Binance API P2P 我无法使用Python查看SELL信息
我一直在尝试使用 Python 从 Binance 获取 P2P 销售数据。运行下面的代码我可以从“买入”部分获取信息,但我无法看到“卖出”部分的信息。你能帮助我吗?
以下代码运行正确,但仅显示 Binance P2P 的 BUY 部分。例如,当我尝试使用此 URL 时 (https: //p2p.binance.com/es/trade/sell/BUSD?fiat=ARS& payment=ALL)没有任何变化。
url_2 = 'https://p2p.binance.com/bapi/c2c/v2/friendly/c2c/adv/search'
p2p = requests.get(url)
q = p2p.text
w = json.loads(q)
e = w['data']
df = pd.json_normalize(e)
df
I´m getting stuck on trying to bring P2P selling data from Binance using Python. Running the code below I can bring the information from de BUY section but I´m not being able to see the information from the SELL section. Can you help me?
The following code runs right but it only shows the BUY section of Binance P2P. When I try to use this URL for example (https://p2p.binance.com/es/trade/sell/BUSD?fiat=ARS&payment=ALL) nothing changes.
url_2 = 'https://p2p.binance.com/bapi/c2c/v2/friendly/c2c/adv/search'
p2p = requests.get(url)
q = p2p.text
w = json.loads(q)
e = w['data']
df = pd.json_normalize(e)
df
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
要访问 p2p 数据,您需要 POST 到 https:// p2p.binance.com/bapi/c2c/v2/Friendly/c2c/adv/search
例如:
您可以根据需要更改数据。 (例如将“Tradetype”更改为“Buy”)不幸的是,API 没有记录,因此计算参数需要进行一些试验和错误。 这个问题有一个很好的参数列表。
To access the p2p data you need to POST to https://p2p.binance.com/bapi/c2c/v2/friendly/c2c/adv/search
So an e.g.:
You can change data accordingly to your needs. (e.g. change "Tradetype" to "Buy") unfortunately the API isn't documented so working out the parameters requires some trial and error. This Question has a good list of the parameters.