Referencia de API

On-ramp: comprar stablecoins

Convierte tu saldo en moneda local a stablecoins en tres pasos: consulta las opciones, pide una cotización y confírmala. El resultado final llega por webhook.

Operaciones

GET/v1/fiat/onramp/optionspermiso: fiat:read

Obtener opciones de on-ramp disponibles

Retorna los pares (red, token, wallet) soportados y activos para compra fiat.

curl
curl "https://api.nvialo.com/v1/fiat/onramp/options" \
  -H "x-api-key: $NVIALO_API_KEY"

Respuesta de ejemplo

200 OK
{
  "data": [
    {
      "network": "ETHEREUM",
      "token": "USDC",
      "wallet_id": "wal_cly123",
      "wallet_address": "0x1234567890abcdef1234567890abcdef12345678"
    }
  ]
}
POST/v1/fiat/onramp/quotespermiso: fiat:write

Cotizar orden de compra on-ramp

Solicita una cotización ejecutable al proveedor fiat y reserva la orden DEAL en estado QUOTED.

Cuerpo (JSON)

from_currencystring (min 3, max 3)requerido

Código de divisa fiat de origen (ej. ARS, USD, COP, MXN, BRL).

tokenstring (min 1)requerido

Símbolo del token stablecoin a adquirir (ej. USDC, USDT, EURC).

networkenumrequerido

Red blockchain de destino. Valores: ETHEREUM, POLYGON, BSC, BASE, ARBITRUM, OPTIMISM, TRON, SOLANA, ROBINHOOD, WORLDCHAIN, AVALANCHE, LINEA.

amountstringrequerido

Monto a operar (positivo). Corresponde a from_currency si side=SELL o a token si side=BUY.

sideSELL | BUY

Indica si el monto especifica lo que se vende (SELL) o lo que se compra (BUY). Por defecto: "SELL".

curl
curl -X POST "https://api.nvialo.com/v1/fiat/onramp/quotes" \
  -H "x-api-key: $NVIALO_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "from_currency": "ARS",
    "token": "USDC",
    "network": "ETHEREUM",
    "amount": "100000"
  }'

Respuesta de ejemplo

201 Created
{
  "data": {
    "id": "ord_cly123456",
    "status": "PENDING",
    "from_currency": "ARS",
    "token": "USDC",
    "network": "ETHEREUM",
    "wallet_address": "0x1234567890abcdef1234567890abcdef12345678",
    "amount_in": "100000",
    "amount_out": "60.88",
    "pending_amount": "100000",
    "platform_fee": {
      "amount": "500.00",
      "currency": "ARS"
    },
    "expires_at": "2026-10-20T12:05:00.000Z",
    "error_code": null,
    "created_at": "2026-10-20T12:00:00.000Z",
    "children": [
      {
        "id": "ord_cly123456",
        "status": "COMPLETED",
        "amount_in": "50000",
        "amount_out": "30.44",
        "tx_hash": "0x123abc...",
        "transaction_id": "tx_cly987",
        "completed_at": "2026-10-20T12:00:00.000Z"
      }
    ]
  }
}
POST/v1/fiat/onramp/quotes/{id}/confirmpermiso: fiat:write

Confirmar cotización on-ramp con MFA

Confirma la cotización con código OTP y ejecuta la orden DEAL ante el proveedor fiat.

Parámetros

idpath · stringrequerido

ID de la orden cotizada.

Cuerpo (JSON)

otp_codestring

OTP (MFA) de 6 dígitos. Obligatorio en el portal; no aplica con API key.

idempotency_keystring (min 1, max 64)

Clave de idempotencia elegida por el integrador. Obligatoria con API key (400 IDEMPOTENCY_KEY_REQUIRED), opcional en el portal. Repetirla con el mismo cuerpo devuelve la operación ya creada; con otro cuerpo, 409 IDEMPOTENCY_KEY_REUSED. Se guarda como client_reference.

curl
curl -X POST "https://api.nvialo.com/v1/fiat/onramp/quotes/{id}/confirm" \
  -H "x-api-key: $NVIALO_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "otp_code": "123456",
    "idempotency_key": "pedido-2026-10-20-0001"
  }'

Respuesta de ejemplo

200 OK
{
  "data": {
    "id": "ord_cly123456",
    "status": "PENDING",
    "from_currency": "ARS",
    "token": "USDC",
    "network": "ETHEREUM",
    "wallet_address": "0x1234567890abcdef1234567890abcdef12345678",
    "amount_in": "100000",
    "amount_out": "60.88",
    "pending_amount": "100000",
    "platform_fee": {
      "amount": "500.00",
      "currency": "ARS"
    },
    "expires_at": "2026-10-20T12:05:00.000Z",
    "error_code": null,
    "created_at": "2026-10-20T12:00:00.000Z",
    "children": [
      {
        "id": "ord_cly123456",
        "status": "COMPLETED",
        "amount_in": "50000",
        "amount_out": "30.44",
        "tx_hash": "0x123abc...",
        "transaction_id": "tx_cly987",
        "completed_at": "2026-10-20T12:00:00.000Z"
      }
    ]
  }
}
GET/v1/fiat/onramp/orders/{id}permiso: fiat:read

Consultar detalle de orden on-ramp

Retorna el detalle del deal on-ramp junto con sus órdenes de ejecución hijas.

Parámetros

idpath · stringrequerido

ID de la orden o deal on-ramp.

curl
curl "https://api.nvialo.com/v1/fiat/onramp/orders/{id}" \
  -H "x-api-key: $NVIALO_API_KEY"

Respuesta de ejemplo

200 OK
{
  "data": {
    "id": "ord_cly123456",
    "status": "PENDING",
    "from_currency": "ARS",
    "token": "USDC",
    "network": "ETHEREUM",
    "wallet_address": "0x1234567890abcdef1234567890abcdef12345678",
    "amount_in": "100000",
    "amount_out": "60.88",
    "pending_amount": "100000",
    "platform_fee": {
      "amount": "500.00",
      "currency": "ARS"
    },
    "expires_at": "2026-10-20T12:05:00.000Z",
    "error_code": null,
    "created_at": "2026-10-20T12:00:00.000Z",
    "children": [
      {
        "id": "ord_cly123456",
        "status": "COMPLETED",
        "amount_in": "50000",
        "amount_out": "30.44",
        "tx_hash": "0x123abc...",
        "transaction_id": "tx_cly987",
        "completed_at": "2026-10-20T12:00:00.000Z"
      }
    ]
  }
}