Account Trade list
Account Trade list [User Data]
URL: https://exchange.bartertrade.io/api/v1/getUserTrades
Method: post
Attributes:
side – (string) can be “Buy”, “Sell”, or “All”
pair - (string) - Token Pair of the trade
from_date – (string) – unix time stamp – optional can be left blank
to_date – (string) - unix time stamp – optional can be left blank
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": "Buy",
"pair": "BRT_ETH",
"from_date": "",
"to_date": "",
"api_key": "49414269baf6b187b5a1c89ce286dece99314ea74d7197956c"
}
Response:
{
"status": true,
"data": [
{
"trade_id": "154911",
"trade_type": "Buy",
"pair": "BRT_ETH",
"orderid": "196",
"price": "0.2",
"amount": "2.00000000000000000000",
"total": "0.400000000000000000000",
"trade_date": "2020-11-18T09:29:24.431Z",
"fee_percent": 0.03375,
"actual_order_type": "market",
"fee_coin": "",
"fee": "0.00013500000000000000000000",
"amount_coin": "BRT"
},
{
"trade_id": "154910",
"trade_type": "Buy",
"pair": "BRT_ETH",
"orderid": "194",
"price": "0.2",
"amount": "12.00000000000000000000",
"total": "2.400000000000000000000",
"trade_date": "2020-11-18T08:13:25.015Z",
"fee_percent": 0.04875,
"actual_order_type": "limit",
"fee_coin": "BRT",
"fee": "0.00117000000000000000000000",
"amount_coin": "BRT"
},
{
"trade_id": "154909",
"trade_type": "Buy",
"pair": "BRT_ETH",
"orderid": "190",
"price": "0.2",
"amount": "2.00000000000000000000",
"total": "0.400000000000000000000",
"trade_date": "2020-11-07T04:17:54.969Z",
"fee_percent": 0.04125,
"actual_order_type": "market",
"fee_coin": "",
"fee": "0.00016500000000000000000000",
"amount_coin": "BRT"
},
{
"trade_id": "154908",
"trade_type": "Buy",
"pair": "BRT_ETH",
"orderid": "189",
"price": "0.2",
"amount": "1.00000000000000000000",
"total": "0.200000000000000000000",
"trade_date": "2020-11-07T03:45:35.052Z",
"fee_percent": 0.04125,
"actual_order_type": "market",
"fee_coin": "",
"fee": "0.00008250000000000000000000",
"amount_coin": "BRT"
},
{
"trade_id": "154906",
"trade_type": "Buy",
"pair": "BRT_ETH",
"orderid": "187",
"price": "0.2",
"amount": "2.00000000000000000000",
"total": "0.400000000000000000000",
"trade_date": "2020-11-07T02:48:39.501Z",
"fee_percent": 0.04125,
"actual_order_type": "market",
"fee_coin": "",
"fee": "0.00016500000000000000000000",
"amount_coin": "BRT"
},
{
"trade_id": "154905",
"trade_type": "Buy",
"pair": "BRT_ETH",
"orderid": "186",
"price": "0.2",
"amount": "11.00000000000000000000",
"total": "2.200000000000000000000",
"trade_date": "2020-11-07T02:47:59.396Z",
"fee_percent": 0.04875,
"actual_order_type": "limit",
"fee_coin": "BRT",
"fee": "0.00107250000000000000000000",
"amount_coin": "BRT"
},
{
"trade_id": "154904",
"trade_type": "Buy",
"pair": "BRT_ETH",
"orderid": "185",
"price": "0.2",
"amount": "1.00000000000000000000",
"total": "0.200000000000000000000",
"trade_date": "2020-11-07T02:46:54.443Z",
"fee_percent": 0.065,
"actual_order_type": "market",
"fee_coin": "",
"fee": "0.000130000000000000000000",
"amount_coin": "BRT"
}
]
}
Last updated
Was this helpful?