knowm / XChange

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.
http://knowm.org/open-source/xchange/
MIT License
3.84k stars 1.94k forks source link

Bittrex V3 API Authentication #3055

Open HiepNinh opened 5 years ago

HiepNinh commented 5 years ago

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

carobeta commented 5 years ago

Hi @HiepNinh, Do you find an answer?