Desarrolladores

API de ArandixBit

Integre saldos, Spot, Convertir, depósitos, retiros y webhooks con claves firmadas por HMAC y permisos por alcance. Los socios B2B operan subcuentas de sus clientes.

Sandbox (predeterminado)
https://api-sandbox.arandixbit.com
WebSocket
wss://stream.arandixbit.com/v1/ws
Versión 2026-10-22 · OpenAPI 3.1

Visión general

La API REST de ArandixBit usa JSON sobre HTTPS. Las rutas con alcance aceptan una clave de API firmada; la gestión de claves solo acepta la sesión web del titular.

  • Comience por el sandbox https://api-sandbox.arandixbit.com: saldo ficticio, sin dinero real ni proveedores externos. El acceso de producción es privado: aparece solo en el panel de su cuenta (Configuración → API).
  • No existen credenciales compartidas ni de demostración: cada desarrollador crea su propia cuenta y sus claves de API en su cuenta (Configuración → API). Nunca enviamos contraseñas ni secretos por correo o chat.
  • Montos en unidades mínimas enteras con su exponente en cada respuesta (ver Unidades y precisión).
  • Los mensajes de error siguen X-Lang o Accept-Language (es, pt, en, gn); el campo code es estable.
  • La referencia (rutas, campos y descripciones) está en inglés, como el contrato OpenAPI.

Descargas

Postman, Insomnia y otras herramientas también importan el archivo OpenAPI directamente.

Inicio rápido

Cuatro pasos para su primera solicitud firmada.

  1. 1

    Cree una clave en la app

    En Ajustes → Claves de API, con 2FA activado, elija los alcances mínimos necesarios y, si es posible, vincule las IP de su servidor. El secreto se muestra una sola vez: guárdelo en un gestor de secretos.

  2. 2

    Sincronice el reloj

    La marca de tiempo debe estar a ±10 s del reloj del servidor. Consulte GET /v1/public/time (público) y guarde la diferencia con su reloj local.

    curl -sS https://api-sandbox.arandixbit.com/v1/public/time
    # {"server_time": 1760000000000, ...}  epoch milliseconds
  3. 3

    Firme la solicitud

    Concatene marca de tiempo, método, ruta con query y cuerpo crudo, y calcule HMAC-SHA256 con el secreto. El asistente arx de Autenticación y firma lo hace por usted.

    Texto a firmar
    timestamp  = 1760000000000
    method     = GET
    path       = /v1/spot/orders?open=true
    body       = (empty)
    
    prehash    = 1760000000000GET/v1/spot/orders?open=true
    signature  = hex(HMAC-SHA256(api_secret, prehash))
  4. 4

    Haga la primera llamada

    GET /v1/balances con el alcance account.read (el de toda clave nueva) devuelve los saldos por moneda y billetera.

    export ARX_API_KEY="arxb_..."
    export ARX_API_SECRET="..."
    source ./arx.sh
    
    arx GET '/v1/balances'

Autenticación y firma

Cada solicitud firmada lleva tres cabeceras. La firma es HMAC-SHA256, en hexadecimal, del texto marca de tiempo + MÉTODO + ruta con query + cuerpo crudo.

CabeceraValor
X-ARX-APIKEYID público de la clave (arxb_…)
X-ARX-TIMESTAMPEpoch en milisegundos; ventana de ±10 s respecto del reloj del servidor
X-ARX-SIGNATUREhex(HMAC-SHA256(secreto, timestamp + MÉTODO + ruta_con_query + cuerpo))

Texto a firmar

  • La ruta se firma exactamente como se envía, con la query y la misma codificación.
  • El cuerpo es el texto JSON exacto enviado; sin cuerpo, cadena vacía. Serialice una vez y use el mismo texto para firmar y enviar.
  • El método va en mayúsculas (GET, POST, PATCH, DELETE).
Texto a firmar
timestamp  = 1760000000000
method     = GET
path       = /v1/spot/orders?open=true
body       = (empty)

prehash    = 1760000000000GET/v1/spot/orders?open=true
signature  = hex(HMAC-SHA256(api_secret, prehash))

Asistente de firma

Los ejemplos de cada operación usan este asistente. Lea la clave y el secreto de variables de entorno, nunca del código fuente.

# arx.sh: source this file, then: arx GET '/v1/balances'
arx() {
  local method="$1" req="$2" body="${3:-}"
  local ts=$(( $(date +%s) * 1000 ))
  local sig=$(printf '%s' "${ts}${method}${req}${body}" \
    | openssl dgst -sha256 -hmac "$ARX_API_SECRET" -hex | sed 's/^.* //')
  local extra=()
  [ -n "$body" ] && extra=(-H "Content-Type: application/json" --data-raw "$body")
  curl -sS -X "$method" "https://api-sandbox.arandixbit.com${req}" \
    -H "X-ARX-APIKEY: $ARX_API_KEY" \
    -H "X-ARX-TIMESTAMP: $ts" \
    -H "X-ARX-SIGNATURE: $sig" \
    "${extra[@]}"
}
  • La misma firma no vale dos veces (anti-replay).
  • IP fuera de la lista vinculada: 403. Clave sin el alcance de la ruta: 403 api_key_scope_required (details.scope).
  • Clave vencida: 401 api_key_expired. Cambiar la contraseña, el 2FA o una passkey revoca las claves existentes.
  • Una cuenta bloqueada no autentica y las cuentas del equipo nunca usan claves.
  • Las rutas marcadas session (gestión de claves) aceptan solo la sesión web, nunca una clave de API.

