TSLab
TSLab.proSupportTSLab LiveTSVerse
Eng
Eng
  • TSLab trading platform
  • For newbies
    • A beginner's guide
      • Purchasing a license key for a data provider
      • An example of connecting text quotes
      • Example of connecting a data provider to a broker / exchange
      • An example of creating a script in TSLab
      • An example of creating a trading algorithm in TSLab
  • Installing TSLab
    • TSLab Installation Guide
      • System requirements
      • TSLab Installation manual
    • Update TSLab
      • Preparing for update
      • Release build
      • Nightly build
    • Restarting the TSLab program
    • TSLab Changelog
      • TSLab 2.1 Changelog
      • TSLab 2.2 Changelog
        • 2.2.26.0 - 2024/01/31
        • 2.2.25.0 - 2024/01/17
        • 2.2.24.0 - 2024/12/04
        • 2.2.23.0 - 2024/09/19
        • 2.2.22.0 - 2024/08/30
        • 2.2.21.0 - 2024/05/17
        • 2.2.20.0 - 2024/05/15
        • 2.2.19.0 - 2024/02/21
        • 2.2.18.0 - 2024/02/09
        • 2.2.17.0 - 2023/11/16
        • 2.2.16.0 - 2023/10/20
        • 2.2.15.0 - 2023/10/13
        • 2.2.14.0 - 2023/08/11
        • 2.2.13.0 - 2023/05/12
        • 2.2.12.0 - 2023/02/28
        • 2.2.11.0 - 2022/12/15
        • 2.2.10.0 - 2022/10/27
        • 2.2.9.0 - 2022/09/16
        • 2.2.7.0 - 2022/06/23
        • 2.2.5.0 - 2022/04/29
        • 2.2.3.0 - 2022/04/01
        • 2.2.2.0 - 2021/12/29
  • Data providers
    • Cryptocurrency exchanges
      • Binance Cryptocurrency Exchange
        • Registration on Binance
          • Registration on Binance Exchange website
          • Configure Binance Wallet
          • Creating a Binance API Key for TSLab
          • Binance. Transferring USDT from wallet to wallet without commission
        • Registration on TSLab [Binance]
          • Account registration on the TSLab website [Binance]
          • Creating a free Binance Data Provider for TSLab
        • Setting up a Binance Data Provider in TSLab
        • TSLab Binance Edition
          • Starting the program
          • Configuring the Binance Data provider
      • Bitget Cryptocurrency Exchange
        • Registration on the Bitget official website
        • Creating a Free Bitget Data Provider
        • Configuring the Bitget Data Provider in TSLab
      • ByBit Cryptocurrency Exchange
        • Registration on the ByBit website
        • Creating a free ByBit data provider
        • Configuring the ByBit Data Provider in TSLab
      • Deribit Cryptocurrency Exchange
        • Deribit data provider settings
        • Deribit. Frequently asked questions and useful information
        • Deribit. Possible problems and solutions
        • Deribit Margin Requirements Calculation
        • An example of a ready-made script for Deribit
      • Kucoin Cryptocurrency Exchange
        • Registration on the KuCoin official website
        • Creating an API key on the KuCoin website
        • Issuing a free license for KuCoin Data Provider
        • Setting up the KuCoin data provider in TSLab
      • OKX Cryptocurrency Exchange
        • Setting up an OKX account
          • Registration on the OKX website
          • OKX API Key creation
          • Issuing a free license for OKX Data Provider
          • Setting up the OKX data provider in TSLab
          • OKX demo account
        • TSLab OKX Edition
          • First launch of TSLab OKEx Edition
          • Configuring the OKEx data provider
          • Trading in TSLab [OKEx]
          • OKEx Demo
    • Historical Data
      • YahooFinance
      • Offline data provider in CSV format
      • An example of connecting text quotes
      • Text files with historical data
    • Interactive Brokers
      • Getting Started with Interactive Brokers Data Provider
        • Installing and configuring the Trader Workstation (TWS) terminal
        • Installing and configuring the IB Gateway terminal
      • Features of working with Interactive Brokers data provider
      • Known issues for Interactive Brokers Data Provider
      • Loading instruments in a package
  • Working with the program
    • Main menu
      • File
        • Program Settings
      • View
        • Chart
          • Features of working with the Chart in TSLab
          • Chart Controls
        • Depth of Market
        • Quotes
        • All Trades
      • Data
        • Data Providers window
        • Add online data provider
        • Add offline data provider
      • Lab
        • Scripts window
          • Script Container
      • Trading
        • Accounts window
        • Positions window
        • My trades window
        • My orders window
          • Move orders and deals to an agent
        • Autotrading Control Center window
          • Agent window
          • Agent trading settings
            • Event recalculations
            • Slippage
          • "Forget errors" of the agent
        • Orders manager
          • Linking a manually completed order to an agent
        • Agent Control Center window
      • Tools
        • Data backup and recovery
        • Notifications manager
          • Notifications Manager Filters
          • Reference List of Service Message Numbers
          • Example of setting up notifications for Gmail
        • Export to Excel
    • Common interface
      • Status bar
      • Tab
      • Workspace
      • Spreadsheets
    • Visual editor
      • Toolbar
        • Compress and Decompress Blocks
      • List of visual blocks
        • Service Elements
        • Cycles
        • TSChannel
      • The syntax of the Formula, Boolean expression and String expression blocks.
    • Autotrading Control Center
      • Agent trade settings
        • Agent trade settings - Placing orders
        • Agent trading settings - Script execution
        • Agent trading settings - Events
    • TSLab API
      • API Introduction
        • Visual Studio Installation
        • First script (API)
        • First Indicator (API)
        • Script Debugging
        • Logging
      • Writing scripts on the API
        • Trading Instrument Data
        • Working with positions
        • List of deals
        • The order queue
        • Standard Indicators and Handlers
        • Script parameters
        • Caching
        • Local and global cache
        • Multiple Tools
      • Writing indicators on the API
        • Stream indicator
        • Bar indicator
        • Pre-processed indicator
        • Indicator with multiple calculations
      • Additional features
        • The ability to create your own optimizers *
        • C ++ / CLI script
        • API Control Panel
        • Result from script
        • * Оптимизация. Пул массивов.
      • Examples
        • Get script results
        • Get script parameters
        • Get script and agent settings
        • Get position balance (net worth)
        • An example of a strategy Breakout of the Donchian channel
        • Example of a Moving Average Crossover strategy
        • Indicator example
        • How to speed up the processing of a script on the API
        • Links to examples
      • Question - Answer
        • HandlerParameter Attribute
    • Optimization
      • Insufficient load on a multicore processor
  • Examples of scripts and indicators
    • Examples of algorithms and indicators
    • Examples of implementing strategies in TSLab
      • A trading system based on indicator CCI
      • A trading system based on Standard Deviation
      • A trading system based on Aroon
      • A trading system based on ADX and DI technical indicators
      • A trading system based on the RSI indicator
      • Example of a trading strategy without parameters
  • TSLab website
    • TSLab Support Service
      • Memory dump of TSLab application
      • TSLab program log files
