Time sync error

$ python3 trader.py positions
Failed to get positions: {‘code’: ‘expired_signature’, ‘context’: {‘request_time’: 1751911625192, ‘server_time’: 1751911625}}
$

Difference:

  • 1,751,911,625.192 s (My time)
  • 1,751,911,625 s (Delta server time)
  • Difference: ~0.192 seconds (less than 1 second!)

This is perfect time sync!
So My clock is NOT the problem.

Hi @boom_boom

It appears the issue is with the timestamp format.

Delta Exchange API expects the timestamp in seconds (not milliseconds). In your error message, the server_time is 1751911625 (seconds), but your request_time is 1751911625192 (milliseconds).

Please make sure to send the timestamp in seconds. If your code is generating milliseconds, just divide by 1000 to convert to seconds before including it in your API requests. This should resolve the expired_signature error.