1
0
mirror of https://github.com/JKorf/CryptoExchange.Net synced 2025-06-07 16:06:15 +00:00

Updated dotnet versions examples/unit tests

This commit is contained in:
Jkorf 2022-03-04 13:41:57 +01:00
parent d8a1d96e5c
commit 9b950cab4c
5 changed files with 29 additions and 28 deletions

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

View File

@ -5,15 +5,15 @@
</PropertyGroup>
<ItemGroup>
<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="Binance.Net" Version="8.0.6" />
<PackageReference Include="Bitfinex.Net" Version="5.0.3" />
<PackageReference Include="Bittrex.Net" Version="7.0.4" />
<PackageReference Include="Bybit.Net" Version="0.0.4" />
<PackageReference Include="CoinEx.Net" Version="5.0.3" />
<PackageReference Include="FTX.Net" Version="1.0.4" />
<PackageReference Include="Huobi.Net" Version="4.0.4" />
<PackageReference Include="KrakenExchange.Net" Version="3.0.3" />
<PackageReference Include="Kucoin.Net" Version="4.0.3" />
<PackageReference Include="Serilog.AspNetCore" Version="4.1.1-dev-00250" />
</ItemGroup>

View File

@ -14,6 +14,7 @@
@using Bybit.Net.Clients.SpotApi
@using CoinEx.Net.Clients.SpotApi
@using CryptoExchange.Net.Interfaces
@using CryptoExchange.Net.Interfaces.CommonClients
@using FTX.Net.Clients.TradeApi
@using Huobi.Net.Clients.SpotApi
@using Kraken.Net.Clients.SpotApi
@ -33,14 +34,14 @@
var clients = new ISpotClient[]
{
binanceClient.SpotApi.ComonSpotClient,
bitfinexClient.SpotApi.ComonSpotClient,
bittrexClient.SpotApi.ComonSpotClient,
binanceClient.SpotApi.CommonSpotClient,
bitfinexClient.SpotApi.CommonSpotClient,
bittrexClient.SpotApi.CommonSpotClient,
bybitClient.SpotApi.CommonSpotClient,
coinexClient.SpotApi.ComonSpotClient,
ftxClient.TradeApi.ComonSpotClient,
huobiClient.SpotApi.ComonSpotClient,
krakenClient.SpotApi.ComonSpotClient,
coinexClient.SpotApi.CommonSpotClient,
ftxClient.TradeApi.CommonSpotClient,
huobiClient.SpotApi.CommonSpotClient,
krakenClient.SpotApi.CommonSpotClient,
kucoinClient.SpotApi.CommonSpotClient
};

View File

@ -2,19 +2,19 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<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="Binance.Net" Version="8.0.6" />
<PackageReference Include="Bitfinex.Net" Version="5.0.3" />
<PackageReference Include="Bittrex.Net" Version="7.0.4" />
<PackageReference Include="Bybit.Net" Version="0.0.4" />
<PackageReference Include="CoinEx.Net" Version="5.0.3" />
<PackageReference Include="FTX.Net" Version="1.0.4" />
<PackageReference Include="Huobi.Net" Version="4.0.4" />
<PackageReference Include="KrakenExchange.Net" Version="3.0.3" />
<PackageReference Include="Kucoin.Net" Version="4.0.3" />
</ItemGroup>
</Project>

View File

@ -61,7 +61,7 @@ namespace ConsoleClient.Exchanges
var result = await client.SpotApi.Trading.PlaceOrderAsync(
symbol,
side.ToLower() == "buy" ? Binance.Net.Enums.OrderSide.Buy: Binance.Net.Enums.OrderSide.Sell,
type == "market" ? Binance.Net.Enums.OrderType.Market : Binance.Net.Enums.OrderType.Limit,
type == "market" ? Binance.Net.Enums.SpotOrderType.Market : Binance.Net.Enums.SpotOrderType.Limit,
quantity,
price: price,
timeInForce: type == "market" ? null: Binance.Net.Enums.TimeInForce.GoodTillCanceled);