A
A
Andrey2017-06-19 21:27:53
Python
Andrey, 2017-06-19 21:27:53

How to pull the value of a variable in Python obtained from the API?

Through api from one site I get this thing...
{'USD_RUB': {'ask_quantity': '59081.20489772', 'ask_amount': '4335615.62096964', 'ask_top': '59.28', 'bid_quantity': '117089.84408971', ' bid_amount': '4621551.63779326', 'bid_top': '59.04'
I need to somehow extract the knowledge of 'ask_top' from all this, i.e. 59.28 how to do it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eugene, 2017-06-19
@immaculate

response.json()['USD_RUB']['ask_top']

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question