CCXT.Collector 2.1.0

There is a newer version of this package available.
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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CCXT.Collector" Version="2.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CCXT.Collector" Version="2.1.0" />
                    
Directory.Packages.props
<PackageReference Include="CCXT.Collector" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CCXT.Collector --version 2.1.0
                    
#r "nuget: CCXT.Collector, 2.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CCXT.Collector@2.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CCXT.Collector&version=2.1.0
                    
Install as a Cake Addin
#tool nuget:?package=CCXT.Collector&version=2.1.0
                    
Install as a Cake Tool

CCXT.Collector

NuGet .NET License

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

🀝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE.txt file for details.

πŸ’¬ Support

πŸ‘₯ Team

Core Development Team


<a name="korean"></a>

πŸ“Š ν•œκ΅­μ–΄ κ°œμš”

CCXT.CollectorλŠ” μ „ 세계 μ•”ν˜Έν™”ν κ±°λž˜μ†Œμ˜ WebSocket을 톡해 μ‹€μ‹œκ°„ μ‹œμž₯ 데이터λ₯Ό μˆ˜μ‹ ν•˜κ³  기술적 μ§€ν‘œλ₯Ό κ³„μ‚°ν•˜λŠ” 쒅합적인 λΌμ΄λΈŒλŸ¬λ¦¬μž…λ‹ˆλ‹€.

✨ μ£Όμš” κΈ°λŠ₯

  • πŸš€ μ‹€μ‹œκ°„ WebSocket 슀트리밍 - μ €μ§€μ—° μ‹œμž₯ 데이터 슀트리밍
  • πŸ”„ 톡합 데이터 클래슀 - λͺ¨λ“  κ±°λž˜μ†Œμ—μ„œ μΌκ΄€λœ 데이터 ν˜•μ‹
  • πŸ“ˆ 25개 μ΄μƒμ˜ 기술 μ§€ν‘œ - κ±°λž˜μ†Œ/λ§ˆμΌ“λ³„ μ‹€μ‹œκ°„ 계산
  • πŸ”Œ 콜백 μ•„ν‚€ν…μ²˜ - 비동기 이벀트 기반 데이터 처리
  • πŸ” μžλ™ μž¬μ—°κ²° - 탄λ ₯적인 WebSocket μ—°κ²° 관리
  • πŸ“¦ RabbitMQ 톡합 - λΆ„μ‚° μ‹œμŠ€ν…œμ„ μœ„ν•œ λ©”μ‹œμ§€ 큐 지원

μžμ„Έν•œ λ‚΄μš©μ€ Developer Guideλ₯Ό μ°Έμ‘°ν•˜μ„Έμš”.


Built with ❀️ by the ODINSOFT Team

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.1.8 106 8/22/2025
2.1.7 138 8/12/2025
2.1.4 130 8/10/2025
2.1.3 101 8/9/2025
2.1.0 98 8/9/2025
1.5.1 191 9/18/2024
1.4.12 712 1/21/2022
1.4.11 541 1/21/2022
1.3.0 576 11/17/2020
1.2.0 680 3/17/2020

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.