https://github.com/joshuachinemezu/coin-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://www.alphavantage.co
https://github.com/joshuachinemezu/coin-quotes
alphavantage alphavantage-api bitcoin cryptocurrency usd
Last synced: 6 months ago
JSON representation
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
- Host: GitHub
- URL: https://github.com/joshuachinemezu/coin-quotes
- Owner: joshuachinemezu
- Created: 2021-05-01T03:19:03.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-05-01T04:11:11.000Z (over 4 years ago)
- Last Synced: 2025-02-16T11:14:20.887Z (8 months ago)
- Topics: alphavantage, alphavantage-api, bitcoin, cryptocurrency, usd
- Language: Python
- Homepage:
- Size: 15.6 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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
- Clone this repository.
- Copy Sample of Environment Variables and Update the missing values
`cp .env.example .env`
- Get `ALPHAVANTAGE_API_KEY` from https://www.alphavantage.co/support/#api-key## 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
- Create Default Admin Account and follow the prompts
`make createsuperuser` or `python manage.py createsuperuser`
- Visit http://127.0.0.1:8000/admin/rest_framework_api_key/apikey/ to create a new API KEY### 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