1
0
mirror of https://github.com/JKorf/CryptoExchange.Net synced 2025-06-07 16:06:15 +00:00
This commit is contained in:
JKorf 2024-03-01 14:25:38 +01:00
parent 0cff678c2d
commit 4c899861b1

View File

@ -2701,7 +2701,13 @@ var listenKey = await binanceClient.SpotApi.Account.StartUserStreamAsync();
// Subscribe using the key // Subscribe using the key
await binanceSocketClient.SpotApi.Account.SubscribeToUserDataUpdatesAsync(listenKey.Data, data => { await binanceSocketClient.SpotApi.Account.SubscribeToUserDataUpdatesAsync(listenKey.Data, data => {
// Handle update // Handle update
}, null, null, null);</code></pre> }, null, null, null);
// 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 () => {
await binanceClient.SpotApi.Account.KeepAliveUserStreamAsync(token.Data);
});</code></pre>
</div> </div>
<div class="tab-pane fade" id="example-stream-order-bitfinex" role="tabpanel" aria-labelledby="example-stream-order-bitfinex-tab"> <div class="tab-pane fade" id="example-stream-order-bitfinex" role="tabpanel" aria-labelledby="example-stream-order-bitfinex-tab">
<pre><code>await bitfinexSocketClient.SpotApi.SubscribeToUserUpdatesAsync(orderHandler: data => { <pre><code>await bitfinexSocketClient.SpotApi.SubscribeToUserUpdatesAsync(orderHandler: data => {
@ -2749,6 +2755,12 @@ var token = await mexcClient.SpotApi.Account.StartUserStreamAsync();
// Subscribe using the key // Subscribe using the key
await mexcSocketClient.SpotApi.SubscribeToOrderUpdatesAsync(token.Data, data => { await mexcSocketClient.SpotApi.SubscribeToOrderUpdatesAsync(token.Data, data => {
// Handle update // Handle update
});
// The listen key will stay valid for 60 minutes, after this the connection is closed and reconnecting with the same listen key will fail
// To extend the life time of the listen key it is recommended to call the KeepAliveUserStreamAsync method every 30 minutes
_ = Task.Run(async () => {
await mexcClient.SpotApi.Account.KeepAliveUserStreamAsync(token.Data);
});</code></pre> });</code></pre>
</div> </div>
<div class="tab-pane fade" id="example-stream-order-okx" role="tabpanel" aria-labelledby="example-stream-order-okx-tab"> <div class="tab-pane fade" id="example-stream-order-okx" role="tabpanel" aria-labelledby="example-stream-order-okx-tab">