Browse Source

添加 'GetSortSymbols.py'

master
tzquant_zq 8 months ago
parent
commit
a3f8a95184
1 changed files with 22 additions and 0 deletions
  1. +22
    -0
      GetSortSymbols.py

+ 22
- 0
GetSortSymbols.py View File

@ -0,0 +1,22 @@
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)

Loading…
Cancel
Save