Skip to content

Commit

Permalink
Merge pull request #311 from crypto-chassis/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
cryptochassis authored Oct 11, 2022
2 parents a6d7c3e + c1d101b commit 8a80881
Show file tree
Hide file tree
Showing 19 changed files with 212 additions and 187 deletions.
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Small Breaking Changes Introduced In v5.32.x For OKEX/OKX Users
* We've renamed OKEX to OKX everywhere in our code. When specifying the exchange, please use "okx" instead of the old "okex". When providing credentials via environment variables, please use OKX_API_KEY, OKX_API_SECRET, and OKX_API_PASSPHRASE, instead of the old OKEX_API_KEY, OKEX_API_SECRET, and OKEX_API_PASSPHRASE. When defining macros, please use CCAPI_ENABLE_EXCHANGE_OKX instead of the old CCAPI_ENABLE_EXCHANGE_OKEX. Thank you.

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*
Expand Down Expand Up @@ -55,8 +58,8 @@
* Code closely follows Bloomberg's API: https://www.bloomberg.com/professional/support/api-library/.
* It is ultra fast thanks to very careful optimizations: move semantics, regex optimization, locality of reference, lock contention minimization, etc.
* Supported exchanges:
* Market data: coinbase, gemini, kraken, kraken-futures, bitstamp, bitfinex, bitmex, binance-us, binance, binance-usds-futures, binance-coin-futures, huobi, huobi-usdt-swap, huobi-coin-swap, okex, erisx, kucoin, kucoin-futures, ftx, ftx-us, deribit, gateio, gateio-perpetual-futures, cryptocom, ascendex.
* Execution Management: coinbase, gemini, kraken, kraken-futures, bitstamp, bitfinex, bitmex, binance-us, binance, binance-usds-futures, binance-coin-futures, huobi, huobi-usdt-swap, huobi-coin-swap, okex, erisx, kucoin, ftx, ftx-us, deribit, gateio, gateio-perpetual-futures, cryptocom, ascendex.
* Market data: coinbase, gemini, kraken, kraken-futures, bitstamp, bitfinex, bitmex, binance-us, binance, binance-usds-futures, binance-coin-futures, huobi, huobi-usdt-swap, huobi-coin-swap, okx, erisx, kucoin, kucoin-futures, ftx, ftx-us, deribit, gateio, gateio-perpetual-futures, cryptocom, ascendex.
* Execution Management: coinbase, gemini, kraken, kraken-futures, bitstamp, bitfinex, bitmex, binance-us, binance, binance-usds-futures, binance-coin-futures, huobi, huobi-usdt-swap, huobi-coin-swap, okx, erisx, kucoin, ftx, ftx-us, deribit, gateio, gateio-perpetual-futures, cryptocom, ascendex.
* FIX: coinbase, gemini, ftx, ftx-us.
* A spot market making application is provided as an end-to-end solution for liquidity providers.
* A single order execution application is provided as an end-to-end solution for executing large orders.
Expand Down Expand Up @@ -86,7 +89,7 @@
* Link libraries:
* OpenSSL: libssl.
* OpenSSL: libcrypto.
* If you need market data for huobi/huobi-usdt-swap/huobi-coin-swap/okex or execution management for huobi-usdt-swap/huobi-coin-swap, also link ZLIB.
* If you need market data for huobi/huobi-usdt-swap/huobi-coin-swap or execution management for huobi-usdt-swap/huobi-coin-swap, also link ZLIB.
* On Windows, also link ws2_32.
* Compiler flags:
* `-pthread` for GCC and MinGW.
Expand All @@ -105,7 +108,7 @@
* Require Python 3, SWIG, and CMake.
* SWIG: On macOS, `brew install SWIG`. On Linux, `sudo apt-get install -y swig`. On Windows, http://www.swig.org/Doc4.0/Windows.html#Windows.
* CMake: https://cmake.org/download/.
* Copy file [`binding/user_specified_cmake_include.cmake.example`](binding/user_specified_cmake_include.cmake.example) to any location and rename to `user_specified_cmake_include.cmake`. Take note of its full path `<path-to-user_specified_cmake_include>`. Uncomment the lines corresponding to the desired service enablement compile definitions such as `CCAPI_ENABLE_SERVICE_MARKET_DATA`, `CCAPI_ENABLE_SERVICE_EXECUTION_MANAGEMENT`, `CCAPI_ENABLE_SERVICE_FIX`, etc. and exchange enablement macros such as `CCAPI_ENABLE_EXCHANGE_COINBASE`, etc. If you need market data for huobi/huobi-usdt-swap/huobi-coin-swap/okex or execution management for huobi-usdt-swap/huobi-coin-swap, also uncomment the lines corresponding to finding and linking ZLIB.
* Copy file [`binding/user_specified_cmake_include.cmake.example`](binding/user_specified_cmake_include.cmake.example) to any location and rename to `user_specified_cmake_include.cmake`. Take note of its full path `<path-to-user_specified_cmake_include>`. Uncomment the lines corresponding to the desired service enablement compile definitions such as `CCAPI_ENABLE_SERVICE_MARKET_DATA`, `CCAPI_ENABLE_SERVICE_EXECUTION_MANAGEMENT`, `CCAPI_ENABLE_SERVICE_FIX`, etc. and exchange enablement macros such as `CCAPI_ENABLE_EXCHANGE_COINBASE`, etc. If you need market data for huobi/huobi-usdt-swap/huobi-coin-swap or execution management for huobi-usdt-swap/huobi-coin-swap, also uncomment the lines corresponding to finding and linking ZLIB.
* Run the following commands.
```
mkdir binding/build
Expand Down Expand Up @@ -701,10 +704,10 @@ request.appendParam({

#### Send request by Websocket API
```
Subscription subscription("okex", "BTC-USDT", "ORDER_UPDATE", "", "same correlation id for subscription and request");
Subscription subscription("okx", "BTC-USDT", "ORDER_UPDATE", "", "same correlation id for subscription and request");
session.subscribe(subscription);
...
Request request(Request::Operation::CREATE_ORDER, "okex", "BTC-USDT", "same correlation id for subscription and request");
Request request(Request::Operation::CREATE_ORDER, "okx", "BTC-USDT", "same correlation id for subscription and request");
request.appendParam({
{"SIDE", "BUY"},
{"LIMIT_PRICE", "20000"},
Expand Down Expand Up @@ -923,7 +926,7 @@ session.serviceByServiceNameExchangeMap[CCAPI_EXECUTION_MANAGEMENT][CCAPI_EXCHAN
* The code uses a simplified version of Avellaneda & Stoikov’s inventory strategy: https://www.math.nyu.edu/~avellane/HighFrequencyTrading.pdf. See the [parameter configuration file `app/src/spot_market_making/config.env.example`](app/src/spot_market_making/config.env.example) for more details. And read more at https://medium.com/open-crypto-market-data-initiative/simplified-avellaneda-stoikov-market-making-608b9d437403.
* Require CMake.
* CMake: https://cmake.org/download/.
* Copy file [`app/user_specified_cmake_include.cmake.example`](app/user_specified_cmake_include.cmake.example) to any location and rename to `user_specified_cmake_include.cmake`. Take note of its full path `<path-to-user_specified_cmake_include>`. Uncomment the lines corresponding to the desired exchange enablement macros such as `CCAPI_ENABLE_EXCHANGE_COINBASE`, etc. If you need okex, also uncomment the lines corresponding to finding and linking ZLIB.
* Copy file [`app/user_specified_cmake_include.cmake.example`](app/user_specified_cmake_include.cmake.example) to any location and rename to `user_specified_cmake_include.cmake`. Take note of its full path `<path-to-user_specified_cmake_include>`. Uncomment the lines corresponding to the desired exchange enablement macros such as `CCAPI_ENABLE_EXCHANGE_COINBASE`, etc.
* Run the following commands.
```
mkdir app/build
Expand All @@ -941,7 +944,7 @@ cmake --build . --target spot_market_making
* The supported strategies are listed in [`app/src/single_order_execution/config.env.example`](app/src/single_order_execution/config.env.example).
* Require CMake.
* CMake: https://cmake.org/download/.
* Copy file [`app/user_specified_cmake_include.cmake.example`](app/user_specified_cmake_include.cmake.example) to any location and rename to `user_specified_cmake_include.cmake`. Take note of its full path `<path-to-user_specified_cmake_include>`. Uncomment the lines corresponding to the desired exchange enablement macros such as `CCAPI_ENABLE_EXCHANGE_COINBASE`, etc. If you need okex, also uncomment the lines corresponding to finding and linking ZLIB.
* Copy file [`app/user_specified_cmake_include.cmake.example`](app/user_specified_cmake_include.cmake.example) to any location and rename to `user_specified_cmake_include.cmake`. Take note of its full path `<path-to-user_specified_cmake_include>`. Uncomment the lines corresponding to the desired exchange enablement macros such as `CCAPI_ENABLE_EXCHANGE_COINBASE`, etc.
* Run the following commands.
```
mkdir app/build
Expand Down
8 changes: 4 additions & 4 deletions app/credential.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ BINANCE_API_SECRET=''
BINANCE_US_API_KEY=''
BINANCE_US_API_SECRET=''

OKEX_API_KEY=''
OKEX_API_SECRET=''
OKEX_API_PASSPHRASE=''
OKEX_API_X_SIMULATED_TRADING='0'
OKX_API_KEY=''
OKX_API_SECRET=''
OKX_API_PASSPHRASE=''
OKX_API_X_SIMULATED_TRADING='0'

KUCOIN_API_KEY=''
KUCOIN_API_SECRET=''
Expand Down
6 changes: 3 additions & 3 deletions app/src/spot_market_making/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,16 +210,16 @@ int main(int argc, char** argv) {
{exchangeUpper + "_API_SECRET", UtilSystem::getEnvAsString(exchangeUpper + "_API_SECRET")},
};
}
std::set<std::string> useCancelOrderToCancelOpenOrdersExchangeSet{"gemini", "kraken", "bitfinex", "okex"};
std::set<std::string> useCancelOrderToCancelOpenOrdersExchangeSet{"gemini", "kraken", "bitfinex", "okx"};
if (useCancelOrderToCancelOpenOrdersExchangeSet.find(eventHandler.exchange) != useCancelOrderToCancelOpenOrdersExchangeSet.end()) {
eventHandler.useCancelOrderToCancelOpenOrders = true;
}
std::set<std::string> useWebsocketToExecuteOrderExchangeSet{"bitfinex", "okex"};
std::set<std::string> useWebsocketToExecuteOrderExchangeSet{"bitfinex", "okx"};
if (useWebsocketToExecuteOrderExchangeSet.find(eventHandler.exchange) != useWebsocketToExecuteOrderExchangeSet.end()) {
eventHandler.useWebsocketToExecuteOrder = true;
}
Request request(Request::Operation::GET_INSTRUMENT, eventHandler.exchange, eventHandler.instrumentRest, "GET_INSTRUMENT");
if (exchange == "okex") {
if (exchange == "okx") {
request.appendParam({
{"instType", "SPOT"},
});
Expand Down
2 changes: 1 addition & 1 deletion app/user_specified_cmake_include.cmake.example
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ endif()
# add_compile_definitions(CCAPI_ENABLE_EXCHANGE_BINANCE_US)
# add_compile_definitions(CCAPI_ENABLE_EXCHANGE_BINANCE)
#
# add_compile_definitions(CCAPI_ENABLE_EXCHANGE_OKEX)
# add_compile_definitions(CCAPI_ENABLE_EXCHANGE_OKX)
#
# add_compile_definitions(CCAPI_ENABLE_EXCHANGE_KUCOIN)
#
Expand Down
1 change: 1 addition & 0 deletions binding/swig_interface.i
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
}
}
%template(map_string_string) std::map<std::string, std::string>;
%template(map_int_string) std::map<int, std::string>;
%template(pair_int_string) std::pair<int, std::string>;
%template(pair_long_long_long_long) std::pair<long long, long long>;
%template(vector_pair_int_string) std::vector<std::pair<int, std::string> >;
Expand Down
2 changes: 1 addition & 1 deletion binding/user_specified_cmake_include.cmake.example
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ include_guard(DIRECTORY)
# add_compile_definitions(CCAPI_ENABLE_EXCHANGE_HUOBI_USDT_SWAP)
# add_compile_definitions(CCAPI_ENABLE_EXCHANGE_HUOBI_COIN_SWAP)
#
# add_compile_definitions(CCAPI_ENABLE_EXCHANGE_OKEX)
# add_compile_definitions(CCAPI_ENABLE_EXCHANGE_OKX)
#
# add_compile_definitions(CCAPI_ENABLE_EXCHANGE_ERISX)
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
set(NAME execution_management_advanced_subscription)
project(${NAME})
add_compile_definitions(CCAPI_ENABLE_SERVICE_EXECUTION_MANAGEMENT)
add_compile_definitions(CCAPI_ENABLE_EXCHANGE_OKEX)
add_compile_definitions(CCAPI_ENABLE_EXCHANGE_OKX)
add_executable(${NAME} main.cpp)
16 changes: 8 additions & 8 deletions example/src/execution_management_advanced_subscription/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class MyEventHandler : public EventHandler {
std::cout << "Received an event of type SUBSCRIPTION_STATUS:\n" + event.toStringPretty(2, 2) << std::endl;
auto message = event.getMessageList().at(0);
if (message.getType() == Message::Type::SUBSCRIPTION_STARTED) {
Request request(Request::Operation::CREATE_ORDER, "okex", "BTC-USDT", "same correlation id for subscription and request");
Request request(Request::Operation::CREATE_ORDER, "okx", "BTC-USDT", "same correlation id for subscription and request");
request.appendParam({
{"SIDE", "BUY"},
{"LIMIT_PRICE", "20000"},
Expand All @@ -33,23 +33,23 @@ using ::ccapi::SessionOptions;
using ::ccapi::Subscription;
using ::ccapi::UtilSystem;
int main(int argc, char** argv) {
if (UtilSystem::getEnvAsString("OKEX_API_KEY").empty()) {
std::cerr << "Please set environment variable OKEX_API_KEY" << std::endl;
if (UtilSystem::getEnvAsString("OKX_API_KEY").empty()) {
std::cerr << "Please set environment variable OKX_API_KEY" << std::endl;
return EXIT_FAILURE;
}
if (UtilSystem::getEnvAsString("OKEX_API_SECRET").empty()) {
std::cerr << "Please set environment variable OKEX_API_SECRET" << std::endl;
if (UtilSystem::getEnvAsString("OKX_API_SECRET").empty()) {
std::cerr << "Please set environment variable OKX_API_SECRET" << std::endl;
return EXIT_FAILURE;
}
if (UtilSystem::getEnvAsString("OKEX_API_PASSPHRASE").empty()) {
std::cerr << "Please set environment variable OKEX_API_PASSPHRASE" << std::endl;
if (UtilSystem::getEnvAsString("OKX_API_PASSPHRASE").empty()) {
std::cerr << "Please set environment variable OKX_API_PASSPHRASE" << std::endl;
return EXIT_FAILURE;
}
SessionOptions sessionOptions;
SessionConfigs sessionConfigs;
MyEventHandler eventHandler;
Session session(sessionOptions, sessionConfigs, &eventHandler);
Subscription subscription("okex", "BTC-USDT", "ORDER_UPDATE", "", "same correlation id for subscription and request");
Subscription subscription("okx", "BTC-USDT", "ORDER_UPDATE", "", "same correlation id for subscription and request");
session.subscribe(subscription);
std::this_thread::sleep_for(std::chrono::seconds(10));
session.stop();
Expand Down
51 changes: 28 additions & 23 deletions include/ccapi_cpp/ccapi_macro.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@
#ifndef CCAPI_EXCHANGE_NAME_HUOBI_COIN_SWAP
#define CCAPI_EXCHANGE_NAME_HUOBI_COIN_SWAP "huobi-coin-swap"
#endif
#ifndef CCAPI_EXCHANGE_NAME_OKEX
#define CCAPI_EXCHANGE_NAME_OKEX "okex"
#ifndef CCAPI_EXCHANGE_NAME_OKX
#define CCAPI_EXCHANGE_NAME_OKX "okx"
#endif
#ifndef CCAPI_EXCHANGE_NAME_ERISX
#define CCAPI_EXCHANGE_NAME_ERISX "erisx"
Expand Down Expand Up @@ -242,11 +242,12 @@
#define CCAPI_WEBSOCKET_HUOBI_CHANNEL_MARKET_BBO_REGEX "market\\.(.+)\\.bbo"
#define CCAPI_WEBSOCKET_HUOBI_CHANNEL_MARKET_DEPTH "market.$symbol.depth.step0"
#define CCAPI_WEBSOCKET_HUOBI_CHANNEL_MARKET_DEPTH_REGEX "market\\.(.+)\\.depth\\.step0"
#define CCAPI_WEBSOCKET_OKEX_CHANNEL_TRADE "trades"
#define CCAPI_WEBSOCKET_OKEX_CHANNEL_PUBLIC_DEPTH50_L2_TBT "books50-l2-tbt"
#define CCAPI_WEBSOCKET_OKEX_CHANNEL_PUBLIC_DEPTH400_L2_TBT "books-l2-tbt"
#define CCAPI_WEBSOCKET_OKEX_CHANNEL_PUBLIC_DEPTH5 "books5"
#define CCAPI_WEBSOCKET_OKEX_CHANNEL_PUBLIC_DEPTH400 "books"
#define CCAPI_WEBSOCKET_OKX_CHANNEL_TRADE "trades"
#define CCAPI_WEBSOCKET_OKX_CHANNEL_PUBLIC_DEPTH50_L2_TBT "books50-l2-tbt"
#define CCAPI_WEBSOCKET_OKX_CHANNEL_PUBLIC_DEPTH400_L2_TBT "books-l2-tbt"
#define CCAPI_WEBSOCKET_OKX_CHANNEL_PUBLIC_DEPTH5 "books5"
#define CCAPI_WEBSOCKET_OKX_CHANNEL_PUBLIC_DEPTH400 "books"
#define CCAPI_WEBSOCKET_OKX_CHANNEL_PUBLIC_DEPTH1_L2_TBT "bbo-tbt"
#define CCAPI_WEBSOCKET_ERISX_CHANNEL_MARKET_DATA_SUBSCRIBE "MarketDataSubscribe"
#define CCAPI_WEBSOCKET_ERISX_CHANNEL_TOP_OF_BOOK_MARKET_DATA_SUBSCRIBE "TopOfBookMarketDataSubscribe"
#define CCAPI_WEBSOCKET_KUCOIN_CHANNEL_MARKET_MATCH "/market/match"
Expand Down Expand Up @@ -594,8 +595,8 @@
#ifndef CCAPI_HUOBI_COIN_SWAP_GET_RECENT_TRADES_PATH
#define CCAPI_HUOBI_COIN_SWAP_GET_RECENT_TRADES_PATH "/swap-ex/market/history/trade"
#endif
#ifndef CCAPI_OKEX_URL_REST_BASE
#define CCAPI_OKEX_URL_REST_BASE "https://www.okex.com"
#ifndef CCAPI_OKX_URL_REST_BASE
#define CCAPI_OKX_URL_REST_BASE "https://www.okx.com"
#endif
#ifndef CCAPI_ERISX_URL_REST_BASE
#define CCAPI_ERISX_URL_REST_BASE "https://trade-api.erisx.com"
Expand Down Expand Up @@ -699,14 +700,14 @@
#ifndef CCAPI_HUOBI_COIN_SWAP_SUBSCRIBE_MATCH_ORDER_DATA_TOPIC
#define CCAPI_HUOBI_COIN_SWAP_SUBSCRIBE_MATCH_ORDER_DATA_TOPIC "matchOrders"
#endif
#ifndef CCAPI_OKEX_URL_WS_BASE
#define CCAPI_OKEX_URL_WS_BASE "wss://ws.okex.com:8443"
#ifndef CCAPI_OKX_URL_WS_BASE
#define CCAPI_OKX_URL_WS_BASE "wss://ws.okx.com:8443"
#endif
#ifndef CCAPI_OKEX_PUBLIC_WS_PATH
#define CCAPI_OKEX_PUBLIC_WS_PATH "/ws/v5/public"
#ifndef CCAPI_OKX_PUBLIC_WS_PATH
#define CCAPI_OKX_PUBLIC_WS_PATH "/ws/v5/public"
#endif
#ifndef CCAPI_OKEX_PRIVATE_WS_PATH
#define CCAPI_OKEX_PRIVATE_WS_PATH "/ws/v5/private"
#ifndef CCAPI_OKX_PRIVATE_WS_PATH
#define CCAPI_OKX_PRIVATE_WS_PATH "/ws/v5/private"
#endif
#ifndef CCAPI_ERISX_URL_WS_BASE
#define CCAPI_ERISX_URL_WS_BASE "wss://publicmd-api.erisx.com"
Expand Down Expand Up @@ -858,17 +859,17 @@
#ifndef CCAPI_HUOBI_COIN_SWAP_API_SECRET
#define CCAPI_HUOBI_COIN_SWAP_API_SECRET "HUOBI_COIN_SWAP_API_SECRET"
#endif
#ifndef CCAPI_OKEX_API_KEY
#define CCAPI_OKEX_API_KEY "OKEX_API_KEY"
#ifndef CCAPI_OKX_API_KEY
#define CCAPI_OKX_API_KEY "OKX_API_KEY"
#endif
#ifndef CCAPI_OKEX_API_SECRET
#define CCAPI_OKEX_API_SECRET "OKEX_API_SECRET"
#ifndef CCAPI_OKX_API_SECRET
#define CCAPI_OKX_API_SECRET "OKX_API_SECRET"
#endif
#ifndef CCAPI_OKEX_API_PASSPHRASE
#define CCAPI_OKEX_API_PASSPHRASE "OKEX_API_PASSPHRASE"
#ifndef CCAPI_OKX_API_PASSPHRASE
#define CCAPI_OKX_API_PASSPHRASE "OKX_API_PASSPHRASE"
#endif
#ifndef CCAPI_OKEX_API_X_SIMULATED_TRADING
#define CCAPI_OKEX_API_X_SIMULATED_TRADING "OKEX_API_X_SIMULATED_TRADING"
#ifndef CCAPI_OKX_API_X_SIMULATED_TRADING
#define CCAPI_OKX_API_X_SIMULATED_TRADING "OKX_API_X_SIMULATED_TRADING"
#endif
#ifndef CCAPI_ERISX_API_KEY
#define CCAPI_ERISX_API_KEY "ERISX_API_KEY"
Expand Down Expand Up @@ -998,4 +999,8 @@
#ifndef CCAPI_FIX_PROTOCOL_VERSION_DERIBIT
#define CCAPI_FIX_PROTOCOL_VERSION_DERIBIT "FIX.4.4"
#endif

#ifndef CCAPI_OKX_API_BROKER_CODE
#define CCAPI_OKX_API_BROKER_CODE "9cbc6a17a1fcBCDE"
#endif
#endif // INCLUDE_CCAPI_CPP_CCAPI_MACRO_H_
20 changes: 10 additions & 10 deletions include/ccapi_cpp/ccapi_session.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
#ifdef CCAPI_ENABLE_EXCHANGE_HUOBI_COIN_SWAP
#include "ccapi_cpp/service/ccapi_market_data_service_huobi_coin_swap.h"
#endif
#ifdef CCAPI_ENABLE_EXCHANGE_OKEX
#include "ccapi_cpp/service/ccapi_market_data_service_okex.h"
#ifdef CCAPI_ENABLE_EXCHANGE_OKX
#include "ccapi_cpp/service/ccapi_market_data_service_okx.h"
#endif
#ifdef CCAPI_ENABLE_EXCHANGE_ERISX
#include "ccapi_cpp/service/ccapi_market_data_service_erisx.h"
Expand Down Expand Up @@ -129,8 +129,8 @@
#ifdef CCAPI_ENABLE_EXCHANGE_HUOBI_COIN_SWAP
#include "ccapi_cpp/service/ccapi_execution_management_service_huobi_coin_swap.h"
#endif
#ifdef CCAPI_ENABLE_EXCHANGE_OKEX
#include "ccapi_cpp/service/ccapi_execution_management_service_okex.h"
#ifdef CCAPI_ENABLE_EXCHANGE_OKX
#include "ccapi_cpp/service/ccapi_execution_management_service_okx.h"
#endif
#ifdef CCAPI_ENABLE_EXCHANGE_ERISX
#include "ccapi_cpp/service/ccapi_execution_management_service_erisx.h"
Expand Down Expand Up @@ -310,9 +310,9 @@ class Session {
this->serviceByServiceNameExchangeMap[CCAPI_MARKET_DATA][CCAPI_EXCHANGE_NAME_HUOBI_COIN_SWAP] =
std::make_shared<MarketDataServiceHuobiCoinSwap>(this->internalEventHandler, sessionOptions, sessionConfigs, this->serviceContextPtr);
#endif
#ifdef CCAPI_ENABLE_EXCHANGE_OKEX
this->serviceByServiceNameExchangeMap[CCAPI_MARKET_DATA][CCAPI_EXCHANGE_NAME_OKEX] =
std::make_shared<MarketDataServiceOkex>(this->internalEventHandler, sessionOptions, sessionConfigs, this->serviceContextPtr);
#ifdef CCAPI_ENABLE_EXCHANGE_OKX
this->serviceByServiceNameExchangeMap[CCAPI_MARKET_DATA][CCAPI_EXCHANGE_NAME_OKX] =
std::make_shared<MarketDataServiceOkx>(this->internalEventHandler, sessionOptions, sessionConfigs, this->serviceContextPtr);
#endif
#ifdef CCAPI_ENABLE_EXCHANGE_ERISX
this->serviceByServiceNameExchangeMap[CCAPI_MARKET_DATA][CCAPI_EXCHANGE_NAME_ERISX] =
Expand Down Expand Up @@ -417,9 +417,9 @@ class Session {
this->serviceByServiceNameExchangeMap[CCAPI_EXECUTION_MANAGEMENT][CCAPI_EXCHANGE_NAME_HUOBI_COIN_SWAP] =
std::make_shared<ExecutionManagementServiceHuobiCoinSwap>(this->internalEventHandler, sessionOptions, sessionConfigs, this->serviceContextPtr);
#endif
#ifdef CCAPI_ENABLE_EXCHANGE_OKEX
this->serviceByServiceNameExchangeMap[CCAPI_EXECUTION_MANAGEMENT][CCAPI_EXCHANGE_NAME_OKEX] =
std::make_shared<ExecutionManagementServiceOkex>(this->internalEventHandler, sessionOptions, sessionConfigs, this->serviceContextPtr);
#ifdef CCAPI_ENABLE_EXCHANGE_OKX
this->serviceByServiceNameExchangeMap[CCAPI_EXECUTION_MANAGEMENT][CCAPI_EXCHANGE_NAME_OKX] =
std::make_shared<ExecutionManagementServiceOkx>(this->internalEventHandler, sessionOptions, sessionConfigs, this->serviceContextPtr);
#endif
#ifdef CCAPI_ENABLE_EXCHANGE_ERISX
this->serviceByServiceNameExchangeMap[CCAPI_EXECUTION_MANAGEMENT][CCAPI_EXCHANGE_NAME_ERISX] =
Expand Down
Loading

0 comments on commit 8a80881

Please sign in to comment.