Skip to main content

Create/Update Ad

Create a new ad or update an existing ad.

HTTP Request

  • POST /api/v3/fiat/merchant/ads/save_or_update

  • Note: Request parameters should be passed as key=value&key=value in the URL query string. JSON body is not supported.

Required Permission: P2P Deal Ad

Request Parameters

NameTypeMandatoryDescription
advNostringnoAd unique identifier (required when updating)
payTimeLimitintegeryesPayment time limit (minutes)
initQuantityBigDecimalyesInitial tradable quantity
supplyQuantityBigDecimalnoWhen updating an ad, this parameter specifies the number of ads to be added. The value cannot be negative.
reduceQuantityBigDecimalnoWhen updating an ad, this parameter specifies the number of ads to be reduced.
priceBigDecimalyesPrice per unit
coinIdstringyesCrypto coin ID (e.g., BTC, ETH)
countryCodestringnoCountry code
sidestringyesTrade direction: BUY / SELL
advStatusstringnoIf provided during update, also updates ad status. See enum values
fiatUnitstringyesFiat currency type (e.g., USD, EUR)
payMethodstringyesUser payment account ID(s), comma-separated
autoReplyMsgstringnoAuto-reply message
tradeTermsstringnoTrade terms
minSingleTransAmountBigDecimalyesMinimum single trade amount
maxSingleTransAmountBigDecimalyesMaximum single trade amount
kycLevelstringnoRequired KYC level for counterparty
userAllTradeCountMinintegeryesMinimum completed trades required
userAllTradeCountMaxintegeryesMaximum trades limit
maxPayLimitintegernoMax orders per user on this ad
buyerRegDaysLimitintegernoMinimum buyer registration days
priceTypeintegernoPrice type: 0=fixed (default), 1=floating
priceRatioBigDecimalconditionalFloating ratio, required when priceType=1. Range depends on fiat currency config
overVerifystringnoOnly applicable to SELL ads when the advertiser is a verified merchant and additional verification is enabled for the fiat currency. Up to 3 types can be selected.
Format: {"types":[1,3]} or {"types":[1,6],"otherText":"Please provide xxx proof"}
Types:
- 1 = ID Card (ID_CARD)
- 2 = Passport (PASSPORT)
- 3 = Selfie (SELFIE)
- 4 = Proof of Address (UTILITY_BILL)
- 5 = Billing Statement (BILLING)
- 6 = Other (OTHER)
otherText: Required when types includes 6; otherwise, omit this field.
Note: The JSON string must be fully URL-encoded when passed as a query parameter. Otherwise, the gateway may return a 400 error.
Example: overVerify=%7B%22types%22%3A%5B1%2C3%5D%7D
supportKycCountrystringnoRestrict taker KYC country list, comma-separated e.g. US,GB,JP, max 10
merchantTradeEnablebooleannoAllow other merchants to place orders, default true. Only certified/preferred/gold merchants can set to false
onlyTradeKybUserbooleannoOnly KYB enterprise users can place orders, only KYB merchants can set to true
paymethodIdsstringconditionalPayment method type ID list for BUY ads (comma-separated e.g. "1,2"), required for BUY ads instead of payMethod. Get type IDs from /api/payment/user response data[].payMethod. Mutually exclusive with payMethod: SELL ads use payMethod (account instance ID), BUY ads use paymethodIds (method type ID)
displayintegernoAdvertisement visibility.
- 1: Public (default)
- 2: Private advertisement
adsTypeintegernoAd Type: 1: Regular Ad (default), 2: Whitelist Zone Ad. The adDisplayAreaType and Whitelist Zone payment method-related fields only take effect when adsType is set to 2.
adDisplayAreaTypeintegernoAdvertisement display area.
- 1: Display in both the General Zone and Whitelist Zone (default)
- 2: Display in the Whitelist Zone only
securityOrderPaymethodIdsstringnoPayment method type IDs for whitelist zone advertisements (comma-separated). Used for BUY advertisements when adDisplayAreaType=2
securityOrderPaymentInfostringnoPayment account IDs for whitelist zone advertisements (comma-separated). Used for SELL advertisements when adDisplayAreaType=2

Response Parameters

NameTypeDescription
codeinteger0 indicates success
msgstringResult description
datastringAd number (advNo)

Response

{
"code": 0,
"msg": "success",
"data": "a1375750128856004608"
}