Fall back to `con.exchange` in IB ledger fill loop
Use `con.primaryExchange or con.exchange` so `pexch` is populated even when `primaryExchange` is empty (e.g. for certain combo/forex fills). (this commit msg was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-codekraken_stale_ws_token
parent
d06bbec24f
commit
d1eec24ed5
|
|
@ -501,7 +501,7 @@ async def update_ledger_from_api_trades(
|
|||
for fill in fills:
|
||||
con: Contract = fill.contract
|
||||
conid: str = con.conId
|
||||
pexch: str | None = con.primaryExchange
|
||||
pexch: str|None = con.primaryExchange or con.exchange
|
||||
|
||||
if not pexch:
|
||||
cons = await client.get_con(conid=conid)
|
||||
|
|
|
|||
Loading…
Reference in New Issue