Skip to content

This API returns the real-time exchange rate for any pair of digital currency (e.g., Bitcoin) or physical currency (e.g., USD) using https://www.alphavantage.co

Notifications You must be signed in to change notification settings

joshuachinemezu/coin-quotes

Repository files navigation

Currency Exchange Quotes

This API returns the real-time exchange rate for any pair of digital currency (e.g., Bitcoin) or physical currency (e.g., USD) using https://alphavantage.co

Installation

Building and Running without Docker

  • Install virtualenv https://virtualenv.pypa.io/en/stable/installation.html
  • Setup virtualenv virtualenv venv
  • Activate virtualenv source venv/bin/activate
  • Install dependencies
    make install or pip install -r requirements.txt
  • Run the project
    make run or python manage.py runserver

Building and Running with Docker Compose

  • Build and Run with Docker
    make docker-up or docker-compose up --build

Access Control and Management

Available Endpoints

/api/v1/quotes/` - POST
    Headers:
         Api-Key: {API_KEY_GENERATED_BY_ADMIN}


/api/v1/quotes/` - GET
    Headers:
         Api-Key: {API_KEY_GENERATED_BY_ADMIN}


Expected Response:

(Success): Status Code: 200
         {
              "status": true,
              "error": [],
              "data": {
                  "from_currency_code": "BTC",
                  "from_currency_name": "Bitcoin",
                  "to_currency_code": "USD",
                  "to_currency_name": "United States Dollar",
                  "exchange_rate": "58073.74000000",
                  "last_refreshed": "2021-05-01 02:58:06",
                  "time_zone": "UTC",
                  "bid_price": "58073.74000000",
                  "ask_price": "58073.75000000"
              },
              "message": "Operation was successful"
         }


(Error): Status Code: 401
         {
            "status": false,
            "data": [],
            "message": "Something went wrong",
            "error": {
                "detail": "Authentication credentials were not provided."
            }
        }

Technologies:

  • Python (Django)
  • PosgreSQL
  • Redis
  • Celery
  • Docker

About

This API returns the real-time exchange rate for any pair of digital currency (e.g., Bitcoin) or physical currency (e.g., USD) using https://www.alphavantage.co

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published