资源加载中... loading...

币安的取现要怎么实现??

Author: sikaru, Created: 2017-11-28 20:40:24, Updated: 2017-11-28 20:44:56

Example 1: As a query string

queryString: symbol=LTCBTC&side=BUY&type=LIMIT&timeInForce=GTC&quantity=1&price=0.1&recvWindow=5000&timestamp=1499827319559

HMAC SHA256 signature:

[linux]$ echo -n “symbol=LTCBTC&side=BUY&type=LIMIT&timeInForce=GTC&quantity=1&price=0.1&recvWindow=5000&timestamp=1499827319559” | openssl dgst -sha256 -hmac “NhqPtmdSJYdKjVHjA7PZj4Mge3R5YNiP1e3UZjInClVN65XAbvqqM6A7H5fATj0j” (stdin)= c8db56825ae71d6d79447849e617115f4a920fa2acdcab2b053c4b2838bd6b71

他需要加上timestamp参数,然后对整个querystring签名, 我试着 var querystr = “asset=abc&amount=100&address=abc&timestamp=abc”; var sig = HMAC(‘sha256’, ‘hex’, querystr, secretkey);//第二个参数全都试过了 exchange.IO("api", “POST”, “/wapi/v3/withdraw.html”,querystr+"&signature="+sig);或者 exchange.IO("api", “POST”, “/wapi/v3/withdraw.html”,querystr); 得到 {“msg”:"{“code”:-1105,“msg”:“Parameter ‘payload’ was was empty.”}",“success”:false}

exchange.IO("api", “POST”, “/wapi/v3/withdraw.html?”+querystr+"&signature="+sig,"");//ru 会得到 {“msg”:"{“code”:-1100,“msg”:“Illegal characters found in parameter ‘signature’; legal range is ‘^[A-Fa-f0-9]{64}$’.”}",“success”:false}

如果不带signature {“msg”:"{“code”:-1022,“msg”:“Signature for this request is not valid.”}",“success”:false}


More

aimmpan 币安 提币 大概多长时间到?谢谢。

sikaru 搞定了,不要用官网的v3,换成v1,就可以了, e.IO("api", "POST", "/wapi/v1/withdraw.html", "amount=" + amount + "&asset=" + currency + "&address=" + address);

发明者量化-小小梦 使用 IO 函数 是不用签名的。

发明者量化-小小梦 哦 是的 BotVS 封装的 这个 IO 应该是 V1的 没有 用V3的。。。 O__O

sikaru 我试了不用签名,会报错哎。。。{"msg":"{"code":-1022,"msg":"Signature for this request is not valid."}","success":false}