Skip to content

Commit dae8e59

Browse files
authored
Merge pull request #484 from pikers/pps_precision_hotfixes
Pps precision hotfixes
2 parents 6cd1857 + aba238e commit dae8e59

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

piker/brokers/kraken/feed.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ async def open_symbol_search(
453453
score_cutoff=50,
454454
)
455455
# repack in dict form
456-
await stream.send(
457-
{item[0]['altname']: item[0]
458-
for item in matches}
459-
)
456+
await stream.send({
457+
pair[0].altname: pair[0]
458+
for pair in matches
459+
})

piker/pp.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,16 @@ def to_pretoml(self) -> tuple[str, dict]:
199199
sym_info = s.broker_info[broker]
200200

201201
d['asset_type'] = sym_info['asset_type']
202-
d['price_tick_size'] = sym_info['price_tick_size']
203-
d['lot_tick_size'] = sym_info['lot_tick_size']
202+
d['price_tick_size'] = (
203+
sym_info.get('price_tick_size')
204+
or
205+
s.tick_size
206+
)
207+
d['lot_tick_size'] = (
208+
sym_info.get('lot_tick_size')
209+
or
210+
s.lot_tick_size
211+
)
204212

205213
if self.expiry is None:
206214
d.pop('expiry', None)

0 commit comments

Comments
 (0)