#[non_exhaustive]pub struct Position {Show 27 fields
pub proxy_wallet: String,
pub asset: String,
pub condition_id: String,
pub size: f64,
pub avg_price: f64,
pub initial_value: f64,
pub gross_initial_value: Option<f64>,
pub entry_fees_usdc: Option<f64>,
pub current_value: f64,
pub cash_pnl: f64,
pub percent_pnl: f64,
pub total_bought: f64,
pub realized_pnl: f64,
pub percent_realized_pnl: f64,
pub cur_price: f64,
pub redeemable: bool,
pub mergeable: bool,
pub title: String,
pub slug: String,
pub icon: Option<String>,
pub event_slug: Option<String>,
pub outcome: String,
pub outcome_index: u32,
pub opposite_outcome: String,
pub opposite_asset: String,
pub end_date: Option<String>,
pub negative_risk: bool,
}Expand description
User position in a market
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.proxy_wallet: StringProxy wallet address
asset: StringAsset identifier (token ID)
condition_id: StringCondition ID of the market
size: f64Position size (number of shares)
avg_price: f64Average entry price
initial_value: f64Initial value of position
gross_initial_value: Option<f64>Remaining entry basis including attributed BUY fees.
initial_value and avg_price
keep their fee-exclusive semantics, so the fee-exclusive basis is
gross_initial_value - entry_fees_usdc. None means upstream omitted
the field — treat that as unavailable, not as zero.
entry_fees_usdc: Option<f64>Attributed BUY-fee component of gross_initial_value.
SELL fees are exit costs and are never included. Upstream returns an
explicit 0 when the component is zero, so Some(0.0) (a measured
zero) and None (no data) are different answers.
current_value: f64Current value of position
cash_pnl: f64Cash profit and loss
percent_pnl: f64Percentage profit and loss
total_bought: f64Total amount bought
realized_pnl: f64Realized profit and loss
percent_realized_pnl: f64Percentage realized P&L
cur_price: f64Current market price
redeemable: boolWhether position is redeemable
mergeable: boolWhether position is mergeable
title: StringMarket title
slug: StringMarket slug
icon: Option<String>Market icon URL
event_slug: Option<String>Event slug
outcome: StringOutcome name (e.g., “Yes”, “No”)
outcome_index: u32Outcome index (0 or 1 for binary markets)
opposite_outcome: StringOpposite outcome name
opposite_asset: StringOpposite outcome asset ID
end_date: Option<String>Market end date
negative_risk: boolWhether this is a negative risk market