Get Prices

Request price info in realtime. The request needs to provide a price pair for specific asset.

Method


GET https://prod.ninjapay.me/sapi/v1/price

Parameters

pricePair?: string // "btcusd", "btcinr" and "usdinr" supported currently (optional)

Response

{"btc_usd": <int>, "btc_inr": <int>, "usd_inr": <int>} // Dont pass any body to get all three pairs.

Example


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));
  

Last updated