diff --git a/GetSortSymbols.py b/GetSortSymbols.py new file mode 100644 index 0000000..9d27d10 --- /dev/null +++ b/GetSortSymbols.py @@ -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) \ No newline at end of file