POST /quotes
Create a rate-locked quote for a crypto-to-peso trade.
POST /quotes
Lock the current exchange rate for 5 minutes. Use the returned quote ID to create an order.
Request
curl -X POST \
-H "X-API-Key: mp2p_test_xxx" \
-H "Content-Type: application/json" \
-d '{
"type": "SELL",
"amountUsdc": 100,
"partnerUserRef": "user_12345",
"feePercent": 1.5,
"feeRecipient": "PARTNER"
}' \
https://mexicop2p.org/api/v1/quotesRequest body
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Must be "SELL" |
amountUsdc | number | Yes | Amount of USDC to sell (must be > 0) |
partnerUserRef | string | Yes | Your internal user reference (must exist) |
feePercent | number | No | Your fee as a percentage of the trade (0–10%), default 0 |
feeRecipient | string | No | Who the fee is charged to: "USER", "PARTNER", or "NONE" (default) |
MexicoP2P does not charge platform fees. The feePercent is your markup as a partner — you keep it (minus MexicoP2P's revenue share based on your tier). See Pricing for details.
Response 201
{
"id": "qt_abc123",
"type": "SELL",
"amountUsdc": 100,
"exchangeRate": 17.25,
"grossAmountMxn": 1725.00,
"feePercent": 1.5,
"feeAmountMxn": 25.88,
"feeRecipient": "PARTNER",
"netAmountMxn": 1699.12,
"expiresAt": "2025-06-15T12:08:00.000Z"
}Response fields
| Field | Type | Description |
|---|---|---|
id | string | Quote ID — pass to POST /orders |
type | string | "SELL" |
amountUsdc | number | USDC amount |
exchangeRate | number | Locked USD/MXN rate from Banxico |
grossAmountMxn | number | Total MXN before your fee |
feePercent | number | Your fee percentage |
feeAmountMxn | number | Your fee in MXN |
feeRecipient | string | Who pays: "USER", "PARTNER", or "NONE" |
netAmountMxn | number | MXN amount after your fee |
expiresAt | string | Quote expires after 5 minutes |
Errors
| Code | HTTP | When |
|---|---|---|
VALIDATION_ERROR | 400 | Missing fields or type is not "SELL" |
NOT_FOUND | 404 | partnerUserRef doesn't exist |