CCXT.Collector
2.1.0
See the version list below for details.
dotnet add package CCXT.Collector --version 2.1.0
NuGet\Install-Package CCXT.Collector -Version 2.1.0
<PackageReference Include="CCXT.Collector" Version="2.1.0" />
<PackageVersion Include="CCXT.Collector" Version="2.1.0" />
<PackageReference Include="CCXT.Collector" />
paket add CCXT.Collector --version 2.1.0
#r "nuget: CCXT.Collector, 2.1.0"
#:package CCXT.Collector@2.1.0
#addin nuget:?package=CCXT.Collector&version=2.1.0
#tool nuget:?package=CCXT.Collector&version=2.1.0
CCXT.Collector
A powerful .NET library for real-time cryptocurrency exchange data collection with unified WebSocket streaming and technical indicator analysis.
<a name="english"></a>
π Overview
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.
β¨ Key Features
- π 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
- π¦ RabbitMQ Integration - Optional message queue support for distributed systems
π’ Supported Exchanges (132 Total)
Major Exchanges by Region
Region | Exchanges | Count |
---|---|---|
πΊπΈ United States | Coinbase, Kraken, Gemini, Bittrex, Poloniex, Phemex, and 20 more | 26 |
π¨π³ China | Binance*, OKX, Huobi, Bybit, KuCoin, Gate.io, MEXC, and 17 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
Implementation Status
Feature | Implemented | In Progress | Planned |
---|---|---|---|
WebSocket Clients | 132 | - | - |
Korean Exchange WebSockets | 5 (Upbit, Bithumb, Coinone, Korbit, Gopax) | 2 (OKCoinKR, Probit) | - |
API Documentation | 44 | 88 | - |
Full Implementation | 5 (Binance, Upbit, Bithumb, Coinone, Korbit) | 8 | 119 |
π¦ Installation
NuGet Package Manager
Install-Package CCXT.Collector -Version 2.1.0
.NET CLI
dotnet add package CCXT.Collector --version 2.1.0
Package Reference
<PackageReference Include="CCXT.Collector" Version="2.1.0" />
π Quick Start
Basic WebSocket Connection
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();
}
}
Multi-Exchange Data Collection
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);
π Technical Indicators
The library includes 25+ technical indicators. See the Developer Guide for the complete list and usage examples.
βοΈ Configuration
{
"appsettings": {
"websocket.retry.waiting.milliseconds": "600",
"use.auto.start": "true",
"auto.start.exchange.name": "binance",
"auto.start.symbol.names": "BTC/USDT,ETH/USDT"
},
"rabbitmq": {
"hostName": "localhost",
"port": "5672",
"virtualHost": "/",
"userName": "guest",
"password": "guest"
}
}
ποΈ Architecture
For detailed architecture and system design, see the Developer Guide.
Project Structure
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
π 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
π€ Contributing
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
π License
This project is licensed under the MIT License - see the LICENSE.txt file for details.
π Links
π₯ Related Projects
- CCXT.NET - The base CCXT library for .NET
- CCXT.Simple - Simplified exchange interface
π¬ Support
- Issues: GitHub Issues
- Email: support@ccxt.net
- Discord: Join our Discord
π₯ Team
Core Development Team
- 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)
<a name="korean"></a>
π νκ΅μ΄ κ°μ
CCXT.Collectorλ μ μΈκ³ μνΈνν κ±°λμμ WebSocketμ ν΅ν΄ μ€μκ° μμ₯ λ°μ΄ν°λ₯Ό μμ νκ³ κΈ°μ μ μ§νλ₯Ό κ³μ°νλ μ’ ν©μ μΈ λΌμ΄λΈλ¬λ¦¬μ λλ€.
β¨ μ£Όμ κΈ°λ₯
- π μ€μκ° WebSocket μ€νΈλ¦¬λ° - μ μ§μ° μμ₯ λ°μ΄ν° μ€νΈλ¦¬λ°
- π ν΅ν© λ°μ΄ν° ν΄λμ€ - λͺ¨λ κ±°λμμμ μΌκ΄λ λ°μ΄ν° νμ
- π 25κ° μ΄μμ κΈ°μ μ§ν - κ±°λμ/λ§μΌλ³ μ€μκ° κ³μ°
- π μ½λ°± μν€ν μ² - λΉλκΈ° μ΄λ²€νΈ κΈ°λ° λ°μ΄ν° μ²λ¦¬
- π μλ μ¬μ°κ²° - νλ ₯μ μΈ WebSocket μ°κ²° κ΄λ¦¬
- π¦ RabbitMQ ν΅ν© - λΆμ° μμ€ν μ μν λ©μμ§ ν μ§μ
μμΈν λ΄μ©μ Developer Guideλ₯Ό μ°Έμ‘°νμΈμ.
Built with β€οΈ by the ODINSOFT Team
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Microsoft.Extensions.Configuration (>= 9.0.8)
- Microsoft.Extensions.Configuration.Abstractions (>= 9.0.8)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 9.0.8)
- Microsoft.Extensions.Configuration.FileExtensions (>= 9.0.8)
- Microsoft.Extensions.Configuration.Json (>= 9.0.8)
- Newtonsoft.Json (>= 13.0.3)
- RabbitMQ.Client (>= 7.1.2)
- RestSharp (>= 112.1.0)
- System.ServiceModel.Primitives (>= 8.1.2)
- System.Text.Json (>= 9.0.8)
-
net9.0
- Microsoft.Extensions.Configuration (>= 9.0.8)
- Microsoft.Extensions.Configuration.Abstractions (>= 9.0.8)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 9.0.8)
- Microsoft.Extensions.Configuration.FileExtensions (>= 9.0.8)
- Microsoft.Extensions.Configuration.Json (>= 9.0.8)
- Newtonsoft.Json (>= 13.0.3)
- RabbitMQ.Client (>= 7.1.2)
- RestSharp (>= 112.1.0)
- System.ServiceModel.Primitives (>= 8.1.2)
- System.Text.Json (>= 9.0.8)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
v2.1.0 - Performance optimizations with Market struct, direct JSON conversion pattern, enhanced symbol formatting, and architectural improvements. Support for 132 exchanges with WebSocket streaming.