glitch100 / BinanceDotNet

Official C# Wrapper for the Binance exchange API, with REST and WebSocket endpoints
https://www.nuget.org/packages/BinanceDotNet/
MIT License
161 stars 138 forks source link

Malformed requests in Azure Functions #162

Closed dmytro-i closed 5 years ago

dmytro-i commented 5 years ago

Issue Overview

There have been reports of requests failing with 400 due to time sync issue. I tried to set timestampOffset but it still won't work when running in Azure Functions.

In my case QueryOrder is failing. And what's even more strange is that it does not fail of the time and I have no idea why it fails sometimes and other times it works.

I checked the timestamps in the logs and they are within 20ms of the timestamp of the log.

When I used this library in a console app targeting .NET Framework 4.6.1 it was running just fine without even setting timestampOffset but Azure Functions 2 are using .NET Core 2.

Aslo it seems to be running just fine on my local machine.

Has anyone else ran into a similar issue? Would appreciate any help.

Package Version: 4.12.0

dmytro-i commented 5 years ago

I thought this https://github.com/glitch100/BinanceDotNet/blob/97a60e8cef65b4cb3c9d58cd51ad662a4118a6c8/BinanceExchange.API/RequestClient.cs#L215 may be to blame but it would fail all the time and not just occasionally.

dmytro-i commented 5 years ago

Turns out it was a different error.