BINANCE SAPI · C2C

Ads Reference Price API

Retrieve benchmark reference prices for peer-to-peer (C2C) trading based on specific crypto assets, fiat currency, trade side, and payment methods.

ENDPOINT
POST /sapi/v1/c2c/ads/getReferencePrice
Authentication NONE (PUBLIC)
API Group C2C / Ads
Method POST
Response JSON

Overview

This endpoint provides dynamic reference market prices for C2C (P2P) cryptocurrency trading. It enables merchants, trading bots, and pricing algorithms to query baseline rate benchmarks across selected fiat currencies, crypto assets (e.g., USDT, BTC), payment types, and trade direction (BUY/SELL).

Automated market-making bots rely heavily on reference pricing to calculate optimal spread margins and set competitive ad offer prices relative to overall peer-to-peer market conditions.

01

Request Parameters

Parameters accepted in Body and HTTP Headers.

Parameter In Type Required Description
clientType Header STRING Required Client Device Type initiating the request (e.g., WEB, APP).
assets Body ARRAY Required List of target cryptocurrency symbols, e.g., ["USDT", "BTC"].
fiatCurrency Body STRING Required Target fiat currency code (e.g., USD, EUR, UAH).
tradeType Body STRING Required Trade direction: BUY or SELL.
fromUserRole Body STRING Optional User role filter identifier, e.g., MERCHANT or USER.
payType Body STRING Optional Specific payment method code identifier.
x-gray-env Header STRING Optional Environment flag identifier used for internal testing.
x-trace-id Header STRING Optional Custom client trace ID for request lifecycle tracking.
i
JSON Body Payload Required

Ensure requests pass a valid JSON body object containing assets, fiatCurrency, and tradeType, alongside the mandatory clientType header and Content-Type: application/json header.

02

Request Example

Example POST request using cURL.

cURL BASH
curl -X POST \
'https://api.binance.com/sapi/v1/c2c/ads/getReferencePrice' \
-H 'clientType: WEB' \
-H 'Content-Type: application/json' \
-d '{
  "assets": ["USDT"],
  "fiatCurrency": "USD",
  "tradeType": "BUY",
  "fromUserRole": "MERCHANT"
}'
03

Response

Example response returned on successful request.

RESPONSE 200 OK
{
    "code": "000000",
    "message": "success",
    "data": [
        {
            "asset": "USDT",
            "fiatCurrency": "USD",
            "referencePrice": "1.002",
            "priceScale": 3
        }
    ],
    "success": true
}

Response Fields

Field Type Description
code STRING Standard Binance response status code ("000000" indicates success).
data ARRAY List of reference price data objects for requested assets.
data[].asset STRING Cryptocurrency asset symbol evaluated.
data[].fiatCurrency STRING Fiat currency symbol used for pricing reference.
data[].referencePrice STRING Calculated baseline market price for the specified asset/fiat pair.
data[].priceScale INT Number of decimal precision digits for pricing calculations.
04

How It Works

Workflow for querying reference market prices.

01 Define Criteria Select target assets, fiat currency, and trade side.
02 Send Payload Post JSON payload to getReferencePrice endpoint.
03 Read Reference Rate Extract calculated benchmark market price.
04 Set Ad Pricing Adjust dynamic ad markup or algorithm offer prices.

Common Use Cases

Dynamic Ad Repricing

Automatically adjust active C2C advertisement pricing relative to current baseline market benchmarks.

P2P Arbitrage Bots

Identify pricing discrepancies between exchange spot markets and local C2C peer-to-peer rates.

Merchant Spread Analysis

Evaluate optimal bid-ask spread margins for specific payment methods before placing new ads.



💬
Telegram WhatsApp