1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
| from RhinoLogger.RhinoLoggerObject.RhinoLoggerEnum import LoggerLevel from RhinoLogger.RhinoLoggerObject.RhinoLoggerObject import LoggerConfig from RhinoObject.Base.BaseEnum import ExchangeSub, DealDataType from RhinoObject.Rhino.RhinoEnum import MethodEnum from RhinoObject.Rhino.RhinoObject import SymbolInfo, RedisConfig, SymbolInfos, RhinoConfig
from RhinoCollect.RhinoCollect import RhinoCollect
proxy = None logger_config = LoggerConfig( cmdlevel=LoggerLevel.DEBUG.value, filename='RhinoCollectlogs/log.log' ) rhino_collect_config = RhinoConfig( collect_type=DealDataType.REDIS.value, redis_config=RedisConfig( host=你 redis 的地址, port=你本地redis的 port, password="", is_subscribe=True, is_async=True ) ) symbol_infos = SymbolInfos( subscribes={ ExchangeSub.BINANCEUSWAP.value: True, }, symbols={ ExchangeSub.BINANCEUSWAP.value: [ SymbolInfo( pair="DOGE_BUSD", real_pair="dogebusd", proxy=proxy, symbol_methods=[MethodEnum.GETDEPTHS.value, MethodEnum.GETTRADES.value], time_out=1, ), ], } )
RhinoCollect(logger_config, rhino_collect_config).start(symbol_infos)
|