Skip to content

A RESTful API service that tracks the prices and convert of various cryptocurrencies using real-time data from different cryptocurrency exchanges.

License

Notifications You must be signed in to change notification settings

pcpratheesh/crypto-currency-tracker-api

Repository files navigation

crypto-currency-tracker-api

A RESTful API service that tracks the prices and convert of various cryptocurrencies using real-time data from different cryptocurrency exchanges.

Installation

Usage

To use the API service, simply run the following command in the project directory:

go run main.go

The API service will start listening on port 8085 by default. You can change the port by setting the PORT environment variable.

Endpoints

The following endpoints are available:

GET /api/v1/convert/:exchange Retrieves the current prices of various cryptocurrencies from different exchanges.

Json Body

    {
        "crypto":"BTC",
        "base":"USD"
    }

Sample API Request

  • With bitfinex
    curl --request POST \
    --url http://localhost:8085/api/v1/track/bitfinex \
    --header 'Content-Type: application/json' \
    --data '{
	    "currencies":["BTC","ETH"]
    }''
  • With binance
    curl --request POST \
    --url http://localhost:8085/api/v1/track/binance \
    --header 'Content-Type: application/json' \
    --data '{
	    "currencies":["BTC","ETH"]
    }'
  • With coinbase
    curl --request POST \
    --url http://localhost:8085/api/v1/track/coinbase \
    --header 'Content-Type: application/json' \
    --data '{
	    "currencies":["BTC","ETH"]
    }'

Supported Exchanges

The following cryptocurrency exchanges are currently supported by the application:

  • Coinbase
  • Binance
  • Bitfinex

Contributing

If you find a bug or would like to contribute to the development of the application, please submit a pull request or create an issue on the GitHub repository.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Releases

No releases published

Packages

No packages published