`kraken`: parse our source asset key and set on `MktPair.src: str`

pre_overruns_ctxcancelled
Tyler Goodlet 2023-03-21 22:08:43 -04:00
parent 0e0338e217
commit 4447f45430
1 changed files with 5 additions and 0 deletions

View File

@ -509,11 +509,16 @@ class Client:
bs_mktid, pair_info = Client.normalize_symbol(pair_str) bs_mktid, pair_info = Client.normalize_symbol(pair_str)
dst_asset = self.assets[pair_info.base] dst_asset = self.assets[pair_info.base]
# NOTE XXX parse out the src asset name until we figure out
# how to get the src asset's `Pair` info from kraken..
src_key = pair_str.lstrip(dst_asset.name.upper()).lower()
return MktPair( return MktPair(
dst=dst_asset, dst=dst_asset,
price_tick=pair_info.price_tick, price_tick=pair_info.price_tick,
size_tick=pair_info.size_tick, size_tick=pair_info.size_tick,
bs_mktid=bs_mktid, bs_mktid=bs_mktid,
src=src_key,
broker='kraken', broker='kraken',
) )