Skip to content

Instantly share code, notes, and snippets.

@christianjohnson
christianjohnson / TK API Python Output
Created April 19, 2011 05:34
Not getting correct quote output - something I'm missing?
Request: <request><account>XXXXXXXXXXXX</account><quote><symbol>AAPL</symbol><symbol>SLV</symbol><delayed>false</delayed></quote></request>
Response:
{u'@id': u'XXXXXXXXXXXXXXXX',
u'quotes': {u'instrumentquote': {u'greeks': None,
u'instrument': {u'desc': u'APPLE INC',
u'exch': u'NSD',
u'sectyp': u'CS',
u'sym': u'AAPL'},
######
To use this class:
Replace self.appkey, userkey, secret, account_number
tradeking = TK.TK()
profit = tradeking.get_profit()
#####