XChange is a Java library providing a streamlined API for interacting with 60+ Bitcoin and Altcoin exchanges providing a consistent interface for trading and accessing market data.
I've been confusing with content-hash term. In the official docs
var contentHash = CryptoJS.SHA512(content).toString(CryptoJS.enc.Hex);
Is anyone know exactly what "content" I need to put in the code above is.
In case of POST order API, content is request body, isn't it?
My request body:
body = {"marketSymbol":"BTC-USD" "direction":"SELL" "type":"LIMIT" "quantity":"0.6" "limit":"6000" "timeInForce":"IMMEDIATE_OR_CANCEL"}
I built content hash as below:
var contentHash = CryptoJS.SHA512(JSON.stringify(body)).toString(CryptoJS.enc.Hex)
Thanks in advanced
I've been confusing with content-hash term. In the official docs
var contentHash = CryptoJS.SHA512(content).toString(CryptoJS.enc.Hex);
Is anyone know exactly what "content" I need to put in the code above is. In case of POST order API, content is request body, isn't it?My request body:
body = {"marketSymbol":"BTC-USD" "direction":"SELL" "type":"LIMIT" "quantity":"0.6" "limit":"6000" "timeInForce":"IMMEDIATE_OR_CANCEL"}
I built content hash as below:
var contentHash = CryptoJS.SHA512(JSON.stringify(body)).toString(CryptoJS.enc.Hex)
Thanks in advanced