Alcances

Una clave nueva tiene solo account.read. Elija los alcances al crearla; agregar alcances o cambiar IP exige 2FA. Cada operación de la referencia indica el alcance que exige.

AlcancePermite
account.readSaldos, portafolio, límites, tarifas, historial unificado y extracto.
spot.readPares, libro, negocios y sus órdenes Spot.
spot.tradeCrear y cancelar órdenes Spot (exige KYC aprobado).
convert.readPares, cotización y conversiones.
convert.executeEjecutar y cancelar conversiones.
wallet.readDepósitos (incluye crear orden de depósito USDT), retiros, lista blanca y cotizaciones de retiro.
wallet.withdrawCrear retiros cripto. Exige IP vinculada y solo envía a direcciones de la lista blanca con el plazo de seguridad cumplido.
webhooksGestionar endpoints de webhook.
partner.*API B2B, solo para cuentas de socio aprobadas.
  • Hasta 30 claves por cuenta y 20 IP (IPv4 o IPv6) por clave.
  • Sin IP vinculada la clave vence en 90 días; se renueva por 90 días más a partir de 5 días antes del vencimiento.
  • Con IP vinculada la clave no vence.

Límites de uso

  • Por clave: 600 solicitudes por minuto (valor por defecto).
  • Toda respuesta autenticada por clave trae X-RateLimit-Limit, X-RateLimit-Remaining y X-RateLimit-Reset (epoch en segundos).
  • Al superar el límite: 429 rate_limited con Retry-After. Espere ese tiempo antes de reintentar.
  • Las rutas públicas (/v1/public/…) tienen límite por IP; los límites del WebSocket están en su sección.

Errores

Toda respuesta de error tiene la forma {"error": {"code", "message", "details"}}. Decida por code, nunca por el texto de message, que se traduce según el idioma pedido.

