Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

Commit

Permalink
Add Execution.pendingPriceRevision field (socket protocol 178)
Browse files Browse the repository at this point in the history
  • Loading branch information
erdewit committed Sep 1, 2023
1 parent 6755bb3 commit 1846f2a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ib_insync/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class Client:
RequestsInterval = 1

MinClientVersion = 157
MaxClientVersion = 177
MaxClientVersion = 178

(DISCONNECTED, CONNECTING, CONNECTED) = range(3)

Expand Down
5 changes: 4 additions & 1 deletion ib_insync/decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,10 @@ def execDetails(self, fields):
ex.evRule,
ex.evMultiplier,
ex.modelCode,
ex.lastLiquidity) = fields
ex.lastLiquidity,
*fields) = fields
if self.serverVersion >= 178:
ex.pendingPriceRevision, *fields = fields

self.parse(c)
self.parse(ex)
Expand Down
1 change: 1 addition & 0 deletions ib_insync/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ class Execution:
evMultiplier: float = 0.0
modelCode: str = ''
lastLiquidity: int = 0
pendingPriceRevision: bool = False


@dataclass
Expand Down

0 comments on commit 1846f2a

Please sign in to comment.