Struct P2pAdvertCreateRequest

Source
pub struct P2pAdvertCreateRequest {
Show 23 fields pub amount: String, pub block_trade: Option<BlockTrade>, pub contact_info: Option<String>, pub description: Option<String>, pub eligible_countries: Option<Vec<String>>, pub local_currency: Option<String>, pub loginid: Option<String>, pub max_order_amount: String, pub min_completion_rate: Option<String>, pub min_join_days: Option<i64>, pub min_order_amount: String, pub min_rating: Option<String>, pub order_expiry_period: Option<i64>, pub p2p_advert_create: Value, pub passthrough: Option<Value>, pub payment_info: Option<String>, pub payment_method: Option<String>, pub payment_method_ids: Option<Vec<i64>>, pub payment_method_names: Option<Vec<String>>, pub rate: String, pub rate_type: Option<RateType>, pub req_id: Option<i64>, pub type_: Type,
}
Expand description

Creates a P2P (Peer to Peer) advert. Can only be used by an approved P2P advertiser.

Fields§

§amount: String

The total amount of the advert, in advertiser’s account currency.\n

§block_trade: Option<BlockTrade>

[Optional] Indicates if this is block trade ad or not. Default: 0.\n

§contact_info: Option<String>

[Optional] Advertiser contact information.\n

§description: Option<String>

[Optional] General information about the advert.\n

§eligible_countries: Option<Vec<String>>

[Optional] 2 letter country codes. Counterparties who do not live in these countries will not be allowed to place orders against the advert.\n

§local_currency: Option<String>

[Optional] Local currency for this advert. If not provided, will use the currency of client’s residence by default.\n

§loginid: Option<String>

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

§max_order_amount: String

Maximum allowed amount for the orders of this advert, in advertiser’s account_currency. Should be more than or equal to min_order_amount\n

§min_completion_rate: Option<String>

[Optional] Counterparties who have a 30 day completion rate less than this value will not be allowed to place orders against the advert.\n

§min_join_days: Option<i64>

[Optional] Counterparties who joined less than this number of days ago will not be allowed to place orders against the advert.\n

§min_order_amount: String

Minimum allowed amount for the orders of this advert, in advertiser’s account_currency. Should be less than or equal to max_order_amount.\n

§min_rating: Option<String>

[Optional] Counterparties who have an average rating less than this value will not be allowed to place orders against the advert.\n

§order_expiry_period: Option<i64>

[Optional] Expiry period (seconds) for order created against this ad.\n

§p2p_advert_create: Value

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

§passthrough: Option<Value>

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

§payment_info: Option<String>

[Optional] Payment instructions.\n

§payment_method: Option<String>

[Optional] Payment method name (deprecated).\n

§payment_method_ids: Option<Vec<i64>>

IDs of previously saved payment methods as returned from p2p_advertiser_payment_methods, only applicable for sell ads.\n

§payment_method_names: Option<Vec<String>>

Payment method identifiers as returned from p2p_payment_methods, only applicable for buy ads.\n

§rate: String

Conversion rate from advertiser’s account currency to local_currency. An absolute rate value (fixed), or percentage offset from current market rate (floating).\n

§rate_type: Option<RateType>

Type of rate, fixed or floating.\n

§req_id: Option<i64>

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

§type_: Type

The advertisement represents the intention to perform this action on your Deriv account funds.\n

Trait Implementations§

Source§

impl Clone for P2pAdvertCreateRequest

Source§

fn clone(&self) -> P2pAdvertCreateRequest

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 P2pAdvertCreateRequest

Source§

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

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

impl<'de> Deserialize<'de> for P2pAdvertCreateRequest

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 P2pAdvertCreateRequest

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