pub struct PredictionPosition {Show 37 fields
pub avg_price_usd: String,
pub bump: i64,
pub claimable: bool,
pub claimable_at: Option<i64>,
pub claimed: bool,
pub claimed_usd: String,
pub contracts: String,
pub contracts_decimal: Option<String>,
pub contracts_micro: Option<String>,
pub event_id: String,
pub event_metadata: PredictionEventMetadata,
pub fees_paid_usd: String,
pub is_yes: bool,
pub mark_price_usd: Option<String>,
pub market: String,
pub market_id: String,
pub market_id_hash: String,
pub market_metadata: Value,
pub max_slippage_bps: Option<i64>,
pub open_orders: i64,
pub opened_at: i64,
pub owner: String,
pub owner_pubkey: String,
pub payout_usd: String,
pub pnl_usd: Option<String>,
pub pnl_usd_after_fees: Option<String>,
pub pnl_usd_after_fees_percent: Option<f64>,
pub pnl_usd_percent: Option<f64>,
pub pubkey: String,
pub realized_pnl_usd: f64,
pub sell_price_usd: Option<String>,
pub settlement_date: Option<i64>,
pub size_usd: String,
pub source: Option<String>,
pub total_cost_usd: String,
pub updated_at: i64,
pub value_usd: Option<String>,
}Fields§
§avg_price_usd: StringAverage entry price per contract in micro USD (u64 as string)
bump: i64Constraint: minimum=0
claimable: boolTrue when the position qualifies for payout claim
claimable_at: Option<i64>Unix timestamp (seconds) when the position becomes claimable; null when unavailable
claimed: boolWhether payout has been claimed
claimed_usd: StringAmount claimed in micro USD (u64 as string)
contracts: StringLegacy whole-contract quantity held. Use contractsMicro or contractsDecimal for the exact fractional quantity.
contracts_decimal: Option<String>Contracts held as a decimal string
contracts_micro: Option<String>Contracts held in micro-contract units (u64 as string, 1000000 = 1 contract)
event_id: StringExternal event identifier if available
event_metadata: PredictionEventMetadata§fees_paid_usd: StringTotal fees paid in micro USD (u64 as string)
is_yes: boolTrue if this is a YES position
mark_price_usd: Option<String>Current mark price per contract in micro USD (u64 as string); null once market is closed
market: StringDeterministic market PDA derived from marketId
market_id: StringExternal market identifier (ticker)
market_id_hash: StringHashed market identifier used for on-chain PDAs
market_metadata: Value§max_slippage_bps: Option<i64>Maximum slippage recorded for the position, in basis points Constraint: minimum=0
open_orders: i64Number of open orders Constraint: minimum=0
opened_at: i64Unix timestamp when the position was opened
owner: StringPosition owner public key
owner_pubkey: StringPosition owner public key (alias of owner, prefer ownerPubkey going forward)
payout_usd: StringNotional payout if position wins (contracts * $1)
pnl_usd: Option<String>Unrealized PnL in micro USD (i128 as string); null once market is closed
pnl_usd_after_fees: Option<String>Unrealized PnL after fees in micro USD (i128 as string); null once market is closed
pnl_usd_after_fees_percent: Option<f64>Unrealized PnL after fees percentage relative to size; null once market is closed
pnl_usd_percent: Option<f64>Unrealized PnL percentage relative to size; null once market is closed
pubkey: StringPosition account public key
realized_pnl_usd: f64Realized PnL in micro USD (i64 as number)
sell_price_usd: Option<String>Current best exit price for this side (micro USD string), or null when unavailable
settlement_date: Option<i64>Unix timestamp (seconds) when the market settles; null when unavailable
size_usd: StringAlias of total cost basis in micro USD (u128 as string)
source: Option<String>Origin of the position (e.g. “program”)
total_cost_usd: StringTotal cost basis in micro USD (u128 as string)
updated_at: i64Unix timestamp of the last position update
value_usd: Option<String>Mark-to-market value in micro USD (u128 as string); null once market is closed
Trait Implementations§
Source§impl Clone for PredictionPosition
impl Clone for PredictionPosition
Source§fn clone(&self) -> PredictionPosition
fn clone(&self) -> PredictionPosition
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more