0
Follow
0
Followers
Gate.IO python コード Github アドレス https://github.com/gateio/rest/blob/master/python/HttpUtil.py
暗号の解析を 専門家に聞いてください.
#!/usr/bin/python
-- coding: utf-8 --
import http.client
import urllib
import json
from hashlib import sha512
import hmac / HMACが何で,どのPython版で使われているか知っていますか?
/ 質問1: Python3Xを本機またはVPSでプリインストールするために上記のことが必要ですか?
def getSign(params,secretKey): /
sign = ''
for key in (params.keys()):
sign += key + '=' + str(params[key]) +'&'
sign = sign[:-1]
my_sign = hmac.new( bytes(secretKey,encoding='utf8'),bytes(sign,encoding='utf8'), sha512).hexdigest()
return my_sign
GATE.IOのインターフェースのコードを解読できる人はいますか?
Related Recommendations
symbol not setGetTicker: 400: {"code": 2, "data": {}, "message": "invalid params"}gateio getdepth 502Decrypt: Secret key decrypt failedGetOrders: 400: {"code":-1121,"msg":"Invalid symbol."}HTTP 403 errorBitcoin trading by using botsPlease translate the buy plan pageRunning botvs docker on androidhttp://www.stevenwu.me/archives/871
Comment
All comments (1)
不用自己 写签名 sing 了, BotVS 底层已经封装 , 签名都是自动的。 不用看这个https://github.com/gateio/rest/blob/master/python/HttpUtil.py
例子了。
直接用BotVS 写策略 就OK了。
9 years ago
- 1
