Request price info in realtime. The request needs to provide a price pair for specific asset.
GET https://prod.ninjapay.me/sapi/v1/price
{"btc_usd": <int>, "btc_inr": <int>, "usd_inr": <int>} // Dont pass any body to get all three pairs.
const options = {
method: 'GET',
headers: {
'Content-Type': 'application/json',
Authorization: 'API_KEY'
},
body: '{"pricePair":"btcinr"}'
};
fetch('https://prod.ninjapay.me/sapi/v1/price', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));