簡體   English   中英

如何在Python使用API Binance獲取賬戶信息

[英]How to get account information via using API Binance in Python

我正在嘗試通過使用帶有以下代碼的請求庫來獲取帳戶信息。

在此處輸入圖像描述

import requests

url = 'https://api.binance.com'
api_get_info = '/sapi/v1/accountSnapshot'
hmac_sha256 = 'api_key'
get_account_info = requests.get(url+api_get_info+api_get_info)

print(get_account_info.text) 

我不知道 url 應該是什么樣子。 你們能給我一些想法嗎:)

Binance 有一個官方的 GitHub 存儲庫,其中包含有關這些簽名的示例,您可以在這里查看: https://github.com/binance/binance-signature-examples/blob/master/python/spot/spot.py

請參閱該文件底部的 function send_signed_request()

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM