FOREX API Documentation (V1)

API Base Url
https://www.nrb.org.np/api/forex/v1/


Endpoints

  • GET /rates
    Returns Foreign Exchange Rates for a given range

Parameters

  • page
    Current Page
  • per_page
    Number of items to show per page
  • from
    Starting date (In Y-m-d format)
  • to
    Endingdate (In Y-m-d format)

Example Response
{"status":{"code":400},"errors":{"validation":{"per_page":["Per Page is required","Per Page must be an integer","Per Page must be at least 1","Per Page must be no more than 100"],"page":["Page is required","Page must be an integer"],"from":["From is required","From must be date with format 'Y-m-d'","From must be date with format 'Y-m-d'"],"to":["To is required"]}},"params":{"from":"","to":"","per_page":"","page":""},"data":{"payload":null},"pagination":{"page":null,"pages":null,"per_page":null,"total":null,"links":{"prev":null,"next":null}}}


Responses Description

  • status  Status

    • code  Status Code

      • 200  OK
      • 400  Bad Request / Invalid Arguments
  • errors  Errors

    • validation  Validation Errors

      • per_page
      • page
      • from
      • to
  • params  GET Parameters of the api endpoint

    • per_page
    • page
    • from
    • to
  • data  Contains the main response

    • payload  Contains array of Foreign Exchange rates of different dates

      • date   FOREX Rates for this date
      • published_on   FOREX Rates publish date
      • modified_on   FOREX Rates last modified date
      • rates  Array of rates

        • currency  Currency

          • unit
          • name
          • ISO3
        • buy   Currency Buying Rate (in NRs.)
        • sell   Currency Selling Rate (in NRs.)
  • pagination  Pagination Data

    • page  Current Page (Cursor)
    • pages  Total number of pages
    • per_page  Items per page
    • total  Total number of items
    • links  Pagination Links

      • prev   Link for previous page
      • next   Link for next page