Coder Social home page Coder Social logo

crypto-apis's Introduction

Crypto API

This is the backend of the KoinX backend Developer Assignment

Installation

Follow these steps to install and run the project:

  1. Clone the Repository
    git clone https://github.com/Ayush-Vish/Crypto-APIs.git
  1. Navigate into the project directory:
    cd <project-directory>
  1. Make a .env file and copy the content of the .env.example
    cp .env.example .env
  1. Install the dependencies:
    npm install 
  1. Start the server:
    npm run dev 

Endpoints

1. Get Cryptocurrency Price

Endpoint: /price

Method: GET

Query Parameters

  • fromCurrency: The cryptocurrency to fetch the price for.
  • toCurrency: The currency to fetch the price in.
  • date: The date to fetch the price for in the format MM-DD-YYYY.

Description

This endpoint retrieves the price of a specific cryptocurrency in a specific currency for a given date.

Sample Request (BASE_URL = http://localhost:3000/api/v1/crypto)

The 2024 Dates are working in the free version.

    GET /price?fromCurrency=bitcoin&toCurrency=usd&date=01-01-2024

2. Get Companies Holding Cryptocurrency

Endpoint: /companies/:currency

Method: GET

Path Parameter:

  • currency: The cryptocurrency to fetch the companies for.
  • Description: This endpoint retrieves the list of companies holding a specific cryptocurrency.

Sample Request:

   GET /companies/bitcoin

crypto-apis's People

Contributors

ayush-vish avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.