Book data data on live commercial order with python-banin
As a live merchant boat, it is essentially it is essentially analyzing the order book awareness decisions. In this article we will explore how to extract variables from a trade order book, a merchant commercial commercial.
Prerequisites
*
- Install Required Libraries: “Python-banium ‘,’ Pandas’, and Numpy
- Set your Binisack API credentials
- Run in scripts in a local environment or "use the banning-client's Cli tool
Code *
Python
Import of Panda as PD
From the import client to the import client
Import the Jon
Set Binax API credentials
API_KEY = '"_API_KEY'
API_SECRET = 'your_API_SSECRET'
#Back build a hemorrhage
Clier = pleient (API_KEY = API_KEY, API_SECRET = API_SECRET)
de Get_order_BOOK (symbol):
Get the Trepe Book for the Underline
Depth = Cuper.get_boook (Symbol = Symbol)
Bid extracts and asking for amazing
Biddds = {K: V ['bids'] k, deep ['bids'] ()}}
Asics = {K: V [asks' asks' (asyaks' items)}}
Print out quoted data
Printing (list (Biss.ines), columns = ['symbol', 'bid price']
Print (PD.dattaframe (SK.dattaframe (SKDATATAFRAME (SKDATATAFRAME), columns = ['Symbol', 'ASP ASP'])
Example use
Get_order_book ('btcusdt')
Explaining *
- 1. We prepared super-drink API credentials.
- We create the banium instance credentials.
3.
- We call on the understanding of bids quote and inspiration.
- Finally, we print extracted data in a Pandas Dautam.
Example Output
`
Symbol Bidding Price
0 btcusdt 34657.7
1 btcusdt 34658.8
Ask for the symbol
0 btcusdt 34656.2
1 btcusdt 34659.5
`
Note:
Tips and Varies
- Other things to extract variables, you can change the dictionary probability to suit the gesture.
- If you need additional information, explore the bannine, if you need additional information.
- Rituals and guidelines for collecting book data on live commercial order
I hope you will help you to extract valuable data on live commercial orders!