-
Notifications
You must be signed in to change notification settings - Fork 6
Exchange Rates
izqalan edited this page Nov 17, 2019
·
4 revisions
Currency exchange rates from the Interbank Foreign Exchange Market in Kuala Lumpur. The price of selected countries currency in relation to Ringgit.
by latest
bnm.exchangeRate().then(response => console.log(response))
{
"meta": {
"last_updated": "2019-11-17T12:51:22Z",
"total_result": 0,
"quote": "rm",
"session": "1130"
},
"data": [
{
"currency_code": "str",
"unit": 0,
"rate": {
"date": "2019-11-17",
"buying_rate": 0,
"selling_rate": 0,
"middle_rate": 0
}
}
]
}
by currency code. ie. USD, EUR, JPY
bnm.xchgRate('currency_code')
{
"meta": {
"last_updated": "2019-11-17T12:51:22Z",
"total_result": 0,
"quote": "rm",
"session": "1130"
},
"data": {
"currency_code": "str",
"unit": 0,
"rate": {
"date": "2019-11-17",
"buying_rate": 0,
"selling_rate": 0,
"middle_rate": 0
}
}
}
by currency code with specific date. Date with format as defined by RFC 3339, section 5.6
bnm.xchgRateByDate('currency_code', 'yyyy-mm-dd')
{
"meta": {
"last_updated": "2019-11-17T12:51:22Z",
"total_result": 0,
"quote": "rm",
"session": "1130"
},
"data": {
"currency_code": "str",
"unit": 0,
"rate": {
"date": "2019-11-17",
"buying_rate": 0,
"selling_rate": 0,
"middle_rate": 0
}
}
}
by currency, year and month
xchgRateByYearMonth('currency_code', 'yyyy', 'mm')
{
"meta": {
"last_updated": "2019-11-15T08:34:38Z",
"total_result": 0,
"quote": "rm",
"session": "1130"
},
"data": {
"currency_code": "str",
"unit": 0,
"rate": [
{
"date": "2019-11-15",
"buying_rate": 0,
"selling_rate": 0,
"middle_rate": 0
}
]
}
}