bybit/models/insurance_summary.rs
1use crate::prelude::*;
2
3/// Summarizes the insurance fund data for Bybit’s perpetual futures.
4/// The insurance fund absorbs losses when a trader’s position is liquidated below the bankruptcy
5/// price (bust price), preventing auto-deleveraging of other traders.
6#[derive(Serialize, Deserialize, Clone, Debug)]
7#[serde(rename_all = "camelCase")]
8pub struct InsuranceSummary {
9 /// Timestamp of the last update to the insurance fund (Unix epoch in milliseconds).
10 /// Bots use this to verify the recency of the data, as outdated fund balances could signal risk.
11 #[serde(with = "string_to_u64")]
12 pub updated_time: u64,
13
14 /// List of insurance fund entries for different coins.
15 /// Each entry details the fund’s balance for a specific cryptocurrency, used to assess
16 /// Bybit’s capacity to cover losses in perpetual futures.
17 pub list: Vec<Insurance>,
18}