What is API-key – Veles Help Center

What is API-key

Let’s look at an example configuration.

What we see in this example:

  • There are two accounts on the exchange – the Main Account and the Subaccount. They are independent of each other, they are like two separate exchanges. Initially, all users of the exchange have only the main account, and subaccounts are created at will.
  • Each exchange account is divided into two accounts at a lower level. A Funding account is used to store funds, and a Unified Trading account is used for trading operations. Our bots log into only one strictly defined trading account, and nowhere else.
  • In order for bots (or other applications) to access the trading account, you first need to open access to it – create an API key. You can have one, or you can have several API keys for the same trading account and same application.
  • In our example, the Main account has three different API keys for Veles and one API key for the TradersDiaries.
  • The Subaccount 1 has two different API keys for Veles and one API key for the TradersDiaries.
  • In the Veles account (in your cabinet), you need to create an intermediate element – a Binding to the API key on the exchange. And the Binding will be selected in the bot settings. Bindings can be edited by saving data from another API key in them (if the old key get expired, for example).
  • If a specific API key has permissions for two types of trading – both Spot and Futures (like API-1, API-4, API-5 on the picture), then both Spot and Futures Bindings can be created for it.
  • If a specific API key has permissions for only one type of trade (like API-2 and API-3), then it can only be linked to this exact type.
  • In the Veles account, all bots have a setting for one of the created Bindings. You can change this setting in the bot, and the bot will start trading using a different link. And the other Binging will either point to another trading account or have other locks.
  • Several exchanges can be connected to one Veles account. The accounts in these exchange may be organized a little differently, but the principle of connection will be the same. An API key is created on the trading account, its data is stored in the Binding, and the desired Binding is selected in the bot.

And now let’s explain in a little more detail.

An API key is an object created and stored on an exchange. This is a data set that includes “login + password + permissions”, only it is not created for a person, but for some program. In this case, for the Veles service, so that the bot can log into your trading account and place orders on your behalf. When creating keys with the “Link to a third-party application” option, you specify “Veles” as the selected application, and no other program or website will enter the exchange using this key, even if it knows the “login + password”.

The password (the secret part of the API key) is displayed only once when you create the API key manually. You will not be able to view it in the saved API key. Therefore, you need to transfer the secret to the password database if you plan to use this API key in different Bindings (for example, on the main Veles website and on the beta stand).

And if the quick connect procedure is used, the secret part is not shown at all, that is, there is no way to register such a key in other Bindings.

One account on the exchange can have several API keys, both for different services and for the same one. It is recommended to delete unused keys.

The Binding in Veles cabinet to this API key is an object stored on the Veles website, that is, a configuration component for the bot that indicates which exchange account the bot should trade on.
You can select one prepared Binding in several bots – and all of them will go to one trading account to work.

What you see in the Veles profile in the “API keys” section (page https://veles.finance/cabinet/account/api) are actually all the Bindings. The API keys themselves reside on the exchange. Like in this example, on Bybit:

The binding can be either Futures only or Spot only. The API key, however, may contain permissions for both types of trading. That is, there may be one key on the exchange, and there will be two different bindings in the profile for it – Spot and Futures. Like on the screenshot below, where both Bindings (named “Bybit Spot NLYT” and “Bybit Futures NLYT”) point to the same API key.

The “API key + Binding” set can be created either with “Fast connection” (available for the main account of the exchange), or completely manually (required for subaccounts, since Fast connection is not supported).

If you change the key on the exchange, and you already have a binding used in twenty bots, then you just need to edit this one binding, insert new data from the key into it. And all bots will automatically use the new data, you do not need to edit each of them.

When the API Binding is created correctly, the bot displays the amount of available funds (“Transferrable amount”) on the corresponding trading account in the “BALANCE” field. A Trading Account is a Derivative, Spot, or Unified Trading Account on an exchange. The Funding account is not a trading account, the bot does not connect to it.

The bot does not show all the funds, but only the currency that it needs for trading (a stablecoin or the selected coin if it is the Short-bot on the Spot).

The exchange itself, on the Assets page, shows you the amount of all assets converted at the current exchange rate into USD or another fiat currency, as configured in your exchange profile, and the current Unrealised PnL. That is, the chart on this page is not a chart of the bot’s trading results. And the amount of funds on a Unified Trading Account is not what is available to the bot at the moment.

Take a closer look – this number is constantly changing, because the exchange rates of coins and PnL positions are changing, for example, and recalculation and updating are taking place.

If your funds are in the right trading account, but the bot sees the amount less than expected, or even “0”, then you need to go to the exchange, to the trading account itself (find the page with the charts of coins), and check what open positions and orders are placed there. Open positions with negative PnL reduce free funds amound down to zero (and return them when they go into profit, to positive PnL). And when creating orders, the exchange also reserves funds from the free margin, and then either returns them to the balance (when the order is canceled), or this amount goes into the deals volume (if the order is executed).

Note. The amount of funds that you see in the Veles profile in the Balance section is not funds for trading, but a separate, internal wallet. It is used exclusively to pay service fees and subscriptions on our platform.

Veles cooperates with exchanges!

Register using our links and get maximum bonuses from exchanges.