Skip to content

Instantly share code, notes, and snippets.

@PatrickAlphaC
Created January 21, 2020 17:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PatrickAlphaC/1a519fe106812dfe6322ce2b7991560c to your computer and use it in GitHub Desktop.
Save PatrickAlphaC/1a519fe106812dfe6322ce2b7991560c to your computer and use it in GitHub Desktop.
Simple Tradier Sandbox startup
import requests
import json
ticker = 'TSLA'
# Only US tickers in the developer account
token = 'XXXXX'
# Get a sandbox/developer token here: https://developer.tradier.com/
headers = {'Authorization': 'Bearer {}'.format(token),
'Accept': 'application/json'}
response = requests.get('https://sandbox.tradier.com/v1/markets/quotes',
params={'symbols': ticker},
headers=headers)
print(response.json())
# Python SDKs are also available
# https://github.com/cablehead/python-tradier
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment