HuobiRDCenter / huobi_Python

Python SDK for Huobi Spot API
https://huobiapi.github.io/docs/spot/v1/en
Apache License 2.0
683 stars 333 forks source link

"err_code":403,"err_msg":**"Verification failure [校验失败]","ts":**1641259756727} #126

Open normanlmfung opened 2 years ago

normanlmfung commented 2 years ago

hi, gents, with huobi, anyone of you have experience with: {"status":"error","err_code":403,"err_msg":**"Verification failure [校验失败]","ts":**1641259756727}

The url (https://huobiapi.github.io/docs/dm/v1/en/#query-history-transactions-via-multiple-fields):
'https://api.hbdm.vn/api/v1/contract_matchresults_exact?AccessKeyId=xxxxxxxxxxx-76e2e89f-c8b043fb-9bb9e&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2022-01-04T02%3A24%3A45&Signature=xxxxxG13XFSj1Kwr0epmqIph2SLaFTvPRj9oxjCYXd0%3D'

Error msg complained about "ts" : timestamp, in UTC per documentation (And actual testing). I read doc, can't find nothing wrong. https://huobiapi.github.io/docs/dm/v1/en/#signature-authentication-amp-verification https://huobiapi.github.io/docs/dm/v1/cn/#59ce3c8353

Also I checked system clock sync, looks fine:

(base) xxx@xxx-Vostro-13-5310:~/dev/trading-hub$ timedatectl status
               Local time: Tue 2022-01-04 09:31:16 HKT
           Universal time: Tue 2022-01-04 01:31:16 UTC
                 RTC time: Tue 2022-01-04 01:31:16
                Time zone: Asia/Hong_Kong (HKT, +0800)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no
And I checked, timestamp is UTC

What's REALLY strange is, my colleague from EMEA can run the same code without this error. But for me and others based in Hong Kong, even if we VPN to Germany, this error just won't go away, with or without VPN.

Huobi official demo code here, gives same "Verification Failure" error! https://github.com/hbdmapi/huobi_api_rules/blob/master/http_private.py

https://gist.github.com/normanlmfung/5017e1b4605863f903add32071815cbc