pub struct Position {Show 25 fields
pub proxy_wallet: String,
pub asset: String,
pub condition_id: String,
pub size: f64,
pub avg_price: f64,
pub initial_value: 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§
§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
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
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Position
impl<'de> Deserialize<'de> for Position
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Position
impl RefUnwindSafe for Position
impl Send for Position
impl Sync for Position
impl Unpin for Position
impl UnwindSafe for Position
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more