tradeType: BUY or SELL (treat as case-insensitive)
limit: 1–20 (default 10)
tradeMethodIdentifiers: pass as a plain string (not JSON array) — e.g. tradeMethodIdentifiers=BANK or tradeMethodIdentifiers=WECHAT. Values must use the identifier field returned by the trade-methods endpoint (see workflow below). ⚠️ Do NOT use JSON array syntax like ["BANK"] — it will return empty results.
Workflow: Compare Prices by Payment Method
When the user wants to compare prices across payment methods (e.g., "Alipay vs WeChat"), follow this two-step flow:
Step 1 — Call trade-methods to get the correct identifiers for the target fiat:
code
GET /bapi/c2c/v1/public/c2c/agent/trade-methods?fiat=CNY
→ [{"identifier":"ALIPAY",...}, {"identifier":"WECHAT",...}, {"identifier":"BANK",...}]
Step 2 — Pass the identifier as a plain string into ad-list via tradeMethodIdentifiers, one payment method per request, then compare:
code
GET /bapi/c2c/v1/public/c2c/agent/ad-list?fiat=CNY&asset=USDT&tradeType=BUY&limit=5&tradeMethodIdentifiers=ALIPAY&tradeMethodIdentifiers=WECHAT
Compare the best price from each result set.
Important: Do not hardcode identifier values like "Alipay" or "BANK". Always call trade-methods first to get the exact identifier strings for the given fiat currency.
Personal Orders (Binance SAPI — Requires Auth)
Base URL: https://api.binance.com
Endpoint
Method
Auth
Usage
/sapi/v1/c2c/orderMatch/listUserOrderHistory
GET
Yes
Order history
/sapi/v1/c2c/orderMatch/getUserOrderSummary
GET
Yes
User statistics
Authentication requirements:
Header: X-MBX-APIKEY
Query: timestamp + signature
Header: User-Agent: binance-wallet/1.0.0 (Skill)
Output Format Guidelines
Price quote
Show both sides when available (best buy / best sell).
Avoid generating parameterized external URLs unless the API returns them.
Placing orders (when user requests):
This skill does NOT support automated order placement.
When user wants to place an order, provide a direct link to the specific ad using the adNo:
code
https://c2c.binance.com/en/adv?code={adNo}
{adNo}: the ad number/identifier from the ad list result
Example: https://c2c.binance.com/en/adv?code=123
This opens the specific ad detail page where user can place order directly with the selected advertisement.
Personal orders
Time format: YYYY-MM-DD HH:mm (UTC+0) — always display in UTC timezone
Include: type, asset/fiat, amount, total, status
Provide a brief summary line (count + totals) when filtering
Time field conversion (for createTime in listUserOrderHistory):
The createTime field returns a Unix timestamp in milliseconds (13 digits).
Convert to human-readable format in UTC+0 timezone:
code
# Python example
from datetime import datetime, timezone
readable_time = datetime.fromtimestamp(createTime / 1000, tz=timezone.utc).strftime('%Y-%m-%d %H:%M (UTC+0)')
# JavaScript example
const readableTime = new Date(createTime).toISOString().replace('T', ' ').slice(0, 16) + ' (UTC+0)';
// Or more explicitly:
const date = new Date(createTime);
const readableTime = date.getUTCFullYear() + '-' +
String(date.getUTCMonth() + 1).padStart(2, '0') + '-' +
String(date.getUTCDate()).padStart(2, '0') + ' ' +
String(date.getUTCHours()).padStart(2, '0') + ':' +
String(date.getUTCMinutes()).padStart(2, '0') + ' (UTC+0)';
Always display the converted time to users with timezone info, not the raw timestamp.
Error Handling (User-Facing)
Invalid API key (-2015): prompt to verify .env / API Management.
Signature failed (-1022): warn about wrong secret, sorted params, or stale timestamp.
Timestamp invalid (-1021): advise time sync / regenerate timestamp.
Rate limit: ask to retry later.
Limitations (By Design)
This skill does NOT:
Place/cancel orders
Mark as paid / release coins
Initiate new appeals / submit-complaint (only evidence supplement for existing appeals is supported)
Post/modify advertisements (Phase 1/2 only — Phase 3 adds ad management for merchants)
Expose sensitive order-detail endpoints beyond what's needed for history/summary
For in-app actions, guide users to the official P2P orders page (only as a general entry point).
Developer Notes
Version Check (First Invocation per Conversation)
On the first invocation of this skill per conversation, call:
GET /bapi/c2c/v1/public/c2c/agent/check-version?version=2.0.0 (Base: https://www.binance.com)
Behavior:
If needUpdate=true: show: New version of P2P Skill is available (current: {clientVersion}, latest: {latestVersion}), update recommended.
Else / on failure: proceed silently.
Client-side operations
Asset filtering: if API doesn't support it, fetch then filter locally.
Aggregations: compute totals client-side when summary endpoint is insufficient.
Phase 3 — Order & Appeal + Ad Publish & Management
Phase 3 extends the skill from read-only market/order queries to write operations (ad management) and advanced order workflows (order detail, appeal/complaint tracking).
Phase 3 Design Constraints
Constraint
Details
Authentication
All Phase 3 features require API Key + Secret Key
Write-op confirmation
Any write operation (publish ad, update ad, change status) must show an operation summary and get explicit user confirmation before executing
API Key permissions
Phase 1 only needed "Enable Reading"; Phase 3 additionally needs write permissions for ad management
Privacy masking
Never display counterparty sensitive info (bank card, Alipay account, phone, email, real name) or internal IDs (payId). Even if the API returns these fields, filter them out in user-facing output. For payment methods, show only tradeMethodName (e.g. "支付宝")
Scene 1: Order Query & Appeal Handling
1.1 Query Order Detail
Trigger examples:
"查看订单 20260315123456 的详情"
"我最近那笔 USDT 买入订单怎么样了?"
"帮我查一下这个订单号"
"Show me the details of order 20260315123456"
Behavior:
If user provides an order number → call getUserOrderDetail
If user describes an order vaguely → call listOrders with filters, then let user pick
Based on order status, branch:
Status branch handling:
Status
Action
Completed (4)
Show full timeline (create → pay → confirm → complete), finish
Cancelled (6) / Expired (7)
Show cancel reason (timeout / manual / system), finish
If status=1 (Unpaid): show "Payment deadline: {notifyPayEndTime}" with remaining time
If status=2 (Paid): show "Release deadline: {confirmPayEndTime}" with remaining time
1.2 View Appeal / Complaint Status
Trigger:
Automatically when order status = In Appeal (5)
"这个申诉进展到哪了?"
"订单 20260315123456 的申诉怎么样了?"
"What's the appeal status?"
Behavior:
Call query-complaints with the order number
Display complaint info in structured format
Output format:
code
⚠️ Appeal Status for Order {orderNo}
├─ Complaint No: {complaintNo}
├─ Status: {complaintStatus description}
├─ Role: {roleIdentity} (COMPLAINANT / RESPONDENT)
├─ Reason: {reason}
├─ Created: {complaintCreateTime}
├─ Order Asset: {orderAsset} | Fiat: {orderFiat}
├─ Order Amount: {orderAmount} ({fiatSymbol})
├─ Amount in USDT: {orderAmountInUsdt}
└─ Dispute Amount: {disputeAmount}
Follow-up guidance (append after the status block, based on complaintStatus):
complaintStatus
Guidance to show
0 (Respondent Processing)
"Waiting for the counterparty to respond. You will be notified when there is an update."
1 (Complainant Processing)
"⚡ Action needed — you need to provide evidence or respond. Say "submit evidence for order {orderNo}" to upload proof now."
2 (CS Processing)
"💡 Both parties may still submit evidence at this stage. You can submit evidence directly through this skill — say "submit evidence for order {orderNo}" or "提交证据" to upload payment proof, screenshots, or other supporting documents."
3 (Completed)
"This appeal has been resolved."
4 (Cancelled)
"This appeal has been cancelled."
MUST follow: When complaintStatus is 0, 1, or 2 (appeal still active), NEVER tell the user to "go to the app" or "head to the dispute center". Always guide them to use this skill to submit evidence. The skill supports the full evidence upload flow (Scene 1.5).
Complaint status mapping:
Status Code
Display Name
Description
0
Respondent Processing (被申诉人处理中)
Complaint initiated, waiting for counterparty to respond
1
Complainant Processing (申诉人处理中)
Waiting for complainant to provide evidence or take action
2
CS Processing (客服处理中)
Customer service reviewing; both parties may submit evidence
3
Completed (已完成)
Appeal resolved
4
Complaint Cancelled (申诉取消)
Appeal withdrawn
Important: Do NOT confuse these with orderStatus codes — they are separate enums.
When complaintStatus=2 (CS Processing), the user should be guided to submit evidence if needed; do NOT tell them to "wait for counterparty".
1.3 Complaint History Query
Trigger:
"查看我的所有申诉记录"
"最近3个月有哪些申诉?"
"List my complaints as complainant"
Behavior:
Call query-complaints with optional filters (roleIdentity, status, date range)
Default: last 90 days if no date specified
Show paginated results
Output format:
code
📋 Complaint Records (Total: {total})
┌───────────┬──────────────┬──────────┬────────┬───────────────┐
│ Order No │ Complaint No │ Status │ Role │ Created │
├───────────┼──────────────┼──────────┼────────┼───────────────┤
│ {orderNo} │ {no} │ {status} │ {role} │ {time UTC+0} │
└───────────┴──────────────┴──────────┴────────┴───────────────┘
1.4 Order List & History
Trigger:
"查看我的订单列表"
"最近的 USDT 买入订单"
"Show my completed orders this week"
Behavior:
For active/recent orders → use listOrders (richer filter: advNo, status, payType)
For historical orders → use listUserOrderHistory (supports tradeType, date range)
Output format (Order List):
code
📋 Orders (Page {page}, Total: {total})
┌──────────────┬──────┬───────┬──────────────┬────────┬───────────────┐
│ Order No │ Type │ Asset │ Total │ Status │ Created │
├──────────────┼──────┼───────┼──────────────┼────────┼───────────────┤
│ {orderNo} │ BUY │ USDT │ ¥{totalPrice}│ 已完成 │ {time UTC+0} │
└──────────────┴──────┴───────┴──────────────┴────────┴───────────────┘
Order status code mapping:
Code
Name
Chinese
0
Pending
处理中
1
Unpaid
未付款
2
Paid (Unconfirmed)
已付款
3
Releasing
放币处理中
4
Completed
已完成
5
In Appeal
申诉中
6
Cancelled
已取消
7
Expired (System Cancel)
超时取消
1.5 Submit Appeal Evidence
Trigger:
"帮我上传这个截图作为申诉证据"
"我要提交付款凭证"
"Submit evidence for order 228..."
"Upload proof of payment for my appeal"
Automatically suggested when order is in Appeal (status=5) and complaintStatus=2 (CS Processing)
Behavior (3-step flow):
Step 1 — Get presigned upload URL:
code
GET /sapi/v1/c2c/agent/file-upload/get-s3-presigned-url?fileName=proof.jpg&scenario=complaint
→ { "uploadUrl": "https://s3...presigned...", "filePath": "/client_upload/c2c/complaint/..." }
Step 2 — Upload file to S3:
bash
curl -X PUT -T /path/to/local/file.jpg "{uploadUrl}"
The presigned URL is valid for 5 minutes. Upload must complete within this window.
Note:fileUrls in the response are CDN-assembled URLs that can be directly accessed.
remarkHtml takes precedence over remark when available for rendering.
1.7 Cancel Complaint / Appeal
Trigger:
"取消这个申诉"
"我不想继续申诉了"
"Cancel my appeal for order 228..."
"Withdraw my complaint"
⚠️ This is a DESTRUCTIVE action — mandatory confirmation required!
Cancelling an appeal is irreversible. The user forfeits their dispute and the order proceeds to its normal resolution. The agent MUST follow this strict confirmation protocol:
Behavior:
When user expresses intent to cancel, FIRST show a clear warning
Wait for explicit confirmation ("确认取消" / "confirm cancel" / "yes")
Only then call cancel-complaint with the orderNo
Display the result
Warning format (MUST show before executing):
code
⚠️ Cancel Appeal Confirmation
├─ Order: {orderNo}
├─ Current complaint status: {status from previous query if available}
│
╔══════════════════════════════════════════════╗
║ WARNING: This action CANNOT be undone! ║
║ - Your appeal will be permanently withdrawn ║
║ - You will lose the right to dispute this ║
║ order through the appeal process ║
║ - The order will proceed to normal ║
║ resolution without CS intervention ║
╚══════════════════════════════════════════════╝
│
└─ Reply "确认取消" or "confirm cancel" to proceed
On success:
code
✅ Appeal Cancelled
├─ Order: {orderNo}
├─ Status: Appeal withdrawn
└─ The order will now proceed to normal resolution.
On failure:
code
❌ Cancel Failed
├─ Order: {orderNo}
├─ Reason: {error message}
└─ Possible causes: no active appeal, order already resolved, or insufficient permissions.
MUST-follow rules:
NEVER cancel without showing the warning and receiving explicit confirmation
If user says anything ambiguous (like "算了" / "never mind" in a conversation about something else), do NOT interpret it as cancel intent — ask to clarify
If the complaint status is already resolved/closed, inform user instead of attempting the API call
1.8 Get Complaint Reasons
Trigger:
"我可以用什么理由申诉?"
"What reasons can I use to appeal?"
"Show available complaint reasons for this order"
"申诉理由有哪些?"
Behavior:
Call get-complaint-reasons with orderNo
Display the list of available reason codes and descriptions
Output format:
code
📋 Available Complaint Reasons for Order {orderNo}
│
├─ [{reasonCode}] {reasonDesc}
├─ [{reasonCode}] {reasonDesc}
├─ [{reasonCode}] {reasonDesc}
└─ ...
💡 Note: These are the reasons you can use when initiating an appeal.
This skill does NOT support initiating appeals — only viewing reasons.
Note: This is a read-only informational query. The skill does NOT support actually submitting a new complaint (that requires the user to use the App).
Scene 2: Ad Publish & Management
⚠️ Write Operation Safety Rules
ALL write operations in Scene 2 MUST follow this protocol:
Pre-check: Verify user has merchant permission (the API itself checks, but inform user clearly on 403/Permission denied)
Show summary: Before executing any write API, display a complete operation summary
Explicit confirmation: Wait for user to say "确认" / "confirm" / "发布" / "yes" before proceeding
Never auto-execute: Even if user says "just do it" in the initial request, still show summary first
2.1 Market Analysis & Reference Pricing
Trigger:
"我想发一个 USDT/CNY 的卖单广告"
"帮我挂一个 BTC 买单"
"当前市场参考价是多少?"
"What's the reference price for USDT/CNY?"
Behavior:
Call getReferencePrice to get market reference prices
Call search to analyze current market ad distribution
📊 Market Ad Analysis: {asset}/{fiat} ({tradeType})
├─ Total Active Ads: {total}
├─ Price Range: {min} ~ {max}
├─ Top 5 Ads:
│ 1. {advNo} | {price} | {surplusAmount} {asset} | Limit: {min}~{max} | {merchantNick}
│ └─ Terms: {remarks or "—"}
│ 2. ...
└─ Recommended Price: {suggestion based on reference + market}
2.2 Ad Configuration
Trigger:
"用浮动价格,溢价 0.5%"
"加上支付宝"
"就按推荐的来"
"单价改成 6.99,限额改到 1000-100000"
Pre-publish preparation workflow:
Step 1 — Get available categories:
code
GET /sapi/v1/c2c/agent/ads/getAvailableAdsCategory
→ {"advClassifies": ["mass", "profession", ...]}
Step 2 — Get user's payment methods (for SELL ads, need payId):
code
GET /sapi/v1/c2c/agent/ads/getPayMethodByUserId
→ [{"payId": 123, "identifier": "ALIPAY", "tradeMethodName": "支付宝"}]
Display rule: Only show tradeMethodName (e.g. "支付宝", "WeChat", "Bank Transfer") to the user.
payId is an internal identifier used only in the API request body — never expose payId values in user-facing output.
Step 3 — Get all system trade methods (for BUY ads, need identifier):
code
POST /sapi/v1/c2c/agent/ads/listAllTradeMethods
→ [{"identifier": "ALIPAY", "tradeMethodName": "支付宝", ...}]
Ad parameter reference:
Parameter
Required
Description
classify
Y
Ad category: mass / profession / block / cash (default: mass)
tradeType
Y
0 = BUY, 1 = SELL
asset
Y
Crypto: BTC, ETH, USDT, BNB
fiatUnit
Y
Fiat: CNY, USD, etc.
priceType
Y
1 = Fixed price, 2 = Floating price
price
Conditional
Fixed price value (required if priceType=1)
priceFloatingRatio
Conditional
Floating ratio % (required if priceType=2)
initAmount
Y
Total crypto quantity
maxSingleTransAmount
Y
Max per-order fiat amount
minSingleTransAmount
Y
Min per-order fiat amount
buyerKycLimit
Y
Require buyer KYC: 0=No, 1=Yes
tradeMethods
Y
Payment methods: [{payId, identifier}]
payTimeLimit
N
Payment time limit in minutes (default 15)
onlineNow
N
Go online immediately (default true)
remarks
N
Ad trading terms / conditions (max 1000 chars, no crypto-related words)
autoReplyMsg
N
Auto-reply message on order creation (max 1000 chars)
buyerRegDaysLimit
N
Min buyer registration days
buyerBtcPositionLimit
N
Min buyer BTC holding
takerAdditionalKycRequired
N
Require extra verification: 0=No, 1=Yes
launchCountry
N
Target countries (default: all regions)
Confirmation summary format:
code
📋 Ad Configuration Summary
┌────────────────────────────────────┐
│ Trade Direction: {SELL/BUY} {asset}│
│ Fiat Currency: {fiatUnit} │
│ Price Type: {Fixed/Floating} │
│ Price: {price or ratio%} │
│ Total Quantity: {initAmount} {asset}│
│ Order Limit: {min} ~ {max} {fiat}│
│ Payment Methods: {method1, method2}│
│ Payment Timeout: {payTimeLimit} min│
│ Status: {Online/Offline} │
├────────────────────────────────────┤
│ Advanced Settings: │
│ Buyer KYC: {Yes/No} │
│ Min Reg Days: {days or "—"} │
│ Min BTC: {amount or "—"} │
│ Extra Verify: {Yes/No} │
│ Regions: {countries or "All"} │
│ Remarks: {text or "—"} │
│ Auto Reply: {text or "—"} │
└────────────────────────────────────┘
⚠️ Please confirm to publish (reply "确认" or "confirm")
2.3 Publish Ad
Trigger:
"确认" / "confirm" / "发布" (after 2.2 summary)
Behavior:
User confirms → call POST /sapi/v1/c2c/agent/ads/post
Return result
Output format (Success):
code
✅ Ad Published Successfully!
├─ Ad Number: {advNo}
├─ Status: Online
├─ View: https://c2c.binance.com/en/adv?code={advNo}
└─ Manage: say "查看我的广告" to see all your ads
Permission denied → User is not a verified merchant
FIAT_ASSET_ILLEGAL → BIDR can only pair with IDR
Insufficient balance → Check asset balance before publishing
2.4 Manage Existing Ads
Trigger:
"查看我的广告" / "List my ads"
"把第 1 条广告下架" / "Take the first ad offline"
"修改我那条 USDT 卖单的价格" / "Update price for my USDT sell ad"
List My Ads
Call POST /sapi/v1/c2c/agent/ads/listWithPagination
Output format:
code
📋 My Advertisements (Total: {total})
┌────┬──────────────┬──────┬───────┬──────────┬─────────────┬──────────┬────────┐
│ # │ Ad No │ Type │ Asset │ Price │ Remaining │ Limit │ Status │
├────┼──────────────┼──────┼───────┼──────────┼─────────────┼──────────┼────────┤
│ 1 │ {advNo} │ SELL │ USDT │ ¥{price} │ {surplus} │ {min}~{max}│ Online │
│ 2 │ {advNo} │ BUY │ BTC │ ¥{price} │ {surplus} │ {min}~{max}│ Offline│
└────┴──────────────┴──────┴───────┴──────────┴─────────────┴──────────┴────────┘
# If any ad has remarks or autoReplyMsg, show below the table:
Ad Terms:
#1: {remarks or "—"} | Auto-reply: {autoReplyMsg or "—"}
#2: {remarks or "—"} | Auto-reply: {autoReplyMsg or "—"}
Actions: "修改第1条广告价格" | "下架第2条" | "查看详情 {advNo}"
View Ad Detail
Call POST /sapi/v1/c2c/agent/ads/getDetailByNo
Trigger: "查看详情 {advNo}" / "Show ad detail"
Output format:
code
📄 Ad Detail: {advNo}
├─ Type: {tradeType} {asset}/{fiatUnit}
├─ Price: {currencySymbol}{price} ({priceType: Fixed/Floating})
├─ Remaining: {surplusAmount} / {initAmount} {asset}
├─ Limit: {minSingleTransAmount} ~ {maxSingleTransAmount} {fiatUnit}
├─ Payment Methods: {tradeMethodName1, tradeMethodName2}
├─ Status: {status}
├─ Payment Timeout: {payTimeLimit} min
│
├─ Trading Terms:
│ {remarks or "No terms set"}
│
├─ Auto-Reply Message:
│ {autoReplyMsg or "No auto-reply set"}
│
└─ Advanced:
├─ Buyer KYC: {Yes/No}
├─ Min Reg Days: {buyerRegDaysLimit or "—"}
└─ Extra Verify: {takerAdditionalKycRequired ? "Yes" : "No"}
Display rule for remarks and autoReplyMsg: These fields are returned by getDetailByNo, listWithPagination, and search. When present and non-empty, always show them. When null/empty, show "—" or a placeholder like "No terms set". Never omit the section silently — the user should know whether terms exist.
Ad status code mapping:
Code
Display
Chinese
1
Online
在线
2
Offline
离线
4
Closed
已关闭
Update Ad
Behavior:
Identify which ad to update (by # in list or advNo)
Show diff: old value → new value
Wait for confirmation
Call POST /sapi/v1/c2c/agent/ads/update
Confirmation format:
code
📝 Update Ad: {advNo}
┌──────────────┬─────────────┬─────────────┐
│ Field │ Current │ New │
├──────────────┼─────────────┼─────────────┤
│ Price │ ¥7.20 │ ¥6.99 │
│ Max Limit │ ¥50,000 │ ¥100,000 │
└──────────────┴─────────────┴─────────────┘
⚠️ Confirm update? (reply "确认" or "confirm")
Update Ad Status (Online / Offline / Close)
Behavior:
Identify target ad(s) — supports batch operation
Show confirmation
Call POST /sapi/v1/c2c/agent/ads/updateStatus
Confirmation format:
code
🔄 Status Update
├─ Ads: {advNo1}, {advNo2}
├─ Action: {Online → Offline}
└─ ⚠️ Confirm? (reply "确认" or "confirm")
Result format:
code
✅ Status updated: {n} ad(s) → {status}
# Or if partial failure:
⚠️ Partial success: {n} updated, {m} failed
Failed:
├─ {advNo}: {errorMessage}
Scene 2 Supplement: Merchant & Currency Queries
View Merchant Profile
Trigger:
"查看商家 {merchantNo} 的信息"
"Show me merchant details"
Behavior: Call GET /sapi/v1/c2c/agent/merchant/getAdDetails?merchantNo={merchantNo}
Add this badge to a GitHub README so readers can open the package page and install the same version.
[](https://www.aipm-registry.com/skills/binance/p2p/1.0.0?utm_source=github&utm_medium=readme&utm_campaign=package_badge)
This imported publisher has not claimed its AIPM account. A connected account confirms account control, but it does not guarantee that a package is safe.
AI assistant context
What this skill is for
@binance/p2p@1.0.0 is an AIPM skill package for All tools. Use it when a project needs the reusable AI behavior described as: |
Run aipm add @binance/p2p@1.0.0 in a project that has AIPM initialized.
Supported tools
@binance/p2p@1.0.0 supports All tools.
Before installing
AIPM skills can add files to your project. Review the package name, target, description, license, and publisher before installing. Use a clean branch when trying a new skill.