AuroraDAO / idex-api-docs

IDEX API documentation (work in progress)
81 stars 27 forks source link

How to extract name or id of coin? #25

Closed anaamnizami closed 6 years ago

anaamnizami commented 6 years ago

when we query for all possible tickers we get this kind of response but here we don`t have any key associated with names like no key is associated with ETH_SAN value, could you please tell me how we are suppose to extract name from this object i am using nodejs. { ETH_SAN: { last: '0.000981', high: '0.0010763', low: '0.0009777', lowestAsk: '0.00098151', highestBid: '0.0007853', percentChange: '-1.83619353', baseVolume: '7.3922603247161', quoteVolume: '7462.998433' }, ETH_LINK: { last: '0.001', high: '0.0014', low: '0.001', lowestAsk: '0.002', highestBid: '0.001', percentChange: '-28.57142857', baseVolume: '13.651606265667369466', quoteVolume: '9765.891979953083752189' } // all possible markets follow ... }

raypulver commented 6 years ago

If I understand right you want to enumerate the keys in the response object? Use Object.keys

fubar commented 6 years ago

@anaamnizami If you need further details about a currency, you can use the returnCurrencies endpoint. See https://github.com/AuroraDAO/idex-api-docs#returncurrencies