GET /orders/:id
Get full order details including spread, timeline, and escrow status.
GET /orders/:id
Retrieve complete details for a single order, including calculated spread, escrow status, bank details, and event timeline.
Request
curl -H "X-API-Key: mp2p_test_xxx" \
https://mexicop2p.org/api/v1/orders/ord_xyz789Response 200
{
"id": "ord_xyz789",
"escrowOrderId": "0x1a2b3c4d5e6f...",
"status": "COMPLETED",
"token": "USDC",
"amount": 100,
"amountRaw": "100000000",
"pricePerUnit": 17.35,
"totalMxn": 1735.00,
"fxRateUsdMxn": 17.25,
"fxRateSource": "partner_quote",
"spread": {
"percent": 0.58,
"mxn": 10.00
},
"escrowTxHash": "0xabc123...",
"escrowStatus": "CONFIRMED",
"releaseTxHash": "0xdef456...",
"buyerWallet": "0x04a1b2c3...",
"lockedAt": "2025-06-15T12:15:00.000Z",
"lockExpiresAt": "2025-06-16T12:15:00.000Z",
"bankAccount": {
"bankName": "BBVA México",
"bankCode": "012",
"clabe": "012345678901234567"
},
"cepValidatedAt": "2025-06-15T12:30:00.000Z",
"cepTrackingKey": "MXBA2025061512300001",
"amlRiskScore": 12,
"amlRiskLevel": "LOW",
"partnerUserRef": "user_12345",
"createdAt": "2025-06-15T12:03:00.000Z",
"completedAt": "2025-06-15T12:35:00.000Z",
"expiresAt": "2025-06-15T13:03:00.000Z",
"timeline": [
{
"id": "evt_001",
"event": "CREATED",
"data": {},
"timestamp": "2025-06-15T12:03:00.000Z"
},
{
"id": "evt_002",
"event": "DEPOSIT_CONFIRMED",
"data": {},
"timestamp": "2025-06-15T12:05:00.000Z"
},
{
"id": "evt_003",
"event": "LOCKED",
"data": {},
"timestamp": "2025-06-15T12:15:00.000Z"
},
{
"id": "evt_004",
"event": "PAYMENT_VERIFIED",
"data": {},
"timestamp": "2025-06-15T12:30:00.000Z"
},
{
"id": "evt_005",
"event": "COMPLETED",
"data": {},
"timestamp": "2025-06-15T12:35:00.000Z"
}
]
}Key response fields
| Field | Type | Description |
|---|---|---|
spread.percent | number | Seller's profit margin as percentage |
spread.mxn | number | Spread in MXN |
escrowTxHash | string | Starknet deposit transaction hash |
escrowStatus | string | "PENDING" or "CONFIRMED" |
releaseTxHash | string | Release transaction hash (when completed) |
buyerWallet | string | Buyer's Starknet wallet (when locked) |
bankAccount | object | Seller's CLABE details |
cepTrackingKey | string | SPEI payment tracking key |
amlRiskScore | number | AML risk score (0–100) |
amlRiskLevel | string | "LOW", "MEDIUM", or "HIGH" |
timeline | array | Ordered list of order events |
Spread calculation
Spread is calculated on-demand from immutable order data, not stored:
spreadPercent = (pricePerUnit - fxRateUsdMxn) / fxRateUsdMxn × 100
spreadMxn = (pricePerUnit - fxRateUsdMxn) × amountErrors
| Code | HTTP | When |
|---|---|---|
NOT_FOUND | 404 | Order doesn't exist or doesn't belong to your partner |