Перейти к основному содержимому

GET /api/v1/p2p/ads

Retrieve a paginated list of active P2P advertisements. Results include basic user info for each ad owner.

Authentication

Not required.

Request

ParameterTypeInDescription
typestringqueryFilter by ad type: "buy" or "sell"
fiat_currencystringqueryFilter by fiat currency (e.g. "RUB")
amountintegerqueryFilter ads whose min/max range covers this amount (kopecks)
payment_methodstringqueryFilter by payment method (e.g. "sber")
max_payment_durationintegerqueryFilter by max payment duration in minutes (e.g. 15, 30)
is_activestringqueryFilter by active status: "true" or "false"
author_nicknamestringqueryFilter by ad author's nickname
sort_bystringquerySort order: "rating", "orders_count", or "best_price"
limitintegerqueryMaximum number of ads to return (default: 20)
offsetintegerqueryNumber of ads to skip for pagination (default: 0)

Example

curl "https://example.com/api/v1/p2p/ads?type=sell&fiat_currency=RUB&limit=10&offset=0"

Response

200 OK

Returns an object with ads array. Each ad includes embedded user info.

{
"ads": [
{
"id": 42,
"user_id": 7,
"type": "sell",
"fiat_currency": "RUB",
"exchange_rate": 9350,
"min_amount": 50000,
"max_amount": 50000000,
"remaining_amount": 50000000,
"payment_methods": ["sber", "tinkoff"],
"instructions": "Transfer to the card number shown after order creation.",
"is_active": true,
"moderation_status": "approved",
"is_platform_ad": false,
"created_at": "2026-04-04T12:00:00Z",
"updated_at": "2026-04-04T12:00:00Z",
"user": {
"id": 7,
"name": "trader42",
"nickname": "trader42",
"avatar_url": "https://cdn.example.com/avatars/7.png",
"completed_orders": 128,
"p2p_avg_rating": 4.9
},
"user_avg_rating": 4.9
}
]
}

Errors

StatusCodeDescription
400INVALID_REQUESTInvalid query parameters (e.g. unknown type)