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

Exception when PlaceLimitOrder #49

Closed
YLPeng opened this issue Feb 6, 2018 · 4 comments
Closed

Exception when PlaceLimitOrder #49

YLPeng opened this issue Feb 6, 2018 · 4 comments
Assignees
Labels

Comments

@YLPeng
Copy link

YLPeng commented Feb 6, 2018

I apologize if I did sth foolish, but I keep getting System.AggregateException: 'One or more errors occurred. (Object reference not set to an instance of an object.)' when I try to place limit order. (both TestPlaceOrder and real)
The inner exception stack trace is :
at Binance.Api.BinanceHttpClientExtensions.d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Binance.Api.BinanceApi.d__34.MoveNext()

I am using version 0.2.0-alpha27, please help!

Thanks.

@YLPeng
Copy link
Author

YLPeng commented Feb 6, 2018

After trying a few things, I was able to place order when I downgrade the version to v0.2.0-alpha24.

Therefore, potentially, the issue was introduced since alpha 25.

@sonvister
Copy link
Owner

@YLPeng, thanks for mentioning this. I see a potential problem that was introduced with 0.2.0-alpha25. If you are not using dependency injection (or IBinanceApiUserProvider) or creating an IApiRateLimiter when creating IBinanceApiUser the associated 'order' rate limiter is null. The changes with 0.2.0-alpha25 failed to check for that case.

So, assuming that's the case, just feed a new ApiRateLimiter() to new BinanceApiUser(rateLimiter: <the rate limiter>) and that should work.

@sonvister sonvister self-assigned this Feb 6, 2018
@sonvister sonvister added the bug label Feb 6, 2018
@sonvister
Copy link
Owner

@YLPeng, let me know if changes made to 0.2.0-alpha28 solves this issue. Thanks.

@YLPeng
Copy link
Author

YLPeng commented Feb 10, 2018

@sonvister verified the bug has been fixed:) THanks!

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

No branches or pull requests

2 participants