You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ These 3 must be installed in order to use the library.
21
21
In order to use this library, you must have all dependencies installed. Only one `#include` statement is required - `#include "include/Binance_Client.h"`, and add all content of `/src` directory should be added to the Source files.
22
22
<br />Note that `.inl` files are included inside the main header.
23
23
<br /> <br />
24
-
<br />You must initialize a `Client` object, which is one of the following: *[SpotClient, FuturesClientUSDT, FuturesClientCoin]*
24
+
<br />You must initialize a `Client` object, which is one of the following: *[SpotClient, FuturesClientUSDT, FuturesClientCoin, OpsClient]*
25
25
<br /> **Unique methods** - In order to use *[Wallet, FuturesWallet, SubAccount, MarginAccount, Savings, Mining]* endpoints, they should be initialized from within other Client classes, and by passing the Client object to the constructor.
26
26
i.e:
27
27
>SpotClient::Wallet my_wallet{ my_client_obj }.
@@ -32,7 +32,7 @@ i.e:
32
32
In order to initialize a client that is not public, api-key and api-secret must be passed in std::string format to the constructor.
33
33
> FuturesClientUSDT(api_key, api_secret)
34
34
>
35
-
<br />Futures clients may be set in testnet mode by using the method "set_testnet_mode(bool)". SpotClient has 'test_new_order' method but no testnet mode endpoints.
35
+
<br />Futures and Options clients may be set in testnet mode by using the method "set_testnet_mode(bool)". SpotClient has 'test_new_order' method but no testnet mode endpoints.
36
36
37
37
-#### CRTP implementation
38
38
The CRTP is implemented as follows:
@@ -81,12 +81,12 @@ In order to initialize a client that is not public, api-key and api-secret must
81
81
since they are all derived. It is also possible to `catch()` a specific exception.
82
82
83
83
-#### Notes
84
-
1. No copy assignment / constructor are implemented for Client classes. Each object has its own unique Session, WS, and running streams...
84
+
1. No copy assignment / constructor are implemented for Client classes. Each object has its own unique Session, WS, and running streams.
85
85
2. All unique endpoint structs require that the client object contains keys and is not a public client.
86
86
3. `ClientException` derives from `std::exception` therefore `catch(std::exception)` would also work.
87
87
88
88
## REST client
89
-
All REST request methods take a pointer to a `Params` object. This object holds the parameters that would be generated to a query string and sent as the request body.
89
+
All (except for ones that don't have mandatory parameters) REST request methods take a pointer to a `Params` object. This object holds the parameters that would be generated to a query string and sent as the request body.
90
90
<br /> Endpoints that do not require any params, have a default argument which is a `nullptr` (beware if using threads).
91
91
<br />* Signing requests is done after generating the query, and the `Params` object remains unchanged.
92
92
-#### 'Params' object
@@ -120,8 +120,8 @@ Each time a client object is created, a websocket client is also instantiated. I
120
120
121
121
<br /> It would be good practice to set the buffer as a member of the functor object.
122
122
-#### Stream Manager
123
-
The WebsocketClient class has a `stream_manager`, which is responsible for the stream connection. It is possible to set `reconnect_on_error` by using Client's `ws_auto_reconnect()` method, and also specify the number of attempts by using `set_max_reconnect_count()` method.
124
-
<br />The `stream_manager` closes a stream when the stream status is set to zero by the `close_stream()` method, or if any other error was encountered (unless `reconnect_on_error` is true).
123
+
The WebsocketClient class has a `stream_manager` method, which is responsible for the stream connection. It is possible to set `reconnect_on_error` by using Client's `ws_auto_reconnect()` method, and also specify the number of attempts by using `set_max_reconnect_count()` method.
124
+
<br />The `stream_manager`method closes a stream when the stream status is set to zero by the `close_stream()` method, or if any other error was encountered (unless `reconnect_on_error` is true).
125
125
<br /> The stream manager also accepts a `bool` for whether or not to ping a listen key periodically. The ping interval is 30 minutes by default, and can be set using `set_refresh_key_interval()` method (in `Client`).
126
126
-#### Custom Streams
127
127
Custom streams are possible by using `Client`'s `custom_stream()` method. This method accepts 4 arguments: `stream_path` std::string, `buffer` std::string, `functor` functor, and `ping_listen_key` bool (when true, pings listen key periodically).
0 commit comments