json
{
  "error": {
    "code": "api_key_scope_required",
    "message": "...",
    "details": { "scope": "spot.trade" }
  }
}
codeHTTPSignificado
address_cooldown422The withdrawal address is still in its security cooldown after being whitelisted.
address_not_whitelisted422The withdrawal address is not on the whitelist (required for API-key and partner withdrawals).
api_key_customer_limit409A sub-account already has the maximum of 5 restricted keys.
api_key_customer_restricted403A key restricted to a sub-account cannot access this route.
api_key_customer_scope400A sub-account restricted key only accepts customer scopes (no partner.*).
api_key_expired401The API key expired. Also returned as 409 when trying to edit or renew an expired key.
api_key_limit409The account already has the maximum number of active API keys (30).
api_key_no_expiry409Keys with an IP allow-list do not expire and cannot be renewed.
api_key_renew_too_early409Renewal opens 5 days before expiry (details.renewable_from).
api_key_required403This partner operation moves money and must be called with an API key, not a session.
api_key_scope_required403The API key lacks the scope required by the route (details.scope).
bad_request400Malformed JSON or invalid parameters; details maps each invalid field to a hint.
below_min_withdrawal422Amount below the minimum withdrawal (details.min).
conflict409The resource is not in a state that allows the operation (for example, the order is not open).
convert_below_min_receive409The conversion would deliver less than min_receive; nothing was executed.
convert_below_minimum422Amount below the minimum for this conversion.
convert_limit_exceeded422Plan Convert limit (per conversion, daily or monthly) exceeded; details has window, limit_usd_minor, remaining_usd_minor.
convert_not_filled409The external leg of the conversion was not filled; nothing was executed.
convert_pair_in_integration422Conversions with this currency (PYG) are switched off at the moment.
convert_pair_unavailable422This conversion pair is not available.
customer_exists409A sub-account with this email or external reference already exists.
deposit_limit_exceeded409Plan deposit limit exceeded (fiat deposits); details has window, level, plan, limit_usd_minor, used_usd_minor, remaining_usd_minor, amount_usd_minor.
dubaicash_provider_unavailable502The payment provider is unavailable; nothing was charged — retry later.
duplicate_client_order_id409Another order of the account already uses this client_order_id.
feature_unavailable503The feature is not available in this environment.
forbidden403Not allowed: IP not in the key allow-list, inactive account or missing permission.
four_eyes_required403Staff: four-eyes rule — the proposer cannot approve and nobody decides on their own account.
house_liquidity_unavailable503House liquidity for this conversion is temporarily unavailable.
idempotency_conflict409Permanent-mode idempotency (Convert, withdrawals): the key was already used with different data.
idempotency_key_invalid400Malformed Idempotency-Key (1–100 characters [A-Za-z0-9_.:-]).
idempotency_key_reused409Stored-response idempotency: the key was already used for a different request (method, path or body).
idempotency_request_in_progress409A request with the same Idempotency-Key is still executing; retry shortly.
insufficient_funds422Not enough available balance for the operation.
internal500Unexpected server error. Safe to retry with backoff; include X-Request-Id when contacting support.
invalid_address400The destination address is invalid for the network.
ip_required_for_withdraw400Keys with a withdrawal scope require an IP allow-list.
jurisdiction_blocked451The country or jurisdiction is not served.
kyc_already_approved409The sub-account KYC is already approved.
kyc_disabled503Identity verification is temporarily unavailable.
kyc_provider_error502The KYC provider could not start the verification; retry later.
kyc_required403Approved identity verification (KYC) is required for this operation.
limit_exceeded422Plan withdrawal limit (per transaction, daily or monthly) exceeded.
market_unavailable503The reference market-data feed is temporarily unavailable.
method_unavailable422The deposit method is not available for this currency.
mexc_provider_unavailable502Pool ArandixBit is unavailable right now; retry later.
mexc_withdraw_unavailable503Crypto withdrawals via the Pool ArandixBit are not available right now.
mxn_amount_out_of_range422MXN deposit amount outside the allowed range.
mxn_provider_unavailable502The MXN deposit provider is unavailable; retry later.
mxn_too_many_open429Too many open MXN deposit charges; pay or wait for the current ones.
no_live_price503No live price available to validate a conditional order; retry shortly.
not_found404Resource not found (also returned for resources of other accounts).
not_pending409The conversion was already decided and can no longer be cancelled.
partner_grant_closed409Staff: the partner proposal was already decided.
partner_grant_open409Staff: there is already an open proposal or the account is already a partner.
partner_not_eligible422Staff: the account is not eligible to become a partner (business account with approved KYB required).
partner_required403partner.* scopes and routes are only for approved partner accounts.
payload_too_large413The request body is too large.
pix_outside_hours422Fee-group account: PIX deposits/withdrawals are closed right now (details.kind deposit|withdrawal, start, end HH:MM, tz, days 0 = Sunday).
pix_amount_out_of_range422PIX deposit amount outside the allowed range (details.min, details.max, BRL cents).
pix_provider_unavailable502The PIX provider is unavailable; nothing was charged — retry later.
pix_qr_invalid502The provider returned an invalid PIX QR code (BR Code failed CRC/format/amount checks); the deposit was closed and nothing can be paid — create a new charge or deposit USDT.
pix_too_many_open429Too many open PIX charges; pay or wait for the current ones to expire.
price_unavailable503No reliable live price right now (the operation fails closed); retry shortly.
quote_expired409The Convert quote expired; request a new quote.
quote_invalid400Unknown quote id, or a quote of another account.
quote_mismatch400The quote does not match this request (currencies, network or amount).
rail_disabled503This rail (Convert, USDT or withdrawal provider) is not available in this environment.
rate_limited429Rate limit exceeded; wait Retry-After seconds.
routing_unavailable503Liquidity routing is temporarily unavailable (502 when the external venue failed); retry later.
sandbox_faucet_limit429Sandbox only — the daily fictitious-balance limit for this currency was reached (details.limit, details.used_minor).
security_lock403Withdrawals are blocked for 24 h after a password or 2FA change (details.until).
self_operation403Staff: operations on one's own account are not allowed.
settlement_pending202The market order executed externally; internal settlement is being reconciled and the balance will be adjusted.
staff_api_keys_forbidden403Staff accounts never use API keys (keys of promoted accounts are revoked).
temporarily_unavailable503A dependency is temporarily unavailable; retry shortly (with the same Idempotency-Key).
timestamp_out_of_window401X-ARX-TIMESTAMP is more than 10 s away from the server clock; details.server_time (epoch ms) and details.recv_window_ms.
too_many_conditional409Too many open conditional orders on the account.
totp_required401A valid 2FA (TOTP) code is required or the code is wrong.
totp_required_for_api_keys403Enable 2FA on the account before creating API keys.
unauthorized401Missing or invalid credentials: token, key, signature, or a replayed request.
usdt_amount_out_of_range422USDT deposit amount outside the allowed range (details.min, details.max).
usdt_order_failed502The USDT deposit order could not be created at the provider; retry shortly.
usdt_too_many_open409Too many open USDT deposit orders; complete or wait for the current ones.
usdt_unavailable503USDT deposits and withdrawals are not available right now.
webhook_limit409Maximum number of webhook endpoints reached (10; 25 for partners).
webhook_url_blocked400The webhook URL resolves to an internal or reserved address.
webhook_url_invalid400Invalid webhook URL: use https, port 443 or 8443, with a public hostname.
websocket_required426Use a WebSocket connection (RFC 6455).
withdraw_fee_changed409The current withdrawal fee is higher than the accepted fee (max_fee or quote); nothing was debited (details.fee).
withdraw_fee_unavailable503The network fee is unavailable right now; retry shortly.
withdraw_quote_required400Quote the withdrawal fee (quote_id) or send max_fee before confirming.
withdrawal_below_minimum422Fee-group account: PIX withdrawal below the group minimum (details.min_amount_minor, BRL cents).
withdrawal_unavailable422Withdrawals on this network/asset are temporarily unavailable.
ws_capacity503The WebSocket service is at capacity; retry shortly.
earn_below_min_claim422Released yield is below the minimum withdrawal (US$ 100 equivalent).
earn_below_minimum422Amount below the Earn product minimum.
earn_matured409The position already matured; payment is automatic.
earn_not_active409The Earn position is not active.
earn_nothing_to_claim409No released yield to withdraw yet.
earn_product_unavailable422The Earn product does not exist or was discontinued.
idempotency_key_required400This route requires the Idempotency-Key header.

