A unified FastAPI-based trading data API that aggregates data from multiple cryptocurrency exchanges and Vietnamese stock market sources.
- Multi-source Crypto Data: Support for Binance, Bybit, Gate.io, KuCoin, MEXC, OKX, Bitfinex, and Coinbase
- Vietnamese Stock Market: Integration with DNSE, SSI, and VCI
- Global Markets: Pyth Network Hermes adapter for commodities, forex, and more
- Trading Platforms: cTrader and MetaTrader 5 integration
- Real-time Data: WebSocket support for live market data
pnfTradingAPI_Py/
├── adapters/ # Data adapters for various external APIs
├── lang/ # Localization files
├── logic/ # Business logic
├── routers/ # FastAPI routers
├── main.py # Main application entry point
├── requirements.txt # Python dependencies
└── pyproject.toml # Project configuration
- Clone the repository:
git clone https://github.com/zorrong/pnfTradingAPI_Py.git
cd pnfTradingAPI_Py- Create and activate virtual environment:
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Configure environment variables:
Create a
.envfile with your API credentials for various data sources.
Start the API server:
uvicorn main:app --reloadThe API will be available at http://localhost:8000
- Swagger UI:
http://localhost:8000/docs - ReDoc:
http://localhost:8000/redoc
/crypto/ohlcv- Cryptocurrency OHLCV data/stockvn/ohlcv- Vietnamese stock OHLCV data/stockvn/symbols- List of Vietnamese stock symbols/pyth/ohlcv- Global markets data via Pyth Network/mt5/ohlcv- MetaTrader 5 data/ws/realtime/{source}/{symbol}- WebSocket for real-time data
- Binance
- Bybit
- Gate.io
- KuCoin
- MEXC
- OKX
- Bitfinex
- Coinbase
- DNSE
- SSI
- VCI (VietCap)
- Pyth Network (Commodities, Forex, etc.)
- cTrader
- MetaTrader 5
MIT License
zorrong