Current Open orders
Current Open orders [User Data]
URL : http://exchange.bartertrade.io/api/v1/getUserOpenOrders
Method: POST
Attributes:
side – (string) – “All” or “Sell” or “Buy”
pair – (string) – the Pair of the order
api_key – (string) - Key to access the user’s data
Header :
API-keys are passed into the Rest API via the 'Authorization' header.
API-keys and secret-keys are case sensitive.
SIGNED
secret key, iat and exp with JWT signature.
How to create token?
Example :
let payload =
{ iat: seconds, //10 digit exp: seconds_exp, //10 digit secretkey: secretkey };
let token = jwt.sign( payload, secretkey );
headers: { 'Authorization': token, 'Content-Type': 'application/json', },
Body:
{
"side": "All",
"pair": "ETH_BTC",
"api_key": "your api key"
}
Response:
{
"status": true,
"openorders": [
{
"id": "192",
"side": "Sell",
"pair": "ETH_BTC",
"size": "23.00000000000000000000",
"price": "1.21",
"fee": "0.01121250000000000000",
"filled": "0.00000000000000000000",
"order_type": "limit",
"status": "Open",
"stop_price": "0",
"datetime": "2020-11-18T08:05:00.617Z",
"modified_date": null
},
{
"id": "191",
"side": "Sell",
"pair": "ETH_BTC",
"size": "1.00000000000000000000",
"price": "1.3",
"fee": "0.00048750000000000000",
"filled": "0.00000000000000000000",
"order_type": "limit",
"status": "Open",
"stop_price": "0",
"datetime": "2020-11-18T08:00:19.428Z",
"modified_date": null
}
]
}
Last updated
Was this helpful?