How to use

Hello, i’d like to use to collect price and qty but i can’t figure out how to actually use the information it gives me: let’s say i only want the price and qty of the first bid on BTC, how do i select those infos from the return the function gives me ?

There are several 3rd party packages written in python and they may use different method to wrap the response. But you can refer to the document here and see how the original object look like.

1 Like

thx but i just don’t understand how to extract what i want even tho i think i understand how is organized the response, ex:

Here’s the code:

from binance_f import RequestClient
from binance_f.constant.test import *

request_client = RequestClient(api_key=g_api_key, secret_key=g_secret_key)
result = request_client.get_order_book(symbol = "BTCUSDT", limit = 10)

And the response:


Process finished with exit code 0

Now i know the first bid is [“58876.56”,“3.673”] but how do i extract that info from the dictionary ?

This is a python programming question. You can go research on how to handle json objects on python. If you have gotten the data you want, handling it in Python is trivial.

1 Like