Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ExchangeBinanceAPI.GetCompletedOrdersForAllSymbolsAsync- System.Net.WebException: 'The remote server returned an error: (400) Bad Request.' #422

Open
GonzoKK opened this issue Aug 16, 2019 · 3 comments

Comments

@GonzoKK
Copy link

GonzoKK commented Aug 16, 2019

System.Net.WebException
HResult=0x80131509
Message=The remote server returned an error: (400) Bad Request.
Source=System
StackTrace:
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task1 promise, Boolean requiresSynchronization)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at ExchangeSharp.APIRequestMaker.d__4.MoveNext() in C:!Dev\ExchangeSharp-master(6)\ExchangeSharp\API\Common\APIRequestMaker.cs:line 182

image

https://api.binance.com/api/v3/myTrades?timestamp=1565945591561&recvWindow=60000&symbol=LINKBTC&signature=04b1c8ba3c55c7e7ebd406b346515348357f7b59b5ea28228..............

@vslee
Copy link
Collaborator

vslee commented Aug 16, 2019

Thanks for filing this bug. If you could send a pull request with the solution, we'll merge it. If you don't know how, you can also post the updated code here.

@GonzoKK
Copy link
Author

GonzoKK commented Sep 12, 2019

This is still on my radar, will tackle soonish

@gajewskiArek
Copy link
Contributor

Not really sure what was original error since there's no responseString included in details but there's a problem with GetCompletedOrdersForAllSymbolsAsync method bacause it calls Parallel.ForEach with async lambdas. When you debug later you hit
orders.Sort((o1, o2) =>
while orders still being empty. Same problem as discussed here:

https://stackoverflow.com/questions/15136542/parallel-foreach-with-asynchronous-lambda

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants