Last Price for Symbol
URL: https://exchange.bartertrade.io/api/v1/getCoinPrice
Method: POST
Attributes:
chartType: stringside - (string) - “Buy” or “Sell”
pair – (string) – Token Pair
coin – (string) – Token for which price requested
reqtype – (string) - “all”
api_key – (string) - Key to access the user’s data
lastreqtime – unix time stamp of last reqest made
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:
{
chartType: "Buy",
pair: "ETH_BTC",
coin: "ETH",
reqtype: "all",
lastreqtime: "1604491200000",
api_key: apikey
}
Response:
{
"status": true,
"price": "116.25"
}
Last updated
Was this helpful?