Skip to main content

Get Options

Returns what your company can do right now: enabled assets and networks, purchase limits, saved addresses, and quote validity. Use this route before quoting or buying.


Endpoint​

  • Method: GET
Endpoint URL
https://api.xgateglobal.com/crypto/options

Request​

Required Headers​

HeaderValueDescription
AuthorizationBearer <your_token>The JWT token obtained at login.

This route does not take parameters.


Responses​

Success (200 OK)​

{
"assets": [
{
"asset": "USDT",
"networks": [
{ "network": "TRON", "networkFee": "0.012000", "networkFeeAsset": "USDT" },
{ "network": "POLYGON", "networkFee": "0.003000", "networkFeeAsset": "USDT" }
]
},
{
"asset": "USDC",
"networks": [
{ "network": "SOLANA", "networkFee": "0.002000", "networkFeeAsset": "USDC" }
]
}
],
"buy": {
"enabled": true,
"minAmount": "50.00",
"maxAmountPerTx": "100000.00",
"dailyCap": "500000.00",
"dailyRemaining": "498500.00",
"totpThreshold": null,
"autoApproval": false,
"addresses": [
{
"addressId": "66f1a2b3c4d5e6f708192a3b",
"alias": "Treasury wallet",
"address": "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE",
"network": "TRON",
"source": "MANUAL",
"addedAt": "2026-10-01T12:00:00.000Z",
"activeAt": "2026-10-01T12:00:00.000Z"
}
]
},
"savedAddressesOnly": {
"enabled": false,
"newAddressHoldHours": 24
},
"quoteTtlSeconds": 30,
"sale": {
"enabled": false,
"status": "DISABLED",
"minAmount": { "USDT": null, "USDC": null },
"depositAddresses": []
}
}

Field Description​

FieldTypeDescription
assets[].assetUSDT | USDCAsset.
assets[].networks[].networkstringNetwork available for the asset (POLYGON, ETHEREUM, TRON, SOLANA).
assets[].networks[].networkFeestring | nullEstimated network gas in the asset itself (6 decimal places), deducted from delivery. null when unavailable or when the company rule is percentage-based.
assets[].networks[].networkFeeAssetUSDT | USDCAsset in which network gas is charged.
buy.enabledbooleanPurchase enabled for the company.
buy.minAmountstringMinimum purchase amount, in BRL.
buy.maxAmountPerTxstring | nullMaximum amount per purchase, in BRL.
buy.dailyCapstring | nullDaily purchase cap, in BRL.
buy.dailyRemainingstring | nullRemaining daily purchase cap, in BRL.
buy.totpThresholdstring | nullUsed only in the panel. Does not apply to the API.
buy.autoApprovalbooleantrue = purchase does not go through the XGate approval queue.
buy.addresses[]arrayCompany saved addresses: addressId, alias, address, network, source (MANUAL | CARD), addedAt, activeAt. addressId can be used as destination for purchases.
savedAddressesOnly.enabledboolean"Saved addresses only" lock, toggled by the company in the panel.
savedAddressesOnly.newAddressHoldHoursintegerHold period, in hours, for newly registered addresses when the lock is active (24).
quoteTtlSecondsintegerQuote validity, in seconds (30).
sale.enabledbooleanSale enabled for the company by XGate.
sale.statusstringDISABLED · PROVISIONING · READY. The first query by an enabled company generates the addresses: stays in PROVISIONING for a few minutes then moves to READY.
sale.minAmountobjectMinimum sale amount per asset (USDT, USDC), in asset quantity.
sale.depositAddresses[]arrayFixed company deposit address for each asset × network pair (asset, network, address). Empty while sale.enabled is false. See Sell Crypto.
Saved addresses lock

With savedAddressesOnly.enabled = true, purchases only accept addresses from buy.addresses[], and newly added addresses can only be used after activeAt (hold duration of newAddressHoldHours).

Common Errors​

StatusReason
400VALIDATION_FAILED
401UNAUTHORIZED
403PERMISSION_DENIED, COMPANY_MISMATCH, COMPANY_BLOCKED, ALLOWED_IPS_REQUIRED, CLIENT_IP_NOT_ALLOWED, CRYPTO_DISABLED, CRYPTO_API_DISABLED
503CONFIGURATION_UNAVAILABLE, SERVICE_OVERLOADED

See the meaning of each code in Error Codes.


Integration​

Integration example using the Axios library in Node.js.

npm install axios
const axios = require("axios");

(async () => {
const email = "your_email@domain.com";
const password = "**********";

try {
const url_api = "https://api.xgateglobal.com";
const login = await axios.post(`${url_api}/auth/token`, { email, password });
const { data } = await axios.get(`${url_api}/crypto/options`, {
headers: { "Authorization": `Bearer ${login.data.token}` }
});
console.log(data.assets, data.buy); // Response
} catch (error) {
console.log(error.response.data.reason, error.response.data.message); // Error
}
})()