示例#1
0
    def __init__(self, symbol: PairSymbolType, level: int = DEFAULT_LEVEL, frequency: int = DEFAULT_FREQUENCY,
                 callbacks: CallbacksType = None):
        super().__init__(callbacks)

        if level not in [0, 5, 10, 20]:
            raise BinanceException(f"Level [{level}] must be one of 0, 5, 10 or 20.")

        if frequency not in [100, 250, 500]:
            raise BinanceException(f"Frequency [{frequency}] must be one of 100, 250 or 500.")

        self.symbol = extract_ws_symbol(symbol)
        self.level = level
        self.frequency = frequency
示例#2
0
    def __init__(self, symbol: PairSymbolType, callbacks: CallbacksType = None):
        super().__init__(callbacks)

        self.symbol = extract_ws_symbol(symbol)
示例#3
0
    def __init__(self, symbol: PairSymbolType, interval: enums.Interval, callbacks: CallbacksType = None):
        super().__init__(callbacks)

        self.interval = interval
        self.symbol = extract_ws_symbol(symbol)
示例#4
0
    def __init__(self, symbol: PairSymbolType, frequency1sec: bool = False, callbacks: CallbacksType = None):
        super().__init__(callbacks)

        self.symbol = extract_ws_symbol(symbol)
        self.frequency1sec = frequency1sec