use serde::Deserialize;
#[derive(Debug, Clone, Deserialize, Default)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct LoanCurrencyData {
pub ccy: String,
pub amt: String,
}
#[derive(Debug, Clone, Deserialize, Default)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct RiskWarningData {
pub inst_id: String,
pub liq_px: String,
}
#[derive(Debug, Clone, Deserialize, Default)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct FlexibleLoanInfo {
pub ord_id: Option<String>,
pub loan_notional_usd: String,
pub loan_data: Vec<LoanCurrencyData>,
pub collateral_notional_usd: String,
pub collateral_data: Vec<LoanCurrencyData>,
pub risk_warning_data: RiskWarningData,
pub cur_ltv: String,
pub margin_call_ltv: String,
pub liq_ltv: String,
}
#[derive(Debug, Clone, Deserialize, Default)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct DcdCurrencyPair {
pub base_ccy: String,
pub quote_ccy: String,
pub opt_type: String,
pub uly: String,
}
#[derive(Debug, Clone, Deserialize, Default)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct DcdProduct {
pub abs_yield: String,
pub annualized_yield: String,
pub base_ccy: String,
pub quote_ccy: String,
pub exp_time: String,
pub interest_accrual_time: String,
pub list_time: String,
pub max_size: String,
pub min_size: String,
pub notional_ccy: String,
pub opt_type: String,
pub product_id: String,
pub quote_time: String,
pub redeem_end_time: String,
pub redeem_start_time: String,
pub step_sz: String,
pub trade_end_time: String,
pub strike: String,
pub uly: String,
}
#[derive(Debug, Clone, Deserialize, Default)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct DcdQuote {
pub abs_yield: String,
pub annualized_yield: String,
pub interest_accrual_time: String,
pub notional_sz: String,
pub notional_ccy: String,
pub product_id: String,
pub quote_id: String,
pub valid_until: String,
pub idx_px: String,
}
#[derive(Debug, Clone, Deserialize, Default)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct DcdTradeResult {
pub quote_id: String,
pub ord_id: String,
pub state: String,
}
#[derive(Debug, Clone, Deserialize, Default)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct DcdRedeemQuote {
pub ord_id: String,
pub quote_id: String,
pub redeem_ccy: String,
pub redeem_sz: String,
pub term_rate: String,
pub valid_until: String,
}
#[derive(Debug, Clone, Deserialize, Default)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct DcdRedeemResult {
pub ord_id: String,
pub state: String,
}
#[derive(Debug, Clone, Deserialize, Default)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct DcdOrderStatus {
pub ord_id: String,
pub state: String,
}
#[derive(Debug, Clone, Deserialize, Default)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct DcdOrderHistoryItem {
pub ord_id: String,
pub quote_id: String,
pub state: String,
pub product_id: String,
pub base_ccy: String,
pub quote_ccy: String,
pub uly: String,
pub strike: String,
pub notional_sz: String,
pub notional_ccy: String,
pub abs_yield: String,
pub annualized_yield: String,
pub yield_sz: String,
pub yield_ccy: String,
pub settle_sz: String,
pub settle_ccy: String,
pub settle_px: String,
pub settle_time: String,
pub exp_time: String,
pub redeem_start_time: String,
pub redeem_end_time: String,
pub c_time: String,
pub u_time: String,
}
#[derive(Debug, Clone, Deserialize, Default)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct StableRewardsProductInfoDetail {
pub ccy: String,
pub settle_ccy: String,
pub sub_fee_rate: String,
pub redempt_fee_rate: String,
pub min_sub_amt: String,
pub min_redeem_amt: String,
pub remaining_sub_quota: String,
pub remaining_redempt_quota: String,
pub can_redeem: bool,
}
#[derive(Debug, Clone, Deserialize, Default)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct StableRewardsProductInfo {
pub details: Vec<StableRewardsProductInfoDetail>,
pub ts: String,
}
#[derive(Debug, Clone, Deserialize, Default)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct StableRewardsQuote {
pub quote_id: String,
pub quote_amt: String,
pub quote_ccy: String,
pub exch_rate: String,
pub fee_rate: String,
pub quote_time: String,
pub ttl_ms: String,
}
#[derive(Debug, Clone, Deserialize, Default)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct StableRewardsTradeResult {
pub quote_id: String,
pub ord_id: String,
}
#[derive(Debug, Clone, Deserialize, Default)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct StableRewardsBalanceDetail {
pub ccy: String,
pub amt: String,
pub total_earn_accrual: String,
pub state: String,
}
#[derive(Debug, Clone, Deserialize, Default)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct StableRewardsBalance {
pub details: Vec<StableRewardsBalanceDetail>,
pub ts: String,
}
#[derive(Debug, Clone, Deserialize, Default)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct StableRewardsApyHistoryItem {
pub rate: String,
pub ts: String,
}
#[derive(Debug, Clone, Deserialize, Default)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct StableRewardsSubscribeRedeemHistoryItem {
#[serde(rename = "type")]
pub type_: String,
pub status: String,
pub ccy: String,
pub settle_ccy: String,
pub ccy_amt: String,
pub settle_ccy_amt: String,
pub fee: String,
pub quote_id: String,
pub ord_id: String,
pub ts: String,
}
#[derive(Debug, Clone, Deserialize, Default)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct OkusdLimitBucket {
pub personal_daily_limit: String,
pub personal_used_amt: String,
pub platform_daily_limit: String,
pub platform_used_amt: String,
pub fee_rate: Option<String>,
}
#[derive(Debug, Clone, Deserialize, Default)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct OkusdSubscribeLimit {
pub personal_daily_limit: String,
pub personal_used_amt: String,
pub platform_daily_limit: String,
pub platform_used_amt: String,
pub fee_rate: Option<String>,
pub max_sub_amt: String,
}
#[derive(Debug, Clone, Deserialize, Default)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct OkusdLimits {
pub sub_limit: OkusdSubscribeLimit,
pub fast_redeem_limit: OkusdLimitBucket,
pub std_redeem_limit: OkusdLimitBucket,
pub ts: String,
}
#[derive(Debug, Clone, Deserialize, Default)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct OkusdSubscribeResult {
pub ord_id: String,
pub cl_ord_id: String,
pub ccy: String,
pub amt: String,
pub okusd_amt: String,
pub state: String,
pub ts: String,
}
#[derive(Debug, Clone, Deserialize, Default)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct OkusdRedeemResult {
pub ord_id: String,
pub cl_ord_id: String,
pub ccy: String,
pub amt: String,
pub fee: String,
pub usdt_amt: String,
pub redeem_type: String,
pub state: String,
pub est_settlement_time: String,
pub ts: String,
}
#[derive(Debug, Clone, Deserialize, Default)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct EthStakingProductInfo {
pub fast_redemption_daily_limit: String,
pub rate: String,
pub redempt_days: String,
pub min_amt: String,
}
#[derive(Debug, Clone, Deserialize, Default)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct SolStakingProductInfo {
pub fast_redemption_avail: String,
pub fast_redemption_daily_limit: String,
pub rate: String,
pub redempt_days: String,
pub min_amt: String,
}
#[derive(Debug, Clone, Deserialize, Default)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct EthStakingCancelRedeemResult {
pub ord_id: String,
}
#[derive(Debug, Clone, Deserialize, Default)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct GlpMakerTaker {
pub maker: String,
pub taker: String,
}
#[derive(Debug, Clone, Deserialize, Default)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct GlpVolumeBuckets {
pub type_a: Option<GlpMakerTaker>,
pub type_b_total: Option<GlpMakerTaker>,
pub tradfi_x2: Option<GlpMakerTaker>,
pub total: GlpMakerTaker,
}
#[derive(Debug, Clone, Deserialize, Default)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct GlpShareBuckets {
pub type_a: Option<GlpMakerTaker>,
pub type_b_adj: Option<GlpMakerTaker>,
pub total: GlpMakerTaker,
}
#[derive(Debug, Clone, Deserialize, Default)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct GlpDailyMetrics {
pub volume: GlpVolumeBuckets,
pub share: GlpShareBuckets,
}
#[derive(Debug, Clone, Deserialize, Default)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct GlpMtdMetrics {
pub volume: GlpVolumeBuckets,
pub share: GlpShareBuckets,
pub mtd_status: String,
pub qualifying_share: GlpMakerTaker,
}
#[derive(Debug, Clone, Deserialize, Default)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct GlpProgramPerformance {
pub program: String,
pub market_maker_business_id: String,
pub enrollment_status: String,
pub market_maker_level_id: String,
pub enrolled_tier_display: String,
pub qualifying_pool: String,
pub qualifying_rows: Vec<String>,
pub daily: GlpDailyMetrics,
pub mtd: GlpMtdMetrics,
}
#[derive(Debug, Clone, Deserialize, Default)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct GlpAccount {
pub master_account_id: String,
pub combined_account_ids: Vec<String>,
}
#[derive(Debug, Clone, Deserialize, Default)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct GlpTodayPerformance {
pub data_ready: bool,
pub data_date: String,
pub account: GlpAccount,
pub programs: Vec<GlpProgramPerformance>,
}
#[derive(Debug, Clone, Deserialize, Default)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct GlpHistoricalPerformanceItem {
pub date: String,
pub volume: GlpVolumeBuckets,
pub share: GlpShareBuckets,
}