GET /exchange-rate
Get the current USD/MXN exchange rate.
GET /exchange-rate
Returns the current USD/MXN exchange rate sourced from Banxico (primary) or CoinGecko (fallback).
Request
curl -H "X-API-Key: mp2p_test_xxx" \
https://mexicop2p.org/api/v1/exchange-rateResponse 200
{
"usdMxn": 17.25,
"source": "banxico",
"timestamp": "2025-06-15T12:00:00.000Z",
"validFor": 300
}Response fields
| Field | Type | Description |
|---|---|---|
usdMxn | number | Current USD to MXN rate |
source | string | Rate provider: "banxico" or "coingecko" |
timestamp | string | When the rate was fetched |
validFor | number | Seconds this rate is valid (300 = 5 minutes) |
Usage notes
- Cache this response for
validForseconds to reduce API calls - Use
POST /quotesto lock a rate for a specific trade - The rate shown here is the mid-market rate; the actual trade rate is set when creating a quote