{"action":"created","issue":{"url":"https://api.github.com/repos/sammchardy/python-binance/issues/2","repository_url":"https://api.github.com/repos/sammchardy/python-binance","labels_url":"https://api.github.com/repos/sammchardy/python-binance/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/sammchardy/python-binance/issues/2/comments","events_url":"https://api.github.com/repos/sammchardy/python-binance/issues/2/events","html_url":"https://github.com/sammchardy/python-binance/issues/2","id":252152063,"number":2,"title":"'Timestamp for this request is not valid'","user":{"login":"hongyanbu","id":23549553,"avatar_url":"https://avatars1.githubusercontent.com/u/23549553?v=4","gravatar_id":"","url":"https://api.github.com/users/hongyanbu","html_url":"https://github.com/hongyanbu","followers_url":"https://api.github.com/users/hongyanbu/followers","following_url":"https://api.github.com/users/hongyanbu/following{/other_user}","gists_url":"https://api.github.com/users/hongyanbu/gists{/gist_id}","starred_url":"https://api.github.com/users/hongyanbu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hongyanbu/subscriptions","organizations_url":"https://api.github.com/users/hongyanbu/orgs","repos_url":"https://api.github.com/users/hongyanbu/repos","events_url":"https://api.github.com/users/hongyanbu/events{/privacy}","received_events_url":"https://api.github.com/users/hongyanbu/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2017-08-23T03:50:06Z","updated_at":"2017-12-31T08:05:25Z","closed_at":"2017-08-27T04:06:04Z","author_association":"NONE","body":"Using Python 3.6.1 |Anaconda 4.4.0 (64-bit)\r\n```\r\nfrom binance.client import Client\r\napi_key = '...'\r\napi_secret = '...'\r\nclient = Client(api_key, api_secret)\r\ntime_res = client.get_server_time()\r\norders = client.get_all_orders(symbol='HSRBTC', limit=10)\r\n```\r\n```\r\nTraceback (most recent call last):\r\n  File \"E:/PyCharm_Project/Binance/main\", line 6, in <module>\r\n    orders = client.get_all_orders(symbol='HSRBTC', limit=10)\r\n  File \"D:\\Anaconda3\\lib\\site-packages\\binance\\client.py\", line 222, in get_all_orders\r\n    return self._get('allOrders', True, data=params)\r\n  File \"D:\\Anaconda3\\lib\\site-packages\\binance\\client.py\", line 75, in _get\r\n    return self._request('get', path, signed, **kwargs)\r\n  File \"D:\\Anaconda3\\lib\\site-packages\\binance\\client.py\", line 63, in _request\r\n    return self._handle_response(response)\r\n  File \"D:\\Anaconda3\\lib\\site-packages\\binance\\client.py\", line 71, in _handle_response\r\n    raise BinanceAPIException(response)\r\nbinance.exceptions.BinanceAPIException: APIError(code=-1021): Timestamp for this request is not valid.\r\n```"},"comment":{"url":"https://api.github.com/repos/sammchardy/python-binance/issues/comments/354590984","html_url":"https://github.com/sammchardy/python-binance/issues/2#issuecomment-354590984","issue_url":"https://api.github.com/repos/sammchardy/python-binance/issues/2","id":354590984,"user":{"login":"FingerDrill","id":26622862,"avatar_url":"https://avatars2.githubusercontent.com/u/26622862?v=4","gravatar_id":"","url":"https://api.github.com/users/FingerDrill","html_url":"https://github.com/FingerDrill","followers_url":"https://api.github.com/users/FingerDrill/followers","following_url":"https://api.github.com/users/FingerDrill/following{/other_user}","gists_url":"https://api.github.com/users/FingerDrill/gists{/gist_id}","starred_url":"https://api.github.com/users/FingerDrill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FingerDrill/subscriptions","organizations_url":"https://api.github.com/users/FingerDrill/orgs","repos_url":"https://api.github.com/users/FingerDrill/repos","events_url":"https://api.github.com/users/FingerDrill/events{/privacy}","received_events_url":"https://api.github.com/users/FingerDrill/received_events","type":"User","site_admin":false},"created_at":"2017-12-31T08:05:25Z","updated_at":"2017-12-31T08:05:25Z","author_association":"NONE","body":"@kroitor Thanks for the reply. I have a question. Does the error \"timestamp more than 1000ms ahead of server time\" on your link occur even if the timestamp is bigger(later) than the server time? My problem is that the timestamp is bigger than the server time.\r\n\r\nEven before yesterday's question, the sync interval was one hour, and the sync was done manually. Today I saw your link and lowered the sync interval to 10 minutes, but still the above code returns a value of about 300.\r\n\r\nThere is also the problem that the return value of the above code is negative value at some time.(maybe, at night?)"}}
{"actor":{"display_login":"FingerDrill"}}