{
"swap_id": "8a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d",
"account_id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
"from_asset": "USDT",
"to_asset": "BTC",
"from_amount": "1000.000000",
"to_amount": "0.01568419",
"rate": "0.00001568",
"status": "completed",
"idempotency_key": "swap-2026-07-10-a",
"created_at": "2026-07-10T15:00:00Z",
"idempotency_hit": true
}{
"swap_id": "8a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d",
"account_id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
"from_asset": "USDT",
"to_asset": "BTC",
"from_amount": "1000.000000",
"to_amount": "0.01568419",
"rate": "0.00001568",
"status": "completed",
"idempotency_key": "swap-2026-07-10-a",
"created_at": "2026-07-10T15:00:00Z"
}{
"error": "amount_too_small",
"message": "amount is too small to convert at the current rate"
}{
"error": "unauthorized",
"message": "invalid or missing credentials"
}{
"error": "insufficient_funds",
"message": "account balance is not enough for this operation"
}{
"error": "service_disabled",
"message": "this service is not enabled for your account"
}{
"error": "settlement_daily_limit_exceeded",
"message": "the account exceeded its 24h volume for volatile assets; retry later or use smaller amounts"
}{
"error": "pricing_unavailable",
"message": "execution price is unavailable or stale; retry later"
}Crear un swap
Convierte saldo entre dos de tus monedas, de forma síncrona y atómica — tu saldo cambia al instante y la plata nunca sale de tu cuenta (sin OTP). Los pares volátiles (BTC/GOLD/SILVER/PLATINUM) comparten los límites por operación y de volumen 24h con payouts y compras con tarjeta. Requiere clave de idempotencia: el replay devuelve el swap original y jamás re-ejecuta.
{
"swap_id": "8a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d",
"account_id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
"from_asset": "USDT",
"to_asset": "BTC",
"from_amount": "1000.000000",
"to_amount": "0.01568419",
"rate": "0.00001568",
"status": "completed",
"idempotency_key": "swap-2026-07-10-a",
"created_at": "2026-07-10T15:00:00Z",
"idempotency_hit": true
}{
"swap_id": "8a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d",
"account_id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
"from_asset": "USDT",
"to_asset": "BTC",
"from_amount": "1000.000000",
"to_amount": "0.01568419",
"rate": "0.00001568",
"status": "completed",
"idempotency_key": "swap-2026-07-10-a",
"created_at": "2026-07-10T15:00:00Z"
}{
"error": "amount_too_small",
"message": "amount is too small to convert at the current rate"
}{
"error": "unauthorized",
"message": "invalid or missing credentials"
}{
"error": "insufficient_funds",
"message": "account balance is not enough for this operation"
}{
"error": "service_disabled",
"message": "this service is not enabled for your account"
}{
"error": "settlement_daily_limit_exceeded",
"message": "the account exceeded its 24h volume for volatile assets; retry later or use smaller amounts"
}{
"error": "pricing_unavailable",
"message": "execution price is unavailable or stale; retry later"
}Autorizaciones
JWT de sesión (de register/login) o llave de API (pk_...).
X-API-Key: <token> se acepta como header alternativo.
Encabezados
Alternativa al campo idempotency_key del body.
Cuerpo
USD, USDT, USDC, BTC, GOLD, SILVER, PLATINUM USD, USDT, USDC, BTC, GOLD, SILVER, PLATINUM Monto en la moneda de origen (6 decimales para USDT/USDC/GOLD/SILVER/PLATINUM, 8 para BTC).
Clave elegida por el cliente. Los prefijos payin-convert: y checkout-swap: están reservados para las auto-conversiones del sistema y se rechazan con 400 reserved_idempotency_key.
Respuesta
Replay de idempotencia (swap original, jamás re-ejecutado).
Cuenta dueña. Permite a los org admins atribuir cada registro en la vista org-wide.
USD, USDT, USDC, BTC, GOLD, SILVER, PLATINUM USD, USDT, USDC, BTC, GOLD, SILVER, PLATINUM Unidades de destino por unidad de origen (tasa de ejecución marcada).
"completed"
Presente en replays.