Nordea bank provides fresh data for several currency exchange rates, but collecting that data automatically can be a tiresome job. The bank does however generate a .dat feed of exchange rates where each rate is matched against Euro (EUR). The list inside .dat feed includes the exotic XDR or SDR among others. I wrote a PHP tool to parse those exchange rates from .dat feed to a neat JSON array. The script is behind a paywall, and can be unlocked with PayPal.
.dat to JSON
Nordea doesn’t have documentation that could help to decypher .dat, but I managed to generate a simple JSON feed where each currency rate includes this kind of data:
{
"week":"01",
"datetime":"1999-01-01 07:30:00",
"version":"0001",
"to":"EUR",
"from":"EUR",
"average":1,
"sell":1,
"buy":1,
"mark":"+",
"end":"K000000000",
"active":true
} Explanations
weekis apparently two-digit number of week.datetimeprobably contains the last date and time when that currency was exchanged.versionis either0001or0002.tois the result currency.fromis the source currency, alwaysEUR.average,sellandbuyare floats of exchange rates.markis either+(plus),-(minus) or(space). Perhaps they’re indicators of exhange rate trend (ie. now vs. previous).endcontains some mysterious string with a letter and date in formatYYYYMMDD.activeis a boolean: marks if the currency is kaput or not.
(Julkaistiin 3165 päivää sitten.)