Idempotencia

Los POST que cambian estado (órdenes, conversiones, retiros y demás) aceptan la cabecera Idempotency-Key. Con ella, un reintento tras un corte de red o un tiempo agotado no ejecuta la operación dos veces.

  • Use un valor nuevo por operación lógica (un UUID v4, por ejemplo), de 1 a 100 caracteres [A-Za-z0-9_-:.], y repítalo solo en los reintentos de esa misma operación. Formato inválido: 400 idempotency_key_invalid.
  • La clave vale por cuenta y la respuesta (2xx o 4xx) se conserva durante 24 h.
  • Misma clave y misma solicitud (método, ruta y cuerpo): se devuelve la respuesta guardada, sin ejecutar de nuevo, con la cabecera Idempotent-Replayed: true.
  • Misma clave con otra solicitud: 409 idempotency_key_reused. Si la primera todavía se está procesando: 409 idempotency_request_in_progress; reintente tras una breve espera.
  • Las respuestas 5xx y 429 no se guardan: puede reintentar con la misma clave.
  • Convertir y los retiros deduplican la clave de forma permanente: devuelven la misma conversión o el mismo retiro; con otros datos, 409 idempotency_conflict.
  • Órdenes Spot: client_order_id (1 a 36 caracteres, letras, números, - y _) identifica la orden con su propio código, único por cuenta (repetido: 409 duplicate_client_order_id), y permite consultarla con ?client_order_id=.

Paginación

Los listados largos usan paginación por cursor.

  • Envíe limit (el máximo de cada ruta está en la referencia) y, desde la segunda página, cursor con el valor next_cursor de la respuesta anterior.
  • next_cursor en null indica que no hay más páginas.
  • El cursor es opaco: no lo construya ni lo interprete; puede cambiar de formato sin aviso.
  • El extracto en CSV (format=csv) devuelve el cursor en la cabecera X-Next-Cursor.

Unidades y precisión

Todos los montos son enteros en la unidad mínima de cada moneda, para evitar errores de redondeo de punto flotante.

  • Cada respuesta trae el exponente: exponent en saldos y movimientos, base_exp y quote_exp en pares Spot. Valor = monto ÷ 10^exponente.
  • Ejemplo: USDT tiene exponente 6, así que 12,5 USDT se envía como 12500000.
  • En Spot, price es la cantidad de unidades mínimas de la moneda cotizada por 1 unidad entera de la base; amount está en unidades mínimas de la base.
  • Use enteros de 64 bits; en JavaScript, BigInt para valores que superen Number.MAX_SAFE_INTEGER.
  • Fechas en RFC 3339 (UTC); marcas de tiempo de cabeceras y del WebSocket en epoch.

Versiones y cambios

La versión mayor va en la ruta (/v1). El contrato tiene una versión fechada que acompaña cada publicación.

  • Dentro de /v1 solo se hacen cambios compatibles: nuevas rutas, campos opcionales, valores de enum y tipos de evento. Su integración debe ignorar campos desconocidos y tolerar valores nuevos.
  • Un cambio incompatible llegaría en una nueva versión de ruta, con aviso previo y período de convivencia.
  • Los campos obsoletos se marcan como deprecated en la referencia antes de retirarse.
  • Los eventos de webhook informan api_version.

