DEV Community

Cover image for This unknown Currency API is served over 50 Billion times a month !
Simplr
Simplr

Posted on

This unknown Currency API is served over 50 Billion times a month !

A quick peak at the stats tab on JSDeliver's Statistics website, shows you the most widely consumed projects in the Open Source Ecosystem.

But the top leader in Requests served & Bandwidth used is neither a package nor a very well-known project.

36,815,723,644 Almost 37 Billion requests in a month to a single file is plain ridiculous! Amounting to more than 49,713 GB of bandwidth in a MONTH!!!!!!!

Image description

Heck the repository only has 28 Stars! (Star the repository to show them love & that you have finally discovered the secret!)

Image description

THE BIG REVEAL:- The repository we are referring to here is none other than https://github.com/prebid/currency-file. It is a simple repository with a README.md and a latest.json file.

All the juice lies in this latest.json file. Let's view the contents of the same.

{
  "dataAsOf": "2025-01-03T00:00:00.000Z",
  "generatedAt": "2025-01-03T16:00:35.356Z",
  "conversions": {
    "USD": {
      "USD": 1,
      "JPY": 157.07350228177492,
      "BGN": 1.8990193222642975,
      "CZK": 24.435382075929702,
      "DKK": 7.243324594620837,
      "GBP": 0.8058355180114574,
      "HUF": 402.88377512379844,
      "PLN": 4.148461015632585,
      "RON": 4.830760267987183,
      "SEK": 11.1073890668997,
      "CHF": 0.9090202932323527,
      "ISK": 139.916496747257,
      "NOK": 11.372948829983493,
      "TRY": 35.36731721526361,
      "AUD": 1.6075347121079715,
      "BRL": 6.163511020487426,
      "CAD": 1.4411107874550926,
      "CNY": 7.3182833284784925,
      "HKD": 7.779590251480726,
      "IDR": 16218.904748033789,
      "ILS": 3.652199242644917,
      "INR": 85.76900669967958,
      "KRW": 1468.7833770268958,
      "MXN": 20.61666181182639,
      "MYR": 4.5000485484027575,
      "NZD": 1.7832799300903,
      "PHP": 58.09787357995922,
      "SGD": 1.3703272162345859,
      "THB": 34.44509175648121,
      "ZAR": 18.73550830177687,
      "EUR": 0.9709680551509855
    },
    "GBP": {
      "USD": 1.240948031761715,
      "JPY": 194.92005349848785,
      "BGN": 2.356584290241346,
      "CZK": 30.32303929247045,
      "DKK": 8.98858939910595,
      "GBP": 1,
      "HUF": 499.95782776860705,
      "PLN": 5.148024532189462,
      "RON": 5.99472244647139,
      "SEK": 13.783692600580773,
      "CHF": 1.128046943718145,
      "ISK": 173.62910124950298,
      "NOK": 14.113238465894714,
      "TRY": 43.8890026869736,
      "AUD": 1.9948670369790225,
      "BRL": 7.648596869615511,
      "CAD": 1.7883435952429725,
      "CNY": 9.081609292349958,
      "HKD": 9.654067210487632,
      "IDR": 20126.81792440326,
      "ILS": 4.532189461761836,
      "INR": 106.43488005012472,
      "KRW": 1822.6838408058513,
      "MXN": 25.58420589688287,
      "MYR": 5.584326388972564,
      "NZD": 2.2129577193257264,
      "PHP": 72.09644186859133,
      "SGD": 1.7005048618558192,
      "THB": 42.74456881905704,
      "ZAR": 23.24979215114528,
      "EUR": 1.2049208969431158
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

It is a simple JSON file which is updated on a daily basis by their bot which provides 2 major things

  1. fiat conversion rates for USD against other currencies.
  2. fiat conversion rates for GBP against other currencies.

For majority of use-cases this is more than sufficient to be used even in production!

The README.md file in the repository handily provides a link to this latest.json file which is served via JSDelivr's CDN.

The link to the file via JSDelivr CDN

https://cdn.jsdelivr.net/gh/prebid/currency-file@1/latest.json
Enter fullscreen mode Exit fullscreen mode

Now you are fully aware of the most used yet highly unknown fiat currency conversion rates API. Use it in your projects without needing to worry about rate-limits, API-Keys, pricing structures, etc. Just get that MVP going, push out production apps and go ham!.

We just happened to stumble upon this initiative by accident whilst exploring the staggering statistics of JSDelivr's network. But it is a happy accident as Open Source has provided us a good alternative to frankly many paid services which are either exorbitantly priced or prohibitively limited in their free offerings.

Hope you all find it of some use now or in the future. Discovery leads to many new paths is what we believe. We should START (Sow Today And Reap Tomorrow) something & go where the journey takes us. Build your dreams into existence.

Top comments (0)