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版本?
/ 问题一: 上面这些是否需要在本机或者VPS预装python3X才行
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
