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 Pageper_page
Number of items to show per pagefrom
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 Code200
OK400
Bad Request / Invalid Arguments
-
-
errors
Errors-
validation
Validation Errorsper_page
page
from
to
-
-
params
GET Parameters of the api endpointper_page
page
from
to
-
data
Contains the main response-
payload
Contains array of Foreign Exchange rates of different datesdate
FOREX Rates for this datepublished_on
FOREX Rates publish datemodified_on
FOREX Rates last modified date-
rates
Array of rates-
currency
Currencyunit
name
ISO3
buy
Currency Buying Rate (in NRs.)sell
Currency Selling Rate (in NRs.)
-
-
-
pagination
Pagination Datapage
Current Page (Cursor)pages
Total number of pagesper_page
Items per pagetotal
Total number of items-
links
Pagination Linksprev
Link for previous pagenext
Link for next page