Withdraw
POST /convert_withdraw/execute
POST /convert_withdraw/executeconst executeQuote = (id: string) => {
const body = '{ "quote_id":' + id + '}'
const timestamp = Math.round(Date.now() / 1000)
const payload = timestamp + 'GET' + '/convert_withdraw/execute' + body
const decodedSecret = Buffer.from(apiSecret, 'base64')
const hmac = crypto.createHmac('sha256', decodedSecret)
const signedPayload = hmac.update(payload).digest('base64')
// SET HEADERS
const headers = {
'X-NDAX-API-KEY': 'public_key',
'X-NDAX-SIGNED': signedPayload,
'X-NDAX-TIMESTAMP': timestamp,
'X-NDAX-PASSPHRASE': 'passphrase'
}
const options = {
headers,
body,
json: true
}
return request.post(`https://api.zerohash.com/convert_withdraw/execute`, options)
}Sample Response
Executes the quote identified by quote_id. The completed trade is submitted to settlement via the 00SCXM platform.
Body parameters include:
quote_id(required) the identifier of the quote to execute, which is provided in response to aGET /convert_withdraw/rfqrequest
Response:
Parameter
Description
Type
request_id
The identifier of the RFQ.
string
quote
The quote object that was executed.
quote
trade_id
The unique identifier assigned to the trade, which is the same trade_id as found in a GET /trades request
Note: the quote_id will be saved as the client_trade_id.
string
status
The status of the trade, e.g. Completed.
string
Last updated