API Providers
CBOE DataShop (aka LiveVol)
- CBOE LiveVol
- Obtaining OAuth2 Token
- see [[OAuth2 tokens in Python]]
clientId: api_client_xxx
secret: xxx
Alpaca
- alpaca-trade-api-python - or on PyPI
- Alpaca API v2 Documentation
- Step by Step Tutorial Videos
- Paper Trading with the Alpaca API
| Key | Value |
|---|---|
| Endpoint URL | https://paper-api.alpaca.markets |
| API Key ID | XXX |
| Secret Key | xxxxxxxxxxxxx |
Example requests
Account
curl --request GET \
--url https://paper-api.alpaca.markets/v2/account \
--header 'APCA-API-KEY-ID: XXX' \
--header 'APCA-API-SECRET-KEY: XXX'Quotes
#unfinished
Testing websocket with wscat
npm install -g wscat
wscat -c ws://echo.websocket.org
wscat -c wss://stream.data.alpaca.markets/v2/sip
connected (press CTRL+C to quit)
< [{"T":"success","msg":"connected"}]
> {"action": "auth", "key": "XXX", "secret": "XXX"}
< [{"T":"success","msg":"authenticated"}]
> {"action": "subscribe", "trades": ["AAPL"], "quotes": ["UI", "CMBM"], "bars": ["*"]}
< [{"T":"t","i":96921,"S":"AAPL","x":"D","p":126.55,"s":1,"t":"2021-02-22T15:51:44.208Z","c":["@","I"],"z":"C"}]
< [{"T":"q","S":"AMD","bx":"U","bp":87.66,"bs":1,"ax":"X","ap":87.67,"as":1,"t":"2021-02-22T15:51:45.3355677Z","c":["R"],"z":"C"},{"T":"q","S":"AMD","bx":"U","bp":87.66,"bs":1,"ax":"Q","ap":87.68,"as":4,"t":"2021-02-22T15:51:45.335689322Z","c":["R"],"z":"C"},{"T":"q","S":"AMD","bx":"U","bp":87.66,"bs":1,"ax":"X","ap":87.67,"as":1,"t":"2021-02-22T15:51:45.335806018Z","c":["R"],"z":"C"}]
Finnhub
#unfinished
- Finnhub API Documentation
- Sandbox - limited to 60 calls/min
- finnhub-python: Finnhub Python API Client
| Key | Value |
|---|---|
XXX |
|
| API key | xxx |
| Sandbox APIkey | sandbox_xxx |
Earnings Calendar / Estimates
- https://finnhub.io/docs/api/earnings-calendar
- https://finnhub.io/docs/api/company-eps-estimates
- https://finnhub.io/docs/api/company-revenue-estimates
curl -s 'https://finnhub.io/api/v1/calendar/earnings?from=2022-02-01&to=2022-03-019&symbol=NET&token=xxx' | jqPython library
mkvirtualenv finnhub
pip install finnhub-pythonAlfred workflow: earn NET
Polygon.io
Free plan is limited to 5 API calls / minute and only has EOD data
| Key | Value |
|---|---|
| API Key | xxx |
Alpha Vantage
API Documentation | Alpha Vantage
| Key | Value |
|---|---|
| API Key | xxx |
xxx |
video
headings2.mp4