Skip to content
Skillpedia
APIs & servers (backend)45k · #6380

ccxt-csharp

What it does

This skill is a guide for building crypto exchange features in C# and .NET projects using the CCXT library. It is for developers building trading tools or finance software in .NET.

When to use it

  • ✓When you are building a C# app that reads crypto prices from exchanges.
  • ✓When you need to place orders from a .NET trading system.
  • ✓When you want live ticker or order book updates in a .NET project.

Skill link

https://github.com/ccxt/ccxt/blob/master/.claude/skills/ccxt-csharp/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/ccxt/ccxt/blob/master/.claude/skills/ccxt-csharp/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“Write a C# console app that prints the live Binance BTC/USDT ticker.”

5 new skills a week. 1 minute to read.

How it works

The AI uses the CCXT.NET package, shows how to create an exchange client, and chooses REST or WebSocket depending on the task.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

CCXT for C#

A comprehensive guide to using CCXT in C# and .NET projects for cryptocurrency exchange integration.

Installation

Via NuGet Package Manager

dotnet add package CCXT.NET

Or via Visual Studio:

  1. Right-click project → Manage NuGet Packages
  2. Search for "CCXT.NET"
  3. Click Install

Requirements

  • .NET Standard 2.0 or higher
  • .NET Core 2.0+ / .NET 5+ / .NET Framework 4.6.1+

Quick Start

REST API

using ccxt;

var exchange = new Binance();
await exchange.LoadMarkets();
var ticker = await exchange.FetchTicker("BTC/USDT");
Console.WriteLine(ticker);

WebSocket API - Real-time Updates

using ccxt.pro;

var exchange = new Binance();
while (true)
{
    var ticker = await exchange.WatchTicker("BTC/USDT");
    Console.WriteLine(ticker.Last);  // Live updates!
}
await exchange.Close();

REST vs WebSocket

Feature REST API WebSocket API
Use for One-time queries, placing orders Real-time monitoring, live price feeds
Import using ccxt; using ccxt.pro;
Methods Fetch* (FetchTicker, FetchOrderBook) Watch* (WatchTicker, WatchOrderBook)
Speed Slower (HTTP request/response) Faster (persistent connection)
Rate limits Strict (1-2 req/sec) More lenient (continuous stream)
Best for Trading, account management Price monitoring, arbitrage detection

Method naming: C# uses PascalCase - FetchTicker not fetchTicker, WatchTicker not watchTicker

Creating Exchange Instance

REST API

using ccxt;

// Public API (no authentication)
var exchange = new Binance
{
    EnableRateLimit = true  // Recommended!
};

// Private API (with authentication)
var exchange = new Binance
{
    ApiKey = "YOUR_API_KEY",
    Secret = "YOUR_SECRET",
    EnableRateLimit = true
};

WebSocket API

using ccxt.pro;

// Public WebSocket
var exchange = new Binance();

// Private WebSocket (with authentication)
var exchange = new Binance
{
    ApiKey = "YOUR_API_KEY",
    Secret = "YOUR_SECRET"
};

// Always close when done
await exchange.Close();

Common REST Operations

Loading Markets

// Load all available trading pairs
await exchange.LoadMarkets();

// Access market information
var btcMarket = exchange.Market("BTC/USDT");
Console.WriteLine(btcMarket.Limits.Amount.Min);  // Minimum order amount

Fetching Ticker

// Single ticker
var ticker = await exchange.FetchTicker("BTC/USDT");
Console.WriteLine(ticker.Last);      // Last price
Console.WriteLine(ticker.Bid);       // Best bid
Console.WriteLine(ticker.Ask);       // Best ask
Console.WriteLine(ticker.Volume);    // 24h volume

// Multiple tickers (if supported)
var tickers = await exchange.FetchTickers(new[] { "BTC/USDT", "ETH/USDT" });

Fetching Order Book

// Full orderbook
var orderbook = await exchange.FetchOrderBook("BTC/USDT");
Console.WriteLine(orderbook.Bids[0]);  // [price, amount]
Console.WriteLine(orderbook.Asks[0]);  // [price, amount]

// Limited depth
var orderbook = await exchange.FetchOrderBook("BTC/USDT", 5);  // Top 5 levels

Creating Orders

Limit Order

// Buy limit order
var order = await exchange.CreateLimitBuyOrder("BTC/USDT", 0.01, 50000);
Console.WriteLine(order.Id);

// Sell limit order
var order = await exchange.CreateLimitSellOrder("BTC/USDT", 0.01, 60000);

// Generic limit order
var order = await exchange.CreateOrder("BTC/USDT", "limit", "buy", 0.01, 50000);

Market Order

// Buy market order
var order = await exchange.CreateMarketBuyOrder("BTC/USDT", 0.01);

// Sell market order
var order = await exchange.CreateMarketSellOrder("BTC/USDT", 0.01);

// Generic market order
var order = await exchange.CreateOrder("BTC/USDT", "market", "sell", 0.01);

Fetching Balance

var balance = await exchange.FetchBalance();
Console.WriteLine(balance["BTC"].Free);   // Available balance
Console.WriteLine(balance["BTC"].Used);   // Balance in orders
Console.WriteLine(balance["BTC"].Total);  // Total balance

Fetching Orders

// Open orders
var openOrders = await exchange.FetchOpenOrders("BTC/USDT");

// Closed orders
var closedOrders = await exchange.FetchClosedOrders("BTC/USDT");

// All orders (open + closed)
var allOrders = await exchange.FetchOrders("BTC/USDT");

// Single order by ID
var order = await exchange.FetchOrder(orderId, "BT
FAQ

How is the library installed?

The skill shows installing the CCXT.NET package with dotnet add package.

What is the difference between REST and WebSocket here?

REST is for one-time queries and orders, while WebSocket is for live updates.

Which .NET versions work?

The skill lists .NET Standard 2.0 or higher, and .NET Core 2.0, .NET 5 and up, and .NET Framework 4.6.1 and up.

Details

Original description by the author

CCXT cryptocurrency exchange library for C# and .NET developers. Covers both REST API (standard) and WebSocket API (real-time). Helps install CCXT, connect to exchanges, fetch market data, place orders, stream live tickers/orderbooks, handle authentication, and manage errors in .NET projects. Use when working with crypto exchanges in C# applications, trading systems, or financial software. Supports .NET Standard 2.0+.

repo: ccxt/ccxt

Popularity

GitHub stars
45k
Ranking position
#6380
License
MIT
Updated
11/2/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills