pub struct MarketPositionV1 {Show 16 fields
pub proxy_wallet: String,
pub name: String,
pub profile_image: Option<String>,
pub verified: bool,
pub asset: String,
pub condition_id: String,
pub avg_price: f64,
pub size: f64,
pub curr_price: f64,
pub current_value: f64,
pub cash_pnl: f64,
pub total_bought: f64,
pub realized_pnl: f64,
pub total_pnl: f64,
pub outcome: String,
pub outcome_index: u32,
}Expand description
A per-user position in a single market, as returned by /v1/market-positions.
Field names and types follow the upstream MarketPositionV1 schema in
docs/specs/data/openapi.yaml.
Fields§
§proxy_wallet: StringProxy wallet address of the position holder
name: StringDisplay name of the position holder
profile_image: Option<String>Profile image URL of the position holder
verified: boolWhether the holder has a verified badge
asset: StringOutcome token asset ID
condition_id: StringCondition ID of the market
avg_price: f64Average entry price
size: f64Position size (number of shares)
curr_price: f64Current market price (OpenAPI field: currPrice)
current_value: f64Current value of the position
cash_pnl: f64Unrealized cash P&L
total_bought: f64Total amount bought
realized_pnl: f64Realized P&L
total_pnl: f64Total P&L (cash + realized)
outcome: StringOutcome name (e.g., “Yes”, “No”)
outcome_index: u32Outcome index (0 or 1 for binary markets)
Trait Implementations§
Source§impl Clone for MarketPositionV1
impl Clone for MarketPositionV1
Source§fn clone(&self) -> MarketPositionV1
fn clone(&self) -> MarketPositionV1
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MarketPositionV1
impl Debug for MarketPositionV1
Source§impl<'de> Deserialize<'de> for MarketPositionV1
impl<'de> Deserialize<'de> for MarketPositionV1
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 MarketPositionV1
impl RefUnwindSafe for MarketPositionV1
impl Send for MarketPositionV1
impl Sync for MarketPositionV1
impl Unpin for MarketPositionV1
impl UnsafeUnpin for MarketPositionV1
impl UnwindSafe for MarketPositionV1
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