BINANCE SAPI · C2C

Retrieve User Order History With Pagination API

Query paginated historical peer-to-peer (C2C) trade orders using URL query parameters to filter by trade direction and historical timestamp windows.

ENDPOINT
GET /sapi/v1/c2c/orderMatch/listUserOrderHistory
Authentication USER_DATA / SIGNED
API Group C2C / Order Match
Method GET
Response JSON (Paginated)

Overview

This endpoint provides a lightweight, HTTP GET alternative for fetching paginated historical C2C (P2P) orders. It allows developers and merchant accounting software to retrieve historical trades by supplying query parameters such as tradeType, startTimestamp, and endTimestamp.

Trading bots and audit scripts use this endpoint for quick historical sync routines and lightweight data exports without needing to construct complex JSON body payloads.

01

Request Parameters

Parameters accepted in Query string and HTTP Headers.

Parameter In Type Required Description
tradeType Query STRING Optional Filter orders by trade direction (BUY or SELL).
startTimestamp Query INT64 Optional Start timestamp filter in milliseconds.
endTimestamp Query INT64 Optional End timestamp filter in milliseconds.
page Query INT32 Optional Target page number for pagination (starts at 1).
rows Query INT32 Optional Number of records per page (default is typically 10 or 20; maximum 100).
x-gray-env Header STRING Optional Environment flag identifier used for internal gray/stage testing.
x-trace-id Header STRING Optional Custom client trace ID for request lifecycle tracking and debugging.
x-user-id Header STRING Optional Target user identifier for context validation.
i
HTTP GET Query Formatting

All filtering parameters must be supplied as standard URL query parameters (e.g., ?tradeType=BUY&page=1&rows=20).

02

Request Example

Example GET request using cURL to query historical trade history.

cURL BASH
curl -X GET \
'https://api.binance.com/sapi/v1/c2c/orderMatch/listUserOrderHistory?tradeType=BUY&page=1&rows=10&startTimestamp=1786867200000&endTimestamp=1786953600000'
03

Response

Example paginated response returned on successful query execution.

RESPONSE 200 OK
{
    "code": "000000",
    "message": "success",
    "data": {
        "total": 35,
        "page": 1,
        "rows": 10,
        "data": [
            {
                "orderNumber": "202608161234567890",
                "advNo": "1122334455667788",
                "tradeType": "BUY",
                "asset": "USDT",
                "fiat": "USD",
                "fiatSymbol": "$",
                "amount": "500.00",
                "totalPrice": "507.50",
                "unitPrice": "1.015",
                "orderStatus": 4,
                "createTime": 1786950000000,
                "counterPartNickName": "TopTraderGlobal"
            }
        ]
    },
    "success": true
}

Response Fields

Field Type Description
code STRING Standard Binance status code ("000000" indicates success).
data.total INT Total number of historical orders matching query criteria.
data.page INT Current page index.
data.rows INT Number of records returned per page.
data.data ARRAY List of historical C2C order objects.
data.data[].orderNumber STRING Unique order identification string.
data.data[].orderStatus INT Status code reflecting final or current order state.
success BOOLEAN Indicates overall request execution result.
04

How It Works

Workflow for querying historical C2C orders via GET.

01 Construct Query Attach timestamp filters, tradeType, and page size to URL.
02 Send GET Request Query /sapi/v1/c2c/orderMatch/listUserOrderHistory.
03 Process Records Extract transaction details, prices, and counterparty nicknames.
04 Iterate Pages Increment page until all historical records are retrieved.

Common Use Cases

Financial Auditing & Tax Logs

Fetch historical completed P2P trades across quarterly or annual time windows for reporting.

Lightweight Bot Synchronization

Synchronize historical transactions via standard GET requests without constructing JSON payloads.

Merchant Trade Analytics

Calculate total buy/sell volumes and average unit pricing over historical date ranges.



💬
Telegram WhatsApp