No commit activity in last 3 years
No release in over 3 years
Polygon API.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 10
>= 0
= 0.72.0

Runtime

 Project Readme

polygon-ruby-client

Polygon.io API ruby client

Example usage:

Client config

client = Polygon::Api::Client.new(api_key: 'xxx')

Trades

client.trades(symbol: 'AAPL', date: '2020-08-14', options: {limit: 3})

All trades

client.all_trades(symbol: 'AAPL', date: '2020-08-14'){ |trade| puts trade  }
client.all_trades(symbol: 'AAPL', date: '2020-08-14', options: {timestamp: 1597414943490858428, timestampLimit: 1597430760261736603}){ |trade| puts trade  }

Aggregates

client.aggregates(symbol: 'AAPL', multiplier: 2, timespan: 'minute', from: '1597941120000', to: '1597942920000')
client.aggregates(symbol: 'AAPL', multiplier: 3, timespan: 'minute', from: '2020-08-19', to: '2020-08-20')