Get price from api json

Hi,
I'm trying to get the price of this api:
https://api.binance.com/api/v3/ticker/price
which looks like this:

0
symbol "ETHBTC"
price "0.03270600"
one
symbol "LTCBTC"
price "0.00336400"
two
symbol "BNBBTC"
price "0.00516560"
3
symbol "NEOBTC"
price "0.00087900"
4
symbol "QTUMETH"
price "0.00532100"

I need to see the price when placing the symbol name in the box. I have tried to do it this way but it has not worked.

imagen

Can someone help me please. Thanks

That is not JSON formatted data.
This is JSON:

[{"symbol":"ETHBTC","price":"0.03261900"},{"symbol":"LTCBTC","price":"0.00335300"},{"symbol":"BNBBTC","price":"0.00520390"},{,{"symbol":"LUNAEUR","price":"15.96700000"}]

(Clipped to fit the board limit)
It decodes as a list of dictionaries, so you will have to post-process it into a single dict with the symbols as keys and the values under them.

Try like this:

image

1 Like

Excellent. It worked very well. Thankssss !!!!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.