Does anyone know how to print the JSON results from the Binance's API? I've been using this to get_all_tickers
which returns all symbols and prices. I want to be able to select a certain symbol and price and display it live in the terminal continuously or until the user exits. I'm using this library.
my code:
url = 'https://api.binance.com/api/v3/ticker/price'
response = reqs.get(url) # To execute get request
print(response.status_code) # To print http response code
print(response.content)
print(response.json) # To print formatted JSON response
output:
200
{
"userId": 1,
"id": 1,
"title": "market data",
"completed": False
}