update
This commit is contained in:
parent
d69261446e
commit
d467c9be90
@ -70,7 +70,7 @@ def stratergy_run(symbol, interval, df, debug):
|
||||
def run_crypto(interval, debug=False):
|
||||
print('Vegas策略运行.')
|
||||
time.sleep(5)
|
||||
for s in redis_helper.get_symbols():
|
||||
for s in setting.symbols:
|
||||
df = crypto.get_klines(s, interval, True)
|
||||
stratergy_run(s,interval, df, debug)
|
||||
|
||||
|
||||
@ -1,10 +0,0 @@
|
||||
import redis
|
||||
import json
|
||||
|
||||
r = redis.Redis(host='45.76.104.85', port=6379, db=0 ,password="redis_ihkXTj")
|
||||
|
||||
def get_symbols():
|
||||
data = json.loads(r.get('t_symbols'))
|
||||
print(f'symbols: \r\n{data}')
|
||||
|
||||
return data
|
||||
@ -4,7 +4,6 @@ numpy==1.26.4
|
||||
pandas
|
||||
requests
|
||||
schedule
|
||||
TA_Lib
|
||||
tweepy
|
||||
discord_webhook
|
||||
redis
|
||||
12
test.py
12
test.py
@ -11,12 +11,16 @@ import datasource
|
||||
from binance.um_futures import UMFutures
|
||||
import redis
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# r = redis.Redis(host='45.76.104.85', port=6379, db=0 ,password="redis_ihkXTj")
|
||||
# r.set('r_symbols', "test")
|
||||
|
||||
# print(r.get('r_symbols'))
|
||||
|
||||
print(datasource.crypto.get_future_symbols())
|
||||
# print(datasource.crypto.get_future_symbols())
|
||||
|
||||
# macd_boll.run_crypto('15m', debug=True)
|
||||
|
||||
@ -27,11 +31,15 @@ print(datasource.crypto.get_future_symbols())
|
||||
|
||||
|
||||
|
||||
key = 'QSZvYevTytwi8CJEkiUqqlZRQBOjIa23BoB8wFwTSY26GBAFkViTExex2mFNJ0ij'
|
||||
secret = '1eGO4aeICAxPRXQzw2lQBc0QAkIKn6WiCV4cRLnUwnJulzixYFkoBeho5ZzsKTbn'
|
||||
|
||||
# client = UMFutures()
|
||||
client = UMFutures(key=key, secret=secret)
|
||||
# print(client.exchange_info())
|
||||
# data = client.funding_rate('BTCUSD_PERP', limit=1)
|
||||
|
||||
print(client.balance())
|
||||
|
||||
# fundingRate = float(data[0]['fundingRate']) * 100
|
||||
|
||||
# text = f"币种: {data[0]['symbol']}\r\n资金费率: {fundingRate} %"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user