Check Order
Check the status of a particular trade order using the transaction ID.
Method
GET https://api.ninjapay.me/tapi/v1/checkOrder
Parameters
tid: string
// the transaction ID of the voucher request.
Response Buy
{
"status": true,
"data":{
"tid": "19B86602A1399N7",
"created_at": 1414912921,
"executed_at": 1714912921,
"type": "buy",
"asset": "BTC",
"amount": "100.00000000",
"price": "47277.89",
"executed_price": "47277.89",
"fee": "0.10", // Always in the asset currency for both buy and sell (BTC, ETH,...)
"fee_percent": 0.10,
"filled_amount": "100.00000000",
"filled_percent": 100.00,
"total_received": "99.90000000", // (Placed amount - fee)
"reveived_asset":"BTC",
"total_paid": "4727789.00000000",
"paid_asset": "USDT",
"note": "Plugin: Strike to US",
"receiver_email": "dev@ninjapay.me",
"email_status": "success", // "success", "pending", "undefined" status's
"revoked": false,
"revoked_at": null,
"extra": []
},
"message":""
}
Response Sell
{
"status": true,
"data":{
"tid": "19B86602A1399N7",
"created_at": 1414912921,
"executed_at": 1714912921,
"type": "sell",
"asset": "BTC",
"amount": "100.00000000",
"price": "47277.89",
"executed_price": "47277.89",
"fee": "0.10", // Always in the asset currency for both buy and sell (BTC, ETH,...)
"fee_percent": 0.10,
"filled_amount": "100.00000000",
"filled_percent": 100.00,
"total_received": "4723061.21100000", // (Placed amount - fee)
"reveived_asset":"USDT",
"total_paid": "100.00000000",
"paid_asset": "BTC",
"note": "Plugin: Strike to US",
"receiver_email": "dev@ninjapay.me",
"email_status": "success", // "success", "pending", "undefined" status's
"revoked": false,
"revoked_at": null,
"extra": []
},
"message":""
}
Code Example
const options = {
method: 'GET',
headers: {
'Content-Type': 'application/json',
'x-api-key': 'API_KEY' // Invoice key
},
body: '{"tid": "210N66027HB789"}'
};
fetch('https://api.ninjapay.me/tapi/v1/checkOrder', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
Last updated