Ethereum: Binance API P2P Purchase Search
As a platform for cryptocurrency trading, Binance has made its application subscription publicly available as a platform. When it comes to retrieving purchasing information with Python, users often face problems. In this article, we will look at why you may not see sales information and provide steps to defect and solve the problem.
Why can't I get to the Binance API P2P information?
There are several restrictions on the Binance application subscription to retrieve certain types of information from the platform. Particularly:
- The "Orders" terminal will return the list of all orders, including purchases, but does not explicitly sell information.
- To apply for sales information, you need to use a different end point that provides a more detailed picture of events.
Search for P2P Purchase Information with Python
With Python, the P2P purchasing information in the Binance file is used by the requests' library. We first try to connect to the application interface and then pick up the desired information.
Python
Bring your requests
Bring JSON
![Ethereum: Binance API P2P I can´t see the SELL information using Python](https://shopxperience.in/wp-content/uploads/2025/02/444e6ebb.png)
Set your Binance application subscription
API_KEY = 'Your_API_KEY'
Api_secret = 'Your_api_secret'
url = f'https: //api.binance.com/api/v3/websocket/getatorbook? Symbol = {binaryrycape} & limit = 10 & Timenorce = goods'
Connect_p2p = True
Def get_p2p_orders (symbol, border):
If not connect_p2p:
Print ('Connecting to P2P end point ...')
try:
Answer = Requests.Get (URL)
Data = JSON.LOADS (Response.Text)
Sell_orders = []
The order of the data ['book'] ['Orders']:
If 'bond' == 'buy':
Sell_orders.Append ({
'Symbol': symbol,
'Quantity': floating (order ['quantity']),
'Time': int (order ['time']) // 1000
})
Return the seller
Except for requests.exception.requestException under the name E:
Print (f'error connecting to P2P end point: {e} ')
Return []
Symbol = 'Your_Babarryscape_Symbol'
Sell_orders = get_p2p_orders (symbol, 10)
For an order on Sell_orders:
Print (order)
`
Troubleshooting Tips
Check API documentation : Make sure you are using the right end point and parameters for your binary symbol.
2
Use the felling mechanism : Print error correction messages to identify problems with API or request.
4
By following these steps and failure tips, you should be able to search for P2P purchases successfully from Binance with Python. If you continue to face problems, please provide additional information on installation and your surroundings.