Skip to main content

List Fiat Currencies

This endpoint returns all fiat currencies available for your account. Use this route to query currencies and build the withdraw order request.


Endpoint​

  • Method: GET
Endpoint URL
https://api.xgateglobal.com/withdraw/company/currencies

Test Integration​

Use the form below to simulate listing fiat currencies.

Test: List Currencies (Withdraw)

1. Your Credentials

Request​

The request does not require a body (body); only authentication Headers.

Required Headers​

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

Responses​

Success (200 OK)​

Returns a list (array) of objects, where each object is a currency.

[
{
"_id": "6728f0a2cb************",
"name": "BRL",
"type": "PIX",
"createdDate": "2024-1************",
"updatedDate": "2026-0************",
"__v": 0,
"symbol": "R$",
"supplierFeeByActivity": {
"xgatetreeal": {
"type": "FIXED",
"value": 0.0
},
"xgatetreealliquidity": {
"type": "PERCENTAGE",
"value": 0.00
}
}
}
]

Common Errors​

StatusMessageLikely Cause
401Unauthorized• Invalid or expired token.
• Invalid or missing header.
• IP not allowed.
404Not FoundCustomer not found.
500Internal Server ErrorInternal server error. Contact support.

How to use​

The main purpose of listing fiat currencies is to allow selection of the correct currency when creating a withdraw order (Withdraw Order).

The response from this endpoint provides the Full Object of the currency, which is required when building the create order payload.

Integration Flow​

  1. List the currencies: Call this endpoint (GET /withdraw/company/currencies).
  2. Select: Identify the desired currency in the list (typically by name or symbol, e.g., "BRL").
  3. Submit: Pass the object within the currency property in the create order payload — required fields are shown in the create withdraw documentation.

Practical Example​

1. What you receive when listing fiat currencies:

[
{
"_id": "6728f0a2cb************",
"name": "BRL",
"type": "PIX",
"createdDate": "2024-1************",
"updatedDate": "2026-0************",
"__v": 0,
"symbol": "R$",
"supplierFeeByActivity": {
"xgatetreeal": {
"type": "FIXED",
"value": 0.0
},
"xgatetreealliquidity": {
"type": "PERCENTAGE",
"value": 0.00
}
}
}
]

2. How you should send it in the withdraw (POST /withdraw):

You will take the object above and inject it inside currency:

{
"amount": 0.2,
"customerId": "68e7b8****************",
"currency": {
"_id": "6728f0a2cb************",
"name": "BRL",
"type": "PIX",
"createdDate": "2024-1************",
"updatedDate": "2026-0************",
"__v": 0,
"symbol": "R$",
"supplierFeeByActivity": {
"xgatetreeal": {
"type": "FIXED",
"value": 0.0
},
"xgatetreealliquidity": {
"type": "PERCENTAGE",
"value": 0.00
}
}
},
"pixKey": {
"key": "+5512************",
"type": "PHONE",
"_id": "68fa5d54004*************"
}
}

Each field in this JSON is explained on the create withdraw order page.


Integration​

The integration example uses the Axios library in Node.js.

Installing Axios:

npm install axios

JavaScript Example:

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}/withdraw/company/currencies`, {
headers: {
"Authorization": `Bearer ${login.data.token}`
}
});
console.log(data); // Response
} catch (error) {
console.log(error.response.data.message) // Error
}
})()