streamPositionUpdates(initial, priceStream?) takes a previously fetched getOpenPositions() response and emits an updated payload whenever relevant prices change.
Example
How it works
- the SDK extracts the unique
pairIdvalues frominitial.pairPositions - it subscribes only to those pairs
- on each price tick, it recalculates price-sensitive fields and emits the full updated
OpenPositionsResponse