Struct Parameters

Source
pub struct Parameters {
Show 14 fields pub amount: Option<String>, pub app_markup_percentage: Option<String>, pub barrier: Option<String>, pub barrier2: Option<String>, pub basis: 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 multiplier: Option<f64>, pub selected_tick: Option<String>, pub symbol: String,
}
Expand description

[Optional] Used to pass the parameters for contract buy.

Fields§

§amount: Option<String>

[Optional] Proposed payout or stake value\n

§app_markup_percentage: Option<String>

[Optional] Markup added to contract prices (as a percentage of contract payout)\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.\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.\n

§basis: Option<String>

[Optional] Indicate whether amount is ‘payout’ or ‘stake’.\n

§contract_type: ContractType

A valid contract-type\n

§currency: String

This can only be the account-holder’s currency\n

§date_expiry: Option<String>

[Optional] Epoch value of the expiry time of the contract. You must either specify date_expiry or duration.\n

§date_start: Option<DateTime<Utc>>

[Optional] For forward-starting contracts, epoch value of the starting time of the contract.\n

§duration: Option<i64>

[Optional] Duration quantity\n

§duration_unit: Option<DurationUnit>

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

§multiplier: Option<f64>

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

§selected_tick: Option<String>

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

§symbol: String

Symbol code\n

Trait Implementations§

Source§

impl Clone for Parameters

Source§

fn clone(&self) -> Parameters

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 Parameters

Source§

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

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

impl<'de> Deserialize<'de> for Parameters

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 Parameters

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>,