21 lines
538 B
Python
21 lines
538 B
Python
import requests
|
|
from monitors import move
|
|
from datasource import crypto
|
|
import talib
|
|
import discord_sender
|
|
from binance.cm_futures import CMFutures
|
|
|
|
|
|
client = CMFutures()
|
|
data = client.funding_rate('BTCUSD_PERP', limit=1)
|
|
|
|
fundingRate = float(data[0]['fundingRate']) * 100
|
|
|
|
text = f"币种: {data[0]['symbol']}\r\n资金费率: {fundingRate} %"
|
|
|
|
|
|
mUrl = "https://discordapp.com/api/webhooks/1285898004641091605/DwIh9yZvrU6TwelVmJr96XBdpFTEEpeFD8GsZpH7rBdwT4UwVyZTrtdmBzS4ae0Ta7PH"
|
|
|
|
discord_sender.send_message(mUrl, '消息内容',text)
|
|
|