天择量化公共接口文档
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

22 lines
497 B

import requests
def GetCoinInfo(coin, settle):
url = "http://43.133.213.20:8001/api/v1/get_sort_symbols/"
payload = {"coin": coin, "settle": settle}
response = requests.post(url, json=payload, timeout=5)
if response.status_code == 200:
return response.json()
else:
print(f"Error: {response.status_code}, {response.json()}")
return None
# 示例参数
coin = "BTC"
settle = "USDT"
# 发送请求
CoinInfo = GetCoinInfo(coin, settle)
print(CoinInfo)