Currency Guide
This guide outlines the basic operations with the Vault API, including working with tokens, exchange rates, and instruments. Follow the provided instructions to perform various requests.
Step 1: Retrieve the List of All Tokens
API Endpoint: Tokens Info
Description: This request returns the complete list of all tokens available in the system.
Steps:
- Send a GET request to the specified endpoint.
- The response will provide a list of tokens. Each token includes the following data:
-
[ { "id": 0, // token's unique identifier. "name": "string", // name of the token. "slug": "string", // token's slug (short name). "address": "string", // blockchain address of the token. "decimals": 0, // number of decimal places the token supports. "nativeSign": true, // indicates if the token has native support for signing. "minConsolidation": 0, // minimum consolidation amount for the token. "currency": { "id": 0, // currency's unique identifier. "slug": "string", // currency's slug (short name). "shortName": "string", // short name of the currency. "description": "string", // description of the currency. "type": "string", // type of the currency (e.g., fiat, crypto). "decimals": 0, // number of decimal places the currency supports. "iconUrl": "string", // URL to the currency's icon. "totalsPrecision": 0, // precision for total calculations. "roundingPrecision": 0, // rounding precision. "eurPrice": "9.87", // price of the currency in EUR. "settings": { "enabled": true, // indicates if the currency is enabled. "partner": "string", // partner code associated with the currency. "group": "string", // group code associated with the currency. "walletEnabled": true, // indicates if wallet transactions are enabled. "transferEnabled": true, // indicates if transfers are enabled. "transferFeePercent": 0, // percentage fee for transfers. "transferFeeFixed": 0, // fixed fee for transfers. "transferFeeMin": 0, // minimum transfer fee. "transferFeeMax": 0 // maximum transfer fee. } }, "blockchain": { "id": 0, // blockchain's unique identifier. "name": "string", // name of the blockchain. "slug": "string", // blockchain's slug (short name). "explorer": "string" // URL to the blockchain explorer. }, "settings": { "partner": "string", // partner code associated with the token. "group": "string", // group code associated with the token. "depositEnabled": true, // indicates if deposits are enabled. "depositFeePercent": 0, // percentage fee for deposits. "depositFeeFixed": 0, // fixed fee for deposits. "depositFeeMin": 0, // minimum deposit fee. "depositFeeMax": 0, // maximum deposit fee. "withdrawEnabled": true, // indicates if withdrawals are enabled. "withdrawFeePercent": 0, // percentage fee for withdrawals. "withdrawFeeFixed": 0, // fixed fee for withdrawals. "withdrawFeeMin": 0, // minimum withdrawal fee. "withdrawFeeMax": 0 // maximum withdrawal fee. } } ]
-
Step 2: Create a New Token
API Endpoint: Create Token
Description: Adds a new token to the system.
Steps:
-
Send a POST request to the specified endpoint with the data for the new token:
-
{ "id": 0, // token's unique identifier. "name": "string", // name of the token. "slug": "string", // token's slug (short name). "address": "string", // blockchain address of the token. "decimals": 0, // number of decimal places the token supports. "nativeSign": true, // indicates if the token has native support for signing. "minConsolidation": 0, // minimum consolidation amount for the token. "currency": { "id": 0, // currency's unique identifier. "slug": "string", // currency's slug (short name). "shortName": "string", // short name of the currency. "description": "string", // description of the currency. "type": "string", // type of the currency (e.g., fiat, crypto). "decimals": 0, // number of decimal places the currency supports. "iconUrl": "string", // URL to the currency's icon. "totalsPrecision": 0, // precision for total calculations. "roundingPrecision": 0, // rounding precision. "eurPrice": "9.87" // price of the currency in EUR. }, "blockchain": { "id": 0, // blockchain's unique identifier. "name": "string", // name of the blockchain. "slug": "string", // blockchain's slug (short name). "explorer": "string" // URL to the blockchain explorer. }, "settings": { "partner": "string", // partner code associated with the token. "group": "string", // group code associated with the token. "depositEnabled": true, // indicates if deposits are enabled. "depositFeePercent": 0, // percentage fee for deposits. "depositFeeFixed": 0, // fixed fee for deposits. "depositFeeMin": 0, // minimum deposit fee. "depositFeeMax": 0, // maximum deposit fee. "withdrawEnabled": true, // indicates if withdrawals are enabled. "withdrawFeePercent": 0, // percentage fee for withdrawals. "withdrawFeeFixed": 0, // fixed fee for withdrawals. "withdrawFeeMin": 0, // minimum withdrawal fee. "withdrawFeeMax": 0 // maximum withdrawal fee. } }
-
-
The response will confirm the creation of the token:
-
{ "id": 0, //token's unique identifier. "name": "MyToken", //name of the token. "slug": "mytoken", //token's slug (short name). "address": "0x1234567890abcdef", //blockchain address of the token. "decimals": 18, //number of decimal places the token supports. "nativeSign": true, //indicates if the token has native support for signing. "minConsolidation": 0, //minimum consolidation amount for the token. "currency": { "id": 1, //currency's unique identifier. "slug": "eur", //currency's slug (short name). "shortName": "EUR", //short name of the currency. "description": "Euro", //description of the currency. "type": "fiat", //type of the currency (e.g., fiat, crypto). "decimals": 2, //number of decimal places the currency supports. "iconUrl": "https://example.com/icon.png", //URL to the currency's icon. "totalsPrecision": 2, //precision for total calculations. "roundingPrecision": 2, //rounding precision. "eurPrice": "9.87" //price of the currency in EUR. }, "blockchain": { "id": 1, //blockchain's unique identifier. "name": "Ethereum", //name of the blockchain. "slug": "ethereum", //blockchain's slug (short name). "explorer": "https://etherscan.io/" //URL to the blockchain explorer. }, "settings": { "partner": "partnerName", //partner code associated with the token. "group": "groupName", //group code associated with the token. "depositEnabled": true, //indicates if deposits are enabled. "depositFeePercent": 0.1, //percentage fee for deposits. "depositFeeFixed": 0.01, //fixed fee for deposits. "depositFeeMin": 0.01, //minimum deposit fee. "depositFeeMax": 10.00, //maximum deposit fee. "withdrawEnabled": true, //indicates if withdrawals are enabled. "withdrawFeePercent": 0.1, //percentage fee for withdrawals. "withdrawFeeFixed": 0.01, //fixed fee for withdrawals. "withdrawFeeMin": 0.01, //minimum withdrawal fee. "withdrawFeeMax": 10.00 //maximum withdrawal fee. } }
-
Ensure that all required fields are correctly filled. Verify that the ID is not already in use for another token in the system
Step 3: Retrieve Short List of Tokens
API Endpoint: Summary Tokent
Description: Retrieves a simplified list of tokens with basic data.
Steps:
- Send a GET request to the specified endpoint.
- The response will provide an array with basic data for each token:
-
[ { "id": 0, //token's unique identifier. "name": "string", //name of the token. "slug": "string", //token's slug (short name). "address": "string", //blockchain address of the token. "decimals": 0, //number of decimal places the token supports. "nativeSign": true, //indicates if the token has native support for signing. "minConsolidation": 0 //minimum consolidation amount for the token. } ]
-
Step 4: Retrieve Exchange Rate for Currency Pair
API Endpoint: Get Exchange Rate for Currency Pair
Описание: Retrieves the current exchange rate for a specified currency pair.
Steps:
- Send a request with the following parameters:
-
{ "fromCurrency": "string", //currency from which the exchange is made. "toCurrency": "string", //currency to which the exchange is made. "amount": "string", //amount to be exchanged. "account": "string", //account identifier for special rate (optional). "partner": "string", //partner code for special rate (optional). "group": "string" //group identifier for special rate (optional). }
-
- The response will include the current exchange rate, validity, and signature:
-
{ "rateRequest": { "fromCurrency": "string", //currency from which the exchange is made. "toCurrency": "string", //currency to which the exchange is made. "amount": "1.12", //amount to be exchanged. "account": "string", //account identifier for special rate (optional). "partner": "string" //partner code for special rate (optional). }, "rate": "1.12", //current exchange rate. "validUntil": "string", //expiry time of the exchange rate. "signature": "string" //signature for the rate request. }
-
Exchange rates can change, so make sure to check the validity of the rate
Step 5: Retrieve List of All Instruments
API Endpoint: Get All Instruments
Description: Retrieves a list of all financial instruments.
Steps:
- Send a request to the specified endpoint.
- In the response, receive a list of instruments with their prices.
-
[ { "instruments": "string", // list of financial instruments. "price": 0 // current price of the instruments. } ]
-
Step 6: Retrieve Instrument Details
API Endpoint: Get Instrument Details
Description: Retrieves the price of a specific instrument.
Steps:
- Send a request with the parameter:
-
{ "instrument": "string" // identifier of the instrument. }
-
- In the response, receive the price of the specified instrument.
-
{ "instruments": "string", // identifier of the instruments. "price": 0 // price of the instruments. }
-
Step 7: Retrieve and Set Preferred Currencies for Account
Retrieve Preferred Currencies
API Endpoint: Get Preferred Currencies for Account
Description: Retrieves a list of currencies preferred for a specific account.
Steps:
- Send a request to the specified endpoint.
- In the response, receive a list of preferred currencies for the account.
Set Preferred Currencies
API Endpoint: Set Preferred Currencies for Account
Description: Sets the preferred currencies for an account.
Шаги:
- Send a POST request with the parameters:
-
{ "accountId": "string", // unique identifier of the account. "preferredCurrencies": ["string"] // list of preferred currencies. }
-
- In the response, receive confirmation of the preferred currencies being set.
Step 8: Retrieve the List of All Blockchains
API Endpoint: Get Blockchain List
Description: Retrieves a list of all blockchains supported by the system.
Steps:
- Send a request to the specified endpoint.
- In the response, receive a list of blockchains with their details.
-
[ { "id": 0, // unique identifier of the blockchain. "name": "string", // name of the blockchain. "slug": "string", // short name of the blockchain. "explorer": "string" // URL to the blockchain explorer. } ]
-
Step 9: Create New Blockchain
API Endpoint: Create New Blockchain
Description: Creates a new blockchain in the system.
Steps:
-
Send a POST request with the new blockchain data:
-
{ "id": 0, // unique identifier of the blockchain. "name": "string", // name of the blockchain. "slug": "string", // unique identifier (slug) of the blockchain. "explorer": "string" // URL to the blockchain explorer. }
-
-
In the response, receive confirmation of the blockchain creation with the provided data.
-
{ "id": 0, // unique identifier of the blockchain. "name": "string", // name of the blockchain. "slug": "string", // unique identifier (slug) of the blockchain. "explorer": "string" // URL to the blockchain explorer. }
-
Step 10: Retrieve List of All Currencies
API Endpoint: Get All Currencies
Description: Retrieves a list of all currencies in the system.
Steps:
- Send a request to the specified endpoint.
- In the response, receive a list of currencies with their details, such as:
-
[ { "id": 0, // unique identifier of the currency. "slug": "string", // unique identifier (slug) of the currency. "shortName": "string", // short name of the currency. "description": "string", // description of the currency. "type": "string", // type of the currency (e.g., fiat, crypto). "decimals": 0, // number of decimal places the currency supports. "iconUrl": "string", // URL to the currency's icon. "totalsPrecision": 0, // precision for total calculations. "roundingPrecision": 0, // rounding precision. "eurPrice": "9.87", // price of the currency in EUR. "settings": { "enabled": true, // indicates if the currency is enabled. "partner": "string", // partner code associated with the currency. "group": "string", // group code associated with the currency. "walletEnabled": true, // indicates if wallet functionality is enabled. "transferEnabled": true, // indicates if transfers are enabled. "transferFeePercent": 0, // percentage fee for transfers. "transferFeeFixed": 0, // fixed fee for transfers. "transferFeeMin": 0, // minimum transfer fee. "transferFeeMax": 0 // maximum transfer fee. }, "tokens": [ { "id": 0, // unique identifier of the token. "name": "string", // name of the token. "slug": "string", // unique identifier (slug) of the token. "address": "string", // blockchain address of the token. "decimals": 0, // number of decimal places the token supports. "nativeSign": true, // indicates if the token has native support for signing. "minConsolidation": 0, // minimum consolidation amount for the token. "blockchain": { "id": 0, // unique identifier of the blockchain. "name": "string", // name of the blockchain. "slug": "string", // unique identifier (slug) of the blockchain. "explorer": "string" // URL to the blockchain explorer. }, "settings": { "partner": "string", // partner code associated with the token. "group": "string", // group code associated with the token. "depositEnabled": true, // indicates if deposits are enabled. "depositFeePercent": 0, // percentage fee for deposits. "depositFeeFixed": 0, // fixed fee for deposits. "depositFeeMin": 0, // minimum deposit fee. "depositFeeMax": 0, // maximum deposit fee. "withdrawEnabled": true, // indicates if withdrawals are enabled. "withdrawFeePercent": 0, // percentage fee for withdrawals. "withdrawFeeFixed": 0, // fixed fee for withdrawals. "withdrawFeeMin": 0, // minimum withdrawal fee. "withdrawFeeMax": 0 // maximum withdrawal fee. } } ] } ]
-
Step 11: Retrieve Currency by Slug
API Endpoint: Get Currency by Slug
Description: Retrieves currency information by its slug.
Steps:
- Send a request with the parameter:
-
{ "slug": "string", // unique identifier (slug) of the currency. }
-
- ВIn the response, receive details about the currency, including information about related tokens.
-
{ "id": 0, // unique identifier of the currency. "slug": "string", // unique identifier (slug) of the currency. "shortName": "string", // short name of the currency. "description": "string", // description of the currency. "type": "string", // type of the currency (e.g., fiat, crypto). "decimals": 0, // number of decimal places the currency supports. "iconUrl": "string", // URL to the currency's icon. "totalsPrecision": 0, // precision for total calculations. "roundingPrecision": 0, // rounding precision. "eurPrice": "9.87", // price of the currency in EUR. "settings": { "enabled": true, // indicates if the currency is enabled. "partner": "string", // partner code associated with the currency. "group": "string", // group code associated with the currency. "walletEnabled": true, // indicates if wallets are enabled for the currency. "transferEnabled": true, // indicates if transfers are enabled for the currency. "transferFeePercent": 0, // percentage fee for transfers. "transferFeeFixed": 0, // fixed fee for transfers. "transferFeeMin": 0, // minimum transfer fee. "transferFeeMax": 0 // maximum transfer fee. }, "tokens": [ { "id": 0, // unique identifier of the token. "name": "string", // name of the token. "slug": "string", // unique identifier (slug) of the token. "address": "string", // blockchain address of the token. "decimals": 0, // number of decimal places the token supports. "nativeSign": true, // indicates if the token has native support for signing. "minConsolidation": 0, // minimum consolidation amount for the token. "blockchain": { "id": 0, // unique identifier of the blockchain. "name": "string", // name of the blockchain. "slug": "string", // unique identifier (slug) of the blockchain. "explorer": "string" // URL to the blockchain explorer. }, "settings": { "partner": "string", // partner code associated with the token. "group": "string", // group code associated with the token. "depositEnabled": true, // indicates if deposits are enabled for the token. "depositFeePercent": 0, // percentage fee for deposits. "depositFeeFixed": 0, // fixed fee for deposits. "depositFeeMin": 0, // minimum deposit fee. "depositFeeMax": 0, // maximum deposit fee. "withdrawEnabled": true, // indicates if withdrawals are enabled for the token. "withdrawFeePercent": 0, // percentage fee for withdrawals. "withdrawFeeFixed": 0, // fixed fee for withdrawals. "withdrawFeeMin": 0, // minimum withdrawal fee. "withdrawFeeMax": 0 // maximum withdrawal fee. } } ] }
-
Step 12: Retrieve Short List of Currencies
API Endpoint: Get Short Currency List
Description: Retrieves a simplified list of all currencies with basic data.
Steps:
- Отправьте запрос на указанный эндпоинт.
- В ответе получите массив валют с основными данными:
-
[ { "id": 0, // unique identifier of the currency. "slug": "string", // unique identifier (slug) of the currency. "shortName": "string", // short name of the currency. "description": "string", // description of the currency. "type": "string", // type of the currency (e.g., fiat, crypto). "decimals": 0, // number of decimal places the currency supports. "iconUrl": "string", // URL to the currency's icon. "totalsPrecision": 0, // precision for total calculations. "roundingPrecision": 0, // rounding precision. "eurPrice": "9.87", // price of the currency in EUR. "settings": { "enabled": true, // indicates if the currency is enabled. "partner": "string", // partner code associated with the currency. "group": "string", // group code associated with the currency. "walletEnabled": true, // indicates if wallet functionality is enabled. "transferEnabled": true, // indicates if transfers are enabled. "transferFeePercent": 0, // percentage fee for transfers. "transferFeeFixed": 0, // fixed fee for transfers. "transferFeeMin": 0, // minimum transfer fee. "transferFeeMax": 0 // maximum transfer fee. } } ]
-
Step 13: Retrieve Currency by Name
API Endpoint: Get Currency by Name
Description: Retrieves information about a currency by its name.
Steps:
-
Send a request with the following parameter:
-
{ "name": "string" // name of the currency. }
-
-
In the response, receive detailed information about the currency and its associated tokens.
-
{ "id": 0, // unique identifier of the currency. "slug": "string", // unique identifier (slug) of the currency. "shortName": "string", // short name of the currency. "description": "string", // description of the currency. "type": "string", // type of the currency (e.g., fiat, crypto). "decimals": 0, // number of decimal places the currency supports. "iconUrl": "string", // URL to the currency's icon. "totalsPrecision": 0, // precision for total calculations. "roundingPrecision": 0, // rounding precision. "eurPrice": "9.87", // price of the currency in EUR. "settings": { "enabled": true, // indicates if the currency is enabled. "partner": "string", // partner code associated with the currency. "group": "string", // group code associated with the currency. "walletEnabled": true, // indicates if wallets are enabled for the currency. "transferEnabled": true, // indicates if transfers are enabled for the currency. "transferFeePercent": 0, // percentage fee for transfers. "transferFeeFixed": 0, // fixed fee for transfers. "transferFeeMin": 0, // minimum transfer fee. "transferFeeMax": 0 // maximum transfer fee. }, "tokens": [ { "id": 0, // unique identifier of the token. "name": "string", // name of the token. "slug": "string", // unique identifier (slug) of the token. "address": "string", // blockchain address of the token. "decimals": 0, // number of decimal places the token supports. "nativeSign": true, // indicates if the token has native support for signing. "minConsolidation": 0, // minimum consolidation amount for the token. "blockchain": { "id": 0, // unique identifier of the blockchain. "name": "string", // name of the blockchain. "slug": "string", // unique identifier (slug) of the blockchain. "explorer": "string" // URL to the blockchain explorer. }, "settings": { "partner": "string", // partner code associated with the token. "group": "string", // group code associated with the token. "depositEnabled": true, // indicates if deposits are enabled for the token. "depositFeePercent": 0, // percentage fee for deposits. "depositFeeFixed": 0, // fixed fee for deposits. "depositFeeMin": 0, // minimum deposit fee. "depositFeeMax": 0, // maximum deposit fee. "withdrawEnabled": true, // indicates if withdrawals are enabled for the token. "withdrawFeePercent": 0, // percentage fee for withdrawals. "withdrawFeeFixed": 0, // fixed fee for withdrawals. "withdrawFeeMin": 0, // minimum withdrawal fee. "withdrawFeeMax": 0 // maximum withdrawal fee. } } ] }
-
Updated 2 months ago