//! This code was AUTOGENERATED using the Codama library.
use crate::types::SpotBalanceType;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Debug, Clone, borsh::BorshSerialize, borsh::BorshDeserialize, PartialEq)]
pub struct SpotPosition {
/// The scaled balance of the position. To get the token amount, multiply by
/// the cumulative deposit/borrow interest of corresponding market.
/// precision: SPOT_BALANCE_PRECISION
pub scaled_balance: u64,
/// How many spot non reduce only trigger orders the user has open
/// precision: token mint precision
pub open_bids: i64,
/// How many spot non reduce only trigger orders the user has open
/// precision: token mint precision
pub open_asks: i64,
/// The cumulative deposits/borrows a user has made into a market
/// precision: token mint precision
pub cumulative_deposits: i64,
/// The market index of the corresponding spot market
pub market_index: u16,
/// Whether the position is deposit or borrow
pub balance_type: SpotBalanceType,
/// Number of open orders
pub open_orders: u8,
pub padding: [u8; 4],
}