df_hyperliquid_core/live/account/
state.rs1use crate::account::ClearinghouseState;
6use crate::utils::Address;
7use serde::Deserialize;
8
9#[derive(Debug, Clone, PartialEq, Eq, Deserialize)]
11#[serde(rename_all = "camelCase")]
12pub struct DexState {
13 pub dex: String,
14 pub user: Address,
15 #[serde(rename = "clearinghouseState")]
16 pub state: ClearinghouseState,
17}
18
19#[derive(Debug, Clone, PartialEq, Eq, Deserialize)]
21#[serde(rename_all = "camelCase")]
22pub struct AllDexsState {
23 pub user: Address,
24 #[serde(rename = "clearinghouseStates")]
25 pub states: Vec<(String, ClearinghouseState)>,
26}
27
28#[derive(Debug, Clone, PartialEq, Eq, Deserialize)]
30#[serde(rename_all = "camelCase")]
31pub struct SpotState {
32 pub user: Address,
33 #[serde(rename = "spotState")]
35 pub state: crate::account::SpotState,
36}
37
38#[cfg(test)]
39#[path = "tests/state.rs"]
40mod tests;