MEXICOP2P

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-rate

Response 200

{
  "usdMxn": 17.25,
  "source": "banxico",
  "timestamp": "2025-06-15T12:00:00.000Z",
  "validFor": 300
}

Response fields

FieldTypeDescription
usdMxnnumberCurrent USD to MXN rate
sourcestringRate provider: "banxico" or "coingecko"
timestampstringWhen the rate was fetched
validFornumberSeconds this rate is valid (300 = 5 minutes)

Usage notes

  • Cache this response for validFor seconds to reduce API calls
  • Use POST /quotes to 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

On this page