[][src]Struct quantaxis_rs::qaposition::QA_Postions

pub struct QA_Postions {
    pub preset: CodePreset,
    pub code: String,
    pub instrument_id: String,
    pub user_id: String,
    pub portfolio_cookie: String,
    pub username: String,
    pub position_id: String,
    pub account_cookie: String,
    pub frozen: f64,
    pub name: String,
    pub spms_id: String,
    pub oms_id: String,
    pub market_type: String,
    pub exchange_id: String,
    pub lastupdatetime: String,
    pub volume_long_today: f64,
    pub volume_long_his: f64,
    pub volume_short_today: f64,
    pub volume_short_his: f64,
    pub volume_long_frozen_today: f64,
    pub volume_long_frozen_his: f64,
    pub volume_short_frozen_today: f64,
    pub volume_short_frozen_his: f64,
    pub margin_long: f64,
    pub margin_short: f64,
    pub position_price_long: f64,
    pub position_cost_long: f64,
    pub position_price_short: f64,
    pub position_cost_short: f64,
    pub open_price_long: f64,
    pub open_cost_long: f64,
    pub open_price_short: f64,
    pub open_cost_short: f64,
    pub lastest_price: f64,
    pub lastest_datetime: String,
}

Fields

preset: CodePresetcode: Stringinstrument_id: Stringuser_id: Stringportfolio_cookie: Stringusername: Stringposition_id: Stringaccount_cookie: Stringfrozen: f64name: Stringspms_id: Stringoms_id: Stringmarket_type: Stringexchange_id: Stringlastupdatetime: Stringvolume_long_today: f64volume_long_his: f64volume_short_today: f64volume_short_his: f64volume_long_frozen_today: f64volume_long_frozen_his: f64volume_short_frozen_today: f64volume_short_frozen_his: f64margin_long: f64margin_short: f64position_price_long: f64position_cost_long: f64position_price_short: f64position_cost_short: f64open_price_long: f64open_cost_long: f64open_price_short: f64open_cost_short: f64lastest_price: f64lastest_datetime: String

Implementations

impl QA_Postions[src]

pub fn new(
    code: String,
    user_id: String,
    username: String,
    account_cookie: String,
    portfolio_cookie: String
) -> Self
[src]

pub fn new_with_inithold(
    code: String,
    user_id: String,
    username: String,
    account_cookie: String,
    portfolio_cookie: String,
    volume_long_today: f64,
    volume_long_his: f64,
    volume_short_today: f64,
    volume_short_his: f64,
    open_price_long: f64,
    open_price_short: f64
) -> Self
[src]

pub fn get_price_tick(&mut self) -> f64[src]

pub fn margin(&mut self) -> f64[src]

pub fn settle(&mut self)[src]

pub async fn settle_async(&mut self)[src]

pub fn on_price_change(&mut self, price: f64, datetime: String)[src]

pub fn float_profit_long(&mut self) -> f64[src]

pub fn float_profit_short(&mut self) -> f64[src]

pub fn float_profit(&mut self) -> f64[src]

pub fn get_qifi_position(&mut self) -> Position[src]

pub fn position_profit_long(&mut self) -> f64[src]

pub fn position_profit_short(&mut self) -> f64[src]

pub fn position_profit(&mut self) -> f64[src]

pub fn volume_long(&mut self) -> f64[src]

pub fn volume_short(&mut self) -> f64[src]

pub fn volume_long_frozen(&mut self) -> f64[src]

pub fn volume_short_frozen(&mut self) -> f64[src]

pub fn update_pos(
    &mut self,
    price: f64,
    amount: f64,
    towards: i32
) -> (f64, f64)
[src]

Trait Implementations

impl Clone for QA_Postions[src]

impl Debug for QA_Postions[src]

impl<'de> Deserialize<'de> for QA_Postions[src]

impl Serialize for QA_Postions[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,