All Orders
All Orders [User Data]
URL : http://exchange.bartertrade.io/api/v1/getUserOrders
Method: POST
Attributes:
api_key – (string) – Key to access the user’s data
side – (string) - “All” or “Sell” or “Buy”
pair – (string) – Token Pair
from_date – (string) – unix time (optional)
to_date – (string) - unix time (optional)
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, (UNIX time 10 digit) exp: seconds_exp, (UNIX time 10 digit) secretkey: secretkey };
let token = jwt.sign( payload, secretkey );
headers: { 'Authorization': token, 'Content-Type': 'application/json', },
Body:
{
"side": "All",
"pair": "BRT_ETH",
"api_key": "your api key"
}
Response:
{
"status": true,
"openorders": [
{
"id": "195",
"side": "Buy",
"pair": "BRT_ETH",
"size": "1.00000000000000000000",
"price": "0.11",
"fee": "0.00005362500000000000",
"filled": "0.00000000000000000000",
"order_type": "limit",
"status": "Open",
"stop_price": "0",
"datetime": "2020-11-18T08:13:40.696Z",
"modified_date": null
},
{
"id": "193",
"side": "Sell",
"pair": "BRT_ETH",
"size": "0.00100000000000000000",
"price": "0.21",
"fee": "0.00000048750000000000",
"filled": "0.00000000000000000000",
"order_type": "limit",
"status": "Open",
"stop_price": "0",
"datetime": "2020-11-18T08:13:03.781Z",
"modified_date": null
}
],
"filledorders": [
{
"id": "194",
"side": "Buy",
"pair": "BRT_ETH",
"size": "12.00000000000000000000",
"price": "0.2",
"fee": "0.00117000000000000000",
"filled": "12.00000000000000000000",
"order_type": "limit",
"status": "Filled",
"stop_price": "0",
"datetime": "2020-11-18T08:13:25.015Z",
"modified_date": "2020-11-18T08:13:25.015Z"
},
{
"id": "186",
"side": "Buy",
"pair": "BRT_ETH",
"size": "11.00000000000000000000",
"price": "0.2",
"fee": "0.00107250000000000000",
"filled": "11.00000000000000000000",
"order_type": "limit",
"status": "Filled",
"stop_price": "0",
"datetime": "2020-11-07T02:47:59.396Z",
"modified_date": "2020-11-07T02:47:59.396Z"
}
]
}
Last updated
Was this helpful?