Skip to main content

hypercall_types/
hypercore_position.rs

1use serde::{Deserialize, Serialize};
2
3/// Perp position update from the Hypercore Position Service.
4///
5/// Used for both snapshot (initial sync) and incremental (diff) updates.
6#[derive(Debug, Clone, Serialize, Deserialize)]
7pub struct HypercorePositionUpdate {
8    pub account: String,
9    pub coin: String,
10    pub size: f64,
11    pub entry_price: f64,
12    pub unrealized_pnl: f64,
13    pub timestamp: u64,
14    /// True for full snapshot (initial sync), false for incremental diff
15    pub snapshot: bool,
16}