|
|
|
@@ -135,6 +135,7 @@
|
|
|
|
|
<th>Nuget</th>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr><td>Binance</td><td><a href="https://github.com/JKorf/Binance.Net">JKorf/Binance.Net</a></td><td><a href="https://www.nuget.org/packages/Binance.Net"><img src="https://img.shields.io/nuget/v/Binance.net.svg?style=flat-square" /></a></td></tr>
|
|
|
|
|
<tr><td>BingX</td><td><a href="https://github.com/JKorf/BingX.Net">JKorf/BingX.Net</a></td><td><a href="https://www.nuget.org/packages/JK.BingX.Net"><img src="https://img.shields.io/nuget/v/JK.BingX.net.svg?style=flat-square" /></a></td></tr>
|
|
|
|
|
<tr><td>Bitfinex</td><td><a href="https://github.com/JKorf/Bitfinex.Net">JKorf/Bitfinex.Net</a></td><td><a href="https://www.nuget.org/packages/Bitfinex.Net"><img src="https://img.shields.io/nuget/v/Bitfinex.net.svg?style=flat-square" /></a></td></tr>
|
|
|
|
|
<tr><td>Bitget</td><td><a href="https://github.com/JKorf/Bitget.Net">JKorf/Bitget.Net</a></td><td><a href="https://www.nuget.org/packages/JK.Bitget.Net"><img src="https://img.shields.io/nuget/v/JK.Bitget.net.svg?style=flat-square" /></a></td></tr>
|
|
|
|
|
<tr><td>Bybit</td><td><a href="https://github.com/JKorf/Bybit.Net">JKorf/Bybit.Net</a></td><td><a href="https://www.nuget.org/packages/Bybit.Net"><img src="https://img.shields.io/nuget/v/Bybit.net.svg?style=flat-square" /></a></td></tr>
|
|
|
|
@@ -174,8 +175,9 @@
|
|
|
|
|
<b>Donate</b><br />
|
|
|
|
|
<p>Make a one time donation in a crypto currency of your choice. If you prefer to donate a currency not listed here please contact me.<p>
|
|
|
|
|
|
|
|
|
|
<p><em>Btc</em>: bc1qz0jv0my7fc60rxeupr23e75x95qmlq6489n8gh <br />
|
|
|
|
|
<em>Eth</em>: 0x8E21C4d955975cB645589745ac0c46ECA8FAE504</p>
|
|
|
|
|
<p><em>Btc</em>: bc1q277a5n54s2l2mzlu778ef7lpkwhjhyvghuv8qf<br />
|
|
|
|
|
<em>Eth</em>: 0xcb1b63aCF9fef2755eBf4a0506250074496Ad5b7<br />
|
|
|
|
|
<em>USDT (TRX)</em>: TKigKeJPXZYyMVDgMyXxMf17MWYia92Rjd</p>
|
|
|
|
|
|
|
|
|
|
<b>Sponsor</b><br />
|
|
|
|
|
<p>Alternatively, sponsor me on Github using <a href="https://github.com/sponsors/JKorf">Github Sponsors</a>.</p>
|
|
|
|
@@ -206,6 +208,9 @@
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<a class="nav-link active" id="install-binance-tab" data-toggle="tab" href="#install-binance" role="tab" aria-controls="install-binance" aria-selected="true">Binance</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<a class="nav-link" id="install-bingx-tab" data-toggle="tab" href="#install-bingx" role="tab" aria-controls="install-bingx" aria-selected="false">BingX</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<a class="nav-link" id="install-bitfinex-tab" data-toggle="tab" href="#install-bitfinex" role="tab" aria-controls="install-bitfinex" aria-selected="false">Bitfinex</a>
|
|
|
|
|
</li>
|
|
|
|
@@ -242,6 +247,9 @@
|
|
|
|
|
<pre><code>dotnet add package Binance.Net</code></pre>
|
|
|
|
|
<img src="assets/images/BinanceInstall.png" />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tab-pane fade" id="install-bingx" role="tabpanel" aria-labelledby="install-bingx-tab">
|
|
|
|
|
<pre><code>dotnet add package JK.BingX.Net</code></pre>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tab-pane fade" id="install-bitfinex" role="tabpanel" aria-labelledby="install-bitfinex-tab">
|
|
|
|
|
<pre><code>dotnet add package Bitfinex.Net</code></pre>
|
|
|
|
|
<img src="assets/images/BitfinexInstall.png" />
|
|
|
|
@@ -299,6 +307,9 @@
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<a class="nav-link active" id="di-binance-tab" data-toggle="tab" href="#di-binance" role="tab" aria-controls="di-binance" aria-selected="true">Binance</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<a class="nav-link" id="di-bingx-tab" data-toggle="tab" href="#di-bingx" role="tab" aria-controls="di-bingx" aria-selected="false">BingX</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<a class="nav-link" id="di-bitfinex-tab" data-toggle="tab" href="#di-bitfinex" role="tab" aria-controls="di-bitfinex" aria-selected="false">Bitfinex</a>
|
|
|
|
|
</li>
|
|
|
|
@@ -333,6 +344,9 @@
|
|
|
|
|
<div class="tab-content my-3" id="myTabContent">
|
|
|
|
|
<div class="tab-pane fade show active" id="di-binance" role="tabpanel" aria-labelledby="di-binance-tab">
|
|
|
|
|
<pre><code>builder.Services.AddBinance();</code></pre>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tab-pane fade" id="di-bingx" role="tabpanel" aria-labelledby="di-bingx-tab">
|
|
|
|
|
<pre><code>builder.Services.AddBingX();</code></pre>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tab-pane fade" id="di-bitfinex" role="tabpanel" aria-labelledby="di-bitfinex-tab">
|
|
|
|
|
<pre><code>builder.Services.AddBitfinex();</code></pre>
|
|
|
|
@@ -373,6 +387,9 @@
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<a class="nav-link active" id="interfaces-binance-tab" data-toggle="tab" href="#interfaces-binance" role="tab" aria-controls="interfaces-binance" aria-selected="true">Binance</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<a class="nav-link" id="interfaces-bingx-tab" data-toggle="tab" href="#interfaces-bingx" role="tab" aria-controls="interfaces-bingx" aria-selected="false">BingX</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<a class="nav-link" id="interfaces-bitfinex-tab" data-toggle="tab" href="#interfaces-bitfinex" role="tab" aria-controls="interfaces-bitfinex" aria-selected="false">Bitfinex</a>
|
|
|
|
|
</li>
|
|
|
|
@@ -434,6 +451,35 @@
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tab-pane fade" id="interfaces-bingx" role="tabpanel" aria-labelledby="interfaces-bingx-tab">
|
|
|
|
|
<table class="table table-bordered">
|
|
|
|
|
<tr><th>Interface</th><th>Description</th></tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td><code>IBingXRestClient</code></td>
|
|
|
|
|
<td>The client for accessing the BingX REST API</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td><code>IBingXSocketClient</code></td>
|
|
|
|
|
<td>The client for accessing the BingX Websocket API</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td><code>IBingXOrderBookFactory</code></td>
|
|
|
|
|
<td>A factory for creating SymbolOrderBook instances for the BingX API</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td><code>ICryptoRestClient</code></td>
|
|
|
|
|
<td>An aggregating client from which multiple different library REST clients can be accessed</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td><code>ICryptoSocketClient</code></td>
|
|
|
|
|
<td>An aggregating client from which multiple different library Websocket clients can be accessed</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td><code>ISpotClient</code></td>
|
|
|
|
|
<td>An implementation of the ISpotClient interface for BingX. The ISpotClient offers basic Spot API functionality in a combined interface</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tab-pane fade" id="interfaces-bitfinex" role="tabpanel" aria-labelledby="interfaces-bitfinex-tab">
|
|
|
|
|
<table class="table table-bordered">
|
|
|
|
|
<tr><th>Interface</th><th>Description</th></tr>
|
|
|
|
@@ -726,6 +772,9 @@
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<a class="nav-link active" id="rest-binance-tab" data-toggle="tab" href="#rest-binance" role="tab" aria-controls="rest-binance" aria-selected="true">Binance</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<a class="nav-link" id="rest-bingx-tab" data-toggle="tab" href="#rest-bingx" role="tab" aria-controls="rest-bingx" aria-selected="false">BingX</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<a class="nav-link" id="rest-bitfinex-tab" data-toggle="tab" href="#rest-bitfinex" role="tab" aria-controls="rest-bitfinex" aria-selected="false">Bitfinex</a>
|
|
|
|
|
</li>
|
|
|
|
@@ -766,6 +815,18 @@ if (!tickersResult.Success)
|
|
|
|
|
// Handle error, tickersResult.Error contains more information
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
// Handle data, tickersResult.Data will contain the actual data
|
|
|
|
|
}</code></pre>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tab-pane fade" id="rest-bingx" role="tabpanel" aria-labelledby="rest-bingx-tab">
|
|
|
|
|
<pre><code>var client = new BingXRestClient();
|
|
|
|
|
var tickersResult = await client.SpotApi.ExchangeData.GetTickersAsync();
|
|
|
|
|
if (!tickersResult.Success)
|
|
|
|
|
{
|
|
|
|
|
// Handle error, tickersResult.Error contains more information
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
// Handle data, tickersResult.Data will contain the actual data
|
|
|
|
|
}</code></pre>
|
|
|
|
@@ -965,6 +1026,9 @@ else
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<a class="nav-link active" id="socket-binance-tab" data-toggle="tab" href="#socket-binance" role="tab" aria-controls="socket-binance" aria-selected="true">Binance</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<a class="nav-link" id="socket-bingx-tab" data-toggle="tab" href="#socket-bingx" role="tab" aria-controls="socket-bingx" aria-selected="false">BingX</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<a class="nav-link" id="socket-bitfinex-tab" data-toggle="tab" href="#socket-bitfinex" role="tab" aria-controls="socket-bitfinex" aria-selected="false">Bitfinex</a>
|
|
|
|
|
</li>
|
|
|
|
@@ -1003,6 +1067,17 @@ if (!subscribeResult.Success)
|
|
|
|
|
{
|
|
|
|
|
// Handle error, subscribeResult.Error contains more information on why the subscription failed
|
|
|
|
|
}
|
|
|
|
|
// Subscribing was successfull, the data will now be streamed into the data handler</code></pre>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tab-pane fade" id="socket-bingx" role="tabpanel" aria-labelledby="socket-bingx-tab">
|
|
|
|
|
<pre><code>var client = new BingXSocketClient();
|
|
|
|
|
var subscribeResult = await client.SpotApi.SubscribeToTickerUpdatesAsync("ETH-USDT", update => {
|
|
|
|
|
// Handle the data update, update.Data will contain the actual data
|
|
|
|
|
});
|
|
|
|
|
if (!subscribeResult.Success)
|
|
|
|
|
{
|
|
|
|
|
// Handle error, subscribeResult.Error contains more information on why the subscription failed
|
|
|
|
|
}
|
|
|
|
|
// Subscribing was successfull, the data will now be streamed into the data handler</code></pre>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tab-pane fade" id="socket-bitfinex" role="tabpanel" aria-labelledby="socket-bitfinex-tab">
|
|
|
|
@@ -1310,6 +1385,9 @@ options.ApiCredentials = new ApiCredentials("YOUR PUBLIC KEY", "YOUR PRIVATE KEY
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<a class="nav-link active" id="options-binance-tab" data-toggle="tab" href="#options-binance" role="tab" aria-controls="options-binance" aria-selected="true">Binance</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<a class="nav-link" id="options-bingx-tab" data-toggle="tab" href="#options-bingx" role="tab" aria-controls="options-bingx" aria-selected="false">BingX</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<a class="nav-link" id="options-bitfinex-tab" data-toggle="tab" href="#options-bitfinex" role="tab" aria-controls="options-bitfinex" aria-selected="false">Bitfinex</a>
|
|
|
|
|
</li>
|
|
|
|
@@ -1344,6 +1422,15 @@ options.ApiCredentials = new ApiCredentials("YOUR PUBLIC KEY", "YOUR PRIVATE KEY
|
|
|
|
|
<div class="tab-content my-3" id="myTabContent">
|
|
|
|
|
<div class="tab-pane fade show active" id="options-binance" role="tabpanel" aria-labelledby="options-binance-tab">
|
|
|
|
|
<pre><code>builder.Services.AddBinance(
|
|
|
|
|
restOptions => {
|
|
|
|
|
restOptions.RequestTimeout = TimeSpan.FromSeconds(30);
|
|
|
|
|
},
|
|
|
|
|
socketOptions => {
|
|
|
|
|
socketOptions.RequestTimeout = TimeSpan.FromSeconds(10);
|
|
|
|
|
});</code></pre>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tab-pane fade" id="options-bingx" role="tabpanel" aria-labelledby="options-bingx-tab">
|
|
|
|
|
<pre><code>builder.Services.AddBingX(
|
|
|
|
|
restOptions => {
|
|
|
|
|
restOptions.RequestTimeout = TimeSpan.FromSeconds(30);
|
|
|
|
|
},
|
|
|
|
@@ -1448,6 +1535,9 @@ options.ApiCredentials = new ApiCredentials("YOUR PUBLIC KEY", "YOUR PRIVATE KEY
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<a class="nav-link active" id="options-binance-tab" data-toggle="tab" href="#options-constr-binance" role="tab" aria-controls="options-constr-binance" aria-selected="true">Binance</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<a class="nav-link" id="options-bingx-tab" data-toggle="tab" href="#options-constr-bingx" role="tab" aria-controls="options-constr-bingx" aria-selected="false">BingX</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<a class="nav-link" id="options-bitfinex-tab" data-toggle="tab" href="#options-constr-bitfinex" role="tab" aria-controls="options-constr-bitfinex" aria-selected="false">Bitfinex</a>
|
|
|
|
|
</li>
|
|
|
|
@@ -1482,6 +1572,12 @@ options.ApiCredentials = new ApiCredentials("YOUR PUBLIC KEY", "YOUR PRIVATE KEY
|
|
|
|
|
<div class="tab-content my-3" id="myTabContent">
|
|
|
|
|
<div class="tab-pane fade show active" id="options-constr-binance" role="tabpanel" aria-labelledby="options-binance-tab">
|
|
|
|
|
<pre><code>var binanceRestClient = new BinanceRestClient(opts =>
|
|
|
|
|
{
|
|
|
|
|
opts.RequestTimeout = TimeSpan.FromSeconds(30);
|
|
|
|
|
});</code></pre>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tab-pane fade" id="options-constr-bingx" role="tabpanel" aria-labelledby="options-bingx-tab">
|
|
|
|
|
<pre><code>var client = new BingXRestClient(opts =>
|
|
|
|
|
{
|
|
|
|
|
opts.RequestTimeout = TimeSpan.FromSeconds(30);
|
|
|
|
|
});</code></pre>
|
|
|
|
@@ -1556,6 +1652,9 @@ options.ApiCredentials = new ApiCredentials("YOUR PUBLIC KEY", "YOUR PRIVATE KEY
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<a class="nav-link active" id="options-binance-tab" data-toggle="tab" href="#options-default-binance" role="tab" aria-controls="options-default-binance" aria-selected="true">Binance</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<a class="nav-link" id="options-bingx-tab" data-toggle="tab" href="#options-default-bingx" role="tab" aria-controls="options-default-bingx" aria-selected="false">BingX</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<a class="nav-link" id="options-bitfinex-tab" data-toggle="tab" href="#options-default-bitfinex" role="tab" aria-controls="options-default-bitfinex" aria-selected="false">Bitfinex</a>
|
|
|
|
|
</li>
|
|
|
|
@@ -1594,6 +1693,13 @@ options.ApiCredentials = new ApiCredentials("YOUR PUBLIC KEY", "YOUR PRIVATE KEY
|
|
|
|
|
options.RequestTimeout = TimeSpan.FromSeconds(30);
|
|
|
|
|
});
|
|
|
|
|
var client = new BinanceRestClient();</code></pre>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tab-pane fade" id="options-default-bingx" role="tabpanel" aria-labelledby="options-bingx-tab">
|
|
|
|
|
<pre><code>BingXRestClient.SetDefaultOptions(options =>
|
|
|
|
|
{
|
|
|
|
|
options.RequestTimeout = TimeSpan.FromSeconds(30);
|
|
|
|
|
});
|
|
|
|
|
var client = new BingXRestClient();</code></pre>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tab-pane fade" id="options-default-bitfinex" role="tabpanel" aria-labelledby="options-bitfinex-tab">
|
|
|
|
|
<pre><code>BitfinexRestClient.SetDefaultOptions(options =>
|
|
|
|
@@ -1846,6 +1952,9 @@ var client = new OKXRestClient();</code></pre>
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<a class="nav-link active" id="book-binance-tab" data-toggle="tab" href="#book-binance" role="tab" aria-controls="book-binance" aria-selected="true">Binance</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<a class="nav-link" id="book-bingx-tab" data-toggle="tab" href="#book-bingx" role="tab" aria-controls="book-bingx" aria-selected="false">BingX</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<a class="nav-link" id="book-bitfinex-tab" data-toggle="tab" href="#book-bitfinex" role="tab" aria-controls="book-bitfinex" aria-selected="false">Bitfinex</a>
|
|
|
|
|
</li>
|
|
|
|
@@ -1884,6 +1993,19 @@ if (!startResult.Success)
|
|
|
|
|
}
|
|
|
|
|
// Book has successfully started and synchronized
|
|
|
|
|
|
|
|
|
|
// Once no longer needed you can stop the live sync functionality by calling StopAsync()
|
|
|
|
|
await book.StopAsync();
|
|
|
|
|
</code></pre>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tab-pane fade" id="book-bingx" role="tabpanel" aria-labelledby="book-bingx-tab">
|
|
|
|
|
<pre><code>var book = new BingXSpotSymbolOrderBook("ETH-USDT");
|
|
|
|
|
var startResult = await book.StartAsync();
|
|
|
|
|
if (!startResult.Success)
|
|
|
|
|
{
|
|
|
|
|
// Handle error, error info available in startResult.Error
|
|
|
|
|
}
|
|
|
|
|
// Book has successfully started and synchronized
|
|
|
|
|
|
|
|
|
|
// Once no longer needed you can stop the live sync functionality by calling StopAsync()
|
|
|
|
|
await book.StopAsync();
|
|
|
|
|
</code></pre>
|
|
|
|
@@ -2205,7 +2327,10 @@ This adds another limit of 10 requests per 2 seconds for the order endpoint in a
|
|
|
|
|
<a class="nav-link active" id="example-symbols-general-tab" data-toggle="tab" href="#example-symbols-general" role="tab" aria-controls="example-symbols-general" aria-selected="true">CryptoRestClient</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<a class="nav-link" id="example-symbols-binance-tab" data-toggle="tab" href="#example-symbols-binance" role="tab" aria-controls="example-symbols-binance" aria-selected="true">Binance</a>
|
|
|
|
|
<a class="nav-link" id="example-symbols-binance-tab" data-toggle="tab" href="#example-symbols-binance" role="tab" aria-controls="example-symbols-binance" aria-selected="false">Binance</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<a class="nav-link" id="example-symbols-bingx-tab" data-toggle="tab" href="#example-symbols-bingx" role="tab" aria-controls="example-symbols-bingx" aria-selected="false">BingX</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<a class="nav-link" id="example-symbols-bitfinex-tab" data-toggle="tab" href="#example-symbols-bitfinex" role="tab" aria-controls="example-symbols-bitfinex" aria-selected="false">Bitfinex</a>
|
|
|
|
@@ -2243,6 +2368,9 @@ await spotClient.GetSymbolsAsync();</code></pre>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tab-pane fade" id="example-symbols-binance" role="tabpanel" aria-labelledby="example-symbols-binance-tab">
|
|
|
|
|
<pre><code>await binanceClient.SpotApi.ExchangeData.GetExchangeInfoAsync();</code></pre>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tab-pane fade" id="example-symbols-bingx" role="tabpanel" aria-labelledby="example-symbols-bingx-tab">
|
|
|
|
|
<pre><code>await bingXClient.SpotApi.ExchangeData.GetSymbolsAsync();</code></pre>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tab-pane fade" id="example-symbols-bitfinex" role="tabpanel" aria-labelledby="example-symbols-bitfinex-tab">
|
|
|
|
|
<pre><code>await bitfinexClient.SpotApi.ExchangeData.GetSymbolsAsync();</code></pre>
|
|
|
|
@@ -2295,6 +2423,9 @@ await spotClient.GetSymbolsAsync();</code></pre>
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<a class="nav-link" id="example-ticker-binance-tab" data-toggle="tab" href="#example-ticker-binance" role="tab" aria-controls="example-ticker-binance" aria-selected="true">Binance</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<a class="nav-link" id="example-ticker-bingx-tab" data-toggle="tab" href="#example-ticker-bingx" role="tab" aria-controls="example-ticker-bingx" aria-selected="true">BingX</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<a class="nav-link" id="example-ticker-bitfinex-tab" data-toggle="tab" href="#example-ticker-bitfinex" role="tab" aria-controls="example-ticker-bitfinex" aria-selected="false">Bitfinex</a>
|
|
|
|
|
</li>
|
|
|
|
@@ -2331,6 +2462,9 @@ await spotClient.GetTickerAsync(spotClient.GetSymbolName("BTC", "USDT"));</code>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tab-pane fade" id="example-ticker-binance" role="tabpanel" aria-labelledby="example-ticker-binance-tab">
|
|
|
|
|
<pre><code>await binanceClient.SpotApi.ExchangeData.GetTickerAsync("BTCUSDT");</code></pre>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tab-pane fade" id="example-ticker-bingx" role="tabpanel" aria-labelledby="example-ticker-bingx-tab">
|
|
|
|
|
<pre><code>await bingXClient.SpotApi.ExchangeData.GetTickersAsync("BTC-USDT");</code></pre>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tab-pane fade" id="example-ticker-bitfinex" role="tabpanel" aria-labelledby="example-ticker-bitfinex-tab">
|
|
|
|
|
<pre><code>await bitfinexClient.SpotApi.ExchangeData.GetTickerAsync("tBTCUST");</code></pre>
|
|
|
|
@@ -2383,6 +2517,9 @@ await spotClient.GetTickerAsync(spotClient.GetSymbolName("BTC", "USDT"));</code>
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<a class="nav-link" id="example-balances-binance-tab" data-toggle="tab" href="#example-balances-binance" role="tab" aria-controls="example-balances-binance" aria-selected="true">Binance</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<a class="nav-link" id="example-balances-bingx-tab" data-toggle="tab" href="#example-balances-bingx" role="tab" aria-controls="example-balances-bingx" aria-selected="true">BingX</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<a class="nav-link" id="example-balances-bitfinex-tab" data-toggle="tab" href="#example-balances-bitfinex" role="tab" aria-controls="example-balances-bitfinex" aria-selected="false">Bitfinex</a>
|
|
|
|
|
</li>
|
|
|
|
@@ -2419,6 +2556,9 @@ await spotClient.GetBalancesAsync();</code></pre>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tab-pane fade" id="example-balances-binance" role="tabpanel" aria-labelledby="example-balances-binance-tab">
|
|
|
|
|
<pre><code>await binanceClient.SpotApi.Account.GetBalancesAsync();</code></pre>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tab-pane fade" id="example-balances-bingx" role="tabpanel" aria-labelledby="example-balances-bingx-tab">
|
|
|
|
|
<pre><code>await bingXClient.SpotApi.Account.GetBalancesAsync();</code></pre>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tab-pane fade" id="example-balances-bitfinex" role="tabpanel" aria-labelledby="example-balances-bitfinex-tab">
|
|
|
|
|
<pre><code>await bitfinexClient.SpotApi.Account.GetBalancesAsync();</code></pre>
|
|
|
|
@@ -2475,6 +2615,9 @@ var result = await huobiClient.SpotApi.Account.GetBalancesAsync();</code></pre>
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<a class="nav-link" id="example-place-binance-tab" data-toggle="tab" href="#example-place-binance" role="tab" aria-controls="example-place-binance" aria-selected="true">Binance</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<a class="nav-link" id="example-place-binance-tab" data-toggle="tab" href="#example-place-bingx" role="tab" aria-controls="example-place-bingx" aria-selected="true">BingX</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<a class="nav-link" id="example-place-bitfinex-tab" data-toggle="tab" href="#example-place-bitfinex" role="tab" aria-controls="example-place-bitfinex" aria-selected="false">Bitfinex</a>
|
|
|
|
|
</li>
|
|
|
|
@@ -2511,6 +2654,9 @@ await spotClient.PlaceOrderAsync(spotClient.GetSymbolName("BTC", "USDT"), Common
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tab-pane fade" id="example-place-binance" role="tabpanel" aria-labelledby="example-place-binance-tab">
|
|
|
|
|
<pre><code>await binanceClient.SpotApi.Trading.PlaceOrderAsync("BTCUSDT", OrderSide.Buy, SpotOrderType.Limit, 0.1m, price: 50000, timeInForce: TimeInForce.GoodTillCanceled);</code></pre>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tab-pane fade" id="example-place-bingx" role="tabpanel" aria-labelledby="example-place-bingx-tab">
|
|
|
|
|
<pre><code>await bingXClient.SpotApi.Trading.PlaceOrderAsync("BTC-USDT", OrderSide.Buy, OrderType.Limit, 0.1m, price: 50000);</code></pre>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tab-pane fade" id="example-place-bitfinex" role="tabpanel" aria-labelledby="example-place-bitfinex-tab">
|
|
|
|
|
<pre><code>await bitfinexClient.SpotApi.Trading.PlaceOrderAsync("tBTCUST", OrderSide.Buy, OrderType.Limit, 0.1m, 50000);</code></pre>
|
|
|
|
@@ -2564,6 +2710,9 @@ var result = await huobiClient.SpotApi.Trading.PlaceOrderAsync(account.Id, "BTCU
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<a class="nav-link active" id="example-stream-ticker-binance-tab" data-toggle="tab" href="#example-stream-ticker-binance" role="tab" aria-controls="example-stream-ticker-binance" aria-selected="true">Binance</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<a class="nav-link" id="example-stream-ticker-bingx-tab" data-toggle="tab" href="#example-stream-ticker-bingx" role="tab" aria-controls="example-stream-ticker-bingx" aria-selected="false">BingX</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<a class="nav-link" id="example-stream-ticker-bitfinex-tab" data-toggle="tab" href="#example-stream-ticker-bitfinex" role="tab" aria-controls="example-stream-ticker-bitfinex" aria-selected="false">Bitfinex</a>
|
|
|
|
|
</li>
|
|
|
|
@@ -2596,6 +2745,11 @@ var result = await huobiClient.SpotApi.Trading.PlaceOrderAsync(account.Id, "BTCU
|
|
|
|
|
<div class="tab-pane fade show active" id="example-stream-ticker-binance" role="tabpanel" aria-labelledby="example-stream-ticker-binance-tab">
|
|
|
|
|
<pre><code>await binanceSocketClient.SpotApi.ExchangeData.SubscribeToTickerUpdatesAsync("ETHUSDT", data => {
|
|
|
|
|
// Handle update
|
|
|
|
|
});</code></pre>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tab-pane fade" id="example-stream-ticker-bingx" role="tabpanel" aria-labelledby="example-stream-ticker-bingx-tab">
|
|
|
|
|
<pre><code>await bingXSocketClient.SpotApi.SubscribeToTickerUpdatesAsync("ETH-USDT", data => {
|
|
|
|
|
// Handle update
|
|
|
|
|
});</code></pre>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tab-pane fade" id="example-stream-ticker-bitfinex" role="tabpanel" aria-labelledby="example-stream-ticker-bitfinex-tab">
|
|
|
|
@@ -2665,6 +2819,9 @@ var result = await huobiClient.SpotApi.Trading.PlaceOrderAsync(account.Id, "BTCU
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<a class="nav-link active" id="example-stream-order-binance-tab" data-toggle="tab" href="#example-stream-order-binance" role="tab" aria-controls="example-stream-order-binance" aria-selected="true">Binance</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<a class="nav-link" id="example-stream-order-bitfinex-tab" data-toggle="tab" href="#example-stream-order-bingx" role="tab" aria-controls="example-stream-order-bingx" aria-selected="false">BingX</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="nav-item" role="presentation">
|
|
|
|
|
<a class="nav-link" id="example-stream-order-bitfinex-tab" data-toggle="tab" href="#example-stream-order-bitfinex" role="tab" aria-controls="example-stream-order-bitfinex" aria-selected="false">Bitfinex</a>
|
|
|
|
|
</li>
|
|
|
|
@@ -2709,7 +2866,26 @@ _ = Task.Run(async () => {
|
|
|
|
|
while (true)
|
|
|
|
|
{
|
|
|
|
|
await Task.Delay(Timespan.FromMinutes(30));
|
|
|
|
|
await binanceClient.SpotApi.Account.KeepAliveUserStreamAsync(token.Data);
|
|
|
|
|
await binanceClient.SpotApi.Account.KeepAliveUserStreamAsync(listenKey.Data);
|
|
|
|
|
}
|
|
|
|
|
});</code></pre>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tab-pane fade" id="example-stream-order-bingx" role="tabpanel" aria-labelledby="example-stream-order-bingx-tab">
|
|
|
|
|
<pre><code>// Retrieve the listen key
|
|
|
|
|
var listenKey = await bingXRestClient.SpotApi.Account.StartUserStreamAsync();
|
|
|
|
|
|
|
|
|
|
// Subscribe using the key
|
|
|
|
|
await bingXSocketClient.SpotApi.SubscribeToBalanceUpdatesAsync(listenKey.Data, data => {
|
|
|
|
|
// Handle update
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// The listen key will stay valid for 60 minutes, after this no updates will be send anymore
|
|
|
|
|
// To extend the life time of the listen key it is recommended to call the KeepAliveUserStreamAsync method every 30 minutes
|
|
|
|
|
_ = Task.Run(async () => {
|
|
|
|
|
while (true)
|
|
|
|
|
{
|
|
|
|
|
await Task.Delay(Timespan.FromMinutes(30));
|
|
|
|
|
await bingXClient.SpotApi.Account.KeepAliveUserStreamAsync(listenKey.Data);
|
|
|
|
|
}
|
|
|
|
|
});</code></pre>
|
|
|
|
|
</div>
|
|
|
|
|