Handle ws style symbol schema
parent
4c0f2099aa
commit
214f864dcf
|
@ -264,6 +264,7 @@ class Client:
|
||||||
size: float,
|
size: float,
|
||||||
reqid: str = None,
|
reqid: str = None,
|
||||||
validate: bool = False # set True test call without a real submission
|
validate: bool = False # set True test call without a real submission
|
||||||
|
|
||||||
) -> dict:
|
) -> dict:
|
||||||
'''
|
'''
|
||||||
Place an order and return integer request id provided by client.
|
Place an order and return integer request id provided by client.
|
||||||
|
@ -278,7 +279,9 @@ class Client:
|
||||||
if reqid is None:
|
if reqid is None:
|
||||||
# Build order data for kraken api
|
# Build order data for kraken api
|
||||||
data |= {
|
data |= {
|
||||||
"ordertype": "limit", "type": action, "volume": str(size)
|
"ordertype": "limit",
|
||||||
|
"type": action,
|
||||||
|
"volume": str(size),
|
||||||
}
|
}
|
||||||
return await self.endpoint('AddOrder', data)
|
return await self.endpoint('AddOrder', data)
|
||||||
else:
|
else:
|
||||||
|
@ -453,6 +456,10 @@ def normalize_symbol(
|
||||||
remap = {
|
remap = {
|
||||||
'XXBTZEUR': 'XBTEUR',
|
'XXBTZEUR': 'XBTEUR',
|
||||||
'XXMRZEUR': 'XMREUR',
|
'XXMRZEUR': 'XMREUR',
|
||||||
|
|
||||||
|
# ws versions? pretty weird..
|
||||||
|
'XBT/EUR': 'XBTEUR',
|
||||||
|
'XMR/EUR': 'XMREUR',
|
||||||
}
|
}
|
||||||
symlen = len(ticker)
|
symlen = len(ticker)
|
||||||
if symlen != 6:
|
if symlen != 6:
|
||||||
|
|
Loading…
Reference in New Issue