Available ticker pair to exchange [Private]
A pre-request for a exchange operations is required only in case when exchange is combined with deposit or withdraw.
Method name: | /v2/exchange/pairs |
Request type: | GET |
To call private endpoints, you need to get a JWT token or an API key for authentication.
Here you can learn in detail how to successfully authenticate.
This endpoint shows which pairs are available for exchange. The list can be edited depending on the partner's needs and agreements. It is not possible to perform an exchange for a pair that is not included in the response from this endpoint. There is also information about operation types and possible source and target assets for each pair here.
The request can be made by pair, by a combination of pair and transaction type, or by transaction type.
Exemplary request
Example path | Description |
---|---|
/v2/exchange/pairs?operationType=DepositWithExchange | Available pairs for "Deposit with exchange (paid by fiat)" request. |
/v2/exchange/pairs?operationType=WithdrawWithExchange | Available pairs for "Exchange with withdraw (receive fiat)" request. |
/v2/exchange/pairs?operationType=CryptoExchange | Available pairs for "Сrypto to crypto exchange" request. |
/v2/exchange/pairs?operationType=BuyToSendCrypto | Available pairs for "Buy crypto to send to address" request. |
const url = BASE_URL;
const path = "/v2/exchange/pairs?operationType=DepositWithExchange";
const body = {};
const options = {
method: "GET",
headers: {
accept: "application/json",
"Content-Type": "application/json",
"Authorization": `Bearer ${data.accessToken}` // data.accessToken - generated a JWT token via /v2/auth/login.
},
body: JSON.stringify(body),
};
fetch(url + path, options)
.then((response) => response.json())
.then((showResponse) => console.log(showResponse.data));
import requests
url = BASE_URL
path = "/v2/exchange/pairs?operationType=DepositWithExchange"
headers = {
"accept": "application/json",
"Content-Type": "application/json",
"Authorization": "Bearer " + data.accessToken # data.accessToken - generated a JWT token via /v2/auth/login.
}
body = {}
request = requests.get(url + path, headers=headers, json=body)
print(request.json())
How to call private endpoints here
Response
{
"data": [
{
"pair": "BTC_EUR", // Pair.
"availableOperations": { // Available pairing operations.
"DepositWithExchange": { // Operation type.
"enabled": true, // The operation is enabled or not (false).
"availableCombinations": [ // Available combinations in this operation.
{
"sourceAsset": "EUR", // Source or base asset code.
"targetAsset": "BTC" // Target or quote asset code.
}
]
},
"WithdrawWithExchange": {
"enabled": true,
"availableCombinations": [
{
"sourceAsset": "BTC",
"targetAsset": "EUR"
}
]
},
"BuyToSendCrypto": {
"enabled": true,
"availableCombinations": [
{
"sourceAsset": "EUR",
"targetAsset": "BTC"
}
]
}
}
}
]
}
Updated about 2 months ago