Saltar al contenido principal

Market Data

The public BAPI search endpoint — the most queried Binance P2P endpoint. No authentication required.

Semantic Gotcha: tradeType

tradeType=BUY means "I want to buy" — it returns SELL ads (sellers).tradeType=SELL returns BUY ads (buyers). This is from the searcher's perspective, not the advertiser's.

EP-0: Search Ads (Public)

No AuthAutoP2P VerifiedCritical

The publisherType Secret

The publisherType parameter is undocumented but critical.

Without publisherType: "merchant", some markets (e.g., USDT/USD) return userType: "user" for all advertisers — including verified merchants. Post-filtering by userType would incorrectly exclude real merchants.

Discovered by reverse-engineering Binance's web UI when toggling the "Verified Merchants" filter. See Undocumented Features for more.

Stealth Headers

The public BAPI endpoint applies soft rate limiting based on request headers. Using default library headers (e.g., python-httpx/0.27) triggers empty responses sooner. AutoP2P rotates browser-like User-Agent and headers to avoid soft limits.

Pagination

Maximum rows: 20 per request. For deeper order book analysis, paginate with 100ms delay between pages:

async def search_all_pages(asset, fiat, trade_type, max_pages=5):
    all_ads = []
    for page in range(1, max_pages + 1):
        data = await search_ads(asset, fiat, trade_type, page=page)
        if not data:
            break  # Empty = no more results (or soft rate limit)
        all_ads.extend(data)
        await asyncio.sleep(0.1)  # 100ms inter-page delay
    return all_ads

Utility: Server Time

No AuthAutoP2P Verified