Documentation

Comprehensive guides and API references to help you get started with our cryptocurrency data platform.

Quick Start

Welcome to CryptoData API. This guide will help you get started with our service in minutes.

Step 1: Get Your API Key

  1. Sign up for a CryptoData account
  2. Navigate to your dashboard
  3. Click "Generate API Key"
  4. Save your key securely
curl -H "X-API-Key: your_api_key_here" \
  https://api.cryptodata.com/v1/exchanges

Authentication

All API requests require your API key to be included in the request headers.

Authentication Methods

API Key (Header)

X-API-Key: your_api_key_here

API Key (Query Parameter)

?api_key=your_api_key_here

API Reference

Market Data Endpoints

GET/v1/exchanges

Get list of all supported exchanges

{
  "exchanges": [
    {"id": "binance", "name": "Binance"},
    {"id": "okx", "name": "OKX"},
    {"id": "bybit", "name": "Bybit"}
  ]
}
GET/v1/trades/:exchange/:pair

Get trade history for specific trading pair

GET/v1/orderbook/:exchange/:pair

Get order book snapshot

Data Formats

JSON

All API responses use JSON format by default, easy to parse and integrate.

Content-Type: application/json

CSV

Download historical data in CSV format for use in Excel and data analysis tools.

format=csv

Parquet

Efficient columnar format ideal for large-scale data analysis and ML.

format=parquet

Code Examples

PythonPython Example

import requests

API_KEY = "your_api_key_here"
BASE_URL = "https://api.cryptodata.com/v1"

headers = {"X-API-Key": API_KEY}

# Get exchanges
response = requests.get(f"{BASE_URL}/exchanges", headers=headers)
exchanges = response.json()

# Get trades for BTC-USDT on Binance
trades = requests.get(
    f"{BASE_URL}/trades/binance/BTC-USDT",
    headers=headers,
    params={"limit": 100}
).json()

print(f"Found {len(trades)} trades")

JavaScriptNode.js Example

const axios = require('axios');

const API_KEY = 'your_api_key_here';
const BASE_URL = 'https://api.cryptodata.com/v1';

const headers = { 'X-API-Key': API_KEY };

// Get exchanges
const getExchanges = async () => {
  const response = await axios.get(`${BASE_URL}/exchanges`, { headers });
  return response.data;
};

// Get order book
const getOrderBook = async (exchange, pair) => {
  const response = await axios.get(
    `${BASE_URL}/orderbook/${exchange}/${pair}`,
    { headers }
  );
  return response.data;
};

getExchanges().then(data => console.log(data));

cURLcURL Examples

# Get exchanges

curl -H "X-API-Key: your_api_key_here" \
  https://api.cryptodata.com/v1/exchanges

# Get trades with pagination

curl -H "X-API-Key: your_api_key_here" \
  "https://api.cryptodata.com/v1/trades/binance/BTC-USDT?limit=100"

Need Help?

Our support team is ready to help you with any questions.