Registro de cambios

  1. Unique deposit address per invoice
    • New routes POST /v1/partner/customers/{cid}/invoice-addresses and GET /v1/partner/customers/{cid}/invoice-addresses/{id}: a new deposit address for each invoice reference of a sub-account, idempotent per reference.
    • Accepted: BTC/BTC, USDT/TRC20, and USDT or USDC on BEP20, ERC20, POLYGON and SOL. Requires scope partner.wallet.write (restricted key: wallet.write).
    • Deposits to the address are credited to the sub-account like the fixed address and the deposit.credited webhook carries invoice_address_id and reference. Another supported coin of the same network sent there is credited in the coin that arrived: compare coin and amount with the invoice.
  2. Guarani buy and sell prices
    • New public route GET /v1/public/local-quotes with bid and ask of USDT/PYG, BRL/PYG and USDT/BRL.
    • Conversions and Paraguay payouts with PYG use the exchange-house buying price when PYG is received and the selling price when PYG is given.
  3. Manual PIX by API
    • New route POST /v1/pix/deposits/{id}/proof: API keys can send the payment proof of a manual PIX deposit.
    • New route POST /v1/partner/customers/{cid}/pix/deposits/{id}/proof for a sub-account.
    • While the manual flow is active, sub-account PIX deposits (pix/deposits and fiat/deposits) answer 503 pix_provider_unavailable and create nothing, unless the request sends accept_manual: true.
  4. Fixed addresses for many accounts
    • With an API key, GET /v1/crypto/fixed-address, GET /v1/partner/customers/{cid}/fixed-address and the sub-account pix/deposits and fiat/deposits creation routes count against the key quota only, not a limit of 20 requests per minute per IP.
    • A network with no address left for a new account now answers 503 crypto_deposit_network_full instead of 502, and shows pool_full: true in mexc_deposit.networks. The Lightning network is no longer listed: it never issued a deposit address.
    • BRL deposits by PIX now document both flows, told apart by the auto field: automatic charge and manual confirmation. Both go from R$ 10,00 to R$ 500.000,00 per PIX, are valid for up to 24 hours and allow up to 5 open charges and R$ 5.000.000,00 per day.
  5. Partner Earn
    • New scopes partner.earn.read and partner.earn.write.
    • New routes: GET /v1/partner/earn/products and /v1/partner/customers/{cid}/earn/positions (open, list, get, cancel-preview, cancel, claim).
    • New webhooks for sub-accounts: earn.opened, earn.released, earn.claimed, earn.cancelled, earn.refunded, earn.matured.
  6. Partner PIX withdrawals, Paraguay payouts and fee groups
    • New sub-account routes: POST/GET /v1/partner/customers/{cid}/pix/withdrawals (+ /{id}) for BRL PIX withdrawals; GET …/{cid}/py/payouts/quote, POST/GET …/{cid}/py/payouts (+ /{id}) for "Receive in Paraguay" payouts; GET …/{cid}/fees for the effective fees.
    • Fee groups (contract pricing): GET /v1/me/fees adds fee_group with the PIX, Convert (fractional bps, *_cbps), crypto and payout rates that replace the plan for accounts in a group; Convert quotes add fee_cbps, fee_pct and fee_group. New errors 422 pix_outside_hours and 422 withdrawal_below_minimum.
    • Webhooks: sub-account events carry customer_external_ref; deposit.credited adds credited_amount and fee (fiat and fixed-address rails); fiat withdrawal.* add fee, net and payment_ref, and a cancelled fiat withdrawal emits withdrawal.failed; Paraguay payouts emit withdrawal.sent/completed/failed with rail: py_payout (amount, fee, net, deliver_amount).
    • Fiat/PIX deposits (/v1/pix/deposits, /v1/fiat/deposits and the sub-account variants) add fee and net_amount (plus credited_amount once credited).
  7. Sandbox in sync with production
    • The sandbox now runs the same code as production (more deposit coins, new fees and Convert rules), keeping its fictitious balances, simulated withdrawals and test webhook receiver.
    • Fixed the servers and WebSocket servers descriptions of this reference, which some OpenAPI tools read as extra fields.
    • BRL deposits by PIX are documented with the current manual-confirmation flow (receiving account, reference, payment proof in the app, minimum R$ 100, 5-hour validity, 0,10% fee); examples use the current rails. Identifiers of older records (dubaicash rail/processor values and error code) are unchanged for compatibility.
  8. More deposit coins
    • Minimum deposit of US$ 10 (equivalent) on any coin: shown as mexc_deposit.min_usd, per network as min_amount and with the fixed address as min_usd; a confirmed deposit below it is not credited (status: below_min).
    • Fixed-address deposits now cover 20+ coins. GET /v1/rails/config → mexc_deposit.networks lists only coins the exchange holds and networks open for deposit right now, with coin_name, confirmations and memo_required.
  9. Sandbox: withdrawals, Convert and webhook receiver
    • Sandbox withdrawals (POST /v1/mexc/withdrawals) now run end to end against a simulated provider, with test addresses for failure, rejection and manual review.
    • Sandbox Convert settles against fictitious house liquidity.
    • New sandbox webhook receiver: POST/GET /v1/sandbox/webhook-inboxes, PATCH/DELETE /v1/sandbox/webhook-inboxes/{id}, GET /v1/sandbox/webhook-inboxes/{id}/requests and the public POST /v1/sandbox/webhook-inboxes/receive/{token}.
  10. Sandbox environment (default)
    • New sandbox at https://api-sandbox.arandixbit.com — the only server published in this reference. Fictitious balances, no real money, no external providers. Production access (endpoint and keys) is private, inside the account dashboard.
    • No shared or demo credentials: each developer creates their own account and API keys. New sandbox-only operations: GET /v1/sandbox/status, POST /v1/sandbox/kyc/approve, POST /v1/sandbox/partner/activate, POST /v1/sandbox/faucet and, for partners, POST /v1/partner/customers/{cid}/sandbox/kyc/approve and /sandbox/faucet (429 sandbox_faucet_limit). All answer 404 in production.
    • Code samples read the base URL and secrets from environment variables (ARX_API, ARX_KEY_ID, ARX_SECRET).
  11. Fixed deposit addresses
    • New GET /v1/crypto/fixed-address and GET /v1/crypto/fixed-deposits: one fixed deposit address per account, coin and network; deposits are credited automatically once per transaction (deposit.credited with rail: "mexc", txid, address).
    • Partners: GET /v1/partner/customers/{cid}/fixed-address and /fixed-deposits (one fixed address per sub-account); sub-account crypto withdrawals via GET …/{cid}/mexc/withdrawals/quote and POST …/{cid}/mexc/withdrawals (USDT included).
    • /v1/rails/config adds mexc_deposit and usdt.deposit_paused. USDT withdrawals move to POST /v1/mexc/withdrawals (coin: "USDT"); the legacy USDT order rail is paused (503 usdt_deposit_paused, 503 usdt_withdraw_moved).
  12. Close sub-accounts
    • New GET /v1/partner/customers/{cid}/close (closure checklist) and POST /v1/partner/customers/{cid}/close (unlink an end customer: zero balance and nothing open required; the sub-account moves to pending_closure and stops operating).
  13. Developer experience upgrade
    • New GET /v1/public/time server-time endpoint for clock synchronization of signed requests.
    • Idempotency-Key header on state-changing POSTs: stored-response mode (24 h replay with Idempotent-Replayed: true, idempotency_key_reused, idempotency_request_in_progress) and the existing permanent mode on Convert and withdrawals (now also sends Idempotent-Replayed). Keys of 1–100 characters.
    • Spot client_order_id (unique per account): set it on POST /v1/spot/orders, filter GET /v1/spot/orders?client_order_id= and cancel with POST /v1/spot/orders/by-client-id/{client_order_id}/cancel; returned on every order.
    • 401 timestamp_out_of_window now includes details.server_time and details.recv_window_ms.
    • Reference rewritten in English with examples for every operation and the x-arx-error-codes catalogue.
    • WebSocket market stream available at wss://stream.arandixbit.com/v1/ws, backed by new public endpoints /v1/public/symbols, /v1/public/book and /v1/public/trades.
    • Sub-account restricted API keys (customer_id) for partners, with x-arx-restricted-scope on sub-account routes.
    • Stable webhook delivery error_code on attempts, deliveries, tests and endpoints (last_error_code).
    • Automatic PIX reversals and MED (deposit.reversed, withdrawal.returned, statement type=reversal) and plan deposit limits (409 deposit_limit_exceeded, deposit block in GET /v1/me/limits).
    • CORS: Idempotency-Key accepted; Idempotent-Replayed, X-Request-Id and rate-limit headers exposed.
  14. Official channel verification
    • New GET /v1/public/verify to check whether a website, email or phone number is an official channel.
  15. Real spot fees
    • /v1/spot/symbols and /v1/public/symbols report the maker/taker fees actually charged (fee configuration, 1 %) instead of legacy constants.
  16. Webhook error codes
    • Stable error_code next to the free-text delivery error (dns_unresolved, blocked_address, connect_timeout, tls_error, http_status, redirect_not_allowed, body_too_large, secret_unavailable, invalid_url, other).
    • PATCH /v1/webhooks/endpoints/{id} re-validates DNS only when the URL changes.
  17. Public spot market data
    • GET /v1/public/symbols, /v1/public/book (depth 5/10/20) and /v1/public/trades (1–40) without authentication, cached for 1 s and limited per IP.
  18. Plan deposit limits and PIX reversals
    • Plan deposit limits enforced on fiat deposit creation (409 deposit_limit_exceeded); usage shown in GET /v1/me/limits.
    • Automatic PIX refunds, reversals and MED in the ledger with the deposit.reversed and withdrawal.returned webhooks.
  19. Sub-account isolation for partners
    • API keys restricted to a single sub-account (customer_id), acting as the sub-account; automatic revocation when unlinked.
    • Ledger statement: GET /v1/statement and GET /v1/partner/customers/{cid}/statement (JSON or CSV).
    • PIX deposits through the API: /v1/pix/deposits and the sub-account variants, with credit only to the account in context.
    • Sub-accounts can register their own webhook endpoints.
  20. Security hardening (penetration test)
    • Keys of accounts promoted to staff are rejected (403 staff_api_keys_forbidden) and revoked.
    • Anti-replay of signatures persisted across instances for state-changing requests.
    • Withdrawals: Idempotency-Key (retry returns the same withdrawal) and max_fee fee cap.
    • Cancelling withdrawals requires wallet.withdraw; webhook tests limited to 5 per minute; WebSocket frame limits include control frames.
  21. Public API launch
    • Scoped API keys signed with HMAC-SHA256, IP allow-lists, expiry and per-key rate limits.
    • OpenAPI 3.1 contract verified against the server routes, with localized errors (es, pt, en, gn).
    • Webhooks with signed deliveries, transactional outbox, retries for about 24 hours and delivery logs.
    • Public market-data WebSocket.
    • B2B partner API: sub-accounts, Sumsub KYC tokens, deposits, Convert and whitelisted withdrawals.
    • Unified history (GET /v1/history) with cursor pagination.