Powered by GitBook
LogoLogo

Мы в соцсетях

  • Группа в Telegram
  • Новости TSLab
  • Vkontakte
  • YouTube канал TSLab Live

Наши веб-сайты

  • TSLab
  • Служба поддержки
On this page
  • Configuring the OKEx data provider
  • Entering the license key
  • Configuring an automatic start of the Data Provider

Was this helpful?

Export as PDF
  1. Data providers
  2. Cryptocurrency exchanges
  3. OKX Cryptocurrency Exchange
  4. TSLab OKX Edition

Configuring the OKEx data provider

Last updated 3 years ago

Was this helpful?

Configuring the OKEx data provider

In order to connect to the trading servers of the OKEx exchange, you need to configure the OKEx data Provider in the TSLab program. Launch the TSLab program and wait for the software components and The trader's workspace to load. In the upper-left corner of the Workspace You will see the Data Providers window.

In this window, 4 data providers are prepared for You in advance:

  • Okex Perpetual Swap Real - data provider configured to work with the perpetual swap market;

  • Okex Spot Real - data provider configured to work with the spot market and margin market;

  • Okex Futures Real - a data provider, configured for futures markets;

  • DEMO Okex Spot -data provider configured to work with the OKEx demo server.

Select the appropriate data provider.

Please note! Trading on the Margin market is available after depositing funds to the Margin Account. To trade in "short", you need to "borrow money" from the exchange.

As an example, we will consider setting up the OKEx Spot Real data provider. Double-click on the selected data provider.

Fill in the required fields in the Data Provider Settings window:

  • API Public - public API key created in the OKEx merchant profile;

  • API Secret - secret API key created in the OKEx merchant profile;

  • Pass Phrase - code phrase from the API key.

Please note! TSLab team recommends to set the necessary settings of the data provider during its creation and configuration. Changing the settings of the data provider after its creation can lead to errors in its work.

Additional settings (optional):

  • Use local time - use time according to your regional settings of your computer.

  • Okex.SimulatedTrading - trading on the OKEx Demo server.

  • Okex.PaperTRealDataForSimulatedTradingrading - Enabling the use of quotes from the real market for simulated trading.

  • Subscribe to trades with quotes -Enables a subscription to the transactions on the instruments. which were ever requested from the View | Quotes window.

  • EnableDebugLogs -Enabling maximum data provider's logging. Enable it only if the TSLab support service has asked you to.

  • Orders blocking timeout (sec.) - Blocks the submission of requests for a set time interval after establishing a connection with the data provider.

  • Cache settings - The cache storage period settings allow you to specify how long your executed orders, transactions, and canceled orders will be stored.

  • Offline orders/Trades visibility - Enables visibility of your transactions in agents when the data provider is disabled.

Click OK to confirm the entered data.

Entering the license key

In the Data Providers window, select the data provider that you entered credentials for. Click on the Key button located on the right.

In the Registration key window that opens, enter the key that was created for the data provider in the TSLab Merchant profile. Click OK.

After you enter the key, you will see the start button for the data provider in the Operation column. Click the button which establishes a connection.

The program will inform You about the connection status in the Data Providers window:

  • red color of the button indicates an error in setting up the connection,

  • yellow color of the button indicates the connection setup process,

  • green color indicates that the connection has been established and you can perform trading operations.

Please note! The Chart and Orders Manager are configured to work with the OKEx Spot Real data provider. After the OKEx Spot Real data provider is launched, the program will load the history from the OKEx server. The Chart will be updated. If you need to display data from another data provider on the Chart and Orders Manager, select the instrument you need in the Chart and Orders Manager settings.

Configuring an automatic start of the Data Provider

OKEx exchange periodically conducts maintenance work. During maintenance there may be problems connecting the data provider to the OKEx exchange servers. Also in the Status bar TSLab you can see the message:

"Matching engine is being upgraded. Please try in about 1 minute."

For this reason, the TSLab team recommends that you set up a schedule for connecting to the data provider.

Using the Manage schedule menu you can configure the data provider to start automatically on the day and time you specify.

Please note! To automatically start the data provider, the TSLab application must be started.

To configure automatic startup of the provider click the button with the three dots in the Schedule Manager column.

In the Edit Schedule window that opens, fill in the schedule data for automatically starting the data provider. Click OK.

To launch the created schedule you need to click the button in the Schedule Manager column in the Data Providers window. In this case, manual management of the data provider startup will be blocked.

To disable the data provider, you need to disable the schedule by clicking the button in the Schedule Manager column.