This commit is contained in:
aaron 2024-07-25 16:32:21 +08:00
parent 9a23417e84
commit 89fb681d02
2 changed files with 5 additions and 2 deletions

View File

@ -26,7 +26,8 @@ def _get_top_coins_by_market_cap(top):
# 获取Binance上的USDT交易对信息
def _get_binance_usdt_pairs():
url = "https://api.binance.com/api/v3/exchangeInfo"
response = requests.get(url)
urllib3.disable_warnings(category=urllib3.exceptions.InsecureRequestWarning)
response = requests.get(url, verify=False)
data = response.json()
usdt_pairs = [symbol['symbol'] for symbol in data['symbols'] if (symbol['quoteAsset'] == 'USDT' and symbol['status'] == 'TRADING')]

View File

@ -1,5 +1,6 @@
import requests
import setting
import urllib3
# 发送消息
def send_message(chat_id, text):
@ -8,4 +9,5 @@ def send_message(chat_id, text):
"chat_id" : chat_id,
"text" : text
}
requests.post(url, data= formData)
urllib3.disable_warnings(category=urllib3.exceptions.InsecureRequestWarning)
requests.post(url, data= formData, verify=False)