polygon.io
rtd.pub plugin for the polygon.io websocket API.
Usage
Third-party subscription required. We are in no way affiliated with polygon.io but anecdotally, their service was a breeze to integrate with. We will open source (Apache licence) this plugin shortly.
Ensure you read their T&Cs to ensure your use of their platform is compliant, particularly around the individual/business pricing models. You need access to their websocket stocks API with at least a Stocks developer account.
Example configuration
rtdpub:
flushMs: 500
plugins:
path: ./
connectors:
stocks:
uses: polygon-io-stocks
properties:
# optional, can also be set in environment
POLYGON_IO_KEY: "hello"
Usage
Install and sign up to rtd.pub (you'll have to join the wait list for now)
Sign up to polygon.io and create an API key
Add a section under
connectors:
inrtdpub.yaml
as belowAlso add the API key as the connector property
POLYGON_IO_KEY
, or set it as an environment variableIn a sheet:
=rtdpub.Sub("stocks", "AAPL", "s", "vw")
will show the (vw)ap value for the tickerAAPL
using the seconds aggregate=rtdpub.Sub("stocks", "TSLA", "m")
will show the last ((c)lose of aggregate window) value for the tickerTSLA
using the (m)inutes aggregateConsult the polygon.io docs for further properties
Caveats
Only supports delayed feeds, minor fix to address
Waits for the next tick to arrive for a given symbol rather than fetching last value so cells appear as #VALUE! until a value arrives
Addition of custom function metadata for ease of use, for example
=polygonio.StocksVWAP("TSLA", "s")
Last updated