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.mdCopy 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
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
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:
- Right-click project → Manage NuGet Packages
- Search for "CCXT.NET"
- 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
Comments
- …
More skills from this repository
binance-agentic-wallet
45kLets your agent manage a Binance Web3 wallet through the baw command line, including sign-in, balances, transfers, token swaps, and limit orders.
binance-sports-ai-analyzer
45kHelps your agent look up World Cup match predictions, AI analysis, and news insights, and recompute win odds after you adjust the signals.
binance-tokenized-securities-info
45kLets your agent look up Ondo tokenized US stocks on Binance Web3, covering token lists, company info, trading status, and on-chain prices.
binance
45kLets your agent use Binance Spot, USD-M Futures, and Convert through the binance-cli tool. Requires you to set up authentication first.
Similar skills
api-connector-builder
280kHas your agent build new API connections following the existing pattern. Use when you need to add one more integration without creating a new way of doing things.
api-design
280kHelps your agent design REST APIs following best practices. It's useful for defining how APIs communicate, how errors are shown, and how to organize data.
backend-patterns
280kHelps your agent with server-side architecture patterns and database optimization. It's useful for building or reviewing code that runs on the server.