diff --git a/docs/index.html b/docs/index.html
index a8f7a5c..6f04a6a 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -171,7 +171,8 @@
Installation
- options.ApiCredentials = new ApiCredentials("YOUR API KEY", "YOUR API SECRET");
- RSA
+ RSA
+ RSA authentication involves generating a private and public key and then uploading the public key to the server. After using the private key to sign the request the server can validate the request by comparing the signature using the public key. Not every exchange supports this authentication method.
+ Depending on the version of dotnet used there are 2 ways of configuring the RSA authentication.
+ When running Dotnet version 3.0 or later the easiest way is to use the RsaPem type. This allows you to use the Private key directly. When running from an older Dotnet/.NET framework version you're forced to use the RsaXml type due to framework limitations. This means you'll have to convert the private key to XML format before using it. +
+ RsaXml +// when using the .netstandard2.0 compiled version, from .NET framework or Dotnet core 2.2 or lower
+// Private key should look something like this: <RSAKeyValue><Modulus>...</RSAKeyValue>
+options.ApiCredentials = new ApiCredentials("YOUR PUBLIC KEY", "YOUR PRIVATE KEY", ApiCredentialsType.RsaXml);
+ RsaPem
+ // when using the .netstandard2.1 compiled version, from Dotnet core 3.0 or later
+// Private key should look something like this: -----BEGIN PRIVATE KEY----- .. -----END PRIVATE KEY-----, or just a long random character string
+options.ApiCredentials = new ApiCredentials("YOUR PUBLIC KEY", "YOUR PRIVATE KEY", ApiCredentialsType.RsaPem);
Via dependency injection
-Via constructor
-Via SetDefaultOptions
+ Dependency injection +When adding a library to the service collection (see Dependency Injection) the options for the clients can be provided as argument to the calls. Options are split between the REST and the websocket client.
+ +builder.Services.AddBinance(
+ restOptions => {
+ restOptions.RequestTimeout = TimeSpan.FromSeconds(30);
+ },
+ socketOptions => {
+ socketOptions.RequestTimeout = TimeSpan.FromSeconds(10);
+ });
+ builder.Services.AddBitfinex(
+ restOptions => {
+ restOptions.RequestTimeout = TimeSpan.FromSeconds(30);
+ },
+ socketOptions => {
+ socketOptions.RequestTimeout = TimeSpan.FromSeconds(10);
+ });
+ builder.Services.AddBitget(
+ restOptions => {
+ restOptions.RequestTimeout = TimeSpan.FromSeconds(30);
+ },
+ socketOptions => {
+ socketOptions.RequestTimeout = TimeSpan.FromSeconds(10);
+ });
+ builder.Services.AddBybit(
+ restOptions => {
+ restOptions.RequestTimeout = TimeSpan.FromSeconds(30);
+ },
+ socketOptions => {
+ socketOptions.RequestTimeout = TimeSpan.FromSeconds(10);
+ });
+ builder.Services.AddCoinGecko(
+ restOptions => {
+ restOptions.RequestTimeout = TimeSpan.FromSeconds(30);
+ });
+ builder.Services.AddCoinEx(
+ restOptions => {
+ restOptions.RequestTimeout = TimeSpan.FromSeconds(30);
+ },
+ socketOptions => {
+ socketOptions.RequestTimeout = TimeSpan.FromSeconds(10);
+ });
+ builder.Services.AddHuobi(
+ restOptions => {
+ restOptions.RequestTimeout = TimeSpan.FromSeconds(30);
+ },
+ socketOptions => {
+ socketOptions.RequestTimeout = TimeSpan.FromSeconds(10);
+ });
+ builder.Services.AddKraken(
+ restOptions => {
+ restOptions.RequestTimeout = TimeSpan.FromSeconds(30);
+ },
+ socketOptions => {
+ socketOptions.RequestTimeout = TimeSpan.FromSeconds(10);
+ });
+ builder.Services.AddKucoin(
+ restOptions => {
+ restOptions.RequestTimeout = TimeSpan.FromSeconds(30);
+ },
+ socketOptions => {
+ socketOptions.RequestTimeout = TimeSpan.FromSeconds(10);
+ });
+ builder.Services.AddMexc(
+ restOptions => {
+ restOptions.RequestTimeout = TimeSpan.FromSeconds(30);
+ },
+ socketOptions => {
+ socketOptions.RequestTimeout = TimeSpan.FromSeconds(10);
+ });
+ builder.Services.AddOKX(
+ restOptions => {
+ restOptions.RequestTimeout = TimeSpan.FromSeconds(30);
+ },
+ socketOptions => {
+ socketOptions.RequestTimeout = TimeSpan.FromSeconds(10);
+ });
+ When creating a client via the constructor options can be provided as parameters
+ +var binanceRestClient = new BinanceRestClient(opts =>
+{
+ opts.RequestTimeout = TimeSpan.FromSeconds(30);
+});
+ var client = new BitfinexRestClient(opts =>
+{
+ opts.RequestTimeout = TimeSpan.FromSeconds(30);
+});
+ var client = new BitgetRestClient(opts =>
+{
+ opts.RequestTimeout = TimeSpan.FromSeconds(30);
+});
+ var client = new BybitRestClient(opts =>
+{
+ opts.RequestTimeout = TimeSpan.FromSeconds(30);
+});
+ var client = new CoinGeckoRestClient(opts =>
+{
+ opts.RequestTimeout = TimeSpan.FromSeconds(30);
+});
+ var client = new CoinExRestClient(opts =>
+{
+ opts.RequestTimeout = TimeSpan.FromSeconds(30);
+});
+ var client = new HuobiRestClient(opts =>
+{
+ opts.RequestTimeout = TimeSpan.FromSeconds(30);
+});
+ var client = new KrakenRestClient(opts =>
+{
+ opts.RequestTimeout = TimeSpan.FromSeconds(30);
+});
+ var client = new KucoinRestClient(opts =>
+{
+ opts.RequestTimeout = TimeSpan.FromSeconds(30);
+});
+ var client = new MexcRestClient(opts =>
+{
+ opts.RequestTimeout = TimeSpan.FromSeconds(30);
+});
+ var client = new OKXRestClient(opts =>
+{
+ opts.RequestTimeout = TimeSpan.FromSeconds(30);
+});
+ The options can be defined in the static SetDefaultOptions method on the client BEFORE creating the client. Any client created after this call will use the specified options
+ +BinanceRestClient.SetDefaultOptions(options =>
+{
+ options.RequestTimeout = TimeSpan.FromSeconds(30);
+});
+var client = new BinanceRestClient();
+ BitfinexRestClient.SetDefaultOptions(options =>
+{
+ options.RequestTimeout = TimeSpan.FromSeconds(30);
+});
+var client = new BitfinexRestClient();
+ BitgetRestClient.SetDefaultOptions(options =>
+{
+ options.RequestTimeout = TimeSpan.FromSeconds(30);
+});
+var client = new BitgetRestClient();
+ BybitRestClient.SetDefaultOptions(options =>
+{
+ options.RequestTimeout = TimeSpan.FromSeconds(30);
+});
+var client = new BybitRestClient();
+ CoinGeckoRestClient.SetDefaultOptions(options =>
+{
+ options.RequestTimeout = TimeSpan.FromSeconds(30);
+});
+var client = new CoinGeckoRestClient();
+ CoinExRestClient.SetDefaultOptions(options =>
+{
+ options.RequestTimeout = TimeSpan.FromSeconds(30);
+});
+var client = new CoinExRestClient();
+ HuobiRestClient.SetDefaultOptions(options =>
+{
+ options.RequestTimeout = TimeSpan.FromSeconds(30);
+});
+var client = new HuobiRestClient();
+ KrakenRestClient.SetDefaultOptions(options =>
+{
+ options.RequestTimeout = TimeSpan.FromSeconds(30);
+});
+var client = new KrakenRestClient();
+ KucoinRestClient.SetDefaultOptions(options =>
+{
+ options.RequestTimeout = TimeSpan.FromSeconds(30);
+});
+var client = new KucoinRestClient();
+ MexcRestClient.SetDefaultOptions(options =>
+{
+ options.RequestTimeout = TimeSpan.FromSeconds(30);
+});
+var client = new MexcRestClient();
+ OKXRestClient.SetDefaultOptions(options =>
+{
+ options.RequestTimeout = TimeSpan.FromSeconds(30);
+});
+var client = new OKXRestClient();
+