Query paginated historical chat logs, text conversations, and attached image URLs exchanged between counterparties for a specific peer-to-peer (C2C) order.
/sapi/v1/c2c/chat/retrieveChatMessagesWithPagination
This endpoint enables client applications, merchant CRM software, and dispute auditing tools to retrieve chronological message histories for Binance C2C (P2P) orders.
It supports query parameters including message type filters (text, image), pagination boundaries (page, rows), cursor-based offset tracking using message ID (id), and sorting options.
Automated customer support consoles and dispute resolution systems query this endpoint to populate historical conversation threads and audit proof-of-payment receipts uploaded during trading.
Parameters accepted in Query String and HTTP Headers.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
clientType |
Header | STRING | Required |
Client Device Type initiating the request (e.g., WEB, APP, WEB_MOBILE).
|
page |
Query | INT32 | Required |
Page number to query (starts at 1).
|
rows |
Query | INT32 | Required |
Number of message records to query per page (suggested: 20, maximum: 100).
|
orderNo |
Query | STRING | Optional | Unique C2C order number identifier to filter messages for. |
id |
Query | INT64 | Optional | Query message ID cursor condition. Returns messages with ID less than the provided value. |
chatMessageType |
Query | STRING | Optional |
Filter by message type (e.g., TEXT, IMAGE, SYSTEM).
|
sort |
Query | STRING | Optional |
Sorting direction: asc or desc.
|
order |
Query | STRING | Optional |
Field to order by (e.g., createTime, id).
|
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. |
For infinite scroll chat interfaces, combining page and rows with the id cursor parameter provides smooth scrolling backwards through earlier messages.
Example GET request using cURL to retrieve recent chat messages for an order.
curl -X GET \
'https://api.binance.com/sapi/v1/c2c/chat/retrieveChatMessagesWithPagination?orderNo=202608171234567890&page=1&rows=20&sort=desc' \
-H 'clientType: WEB'
Example paginated response returned on successful query execution.
{
"code": "000000",
"message": "success",
"data": {
"total": 12,
"page": 1,
"rows": 20,
"data": [
{
"id": 1059483721,
"orderNo": "202608171234567890",
"senderUserId": 123456789,
"senderNickName": "MerchantAlpha",
"chatMessageType": "TEXT",
"content": "Payment sent. Please check your bank account and release.",
"createTime": 1786953600000,
"status": 1
},
{
"id": 1059483720,
"orderNo": "202608171234567890",
"senderUserId": 123456789,
"senderNickName": "MerchantAlpha",
"chatMessageType": "IMAGE",
"content": "https://binance-c2c.s3.amazonaws.com/chat/2026/08/17/img_receipt.jpg",
"createTime": 1786953580000,
"status": 1
}
]
},
"success": true
}
| Field | Type | Description |
|---|---|---|
code |
STRING |
Standard Binance status code ("000000" indicates success).
|
data.total |
INT | Total count of chat messages available in this thread. |
data.page |
INT | Current query page index. |
data.rows |
INT | Number of records returned per page. |
data.data |
ARRAY | Array of chat message record objects. |
data.data[].id |
INT64 | Unique chat message record identifier. |
data.data[].senderUserId |
INT64 | User ID of the message author. |
data.data[].chatMessageType |
STRING |
Message format type (e.g., TEXT, IMAGE, SYSTEM).
|
data.data[].content |
STRING | Raw text body or uploaded media URL. |
data.data[].createTime |
LONG | Timestamp when the message was sent (in milliseconds). |
success |
BOOLEAN | Indicates overall request execution result. |
Workflow for retrieving and displaying chat conversation history.
Load complete message dialogues when an operator or user opens an active or archived C2C trade card.
Extract verified chat transcripts and payment receipt URLs to attach as formal evidence during order mediation.
Automatically archive all buyer-seller correspondence into internal merchant databases for compliance auditing.
This article is part of our complete learning guide covering professional cross-exchange cryptocurrency arbitrage.
Explore the Spot Arbitrage Guide →This article is part of our complete learning guide covering Binance P2P automation, merchant tools, and automated trading.
Explore the Binance P2P Automation Guide →