CCXT cryptocurrency exchange library for Go 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 Go projects. Use when working with crypto exchanges in Go applications, microservices, or trading systems.
View on GitHubFebruary 5, 2026
Select agents to install to:
npx add-skill https://github.com/ccxt/ccxt/blob/0c7a01553eb8e9150ee5ac39bd64b3e9f0713955/.claude/skills/ccxt-go/SKILL.md -a claude-code --skill ccxt-goInstallation paths:
.claude/skills/ccxt-go/# CCXT for Go
A comprehensive guide to using CCXT in Go projects for cryptocurrency exchange integration.
## Installation
### REST API
```bash
go get github.com/ccxt/ccxt/go/v4
```
### WebSocket API (ccxt.pro)
```bash
go get github.com/ccxt/ccxt/go/v4/pro
```
## Quick Start
### REST API
```go
package main
import (
"fmt"
"github.com/ccxt/ccxt/go/v4/binance"
)
func main() {
exchange := binance.New()
markets, err := exchange.LoadMarkets()
if err != nil {
panic(err)
}
ticker, err := exchange.FetchTicker("BTC/USDT")
if err != nil {
panic(err)
}
fmt.Println(ticker)
}
```
### WebSocket API - Real-time Updates
```go
package main
import (
"fmt"
"github.com/ccxt/ccxt/go/v4/pro/binance"
)
func main() {
exchange := binance.New()
defer exchange.Close()
for {
ticker, err := exchange.WatchTicker("BTC/USDT")
if err != nil {
panic(err)
}
fmt.Println(ticker.Last) // Live updates!
}
}
```
## REST vs WebSocket
| Feature | REST API | WebSocket API |
|---------|----------|---------------|
| **Use for** | One-time queries, placing orders | Real-time monitoring, live price feeds |
| **Import** | `github.com/ccxt/ccxt/go/v4/{exchange}` | `github.com/ccxt/ccxt/go/v4/pro/{exchange}` |
| **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 |
**Important:** All methods return `(result, error)` - always check errors!
## Creating Exchange Instance
### REST API
```go
import "github.com/ccxt/ccxt/go/v4/binance"
// Public API (no authentication)
exchange := binance.New()
exchange.EnableRateLimit = true // Recommended!
// Private API (with authentication)
exchange := binance.