WebSocket de mercado

wss://stream.arandixbit.com/v1/ws, sin autenticación. Canales: ticker.<SYM>, book.<SYM>[@N] (N = 5, 10, 20 o 50) y trades.<SYM>, con <SYM> = BTC-USDT. Envíe {"op":"ping"} cada 25–30 s.

  • Cliente (JSON de hasta 4 KiB): {"op":"subscribe","channels":[…]}, {"op":"unsubscribe","channels":[…]} y {"op":"ping"}.
  • Servidor: subscribed / unsubscribed, pong, error con code, y {"channel","type":"snapshot"|"update","ts","data"}.
  • Cada canal nuevo recibe primero una foto (snapshot) y luego actualizaciones cada 1–2 s.
  • Límites: 10 conexiones por IP, 50 suscripciones por conexión y 100 mensajes cada 10 s.
  • El servidor envía ping cada 25 s y cierra tras 60 s sin tramas del cliente; un cliente lento se desconecta (1008).
const ws = new WebSocket('wss://stream.arandixbit.com/v1/ws');

ws.onopen = () => {
  ws.send(JSON.stringify({ op: 'subscribe', channels: ['ticker.BTC-USDT', 'book.BTC-USDT@20', 'trades.BTC-USDT'] }));
  setInterval(() => ws.send(JSON.stringify({ op: 'ping' })), 25_000);
};
ws.onmessage = (m) => {
  const msg = JSON.parse(m.data);
  if (msg.channel) console.log(msg.channel, msg.type, msg.data);
};

