mscheetz / KuCoinApi.Net

KuCoin api access built in .Net Standard
MIT License
6 stars 4 forks source link

PostTrade doesn't work #2

Closed SergeevGregory closed 5 years ago

SergeevGregory commented 5 years ago

Dear Developer, today I tested new version of Package. GetBalance issue was fixed, but PostTrade doesn't work... I attached screen with error. Hope you will fix this issue too. Thx

posttrade

SergeevGregory commented 5 years ago

I found that problem is in strings in public async Task<ApiResponse<Dictionary<string, string>>> PostTrade:

var queryString = new List<string> { $"amount={tradeParams.quantity}", $"price={tradeParams.price}", $"symbol={kuPair}", $"type={tradeParams.side}" }; Because in Russian Culture default decimal separator is ",", not ".". Possible fix is: var queryString = new List<string> { $"amount={tradeParams.quantity}".Replace(",","."), $"price={tradeParams.price}".Replace(",","."), $"symbol={kuPair}", $"type={tradeParams.side}" }; I think in next release you have to fix this issue in all places where you convert decimal to string.

mscheetz commented 5 years ago

Will look into it tonight. Thanks for the possible fix too.

There is a LimitOrder endpoint you can try as well.

mscheetz commented 5 years ago

Fixed in latest