Skip to main content

Error Codes

Every crypto API error is returned in the { "reason", "message", "traceId" } envelope (see Conventions). Always use reason in your logic; message is for informational purposes only.


Reasons by HTTP status​

HTTPReasons
400VALIDATION_FAILED, AMOUNT_MUST_BE_STRING, CONFLICTING_FIELDS
401UNAUTHORIZED
403PERMISSION_DENIED, COMPANY_MISMATCH, COMPANY_BLOCKED, ALLOWED_IPS_REQUIRED, CLIENT_IP_NOT_ALLOWED, CRYPTO_DISABLED, CRYPTO_API_DISABLED, BUY_DISABLED
404PURCHASE_NOT_FOUND, SALE_NOT_FOUND, QUOTE_NOT_FOUND, SAVED_ADDRESS_NOT_FOUND, ROUTE_NOT_FOUND
409EXTERNAL_ID_CONFLICT, QUOTE_EXPIRED, QUOTE_ALREADY_USED
410FEATURE_DISCONTINUED (crypto withdrawal, crypto withdrawal quotes, and customer wallet, from 2026-10-30 onward)
413PAYLOAD_TOO_LARGE
422AMOUNT_BELOW_MIN, AMOUNT_ABOVE_MAX, AMOUNT_TOO_LOW_FOR_NETWORK_FEE, ASSET_NOT_SUPPORTED, NETWORK_NOT_SUPPORTED, ADDRESS_INVALID_FOR_NETWORK, ADDRESS_NOT_SAVED, ADDRESS_ON_HOLD, ADDRESS_NOT_ALLOWED, SAVED_ADDRESS_NETWORK_MISMATCH, INSUFFICIENT_BALANCE, PRICE_UNSTABLE
429RATE_LIMITED, DAILY_CAP_EXCEEDED, OUTFLOW_HOURLY_CAP_EXCEEDED
500INTERNAL_SERVER_ERROR
503PRICE_STALE, NETWORK_FEE_UNAVAILABLE, CRYPTO_TEMPORARILY_UNAVAILABLE, CONFIGURATION_UNAVAILABLE, PURCHASE_UNAVAILABLE, SERVICE_OVERLOADED, FEATURE_STATUS_UNAVAILABLE

Meaning of the main reasons​

ReasonMeaningWhat to do
VALIDATION_FAILEDA field is missing or has an invalid format.Correct the body or query.
AMOUNT_MUST_BE_STRINGMonetary amount was sent as a number.Send it as a string ("1500.00").
CONFLICTING_FIELDSFields from different methods were combined (e.g., quoteId with amount).Use only one method.
PERMISSION_DENIEDThe API user does not have access to this operation.Contact XGate.
COMPANY_BLOCKEDThe company is blocked.Contact support.
ALLOWED_IPS_REQUIREDThe company has no allowed IP list.Add IPs in the Dashboard.
CLIENT_IP_NOT_ALLOWEDThe request came from an IP outside the list.Allow the IP in the Dashboard.
CRYPTO_DISABLEDCrypto is not enabled for the company.Contact XGate.
CRYPTO_API_DISABLEDCrypto API access is not enabled for the company.Contact XGate.
BUY_DISABLEDPurchases are not enabled for the company.Contact XGate.
PURCHASE_NOT_FOUNDPurchase ID does not exist, is malformed, or belongs to another company.Check the id returned when the purchase was created.
SALE_NOT_FOUNDSale ID does not exist, is malformed, or belongs to another company.Check the id received in the webhook.
QUOTE_NOT_FOUNDquoteId does not exist.Generate a new quote.
QUOTE_EXPIREDThe quote has passed its expiresAt time.Generate a new quote.
QUOTE_ALREADY_USEDThe quote has already been used for another purchase.Generate a new quote.
EXTERNAL_ID_CONFLICTexternalId has already been used with a different body.Use a different externalId.
SAVED_ADDRESS_NOT_FOUNDaddressId does not exist.Check buy.addresses[].
SAVED_ADDRESS_NETWORK_MISMATCHThe saved address belongs to a different network.Use an address for the purchase network.
ADDRESS_INVALID_FOR_NETWORKThe address is invalid for the network.Check the address.
ADDRESS_NOT_SAVEDThe “saved addresses only” restriction is enabled, and the address is not saved.Save the address in the Dashboard or use addressId.
ADDRESS_ON_HOLDThe saved address is still within its hold period.Wait until activeAt.
ASSET_NOT_SUPPORTEDThe asset is unsupported or not enabled.Check GET /crypto/options.
NETWORK_NOT_SUPPORTEDThe network is not supported for the asset.Check GET /crypto/options.
AMOUNT_BELOW_MINThe amount is below buy.minAmount.Increase the amount.
AMOUNT_ABOVE_MAXThe amount exceeds buy.maxAmountPerTx.Split it into smaller purchases.
AMOUNT_TOO_LOW_FOR_NETWORK_FEEThe amount does not cover the fee and network gas.Increase the amount or choose another network.
INSUFFICIENT_BALANCEInsufficient BRL balance.Deposit BRL before purchasing.
PRICE_UNSTABLEThe price is currently unstable. No amount was debited.Try again shortly.
PRICE_STALEThe reference price is unavailable.Try again shortly.
NETWORK_FEE_UNAVAILABLEThe network gas fee could not be estimated.Try again or use another network.
RATE_LIMITEDToo many requests per minute.Wait for Retry-After.
DAILY_CAP_EXCEEDEDThe daily purchase cap has been reached.Wait until the next day or check buy.dailyRemaining.
OUTFLOW_HOURLY_CAP_EXCEEDEDThe treasury’s hourly outflow cap has been reached.Try again later.
CRYPTO_TEMPORARILY_UNAVAILABLECrypto is temporarily unavailable.Try again later.
FEATURE_DISCONTINUEDOld crypto route, disabled on 30/10/2026.Use Crypto Buy and Sell.
FEATURE_STATUS_UNAVAILABLEThe discontinuation status could not be verified.Try again.

Purchase rejection reasons​

When a purchase ends in REJECTED, the rejection.reason field contains one of the reasons below. For all of them, rejection.refunded = true means the full BRL amount, including fees, was returned to the balance.

rejection.reasonMeaning
INSUFFICIENT_BALANCEInsufficient BRL balance.
QUOTE_NOT_FOUNDQuote does not exist.
QUOTE_EXPIREDQuote has expired.
QUOTE_ALREADY_USEDQuote has already been used.
PRICE_STALEReference price is unavailable.
PRICE_UNSTABLEPrice is unstable; no amount was debited.
NETWORK_FEE_UNAVAILABLENetwork gas fee is unavailable.
AMOUNT_TOO_LOW_FOR_NETWORK_FEEAmount does not cover the fee and gas.
DAILY_CAP_EXCEEDEDDaily cap has been reached.
OUTFLOW_HOURLY_CAP_EXCEEDEDTreasury’s hourly outflow cap has been reached.
LIQUIDITY_UNAVAILABLELiquidity is unavailable.
CRYPTO_TEMPORARILY_UNAVAILABLECrypto is temporarily unavailable.
APPROVAL_REJECTEDRejected in XGate’s approval queue.
PROVIDER_REJECTEDRejected by the custody provider.
SEND_FAILEDTransfer failed; no funds were sent.