Get Prices
Request price info in realtime. The request needs to provide a price pair for specific asset.
Method
GET https://api.ninjapay.me/lapi/v1/price
Parameters
pricePair?: string
// "btcusd", "btcinr" and "usdinr" supported currently (optional)
Response
// Dont pass any body to get all three pairs.
{
"status": true,
"data": {
"btc_usd": 39936, //<int>
"btc_inr": 3321112, //<int>
"usd_inr": 83.3 //<int>
},
"message": “Pricing data”
}
Example
const options = {
method: 'GET',
headers: {
'Content-Type': 'application/json',
'x-api-key': 'API_KEY'
},
body: '{"pricePair":"btcinr"}'
};
fetch('https://api.ninjapay.me/sapi/v1/price', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
Last updated