You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I call BybitClient.UsdPerpetualApi.Account.GetPositionAsync(Symbol)
and after that I call
BybitClient.CopyTradingApi.Trading.GetPositionsAsync()
it returns the following error:
{10002: invalid request, please check your server timestamp or recv_window param }
If I first call BybitClient.CopyTradingApi.Trading.GetPositionsAsync() and then call BybitClient.UsdPerpetualApi.Account.GetPositionAsync(Symbol) it returns similar error which looks like the following:
{10002: invalid request, please check your timestamp and recv_window param. req_timestamp: 1665531628720 server_timestamp: 1665531627702 recv_window: 5000 }
The text was updated successfully, but these errors were encountered:
behaviour is more consistent now, but if my local time is 1 second outdated, this does not work.
to test it i used following code
[StructLayout(LayoutKind.Sequential)]
public struct SYSTEMTIME
{
public short wYear;
public short wMonth;
public short wDayOfWeek;
public short wDay;
public short wHour;
public short wMinute;
public short wSecond;
public short wMilliseconds;
}
[DllImport("kernel32.dll", SetLastError = true)]
public static extern bool SetSystemTime(ref SYSTEMTIME st);
if my local time differs from timeserver time by more than 1 second, api calls return an error.
I probably dont get it, but shouldn't the 5000 ms recv_window let the api calls work up to 5 seconds time desync in at least one direction (assuming network delays are way below 1s)?
If I call BybitClient.UsdPerpetualApi.Account.GetPositionAsync(Symbol)
and after that I call
BybitClient.CopyTradingApi.Trading.GetPositionsAsync()
it returns the following error:
{10002: invalid request, please check your server timestamp or recv_window param }
If I first call BybitClient.CopyTradingApi.Trading.GetPositionsAsync() and then call BybitClient.UsdPerpetualApi.Account.GetPositionAsync(Symbol) it returns similar error which looks like the following:
{10002: invalid request, please check your timestamp and recv_window param. req_timestamp: 1665531628720 server_timestamp: 1665531627702 recv_window: 5000 }
The text was updated successfully, but these errors were encountered: