Crypto Exchange Volume Analytics

This project fetches and pulls trading volume data for cryptocurrency exchanges, storing it in a SQLite database and provides visualizations.

Setup

Prerequisites

  • Node.js (v14 or higher)
  • npm or yarn
  • TypeScript

Installation

  1. Clone the repository:
git clone <repository-url>
cd crypto-exchange-volume
  1. Install dependencies:
npm install

or

yarn install

Required packages:

bash
npm install @prisma/client axios typescript ts-node nodeplotlib date-fns
npm install -D prisma @types/node

Database Setup

  1. Initialize Prisma:
npx prisma init
  1. Create/update the .env file:
DATABASE_URL="file:./dev.db"
  1. Update the Prisma schema in prisma/schema.prisma:

npx prisma migrate dev --name init

  1. Run the script to fetch and store data:
ts-node src/main.ts
  1. plot the data:
ts-node src/plot_volumes.ts
ts-node src/plot_dominance.ts