CryptoPrice Api allows you to query cached currency exchange rates from the following digital currency markets:
- Request api keys from coinmarketcap.com and kraken.com.
- Copy .env.example file to .env and setup the following entries
DB_PASSWORD:random secure passwordCOINMARKETCAP_TOKEN:Your Coinmarketcap.com API TokenKRAKEN_API_KEY:Your Kraken.com Api TokenKRAKEN_SECRET_KEY:Your Kraken.com Secret Key
- Run
docker-compose -f docker-compose-example.yml upto start and build your containers stack - Every 30 minutes exchange rates are queried and refreshed via cronjobs, to prefill your database use the following commands:
- Obtain container id by querying docker via
docker psand look for the image namelampsolutions/cryptoprice:0.1 - Run
docker exec <container id> /usr/bin/php /app/artisan coinmarketcap:cron - Run
docker exec <container id> /usr/bin/php /app/artisan coinbase:cron - Run
docker exec <container id> /usr/bin/php /app/artisan kraken:cron
- Obtain container id by querying docker via
- You should now be able to query the api via
http://localhost:8080/api/v1/calculate-exchange?amount=333&origin=USD&destination=BTC&api=coinmarketcap.com
To see an example api, please visit cryptoprice.api.cryptopanel.de.
You can also visit our german website www.cryptopanel.de.
Code released under the MIT license.