Struct ProposalRequest

Source
pub struct ProposalRequest {
Show 26 fields pub amount: Option<f64>, pub barrier: Option<String>, pub barrier2: Option<String>, pub barrier_range: Option<BarrierRange>, pub basis: Option<String>, pub cancellation: Option<String>, pub contract_type: ContractType, pub currency: String, pub date_expiry: Option<String>, pub date_start: Option<DateTime<Utc>>, pub duration: Option<i64>, pub duration_unit: Option<DurationUnit>, pub growth_rate: Option<f64>, pub limit_order: Option<LimitOrder>, pub loginid: Option<String>, pub multiplier: Option<f64>, pub passthrough: Option<Value>, pub payout_per_point: Option<String>, pub product_type: Option<String>, pub proposal: Value, pub req_id: Option<i64>, pub selected_tick: Option<String>, pub subscribe: Option<String>, pub symbol: String, pub trade_risk_profile: Option<String>, pub trading_period_start: Option<DateTime<Utc>>,
}
Expand description

Gets latest price for a specific contract.

Fields§

§amount: Option<f64>

[Optional] Proposed contract payout or stake, or multiplier (for lookbacks).\n

§barrier: Option<String>

[Optional] Barrier for the contract (or last digit prediction for digit contracts). Contracts less than 24 hours in duration would need a relative barrier (barriers which need +/-), where entry spot would be adjusted accordingly with that amount to define a barrier, except for Synthetic Indices as they support both relative and absolute barriers. Not needed for lookbacks.\n

§barrier2: Option<String>

[Optional] Low barrier for the contract (for contracts with two barriers). Contracts less than 24 hours in duration would need a relative barrier (barriers which need +/-), where entry spot would be adjusted accordingly with that amount to define a barrier, except for Synthetic Indices as they support both relative and absolute barriers. Not needed for lookbacks.\n

§barrier_range: Option<BarrierRange>

[Optional] Barrier range for callputspread.\n

§basis: Option<String>

[Optional] Indicates type of the amount.\n

§cancellation: Option<String>

Cancellation duration option (only for MULTUP and MULTDOWN contracts).\n

§contract_type: ContractType

The proposed contract type\n

§currency: String

This can only be the account-holder’s currency (obtained from payout_currencies call).\n

§date_expiry: Option<String>

[Optional] Epoch value of the expiry time of the contract. Either date_expiry or duration is required.\n

§date_start: Option<DateTime<Utc>>

[Optional] Indicates epoch value of the starting time of the contract. If left empty, the start time of the contract is now.\n

§duration: Option<i64>

[Optional] Duration quantity. Either date_expiry or duration is required.\n

§duration_unit: Option<DurationUnit>

[Optional] Duration unit - s: seconds, m: minutes, h: hours, d: days, t: ticks.\n

§growth_rate: Option<f64>

[Optional] Growth rate of an accumulator contract.\n

§limit_order: Option<LimitOrder>

Add an order to close the contract once the order condition is met (only for MULTUP and MULTDOWN and ‘ACCU’ contracts). Supported orders: take_profit, stop_loss.\n

§loginid: Option<String>

[Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.\n

§multiplier: Option<f64>

[Optional] The multiplier for non-binary options. E.g. lookbacks.\n

§passthrough: Option<Value>

[Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field.\n

§payout_per_point: Option<String>

[Optional] Clients can provide payout_per_point directly, and the barrier will be calculated based on this payout_per_point value.\n

§product_type: Option<String>

[Optional] The product type.\n

§proposal: Value

Field ‘proposal’ mapped to Value due to complexity/potential issues.\n

§req_id: Option<i64>

[Optional] Used to map request to response.\n

§selected_tick: Option<String>

[Optional] The tick that is predicted to have the highest/lowest value - for TICKHIGH and TICKLOW contracts.\n

§subscribe: Option<String>

[Optional] 1 - to initiate a realtime stream of prices. Note that tick trades (without a user-defined barrier), digit trades and less than 24 hours at-the-money contracts for the following underlying symbols are not streamed: R_10, R_25, R_50, R_75, R_100, RDBULL, RDBEAR (this is because their price is constant).\n

§symbol: String

The short symbol name (obtained from active_symbols call).\n

§trade_risk_profile: Option<String>

[Only for Snowball] The trade risk profile for the Snowball contract. Higher risk profile offers higher coupon rate at the expense of higher probability of breaching caution price\n

§trading_period_start: Option<DateTime<Utc>>

[Optional] Required only for multi-barrier trading. Defines the epoch value of the trading period start time.\n

Trait Implementations§

Source§

impl Clone for ProposalRequest

Source§

fn clone(&self) -> ProposalRequest

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ProposalRequest

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ProposalRequest

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for ProposalRequest

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

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