Skip to Content

Connecting to BCS API

To connect BCS via BCS API, issue a refresh token in the web version of BCS World of Investments («БКС Мир инвестиций») and enter it in the JetScalp connection settings.

Each BCS token is bound to exactly one brokerage account (trade-api.bcs.ru ). Issue the token for the account you are going to trade on from JetScalp.

1.Issue a BCS API token

Open the web version of BCS World of Investments  and sign in.

In the Profile («Профиль») section, under the Accounts and plans («Счета и тарифы») heading, click the brokerage account you want to access via the API. In the account settings, select API tokens («Токены API»), click Issue token («Выпустить токен») and follow the instructions.

BCS API issues tokens with different access rights:

  • For trading and reading data («Для торговли и чтения данных») — market and limit orders on the Moscow Exchange, quotes and portfolio data.
  • Read only («Только для чтения») — quotes and portfolio data, but no order placement.

To trade from JetScalp, issue a token for trading and reading data.

2.Copy the token

After the token is issued, BCS displays it. Copy it and keep it in a safe place.

The token is a long string of three parts separated by dots:

eyJhbGciOi...xxxxxxxx.eyJleHAiOi...xxxxxxxx.xxxxxxxxxxxxxxxx

Paste the whole token, without spaces or line breaks. You do not need to add Bearer.

The token is a secret key to your brokerage account: do not share it with anyone or publish it.

3.Add the connection in JetScalp

Open Settings Settings → Connections, click Add connection below the connection list and click the tile BCS API. The connection appears in the list, and its settings appear on the right.

Fill in the connection settings:

FieldValue
NameThe connection name in the list. By default it is the exchange or broker name; you can change it.
BCS Trade API tokenThe refresh token issued in the API tokens section of BCS World of Investments.
ProxyA proxy from the list or None. See Proxy settings.
Receive market dataReceive market data (order books, time and sales) through this connection. On by default; turn it off if quotes come from another connection.

The token is stored encrypted in the JetScalp settings.

If Receive market data is off, the connection is used for trading only: orders, trades, positions and account limits. Quotes must then come from another Moscow Exchange connection.

4.Turn on the connection and check

Turn the connection on with the switch on the right of its row in the list. The state appears under the connection name: first connecting…, then connected. If the connection fails, the error text appears there — the full text is shown in the tooltip and in the header of the connection settings. For all states, see Connections.

Check that:

  • BCS API is connected.
  • The BCS account and its balance are shown.
  • Open positions and active orders are shown.
  • Orders are placed and canceled.

If Receive market data is on, JetScalp starts receiving market data for Moscow Exchange stocks, futures and currencies.

If the connection does not work

Check that:

  • the token is copied completely;
  • the token is for trading and reading data, not read only;
  • the token has not been deleted in the API tokens section and has not expired;
  • the token was issued for the brokerage account you trade on;
  • your internet connection is working;
  • the proxy settings are correct, if you selected a proxy.

The message “BCS API token is not set.” means the BCS Trade API token field is empty.

If a message starting with “BCS API: error getting token” appears and the connection is dropped, BCS has rejected the token: it was entered incorrectly, deleted or has expired. Issue a new token and enter it in the connection settings.

Token expiration

A BCS API refresh token is valid for 90 days.

Using it, JetScalp obtains a short-lived access token (valid for 24 hours) on its own and renews it in advance by briefly reconnecting to BCS. This is a scheduled operation: no notification is shown, and positions and orders are preserved.

JetScalp does not extend the refresh token itself. When it expires, the connection can no longer be established — issue a new token in Profile («Профиль») → Accounts and plans («Счета и тарифы») → (brokerage account) → API tokens («Токены API») and replace it in the BCS Trade API token field of the connection settings. Tokens you no longer need are deleted in the same section with the delete icon to the right of the token.

Last updated on