# 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/workflows/binance
- Handle: `@binance`
- Category: [Blockchain](https://fous.com/workflows/category/blockchain)
- Source website: https://binance.com
- Last verified: Sep 29, 2026
- Fous is not affiliated with Binance.

## Methods

### Get coin price

Operation `get_coin_price`, version 1. 1 credit per call.

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 call.

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 call.

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

Call the API with a Fous API key (`FOUS_API_KEY`). To create one, turn on Developer mode in Fous Studio, then open Keys & connections → API keys (https://app.fous.com/keys).

```bash
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
: "${FOUS_API_KEY:?Set FOUS_API_KEY before running this example}"

curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 120 \
  -H "Authorization: Bearer $FOUS_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.
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
import json
import os
import urllib.error
import urllib.request

api_key = os.environ.get("FOUS_API_KEY")
if not api_key:
    raise RuntimeError("Set FOUS_API_KEY before running this example")

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=120) 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.
// First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
const apiKey = process.env.FOUS_API_KEY;
if (!apiKey) throw new Error("Set FOUS_API_KEY before running this example");

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(120_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);
```

Or describe the data in plain language: send `{"api":"@binance","prompt":"Describe the data you need, with every detail"}` to the same URL. Fous fills in the input, runs the method that fits and returns only the fields you asked for; `data.route.calls[].request` is the exact call it made. Routing is free; the run costs the same.

## 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

### Is Fous affiliated with Binance?

No. Fous is not affiliated with Binance. This workflow reads the public binance.com website and returns its data.

### How much does it cost?

Each run costs 1 credit. 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; repeating the same request within a day may return the saved result. Fous checks this workflow automatically; it last passed a check 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/workflows/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/workflows/kraken.md): Live cryptocurrency market prices and trading statistics from Kraken.
- [CoinMarketCap API](https://fous.com/workflows/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/workflows/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/workflows/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/workflows/kitco.md): Precious metals spot prices and market coverage.
- [Google Finance API](https://fous.com/workflows/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/workflows/twelve-data.md): Market data for stocks, ETFs, foreign exchange and cryptocurrencies.
- [All Blockchain workflows](https://fous.com/workflows/category/blockchain)
