From 214f864dcf54273b97580a223130e6898dca025d Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Sun, 3 Jul 2022 14:37:15 -0400 Subject: [PATCH] Handle ws style symbol schema --- piker/brokers/kraken/api.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/piker/brokers/kraken/api.py b/piker/brokers/kraken/api.py index 68bdde6e..fa167cf4 100644 --- a/piker/brokers/kraken/api.py +++ b/piker/brokers/kraken/api.py @@ -264,6 +264,7 @@ class Client: size: float, reqid: str = None, validate: bool = False # set True test call without a real submission + ) -> dict: ''' Place an order and return integer request id provided by client. @@ -278,7 +279,9 @@ class Client: if reqid is None: # Build order data for kraken api data |= { - "ordertype": "limit", "type": action, "volume": str(size) + "ordertype": "limit", + "type": action, + "volume": str(size), } return await self.endpoint('AddOrder', data) else: @@ -453,6 +456,10 @@ def normalize_symbol( remap = { 'XXBTZEUR': 'XBTEUR', 'XXMRZEUR': 'XMREUR', + + # ws versions? pretty weird.. + 'XBT/EUR': 'XBTEUR', + 'XMR/EUR': 'XMREUR', } symlen = len(ticker) if symlen != 6: