|
32 | 32 | - [Multiple subscription fields](#multiple-subscription-fields) |
33 | 33 | - [Make Session::sendRequest blocking](#make-sessionsendrequest-blocking) |
34 | 34 | - [Provide API credentials for an exchange](#provide-api-credentials-for-an-exchange) |
35 | | - - [Override exchange urls](#override-exchange-urls) |
36 | 35 | - [Complex request parameters](#complex-request-parameters-1) |
37 | 36 | - [Send request by Websocket API](#send-request-by-websocket-api) |
38 | 37 | - [Specify instrument type](#specify-instrument-type) |
|
44 | 43 | - [Set timer](#set-timer) |
45 | 44 | - [Heartbeat](#heartbeat) |
46 | 45 | - [Use multiple sessions](#use-multiple-sessions) |
| 46 | + - [Override exchange urls](#override-exchange-urls) |
| 47 | + - [Connect to a proxy](#connect-to-a-proxy) |
| 48 | + - [Reduce build time](#reduce-build-time) |
47 | 49 | - [Performance Tuning](#performance-tuning) |
48 | 50 | - [Known Issues and Workarounds](#known-issues-and-workarounds) |
49 | 51 |
|
|
60 | 62 | * FIX: [binance](https://accounts.maxweb.academy/register?ref=1116718520), coinbase, gemini. |
61 | 63 | * Join us on Discord https://discord.gg/b5EKcp9s8T and Medium https://cryptochassis.medium.com. |
62 | 64 | * For any questions, email hello@cryptochassis.com. |
| 65 | +* We’re experts in market data collection, high-speed trading system, infrastructure optimization, and proprietary market making. Hire us as engineers, liquidity providers, traders, or asset managers. |
63 | 66 |
|
64 | 67 | ## Branches |
65 | 68 | * The `develop` branch may contain experimental features. |
@@ -700,11 +703,11 @@ Bye |
700 | 703 |
|
701 | 704 | #### Specify correlation id |
702 | 705 |
|
703 | | -Instantiate `Request` with the desired correlationId. The `correlationId` should be unique. |
| 706 | +Instantiate `Request` with the desired `correlationId`. The `correlationId` should be unique. |
704 | 707 | ``` |
705 | 708 | Request request(Request::Operation::CREATE_ORDER, "okx", "BTC-USDT", "cool correlation id"); |
706 | 709 | ``` |
707 | | -Instantiate `Subscription` with the desired correlationId. |
| 710 | +Instantiate `Subscription` with the desired `correlationId`. |
708 | 711 | ``` |
709 | 712 | Subscription subscription("okx", "BTC-USDT", "ORDER_UPDATE", "", "cool correlation id"); |
710 | 713 | ``` |
@@ -767,9 +770,6 @@ Subscription subscription("okx", "BTC-USDT", "ORDER_UPDATE", "", "", { |
767 | 770 | }); |
768 | 771 | ``` |
769 | 772 |
|
770 | | -#### Override exchange urls |
771 | | -You can override exchange urls at compile time by using macros. See section "exchange REST urls", "exchange WS urls", and "exchange FIX urls" in [`include/ccapi_cpp/ccapi_macro.h`](include/ccapi_cpp/ccapi_macro.h). You can also override exchange urls at runtime. See [this example](example/src/override_exchange_url_at_runtime/main.cpp). These can be useful if you need to connect to test accounts (e.g. https://www.okx.com/docs-v5/en/#overview-demo-trading-services) or connect to an IP address (e.g. ws://172.30.0.146:9000). |
772 | | - |
773 | 773 | #### Complex request parameters |
774 | 774 | Please follow the exchange's API documentations: e.g. https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-place-order. |
775 | 775 | ``` |
@@ -1073,7 +1073,17 @@ Subscription subscription("", "", "HEARTBEAT", "HEARTBEAT_INTERVAL_MILLISECONDS= |
1073 | 1073 | session.subscribe(subscription); |
1074 | 1074 | ``` |
1075 | 1075 |
|
| 1076 | +#### Override exchange urls |
| 1077 | +You can override exchange urls at compile time by using macros. See section "exchange REST urls", "exchange WS urls", and "exchange FIX urls" in [`include/ccapi_cpp/ccapi_macro.h`](include/ccapi_cpp/ccapi_macro.h). You can also override exchange urls at runtime. See [this example](example/src/override_exchange_url_at_runtime/main.cpp). These can be useful if you need to connect to test accounts (e.g. https://www.okx.com/docs-v5/en/#overview-demo-trading-services). |
| 1078 | + |
| 1079 | +#### Connect to a proxy |
| 1080 | +Instantiate `Subscription` with the desired `proxyUrl`. |
| 1081 | +``` |
| 1082 | +Subscription subscription("okx", "BTC-USDT", "MARKET_DEPTH", "", "", {}, "172.30.0.146:9000"); |
| 1083 | +``` |
1076 | 1084 |
|
| 1085 | +#### Reduce build time |
| 1086 | +The Pimpl (Pointer to Implementation) idiom in C++ can significantly reduce build time. This reduction is achieved by minimizing compilation dependencies and isolating implementation details. See [this example](example/src/reduce_build_time). |
1077 | 1087 |
|
1078 | 1088 | ## Performance Tuning |
1079 | 1089 | * Turn on compiler optimization flags (e.g. `cmake -DCMAKE_BUILD_TYPE=Release ...`). |
|
0 commit comments