Skip to content

collab03/Crypto_mcp_server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Crypto MCP Server

A Python-based server that fetches real-time and historical cryptocurrency market data from major exchanges using the CCXT library. It provides API endpoints built with FastAPI for accessing price quotes and OHLCV (candlestick) data.

Project Overview

This project aims to build a simple but robust server that:

  • Retrieves live cryptocurrency prices for various trading pairs.
  • Fetches historical market data in OHLCV format with configurable timeframes.
  • Implements caching to reduce unnecessary repeated API calls.
  • Provides clear and reliable API endpoints with error handling.
  • Uses asynchronous programming with FastAPI for better performance.

Features

  • Real-time price quote API endpoint (/quote).
  • Historical candlestick data API endpoint (/history).
  • Supports Binance, Kraken, and Coinbase Pro exchanges.
  • In-memory caching with 60 seconds TTL.
  • Handles errors gracefully and returns meaningful HTTP responses.
  • Basic test coverage included.

Setup Instructions

  • Having Python Updated Version

Installation

Install required Python packages:

pip install fastapi uvicorn ccxt cachetools pydantic

What I Learned 1.How to use APIs from different crypto exchanges collectively with CCXT. 2.Building fast and asynchronous web servers with FastAPI. 3.Handling common software problems like errors and caching. 4.Organizing Python code in a clean, modular way following best practices.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages