Binance API / SAPI / C2C
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.

ParameterInTypeRequiredDescription
tradeTypeQuerySTRINGOptionalFilter orders by trade direction (BUY or SELL).
startTimestampQueryINT64OptionalStart timestamp filter in milliseconds.
endTimestampQueryINT64OptionalEnd timestamp filter in milliseconds.
pageQueryINT32OptionalTarget page number for pagination (starts at 1).
rowsQueryINT32OptionalNumber of records per page (default is typically 10 or 20; maximum 100).
x-gray-envHeaderSTRINGOptionalEnvironment flag identifier used for internal gray/stage testing.
x-trace-idHeaderSTRINGOptionalCustom client trace ID for request lifecycle tracking and debugging.
x-user-idHeaderSTRINGOptionalTarget 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

FieldTypeDescription
codeSTRINGStandard Binance status code ("000000" indicates success).
data.totalINTTotal number of historical orders matching query criteria.
data.pageINTCurrent page index.
data.rowsINTNumber of records returned per page.
data.dataARRAYList of historical C2C order objects.
data.data[].orderNumberSTRINGUnique order identification string.
data.data[].orderStatusINTStatus code reflecting final or current order state.
successBOOLEANIndicates 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