我正在尝试通过 R 中的 Binance API 下订单,我的所有其他端点都可以工作,但是,我收到错误 HTTP/1.1 400 Bad Request ....请帮助。
**url="https://api.binance.com/api/v3/order/test"
timestamp <- GET(
url = "https://api.binance.com",
path = "/api/v1/time")
timestamp=content(timestamp, as="parsed")
timestamp=timestamp$serverTime
signature <- openssl::sha256(postmsg, key=secretKey)
postmsg <- paste0("timestamp=", timestamp, "&recvWindow=", recvWindow,"&symbol=",symbol,
"&side=",side,"&type=",type,"&quantity=",quantity,"&timeInForce=",timeInForce)
signature <- openssl::sha256(postmsg, key=secretKey)
order = POST(
url = url,
content_type('application/json'), add_headers(.headers = c("X-MBX-APIKEY"=apiKey)),
query=list(signature=signature),
encode = 'json'
)**