Expand description
Hydromancer WebSocket feed for real-time order updates, fills, and positions.
Subscribes to userOrderUpdates and userFills for tracked accounts via
Hydromancer’s WebSocket API. Maintains current position state per account.
On boot and reconnect: fetches portfolioState from Hydromancer API to seed
position snapshots and catch missed fills. Uses the portfolio endpoint (not raw
clearinghouseState) so that spot USDC balances are included in account equity
for unified accounts.
Structs§
- Account
State - Full account state: equity + positions.
- Fill
Event - A fill event from Hydromancer WS.
- Hydromancer
Feed Service - Order
Update - An order update event from Hydromancer WS.
- Perp
Position - A perp position snapshot for one coin.
Enums§
- Hydromancer
Event - Events emitted by the feed service.
Functions§
- parse_
portfolio_ 🔒state - Parse
portfolioStateresponse which wraps data underclearinghouseStateandspotClearinghouseStatekeys. Computes unified account value asperp_account_value + spot_usdc_balance.