ColdFusion:Binance API:未读取所有发送的参数
这些加密 API 将要我的命。最后,币安 API 已排序且签名正常工作。但是现在当所有变量都被传递时,我收到下面的错误-1104。
{"code":-1104,"msg":"未读取所有发送的参数;读取了'4'参数,但发送了'5'。"}
我确信这是签名变量。
BINANCE API 注意:签名(TRADE 和 USER_DATA)端点安全
签名端点需要在查询字符串或请求正文中发送附加参数、签名。
端点使用 HMAC SHA256 签名。
HMAC SHA256 签名是密钥化的 HMAC SHA256 操作。
使用您的secretKey 作为密钥,使用totalParams 作为HMAC 操作的值。
签名不区分大小写。 TotalParams 定义为与请求正文连接的查询字符串。
这是有效的 cfhttp 发送。这是正在发送的尸体。
symbol=SHIBUSDT&side=sell&type=market×tamp=1645629335613&signature=1071B5C8BF8727FD465483543BC93A7FF5EBD35AC63A8219E166238E552A7867
5个参数(symbol、side、sell、type、timestamp、签名)
<cfhttp url="#base_api##req_path#" method="POST" result="result" charset="utf-8">
<cfhttpparam type="header" name="X-MBX-APIKEY" value="#bn_key#">
<cfhttpparam type="body" value="#thebody#">
</cfhttp>
如下:这个 cfhttp 发送也有效。前面咯咯地笑,我将签名添加到 URL 调用中。这是正在发送的尸体。
symbol=SHIBUSDT&side=sell&type=market×tamp=1645629335613
5 个参数(symbol、side、sell、type、timestamp、URL ?=signature)
<cfhttp url="#base_api##req_path#?signature=XXXXXSIGSTUFFXXX" method="POST" result="result" charset="utf-8">
<cfhttpparam type="header" name="X-MBX-APIKEY" value="#bn_key#">
<cfhttpparam type="body" value="#thebody#">
</cfhttp>
寻找修复,我似乎发现它通常是参数上的拼写错误。但这些是正确的参数。想法?或者有其他方式发送签名吗?如果作为标头发送,则会出错。
These Crypto API's are going to be the death of me. Finally have Binance API sorted and the Signature working. But now when all the variable are passed I get the error -1104 below.
{"code":-1104,"msg":"Not all sent parameters were read; read '4' parameter(s) but was sent '5'."}
I am certain it is the Signature Variable.
BINANCE API NOTES : SIGNED (TRADE and USER_DATA) Endpoint security
SIGNED endpoints require an additional parameter, signature, to be sent in the query string or request body.
Endpoints use HMAC SHA256 signatures.
The HMAC SHA256 signature is a keyed HMAC SHA256 operation.
Use your secretKey as the key and totalParams as the value for the HMAC operation.
The signature is not case sensitive.
totalParams is defined as the query string concatenated with the request body.
This is the cfhttp send that works. This is the body being sent.
symbol=SHIBUSDT&side=sell&type=market×tamp=1645629335613&signature=1071B5C8BF8727FD465483543BC93A7FF5EBD35AC63A8219E166238E552A7867
5 parameters (symbol, side, sell, type, timestamp, signature)
<cfhttp url="#base_api##req_path#" method="POST" result="result" charset="utf-8">
<cfhttpparam type="header" name="X-MBX-APIKEY" value="#bn_key#">
<cfhttpparam type="body" value="#thebody#">
</cfhttp>
Below : This cfhttp send also works. Fore giggles I added the signature into URL Call. This is the body being sent.
symbol=SHIBUSDT&side=sell&type=market×tamp=1645629335613
5 parameters (symbol, side, sell, type, timestamp, URL ? = signature)
<cfhttp url="#base_api##req_path#?signature=XXXXXSIGSTUFFXXX" method="POST" result="result" charset="utf-8">
<cfhttpparam type="header" name="X-MBX-APIKEY" value="#bn_key#">
<cfhttpparam type="body" value="#thebody#">
</cfhttp>
Looking for fix, I seem to find that it usually a spelling error on the parameter. But these are correct parameters. Thoughts? Or is there a different way to send signature? If sent as Header it errors.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请添加数量作为另一个参数,在不知道数量的情况下无法接受订单。
Please add quantity to as another parameter, the order cannot be accepted without knowing the quantity.