bybit/models/insurance.rs
1use crate::prelude::*;
2
3/// Represents an insurance fund entry for a specific cryptocurrency.
4/// Details the fund’s balance and value, which backstops losses in perpetual futures trading.
5#[derive(Serialize, Deserialize, Clone, Debug)]
6#[serde(rename_all = "camelCase")]
7pub struct Insurance {
8 /// The cryptocurrency of the insurance fund (e.g., "BTC").
9 /// Specifies which asset’s fund is being described. Bots must match this with trading pairs.
10 pub coin: String,
11
12 /// The balance of the insurance fund in the specified coin (e.g., 0.5 for 0.5 BTC).
13 /// A larger balance indicates a stronger buffer against liquidations. Bots monitor this to
14 /// gauge exchange stability, as a depleted fund increases counterparty risk.
15 #[serde(with = "string_to_float")]
16 pub balance: f64,
17
18 /// The USD value of the fund balance (e.g., "10000").
19 /// Provides a standardized valuation, useful for comparing fund sizes across coins. Bots use
20 /// this to assess the fund’s adequacy relative to market volatility.
21 pub value: String,
22}