# Binance API

> Binance returns spot prices, price history, and order book data as a workflow and API.

Binance's Get coin price returns a spot price and 24-hour statistics; enter a coin and optionally a quote currency. Binance's Get price history returns spot price candles; enter a coin and optionally a quote currency, UTC dates, candle period, and maximum results. Binance's Get order book returns current bid and ask levels; enter a coin and optionally a quote currency and price-level depth.

- Page: https://fous.com/tools/binance
- Handle: `@binance`
- Category: [Blockchain](https://fous.com/tools/category/blockchain)
- Source website: https://binance.com
- Last verified: Sep 29, 2026

## Methods

### Get coin price

Operation `get_coin_price`, version 1. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

Get a Binance spot coin pair’s latest price and rolling 24-hour trading statistics from its name or symbol. Only currently trading pairs are available.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `coin` | string | yes | `"Bitcoin"` | Cryptocurrency name or symbol, such as Bitcoin or SOL. |
| `currency` | string | no | `"EUR"` | Currency symbol to price the coin in, such as USDT, USDC, BTC or EUR. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "coin"
  ],
  "properties": {
    "coin": {
      "type": "string",
      "description": "Cryptocurrency name or symbol, such as Bitcoin or SOL.",
      "examples": [
        "Bitcoin",
        "SOL",
        "Ethereum"
      ]
    },
    "currency": {
      "type": "string",
      "default": "USDT",
      "description": "Currency symbol to price the coin in, such as USDT, USDC, BTC or EUR.",
      "examples": [
        "EUR",
        "USDC"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "coin": "Bitcoin"
    },
    {
      "coin": "SOL",
      "currency": "EUR"
    },
    {
      "coin": "Ethereum",
      "currency": "USDC"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `coin` | string | `"BTC"` | Coin ticker symbol. |
| `pair` | string | `"BTC/USDT"` | Trading pair, such as BTC/USDT. |
| `time` | string | `"2026-09-29T01:48:03.013000+00:00"` | UTC time at the end of the reported 24-hour interval. |
| `low_24h` | number | `82563` | Lowest price in the last 24 hours, in the quote currency. |
| `currency` | string | `"USDT"` | Quote currency ticker symbol. |
| `high_24h` | number | `84381.3` | Highest price in the last 24 hours, in the quote currency. |
| `page_url` | string | `"https://www.binance.com/en/trade/BTC_USDT?type=spot"` | Binance page for this trading pair. |
| `last_price` | number | `83027.91` | Latest price in the quote currency. |
| `trade_count_24h` | integer | `3557192` | Trades in the last 24 hours. |
| `volume_24h_coin` | number | `20556.53492` | 24-hour volume in the coin. |
| `price_change_24h` | number | `-862.35` | Price change in the quote currency over the last 24 hours. |
| `volume_24h_currency` | number | `1711604871.4200048` | 24-hour volume in the quote currency. |
| `price_change_percent_24h` | number | `-1.028` | Percentage change over the last 24 hours. |
| `weighted_average_price_24h` | number | `83263.2969555` | Volume-weighted average price over the last 24 hours, in the quote currency. |

**Example input**

```json
{
  "coin": "Bitcoin"
}
```

**Example output**

```json
{
  "coin": "BTC",
  "pair": "BTC/USDT",
  "time": "2026-09-29T01:48:03.013000+00:00",
  "low_24h": 82563,
  "currency": "USDT",
  "high_24h": 84381.3,
  "page_url": "https://www.binance.com/en/trade/BTC_USDT?type=spot",
  "last_price": 83027.91,
  "trade_count_24h": 3557192,
  "volume_24h_coin": 20556.53492,
  "price_change_24h": -862.35,
  "volume_24h_currency": 1711604871.4200048,
  "price_change_percent_24h": -1.028,
  "weighted_average_price_24h": 83263.2969555
}
```

### Get order book

Operation `get_order_book`, version 1. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

Get current bid and ask price levels for a Binance spot pair from a coin name or symbol. Levels aggregate orders at each price; time is when the snapshot was received, not when individual orders were placed.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `coin` | string | yes | `"SOL"` | The coin name or symbol, for example Bitcoin or BTC. |
| `depth` | integer | no | `5` | Price levels to show per side, for example 20. |
| `currency` | string | no | `"BTC"` | Currency symbol used to price the coin, for example USDT or BTC. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "coin"
  ],
  "properties": {
    "coin": {
      "type": "string",
      "description": "The coin name or symbol, for example Bitcoin or BTC.",
      "examples": [
        "SOL",
        "Bitcoin"
      ]
    },
    "depth": {
      "enum": [
        5,
        10,
        20,
        50,
        100
      ],
      "type": "integer",
      "default": 20,
      "description": "Price levels to show per side, for example 20.",
      "x-fous-developer": true,
      "examples": [
        5
      ]
    },
    "currency": {
      "type": "string",
      "default": "USDT",
      "description": "Currency symbol used to price the coin, for example USDT or BTC.",
      "examples": [
        "BTC"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "coin": "SOL",
      "depth": 5,
      "currency": "BTC"
    },
    {
      "coin": "Bitcoin"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `asks` | array |  | Sell levels, lowest price first. |
| `asks[].price` | number | `0.0014089` | Price per coin in the quote currency. |
| `asks[].quantity` | number | `3.89` | Amount of the coin available at this price. |
| `bids` | array |  | Buy levels, highest price first. |
| `bids[].price` | number | `0.0014088` | Price per coin in the quote currency. |
| `bids[].quantity` | number | `17.927` | Amount of the coin available at this price. |
| `pair` | string | `"SOL/BTC"` | Base coin and quote currency, for example BTC/USDT. |
| `time` | string | `"2026-09-29T01:51:22.091314+00:00"` | Approximate snapshot receipt time in UTC. |
| `best_ask` | number | `0.0014089` | Lowest sell price in the quote currency. |
| `best_bid` | number | `0.0014088` | Highest buy price in the quote currency. |
| `page_link` | string | `"https://www.binance.com/en/trade/SOL_BTC"` | Binance trading page for the pair. |
| `spread_percent` | number | `0.007097987720481243` | Spread as a percent of the midpoint between the best bid and best ask. |
| `spread_absolute` | number | `1e-7` | Best ask minus best bid in the quote currency. |
| `order_book_update_id` | integer | `7022682274` | Binance order book last update ID. |

**Example input**

```json
{
  "coin": "SOL",
  "depth": 5,
  "currency": "BTC"
}
```

**Example output**

```json
{
  "asks": [
    {
      "price": 0.0014089,
      "quantity": 3.89
    },
    {
      "price": 0.0014091,
      "quantity": 5.155
    },
    {
      "price": 0.0014092,
      "quantity": 5
    }
  ],
  "bids": [
    {
      "price": 0.0014088,
      "quantity": 17.927
    },
    {
      "price": 0.0014087,
      "quantity": 3.89
    },
    {
      "price": 0.0014086,
      "quantity": 7.486
    }
  ],
  "pair": "SOL/BTC",
  "time": "2026-09-29T01:51:22.091314+00:00",
  "best_ask": 0.0014089,
  "best_bid": 0.0014088,
  "page_link": "https://www.binance.com/en/trade/SOL_BTC",
  "spread_percent": 0.007097987720481243,
  "spread_absolute": 1e-7,
  "order_book_update_id": 7022682274
}
```

### Get price history

Operation `get_price_history`, version 1. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

Get Binance spot price candles for a coin and quote currency, newest by default or within a UTC date range. Dates include the full named day; returns at most 1,000 candles.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `coin` | string | yes | `"BTC"` | Coin name or symbol, for example Ethereum or ETH. |
| `currency` | string | no | `"USDT"` | Quote currency symbol, for example USDT or BTC. |
| `end_date` | string | no | `"2024-01-03"` | Last day of history, UTC (inclusive), for example 2024-01-07. |
| `interval` | string | no | `"1_day"` | Candle period, for example 1_day. |
| `start_date` | string | no | `"2024-01-01"` | First day of history, UTC (inclusive), for example 2024-01-01. |
| `max_results` | integer | no | `5` | Maximum candles to return, for example 100. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "coin"
  ],
  "properties": {
    "coin": {
      "type": "string",
      "description": "Coin name or symbol, for example Ethereum or ETH.",
      "examples": [
        "BTC",
        "Ethereum",
        "ETH"
      ]
    },
    "currency": {
      "type": "string",
      "default": "USDT",
      "description": "Quote currency symbol, for example USDT or BTC.",
      "examples": [
        "USDT",
        "BTC"
      ]
    },
    "end_date": {
      "type": "string",
      "format": "date",
      "description": "Last day of history, UTC (inclusive), for example 2024-01-07.",
      "examples": [
        "2024-01-03",
        "2010-01-02"
      ]
    },
    "interval": {
      "enum": [
        "1_minute",
        "5_minutes",
        "15_minutes",
        "1_hour",
        "4_hours",
        "1_day",
        "1_week"
      ],
      "type": "string",
      "default": "1_hour",
      "description": "Candle period, for example 1_day.",
      "examples": [
        "1_day",
        "1_hour",
        "5_minutes"
      ]
    },
    "start_date": {
      "type": "string",
      "format": "date",
      "description": "First day of history, UTC (inclusive), for example 2024-01-01.",
      "examples": [
        "2024-01-01",
        "2010-01-01"
      ]
    },
    "max_results": {
      "type": "integer",
      "default": 100,
      "maximum": 1000,
      "minimum": 1,
      "description": "Maximum candles to return, for example 100.",
      "x-fous-developer": true,
      "examples": [
        5,
        3,
        2
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "coin": "BTC",
      "currency": "USDT",
      "end_date": "2024-01-03",
      "interval": "1_day",
      "start_date": "2024-01-01",
      "max_results": 5
    },
    {
      "coin": "Ethereum",
      "currency": "USDT",
      "interval": "1_hour",
      "max_results": 3
    },
    {
      "coin": "BTC",
      "currency": "USDT",
      "end_date": "2010-01-02",
      "interval": "1_day",
      "start_date": "2010-01-01",
      "max_results": 5
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `pair` | string | `"BTC/USDT"` | Trading pair, for example ETH/USDT. |
| `candles` | array |  |  |
| `candles[].low` | number | `42180.77` | Lowest price in the quote currency. |
| `candles[].high` | number | `44184.1` | Highest price in the quote currency. |
| `candles[].open` | number | `42283.58` | Opening price in the quote currency. |
| `candles[].close` | number | `44179.55` | Closing price in the quote currency. |
| `candles[].open_time` | string | `"2024-01-01T00:00:00.000+00:00"` | Candle opening time in UTC, ISO 8601. |
| `candles[].page_link` | string | `"https://www.binance.com/en/trade/BTC_USDT"` | Binance trading page for this pair. |
| `candles[].volume_coin` | number | `27174.29903` | Traded volume in the coin. |
| `candles[].volume_currency` | number | `1169995682.0280013` | Traded volume in the quote currency. |
| `candles[].number_of_trades` | integer | `1114623` | Number of trades in this candle. |
| `candles[].open_time_epoch_ms` | integer | `1704067200000` | Candle opening time, epoch milliseconds. |
| `interval` | string | `"1_day"` | Requested candle period. |

**Example input**

```json
{
  "coin": "BTC",
  "currency": "USDT",
  "end_date": "2024-01-03",
  "interval": "1_day",
  "start_date": "2024-01-01",
  "max_results": 5
}
```

**Example output**

```json
{
  "pair": "BTC/USDT",
  "candles": [
    {
      "low": 42180.77,
      "high": 44184.1,
      "open": 42283.58,
      "close": 44179.55,
      "open_time": "2024-01-01T00:00:00.000+00:00",
      "page_link": "https://www.binance.com/en/trade/BTC_USDT",
      "volume_coin": 27174.29903,
      "volume_currency": 1169995682.0280013,
      "number_of_trades": 1114623,
      "open_time_epoch_ms": 1704067200000
    },
    {
      "low": 44148.34,
      "high": 45879.63,
      "open": 44179.55,
      "close": 44946.91,
      "open_time": "2024-01-02T00:00:00.000+00:00",
      "page_link": "https://www.binance.com/en/trade/BTC_USDT",
      "volume_coin": 65146.40661,
      "volume_currency": 2944331821.8230762,
      "number_of_trades": 2247532,
      "open_time_epoch_ms": 1704153600000
    },
    {
      "low": 40750,
      "high": 45500,
      "open": 44946.91,
      "close": 42845.23,
      "open_time": "2024-01-03T00:00:00.000+00:00",
      "page_link": "https://www.binance.com/en/trade/BTC_USDT",
      "volume_coin": 81194.55173,
      "volume_currency": 3507104563.744232,
      "number_of_trades": 2658041,
      "open_time_epoch_ms": 1704240000000
    }
  ],
  "interval": "1_day"
}
```

## Quick start

Replace `YOUR_API_KEY` with a Fous API key. To create one, open Developers at the bottom of Fous Studio, turn on Developer mode, then go to API keys (https://app.fous.com/keys). Change the values in `input` to run the same tool on new data.

```bash
curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 180 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "api": "@binance",
  "visibility": "public",
  "operation": "get_coin_price",
  "version": 1,
  "input": {
    "coin": "Bitcoin"
  },
  "response": {
    "format": "json"
  }
}'
```

```python
# Save as fous.py and run with python3 fous.py. No packages needed.
import json
import urllib.error
import urllib.request

api_key = "YOUR_API_KEY"

body = json.loads("{\n  \"api\": \"@binance\",\n  \"visibility\": \"public\",\n  \"operation\": \"get_coin_price\",\n  \"version\": 1,\n  \"input\": {\n    \"coin\": \"Bitcoin\"\n  },\n  \"response\": {\n    \"format\": \"json\"\n  }\n}")
request = urllib.request.Request(
    "https://api.fous.com/v1/query",
    data=json.dumps(body).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urllib.request.urlopen(request, timeout=180) as response:
        result = json.load(response)
except urllib.error.HTTPError as error:
    raise RuntimeError(f"HTTP {error.code}: {error.read().decode('utf-8', errors='replace')}") from error
if result.get("success") is False:
    raise RuntimeError(result.get("error", {}).get("message", "Request failed"))
print(json.dumps(result["data"]["output"], indent=2))
```

```typescript
// Save as fous.mts and run with npx tsx fous.mts.
const apiKey = "YOUR_API_KEY";

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(180_000),
  body: JSON.stringify({
  "api": "@binance",
  "visibility": "public",
  "operation": "get_coin_price",
  "version": 1,
  "input": {
    "coin": "Bitcoin"
  },
  "response": {
    "format": "json"
  }
}),
});
type ApiResult = { success: boolean; data?: { output: unknown }; error?: { message: string } };
const result: ApiResult = await response.json();
if (!response.ok || result.success === false) {
  throw new Error(result.error?.message ?? `HTTP ${response.status}`);
}
if (!result.data) throw new Error("Missing API response data");
console.log(result.data.output);
```

## Use from an AI assistant

Connect this tool to Claude Code, Claude Desktop, Cursor, VS Code, Codex and any MCP client as its own MCP server. Each method is a typed tool whose arguments are the method’s input.

- Server URL: `https://api.fous.com/mcp/tools/binance`
- Authorization: `Authorization: Bearer <Fous API key>`

**Tools**

- `get_coin_price`: Get coin price. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `get_order_book`: Get order book. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `get_price_history`: Get price history. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `fous_get_run`: the result of a run that was still going, by its `request_id`. Free.

Claude Code:

```bash
claude mcp add --scope user --transport http fous-binance https://api.fous.com/mcp/tools/binance --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"
```

To give the assistant every tool, connect `https://api.fous.com/mcp`: it finds one with `fous_search_tools` and runs it with `fous_run_tool`. Setup for other clients: https://fous.com/llms-full.txt.

## Use cases

- Track spot prices and 24-hour changes for selected coins
- Review candle prices and trading volumes over a date range
- Compare the best bids and asks for a trading pair
- Measure the spread between the best bid and ask
- Monitor trade counts and volumes for spot pairs

## FAQ

### Can I run it with my own inputs?

Yes. Change the inputs in Studio and press Run, or send new inputs from your code, or ask a connected AI assistant.

### Can I call this Binance tool as an API?

Yes. Send a POST request to /v1/query with your Fous API key and the inputs, and get JSON back.

### How much does it cost?

Each completed run costs 1 credit. Failed runs without a completed receipt are free; completed work can remain charged if delivery is interrupted. With pay as you go, a credit costs 1¢. Monthly plans cost less per credit.

### Do I need a Binance account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from binance.com when you run it. Some results are reused for up to 24 hours, and results that use your account or key are never reused. It was last verified on Sep 29, 2026.

### What is the latest price and 24-hour change for a coin?

Use Get coin price with a coin name or symbol and, optionally, a quote currency.

### What were a coin’s prices over a date range?

Use Get price history with a coin and, optionally, a quote currency, UTC dates, and candle period.

### What are the current bids and asks for a pair?

Use Get order book with a coin and, optionally, a quote currency and price-level depth.

## Related

- [Coinbase API](https://fous.com/tools/coinbase.md): Coinbase provides public cryptocurrency prices and market overviews, including changing spot, buy, and sell quotes and 24-hour statistics; unavailable page facts may be missing.
- [Kraken API](https://fous.com/tools/kraken.md): Live cryptocurrency market prices and trading statistics from Kraken.
- [CoinMarketCap API](https://fous.com/tools/coinmarketcap.md): CoinMarketCap returns prices, rankings and current Fear and Greed readings; gainers and losers include up to 30 top-100 coins above $50,000 in 24-hour volume.
- [CoinGecko API](https://fous.com/tools/coingecko.md): CoinGecko returns cryptocurrency prices and histories, sector rankings and details, and trending coins; non-USD historical values cover 365 days, histories 7–365 days, and today’s prices may change.
- [Yahoo Finance API](https://fous.com/tools/yahoo-finance.md): Yahoo Finance provides quotes, movers, company financials, analyst ratings, earnings, news, and up to 5,000 price rows with adjusted returns; prices may be delayed.
- [Kitco API](https://fous.com/tools/kitco.md): Precious metals spot prices and market coverage.
- [Google Finance API](https://fous.com/tools/google-finance.md): Google Finance returns possibly delayed prices and figures, indexes, up to four movers timed by oldest quote, currency conversions, and up to five financial periods.
- [Twelve Data API](https://fous.com/tools/twelve-data.md): Market data for stocks, ETFs, foreign exchange and cryptocurrencies.
- [All Blockchain tools](https://fous.com/tools/category/blockchain)
