jane-cloud / Open-API-SDK-V5

360 stars 212 forks source link

Not acctual issue but need help! #14

Closed p0ntuzz closed 2 years ago

p0ntuzz commented 3 years ago

Hi, How do i grab a single value from a function that returns multiple? Like if im using the get_ticker function for example and i only want to grab the 24H price and store it as an variable to do something with how do i do that without getting all of this returned?

{'code': '0', 'msg': '', 'data': [{'instType': 'SPOT', 'instId': 'ETH-BTC', 'last': '0.075', 'lastSz': '0.086', 'askPx': '0.075', 'askSz': '132971196.739574', 'bidPx': '0.0721', 'bidSz': '23.652', 'open24h': '0.062', 'high24h': '0.07615', 'low24h': '0.0609', 'volCcy24h': '524334416.762623', 'vol24h': '8436393910.5933', 'ts': '1630925573714', 'sodUtc0': '0.062', 'sodUtc8': '0.06199'}]}