Created
July 27, 2018 21:24
-
-
Save akhan118/0daf12fbc5ffb7e9fb5c4cb02e5271ba to your computer and use it in GitHub Desktop.
Get Quote
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_quotes(self,symbol): | |
access_token = self.get_access_token().json() | |
access_token = access_token['access_token'] | |
headers={'Content-Type': 'application/x-www-form-urlencoded', | |
'Authorization': 'Bearer {}'.format(access_token)} | |
data = { 'symbol': symbol, 'apikey': self.apikey} | |
authReply = requests.get('https://api.tdameritrade.com/v1/marketdata/quotes', | |
headers=headers, params=data) | |
# print(authReply) | |
return (authReply.json()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment