mirror of
https://github.com/JKorf/CryptoExchange.Net.git
synced 2026-08-13 01:12:59 +00:00
Examples
This commit is contained in:
@@ -5,16 +5,16 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Binance.Net" Version="8.0.0-alpha5" />
|
||||
<PackageReference Include="Bitfinex.Net" Version="5.0.0-alpha5" />
|
||||
<PackageReference Include="Bittrex.Net" Version="7.0.0-alpha5" />
|
||||
<PackageReference Include="Bybit.Net" Version="0.0.1-alpha5" />
|
||||
<PackageReference Include="CoinEx.Net" Version="5.0.0-alpha5" />
|
||||
<PackageReference Include="FTX.Net" Version="1.0.0-alpha5" />
|
||||
<PackageReference Include="Huobi.Net" Version="4.0.0-alpha6" />
|
||||
<PackageReference Include="KrakenExchange.Net" Version="3.0.0-alpha5" />
|
||||
<PackageReference Include="Kucoin.Net" Version="4.0.0-alpha5" />
|
||||
<PackageReference Include="Serilog.AspNetCore" Version="4.1.1-dev-00241" />
|
||||
<PackageReference Include="Binance.Net" Version="8.0.0-beta1" />
|
||||
<PackageReference Include="Bitfinex.Net" Version="5.0.0-beta1" />
|
||||
<PackageReference Include="Bittrex.Net" Version="7.0.0-beta1" />
|
||||
<PackageReference Include="Bybit.Net" Version="0.0.1-beta2" />
|
||||
<PackageReference Include="CoinEx.Net" Version="5.0.0-beta1" />
|
||||
<PackageReference Include="FTX.Net" Version="1.0.0-beta1" />
|
||||
<PackageReference Include="Huobi.Net" Version="4.0.0-beta1" />
|
||||
<PackageReference Include="KrakenExchange.Net" Version="3.0.0-beta1" />
|
||||
<PackageReference Include="Kucoin.Net" Version="4.0.0-beta3" />
|
||||
<PackageReference Include="Serilog.AspNetCore" Version="4.1.1-dev-00250" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -17,19 +17,21 @@
|
||||
@implements IDisposable
|
||||
|
||||
<h3>ETH-BTC books, live updates:</h3>
|
||||
@foreach(var book in _books.OrderBy(p => p.Key))
|
||||
{
|
||||
<div style="margin-bottom: 20px;">
|
||||
<h4>@book.Key</h4>
|
||||
@if (book.Value.AskCount >= 3 && book.Value.BidCount >= 3)
|
||||
{
|
||||
for (var i = 0; i < 3; i++)
|
||||
<div style="display:flex; flex-wrap: wrap;">
|
||||
@foreach(var book in _books.OrderBy(p => p.Key))
|
||||
{
|
||||
<div style="margin-bottom: 20px; flex: 1; min-width: 300px;">
|
||||
<h4>@book.Key</h4>
|
||||
@if (book.Value.AskCount >= 3 && book.Value.BidCount >= 3)
|
||||
{
|
||||
<div>@book.Value.Bids.ElementAt(i).Price - @book.Value.Asks.ElementAt(i).Price</div>
|
||||
for (var i = 0; i < 3; i++)
|
||||
{
|
||||
<div>@book.Value.Bids.ElementAt(i).Price - @book.Value.Asks.ElementAt(i).Price</div>
|
||||
}
|
||||
}
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
@code{
|
||||
private Dictionary<string, ISymbolOrderBook> _books = new Dictionary<string, ISymbolOrderBook>();
|
||||
|
||||
@@ -36,12 +36,12 @@
|
||||
binanceClient.SpotApi.ComonSpotClient,
|
||||
bitfinexClient.SpotApi.ComonSpotClient,
|
||||
bittrexClient.SpotApi.ComonSpotClient,
|
||||
bybitClient.SpotApi.ComonSpotClient,
|
||||
bybitClient.SpotApi.CommonSpotClient,
|
||||
coinexClient.SpotApi.ComonSpotClient,
|
||||
ftxClient.TradeApi.ComonSpotClient,
|
||||
huobiClient.SpotApi.ComonSpotClient,
|
||||
krakenClient.SpotApi.ComonSpotClient,
|
||||
kucoinClient.SpotApi.ComonSpotClient
|
||||
kucoinClient.SpotApi.CommonSpotClient
|
||||
};
|
||||
|
||||
var tasks = clients.Select(c => (c.ExchangeName, c.GetTickerAsync(c.GetSymbolName("ETH", "BTC"))));
|
||||
|
||||
Reference in New Issue
Block a user