A powerful .NET library for real-time cryptocurrency exchange data collection with unified WebSocket streaming and technical indicator analysis.
CCXT.Collector is a comprehensive library that connects to cryptocurrency exchanges worldwide via WebSocket to receive real-time market data and calculate technical indicators. It provides a unified interface for handling data from multiple exchanges, making it easy to build trading bots, market analysis tools, and data collection systems.
- 🚀 Real-time WebSocket Streaming - Low-latency market data streaming
- 🔄 Unified Data Classes - Consistent data format across all exchanges
- 📈 25+ Technical Indicators - Real-time calculation per exchange/market
- 🔌 Callback Architecture - Asynchronous event-driven data handling
- 🔐 Automatic Reconnection - Resilient WebSocket connection management
Region | Exchanges | Count |
---|---|---|
🇺🇸 United States | Coinbase, Kraken, Gemini, Bittrex, Poloniex, Phemex, Crypto.com, and 19 more | 26 |
🇨🇳 China | Binance*, OKX, Huobi, Bybit, KuCoin, Gate.io, MEXC, Bitget, and 16 more | 24 |
🇰🇷 South Korea | Upbit, Bithumb, Coinone, Korbit, Gopax, Probit, OKCoinKR | 7 |
🇯🇵 Japan | bitFlyer, Coincheck, Bitbank, Zaif, and 4 more | 8 |
🇪🇺 Europe | Bitstamp, Bitfinex, Bitvavo, EXMO, WhiteBIT, and 8 more | 13 |
🇬🇧 United Kingdom | Bitfinex, Bitstamp, CEX.IO, Luno, and 3 more | 7 |
🇸🇬 Singapore | BitMEX*, Bitrue, Coins.ph, and 5 more | 8 |
🌍 Other Regions | Deribit (UAE), BTC Markets (AU), Bitso (MX), NDAX (CA), and more | 39 |
*Note: Exchange locations indicate registration/headquarters, not service availability
Feature | Implemented | In Progress | Planned |
---|---|---|---|
WebSocket Clients | 132 | - | - |
Korean Exchange WebSockets | 5 (Upbit, Bithumb, Coinone, Korbit, Gopax) | 2 (OKCoinKR, Probit) | - |
Major Exchange Implementations | 15 (100% Complete) | - | - |
Full WebSocket Implementation | 15 | - | 117 |
Binance, Bitget, Bithumb, Bittrex, Bybit, Coinbase, Coinone, Crypto.com, Gate.io, Huobi, Korbit, Kucoin, OKX, Upbit - All functional with standardized WebSocket streaming
Install-Package CCXT.Collector -Version 2.1.5
dotnet add package CCXT.Collector --version 2.1.5
<PackageReference Include="CCXT.Collector" Version="2.1.5" />
- IMPORTANT: Complete migration from Newtonsoft.Json to System.Text.Json
- All JSON processing now uses System.Text.Json for better performance and reduced dependencies
- Added JsonExtensions utility class with safe property access methods
- See CHANGELOG for migration details
SCandlestick.result
changed from single item toList<SCandleItem>
OnOrderUpdate
event now usesSOrders
container instead of singleSOrder
OnPositionUpdate
event now usesSPositions
container instead of singleSPosition
- See Migration Guide for details
using CCXT.Collector.Binance;
using CCXT.Collector.Service;
using System;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
// Create WebSocket client
var client = new BinanceWebSocketClient();
// Register callbacks for real-time data
client.OnOrderbookReceived += (orderbook) =>
{
Console.WriteLine($"Orderbook update: {orderbook.symbol}");
Console.WriteLine($"Best bid: {orderbook.result.bids[0].price} @ {orderbook.result.bids[0].quantity}");
Console.WriteLine($"Best ask: {orderbook.result.asks[0].price} @ {orderbook.result.asks[0].quantity}");
};
client.OnConnected += () => Console.WriteLine("✅ Connected to Binance");
client.OnError += (error) => Console.WriteLine($"❌ Error: {error}");
// Connect and subscribe to markets
await client.ConnectAsync();
// Using the new Market-based subscription (more efficient)
var market = new Market("BTC", "USDT");
await client.SubscribeOrderbookAsync(market);
await client.SubscribeTradesAsync(market);
// Or using traditional string format (backward compatible)
await client.SubscribeTickerAsync("BTC/USDT");
// Keep the connection alive
Console.WriteLine("Press any key to stop...");
Console.ReadKey();
// Cleanup
await client.DisconnectAsync();
}
}
using CCXT.Collector.Binance;
using CCXT.Collector.Upbit;
using CCXT.Collector.Service;
// Initialize multiple exchanges
var binanceClient = new BinanceWebSocketClient();
var upbitClient = new UpbitWebSocketClient();
// Set up unified callbacks - all exchanges use same data format
Action<STicker> processTicker = (ticker) =>
{
Console.WriteLine($"[{ticker.exchange}] {ticker.symbol}: " +
$"Price={ticker.result.closePrice:F2}, " +
$"Volume={ticker.result.volume:F2}");
};
binanceClient.OnTickerReceived += processTicker;
upbitClient.OnTickerReceived += processTicker;
// Connect and subscribe
await Task.WhenAll(
binanceClient.ConnectAsync(),
upbitClient.ConnectAsync()
);
// Use Market struct for cleaner code
var btcUsdt = new Market("BTC", "USDT");
var btcKrw = new Market("BTC", "KRW");
await binanceClient.SubscribeTickerAsync(btcUsdt);
await upbitClient.SubscribeTickerAsync(btcKrw);
The library includes 25+ technical indicators. See the Developer Guide for the complete list and usage examples.
{
"appsettings": {
"websocket.retry.waiting.milliseconds": "600",
"use.auto.start": "true",
"auto.start.exchange.name": "binance",
"auto.start.symbol.names": "BTC/USDT,ETH/USDT"
}
}
For detailed architecture and system design, see the Developer Guide.
CCXT.Collector/
├── src/
│ ├── Core/ # Core framework components
│ ├── Models/ # Data models and structures
│ ├── Indicators/ # Technical indicators (25+ indicators)
│ ├── Utilities/ # Utility classes
│ └── exchanges/ # Exchange implementations (132 exchanges)
│ ├── kr/ # South Korea (7 exchanges)
│ ├── us/ # United States (26 exchanges)
│ ├── cn/ # China (24 exchanges)
│ └── ... # 18 more country/region folders
├── tests/ # Test suites
├── samples/ # Example implementations
└── docs/ # Documentation
- Developer Guide - Complete architecture, API reference, and contributing guide
- Deployment Guide - Production deployment instructions
- Roadmap & Tasks - Development roadmap and current tasks
- Changelog - Version history and release notes
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE.txt file for details.
- CCXT.NET - The base CCXT library for .NET
- CCXT.Simple - Simplified exchange interface
- Issues: GitHub Issues
- Email: support@ccxt.net
- Discord: Join our Discord
- SEONGAHN - Lead Developer & Project Architect (lisa@odinsoft.co.kr)
- YUJIN - Senior Developer & Exchange Integration Specialist (yoojin@odinsoft.co.kr)
- SEJIN - Software Developer & API Implementation (saejin@odinsoft.co.kr)
Built with ❤️ by the ODINSOFT Team