kucoin: facepalm, use correct pair fields for price/size ticks

account_tests
Tyler Goodlet 2023-07-26 12:44:41 -04:00
parent 618c461bfb
commit bd0af7a4c0
1 changed files with 5 additions and 2 deletions

View File

@ -74,6 +74,8 @@ from ._util import DataUnavailable
log = get_logger(__name__) log = get_logger(__name__)
_no_symcache: bool = True
class KucoinMktPair(Struct, frozen=True): class KucoinMktPair(Struct, frozen=True):
''' '''
@ -86,14 +88,14 @@ class KucoinMktPair(Struct, frozen=True):
@property @property
def price_tick(self) -> Decimal: def price_tick(self) -> Decimal:
return Decimal(str(self.baseIncrement)) return Decimal(str(self.quoteIncrement))
baseMaxSize: float baseMaxSize: float
baseMinSize: float baseMinSize: float
@property @property
def size_tick(self) -> Decimal: def size_tick(self) -> Decimal:
return Decimal(str(self.baseMinSize)) return Decimal(str(self.quoteMinSize))
enableTrading: bool enableTrading: bool
feeCurrency: str feeCurrency: str
@ -207,6 +209,7 @@ def get_config() -> BrokerConfig | None:
class Client: class Client:
def __init__(self) -> None: def __init__(self) -> None:
self._config: BrokerConfig | None = get_config() self._config: BrokerConfig | None = get_config()
self._pairs: dict[str, KucoinMktPair] = {} self._pairs: dict[str, KucoinMktPair] = {}