fawazahmed0 / exchange-api

Free Currency Exchange Rates API with 200+ Currencies & No Rate Limits
https://github.com/fawazahmed0/exchange-api#readme
Creative Commons Zero v1.0 Universal
708 stars 46 forks source link

[Suggestion] API v2 #84

Open RaptaG opened 9 months ago

RaptaG commented 9 months ago

The Problem

In the current version, even though it works, there are many flaws and problems which should be fixed on the side of this API (not the developer side).

Just to name a few:

Solution

There are many fixes about these issues:

Efficiency

  1. Host the project on NPM
  2. Do not generate .min.jsons (see jsDelivr docs)
  3. Use the purge cache jsDelivr API for faster user access to the new data

Organization

  1. Use a new JSON format:

currencies.json

{
  "date": "YYYY-MM-DD",
  "national": {
    "currency-id-in-the-api": {
      "id": "id-here",
      "name": "name-here",
      "symbol": "symbol-here",
      "country": "country-here"
    }
  },
  "obsolete": {
    "currency-id-in-the-api": {
      "id": "id-here",
      "name": "name-here",
      "symbol": "symbol-here",
      "country": "country-here"
    }
  },
  "crypto": {
    "currency-id-in-the-api": {
      "id": "id-here",
      "name": "name-here",
      "symbol": "symbol-here"
    }
  }
}

Description:

  1. Using the Calver versioning system instead of putting historical data to folders
  2. Cleanup and remove useless files from the repo

Other

A cleanup of the API currency IDs would be a useful, yet optional, addition as well.

References

fawazahmed0/currency-api#104 fawazahmed0/exchange-api#83 fawazahmed0/exchange-api#81 fawazahmed0/exchange-api#78 fawazahmed0/exchange-api#73 fawazahmed0/exchange-api#72 fawazahmed0/exchange-api#53 fawazahmed0/exchange-api#42

RaptaG commented 9 months ago

It is sad that the developer ignores this

RaptaG commented 9 months ago

Hey @fawazahmed0, how likely is it for this to be implemented? I can provide my assistance if you want me to.

fawazahmed0 commented 9 months ago

Thanks for assistance @RaptaG , I will let you know when I start implementing v2 of this api.

RaptaG commented 9 months ago

Thanks for assistance @RaptaG , I will let you know when I start implementing v2 of this api.

Do you plan it anytime soon and if yes, when? Thanks for replying @fawazahmed0 , too

fawazahmed0 commented 9 months ago

I don't have an exact date, but v2 of this api is something I am considering from long time. To be more precise, I am not intending to start this in next coming days because there are more high priority tasks in my backlog.

RaptaG commented 9 months ago

Btw, I suggest removing obsolete currencies altogether, they are of no real value

RaptaG commented 8 months ago

why did you close all these issues man?

fawazahmed0 commented 8 months ago

Most of these things are not relevant now, the project has been migrated to npm and cloudflare. For example:

Storage space of the repo is too big

Currently the data is not stored in git repo, its stored in npm.

Host the project on NPM

This is already done now

RaptaG commented 8 months ago

Most of these things are not relevant now, the project has been migrated to npm and cloudflare. For example:

Storage space of the repo is too big

Currently the data is not stored in git repo, its stored in npm.

Host the project on NPM

This is already done now

What about the proposed json format?