Swiftpack.co -  AustinWSchaaf/PolygonioSwiftClient as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
Make calls to Polygonio's rest api in swift
.package(url: "https://github.com/AustinWSchaaf/PolygonioSwiftClient.git", from: "v0.9-beta")


Make calls to Polygonio's rest api in swift


Consuming Polygon.io with PolygonioSwiftClient

//first import the package
import PolygonioSwiftClient

//pass your api key to a newly instatiated Polygon object
let client = PolygonioClient(apiKey: apiKey)

//create your desired PolygonQuery - in this case we call the stock aggregate bars query
let query = Query.stock.aggregateBars(ticker: "AAPL",
                                      multiplier: 1,
                                      timespan: .minute,
                                      from: QueryDate(year: 2021, month: 1, day: 28),
                                      to: QueryDate(year: 2021, month: 1, day: 28))

//pass your query to the client object 
client.get(query: query) { (data, res, err) in
    if let err = err{
    if let data = data{
            if let results = try JSONSerialization.jsonObject(with: data, options: []) as? [String:Any]{
                //do something with your data
        }catch let e{


Stars: 0
Last commit: 20 weeks ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Release Notes

PolygonioSwiftClient v.0.9-beta
20 weeks ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API