POST /api/v1/p2p/ads
Create a new P2P advertisement to buy or sell USDT for fiat currency.
A sell ad means you are selling USDT in exchange for fiat. A buy ad means you are buying USDT with fiat.
Authentication
Required. Pass a Bearer token in the Authorization header.
Request
| Parameter | Type | In | Description |
|---|---|---|---|
type | string | body | Ad direction: "buy" or "sell" |
fiat_currency | string | body | Fiat currency code (e.g. "RUB") |
exchange_rate | integer | body | Exchange rate; for RUB optional (defaults to 100 = 1:1). Must be positive for non-RUB currencies |
min_amount | integer | body | Minimum order amount in kopecks (fiat) |
max_amount | integer | body | Maximum order amount in kopecks (fiat) |
payment_methods | string[] | body | Accepted payment methods (e.g. ["sber", "tinkoff"]) |
payment_details | object | body | Payment details visible to the counterparty |
instructions | string? | body | Free-text instructions shown to the counterparty (optional) |
Example
curl -X POST https://example.com/api/v1/p2p/ads \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"type": "sell",
"fiat_currency": "RUB",
"exchange_rate": 9350,
"min_amount": 50000,
"max_amount": 50000000,
"payment_methods": ["sber", "tinkoff"],
"payment_details": {
"sber": "4276 **** **** 1234",
"tinkoff": "4377 **** **** 5678"
},
"instructions": "Transfer to the card number shown after order creation."
}'
Response
200 OK
Returns the ID of the created ad.
{
"id": 42
}
Errors
| Status | Code | Description |
|---|---|---|
| 400 | — | Missing or malformed fields (plain text error) |
| 400 | DUPLICATE_AD_TYPE | User already has an active ad of this type |
| 401 | — | Missing or invalid token |
| 500 | CREATE_AD_FAILED | Internal error creating the ad |