MEXICOP2P

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/quotes

Request body

FieldTypeRequiredDescription
typestringYesMust be "SELL"
amountUsdcnumberYesAmount of USDC to sell (must be > 0)
partnerUserRefstringYesYour internal user reference (must exist)
feePercentnumberNoYour fee as a percentage of the trade (0–10%), default 0
feeRecipientstringNoWho 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

FieldTypeDescription
idstringQuote ID — pass to POST /orders
typestring"SELL"
amountUsdcnumberUSDC amount
exchangeRatenumberLocked USD/MXN rate from Banxico
grossAmountMxnnumberTotal MXN before your fee
feePercentnumberYour fee percentage
feeAmountMxnnumberYour fee in MXN
feeRecipientstringWho pays: "USER", "PARTNER", or "NONE"
netAmountMxnnumberMXN amount after your fee
expiresAtstringQuote expires after 5 minutes

Errors

CodeHTTPWhen
VALIDATION_ERROR400Missing fields or type is not "SELL"
NOT_FOUND404partnerUserRef doesn't exist

On this page