P2P Advert Create (p2p_advert_create)¶
Creates a P2P (Peer to Peer) advert. Can only be used by an approved P2P advertiser.
Auth Scope(s): payments
-
p2p_advert_create
(amount: Union[int, float, Decimal], max_order_amount: Union[int, float, Decimal], min_order_amount: Union[int, float, Decimal], rate: Union[int, float, Decimal], type: str, contact_info: Optional[str] = None, description: Optional[str] = None, local_currency: Optional[str] = None, payment_info: Optional[str] = None, payment_method: Optional[str] = None, payment_method_ids: Optional[List] = None, payment_method_names: Optional[List] = None, rate_type: Optional[str] = None, passthrough: Optional[Any] = None, req_id: Optional[int] = None) → int¶ Parameters: - amount (Union[int, float, Decimal]) – The total amount of the advert, in advertiser’s account currency.
- max_order_amount (Union[int, float, Decimal]) – Maximum allowed amount for the orders of this advert, in advertiser’s account_currency. Should be more than or equal to min_order_amount
- min_order_amount (Union[int, float, Decimal]) – Minimum allowed amount for the orders of this advert, in advertiser’s account_currency. Should be less than or equal to max_order_amount.
- rate (Union[int, float, Decimal]) – Conversion rate from advertiser’s account currency to local_currency. An absolute rate value (fixed), or percentage offset from current market rate (floating).
- type (str) – The advertisement represents the intention to perform this action on your Deriv account funds.
- contact_info (Optional[str]) – [Optional] Advertiser contact information.
- description (Optional[str]) – [Optional] General information about the advert.
- local_currency (Optional[str]) – [Optional] Local currency for this advert. If not provided, will use the currency of client’s residence by default.
- payment_info (Optional[str]) – [Optional] Payment instructions.
- payment_method (Optional[str]) – [Optional] Payment method name (deprecated).
- payment_method_ids (Optional[List]) – IDs of previously saved payment methods as returned from p2p_advertiser_payment_methods, only applicable for sell ads.
- payment_method_names (Optional[List]) – Payment method identifiers as returned from p2p_payment_methods, only applicable for buy ads.
- rate_type (Optional[str]) – Type of rate, fixed or floating.
- passthrough (Optional[Any]) – [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field.
- req_id (Optional[int]) – [Optional] Used to map request to response.
Returns: req_id
Return type: int
Example¶
binary.api.p2p_advert_create(
description='Please transfer to account number 1234'
type='buy'
amount=100
max_order_amount=50
min_order_amount=20
payment_method='bank_transfer'
rate=4.25
)