From 39af215d61759acb929e531693e06a5153fad6b0 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Wed, 24 May 2023 15:29:42 -0400 Subject: [PATCH] kraken: use new `Position.mkt` attr --- piker/brokers/kraken/broker.py | 2 +- piker/brokers/kucoin.py | 1 - piker/clearing/_paper_engine.py | 3 +-- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/piker/brokers/kraken/broker.py b/piker/brokers/kraken/broker.py index 0a9056af..28f5d026 100644 --- a/piker/brokers/kraken/broker.py +++ b/piker/brokers/kraken/broker.py @@ -402,7 +402,7 @@ def trades2pps( # right since `.broker` is already # included? account='kraken.' + acctid, - symbol=p.symbol.fqme, + symbol=p.mkt.fqme, size=p.size, avg_price=p.ppu, currency='', diff --git a/piker/brokers/kucoin.py b/piker/brokers/kucoin.py index 17376e8d..8cf06300 100755 --- a/piker/brokers/kucoin.py +++ b/piker/brokers/kucoin.py @@ -647,7 +647,6 @@ async def get_mkt_info( tx_tick=digits_to_dec(dst.precision), info=dst.to_dict(), ) - mkt = MktPair( dst=dst_asset, src=src_asset, diff --git a/piker/clearing/_paper_engine.py b/piker/clearing/_paper_engine.py index bf4f0948..44171dbc 100644 --- a/piker/clearing/_paper_engine.py +++ b/piker/clearing/_paper_engine.py @@ -578,8 +578,7 @@ async def trades_dialogue( # for each sym in the ledger load it's `MktPair` info for tid, txdict in ledger.data.items(): - # TODO: switch this to fqme - l_fqme = txdict.get('fqme', txdict['fqsn']) + l_fqme: str = txdict.get('fqme') or txdict['fqsn'] if ( gmi