Angular · FastAPI · CCXT · Cryptocurrency

Cryptocurrency API: project overview and architecture

This page is intended as technical documentation for the project. It explains how the API is structured, which endpoints it exposes, how the client authenticates and how it can be consumed from Angular or Python.

The functional app is separated so that users who only want to query data can do so without mixing usage with the didactic material.

Project context

The backend is deployed in FastAPI and uses CCXT to normalize access to multiple exchanges. Angular acts as the client and consumes endpoints protected with JWT tokens.

This separation improves maintainability, allows API reuse from other clients and keeps the frontend focused on user experience, SEO and presentation.

Available endpoints

1. Introduction

In the previous version, the main utility was comparing the price of one pair across several exchanges. In this newer version that idea remains, but the architecture is cleaner: market logic lives in an independent API and Angular only acts as the client.

That brings several benefits: an easier interface to maintain, backend reuse from scripts or future apps, and a cleaner structure for adding filters, historical data or alerts.

This tool is primarily educational. Price differences between exchanges do not guarantee real arbitrage because fees, liquidity, slippage, transfer times and operational risk all matter.

2. Architecture

Backend

FastAPI exposes endpoints, validates parameters and unifies responses.

Connectivity

CCXT encapsulates exchange communication and reduces implementation differences.

Security

Authentication uses JWT through the /token endpoint.

Frontend

Angular consumes the API and organizes loading state, errors and results display.

3. Integration examples

One of the main improvements of this migration is that the logic is now decoupled. The backend can be reused from Angular, Python, internal scripts or future mobile applications.

3.1 Get a token with Python

3.2 Compare a symbol with Python

3.3 Consume the API from Angular

4. Useful concepts

What is an exchange?

It is a platform where cryptocurrencies and other digital pairs are traded.

What is a pair?

It is the relation between two assets, for example BTC/USDT or ETH/EUR.

What does bid/ask mean?

Bid is the best available buy price and ask is the best available sell price.

Why do two exchanges show different prices?

Because liquidity, volume, order books and demand are not identical in every market.

5. Project links