Webhooks

Configure endpoints en Ajustes → Webhooks o por API con el alcance webhooks. Cada entrega es un POST JSON firmado.

  • Cabecera X-ARX-Signature: t=<unix>,v1=<hex>, con v1 = HMAC-SHA256(secreto_del_endpoint, "<t>." + cuerpo_crudo).
  • Compare en tiempo constante y rechace t con más de 5 minutos.
  • Deduplique por X-ARX-Event-Id (es el mismo en reintentos y reenvíos).
  • Responda 2xx en hasta 10 s. Reintentos exponenciales durante unas 24 h (11 intentos). No se siguen redirecciones.
  • Tras 50 fallas seguidas el endpoint se desactiva y el titular recibe un correo.
  • URL solo https, puerto 443 y nombre de dominio público (no se aceptan direcciones IP); las direcciones internas o reservadas se bloquean.

Verificar la firma

import crypto from 'node:crypto';

// rawBody: the raw request body (string), before any JSON.parse
export function verifyWebhook(rawBody, signatureHeader, endpointSecret) {
  const parts = Object.fromEntries(signatureHeader.split(',').map((p) => p.split('=')));
  const expected = crypto.createHmac('sha256', endpointSecret)
    .update(parts.t + '.' + rawBody)
    .digest('hex');
  const fresh = Math.abs(Date.now() / 1000 - Number(parts.t)) < 300;
  return fresh && expected.length === parts.v1?.length &&
    crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(parts.v1));
}

Eventos

Abra un evento para ver los campos y un ejemplo del cuerpo.

deposit.creditedDepósito acreditado (USDT, on-chain o moneda local).
deposit.reversedDepósito PIX revertido (devolución o MED).
withdrawal.sentRetiro enviado al proveedor o a la red.
withdrawal.completedRetiro completado (con txid cuando existe).
withdrawal.failedRetiro fallido, rechazado o devuelto (monto liberado).
withdrawal.returnedRetiro PIX devuelto por el banco de destino.
order.filledOrden Spot ejecutada por completo.
convert.completedConversión completada (completed o partial).
convert.pending_approvalConversión con moneda local esperando aprobación del equipo.
convert.rejectedConversión rechazada por el equipo.
kyc.status_changedCambió el estado del KYC.
partner.customer.createdSocio: subcuenta creada.
partner.customer.kyc_approvedSocio: KYC de subcuenta aprobado.
partner.customer.kyc_rejectedSocio: KYC de subcuenta rechazado.
earn.openedPartner: Earn position opened
earn.releasedPartner: Earn yield released
earn.claimedPartner: Earn yield paid
earn.cancelledPartner: Earn early exit requested
earn.refundedPartner: Earn capital refunded
earn.maturedPartner: Earn position matured

API B2B y subcuentas

Las cuentas de socio aprobadas por ArandixBit operan subcuentas de sus clientes finales con los alcances partner.*.

  • Subcuentas: crear (correo nuevo, nombre y país), listar y consultar. Nunca se vincula una cuenta existente.
  • KYC: el socio pide un token del WebSDK de Sumsub para el cliente final; el socio nunca aprueba identidades.
  • Billetera, historial, depósito USDT, lista blanca, retiro USDT y Convertir por subcuenta, en /v1/partner/customers/{cid}/….
  • Clave restringida: con customer_id al crear la clave, esta actúa como la subcuenta indicada, solo con alcances de cliente (hasta 5 por subcuenta).
  • Webhooks con include_customers reciben también los eventos de las subcuentas (con customer_id).

Referencia de la API

Todas las operaciones públicas del contrato, agrupadas por sección. Abra una operación para ver parámetros, cuerpo, respuestas y ejemplos de código.

MercadoMarket

11 operaciones

Public market data, server time and the market-data WebSocket. No authentication.

public
public
public
public
public
public
public
public
public
public
public

CuentaAccount

6 operaciones

Balances, portfolio, plan limits, fees, unified history and ledger statement (account.read).

account.read
account.read
account.read
account.read
account.read
account.read

Spot

7 operaciones

Spot trading on the ArandixBit order book (spot.read / spot.trade). Trading requires approved KYC.

spot.read
spot.read
spot.read
spot.read
Idempotentspot.trade
Idempotentspot.trade
Idempotentspot.trade

ConvertirConvert

7 operaciones

Instant conversions between crypto and fiat (convert.read / convert.execute). Conversions involving fiat wait for staff approval.

convert.read
convert.read
convert.read
Idempotentconvert.execute
convert.read
convert.read
Idempotentconvert.execute

BilleteraWallet

21 operaciones

Deposits (USDT, on-chain, fiat, PIX), withdrawals (crypto, including USDT, via POST /v1/mexc/withdrawals) and the withdrawal whitelist (wallet.read / wallet.withdraw).

wallet.read
wallet.read
wallet.read
wallet.read
Idempotentwallet.read
wallet.read
wallet.read
Idempotentwallet.withdraw
wallet.read
Idempotentwallet.withdraw
wallet.read
wallet.withdraw
wallet.read
wallet.read
wallet.read
wallet.read
wallet.read
wallet.read
Idempotentwallet.read
wallet.read
wallet.read

Webhooks

11 operaciones

Webhook endpoints, delivery logs, test events and secret rotation (webhooks).

webhooks
webhooks
Idempotentwebhooks
webhooks
webhooks
webhooks
webhooks
webhooks
webhooks
webhooks
webhooks

Gestión de clavesKeys

5 operaciones

API key management. Interactive session only — keys cannot manage keys.

session
session
session
session
session

Socios B2BPartner

47 operaciones

B2B / white-label API for approved partners: create and operate customer sub-accounts (partner.*).

partner.customers.read
partner.customers.read
Idempotentpartner.customers.write
partner.customers.read
partner.customers.read
partner.kyc
partner.customers.read
Idempotentpartner.customers.write
partner.wallet.read
partner.wallet.read
partner.wallet.read
partner.wallet.read
Idempotentpartner.wallet.write
partner.wallet.read
partner.wallet.read
Idempotentpartner.wallet.read
partner.wallet.read
partner.wallet.read
partner.wallet.withdraw
partner.wallet.read
Idempotentpartner.wallet.withdraw
Idempotentpartner.wallet.withdraw
partner.convert
Idempotentpartner.convert
partner.convert
partner.wallet.read
partner.wallet.read
Idempotentpartner.wallet.read
Idempotentpartner.wallet.read
partner.wallet.read
partner.wallet.read
partner.wallet.read
partner.earn.read
partner.earn.read
Idempotentpartner.earn.write
partner.earn.read
partner.earn.read
Idempotentpartner.earn.write
Idempotentpartner.earn.write
partner.wallet.read
partner.wallet.read
Idempotentpartner.wallet.withdraw
partner.wallet.read
partner.wallet.read
partner.wallet.read
Idempotentpartner.wallet.withdraw
partner.wallet.read

Sandbox

12 operaciones

Sandbox-only self-service: test KYC/KYB approval, B2B activation and fictitious balances. Every operation answers 404 in production.

public
session
session
wallet.read
partner.kyc
partner.wallet.read
webhooks
webhooks
webhooks
webhooks
webhooks
public