> ## Documentation Index
> Fetch the complete documentation index at: https://docs.b3os.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Orderbook Pair Bid/Ask History

Get historical orderbook bid/ask volume data for a specific exchange and trading pair within a price range. Returns aggregated ask/bid volumes and USD amounts over time for liquidity analysis. Ideal for: orderbook depth analysis, liquidity monitoring, buy/sell pressure detection, market microstructure analysis.

![Get Orderbook Pair Bid/Ask History logo](https://ai-icon.b3.fun/logo/coinglass)
Catalog action Blockchain Data

Get historical orderbook bid/ask volume data for a specific exchange and trading pair within a price range. Returns aggregated ask/bid volumes and USD amounts over time for liquidity analysis. Ideal for: orderbook depth analysis, liquidity monitoring, buy/sell pressure detection, market microstructure analysis.


## At a Glance

| Field | Value |
| --- | --- |
| Action ID | `coinglass-get-orderbook-pair` |
| Category | Blockchain Data |
| Connector | Not required |
| Requires gas | No |
| Funds movement | None declared |
| Tags | `coinglass`, `liquidity`, `futures`, `derivatives`, `read` |

## Payload Schema

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `exchange` | `string` | Yes | Futures exchange name \(e.g., 'Binance', 'OKX', 'Bybit'\). Use the supported-exchange-pair API to get valid exchanges. |
| `symbol` | `string` | Yes | Trading pair symbol \(e.g., 'BTCUSDT', 'ETHUSDT'\). Check supported pairs via the supported-exchange-pair API. |
| `range` | `string` | Yes | Price range percentage for bid/ask aggregation \(e.g., '0.5' for +/-0.5%, '1' for +/-1%, '2' for +/-2%\). |
| `interval` | `string` | Yes | Time interval for data points \(e.g., '1h', '4h', '12h', '1d'\). |
| `limit` | `number` | No | Maximum number of results to return \(default: 1000\). |
| `startTime` | `number` | No | Start timestamp in milliseconds \(e.g., 1641522717000\). |
| `endTime` | `number` | No | End timestamp in milliseconds \(e.g., 1641522717000\). |

## Result Schema

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `exchange` | `string` | Yes | Exchange name. |
| `symbol` | `string` | Yes | Trading pair symbol. |
| `range` | `string` | Yes | Price range percentage used for aggregation. |
| `entries` | `array` | Yes | Array of orderbook bid/ask history entries |

## Examples

**Workflow node**

```json
{
  "type": "coinglass-get-orderbook-pair",
  "payload": {
    "exchange": "example-exchange",
    "symbol": "ETH",
    "range": "example-range",
    "interval": "example-interval"
  },
  "children": []
}
```
  **Test with API**

```bash
curl -X POST "https://api.b3os.org/v1/actions/coinglass-get-orderbook-pair/test" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "inputs": {
    "exchange": "example-exchange",
    "symbol": "ETH",
    "range": "example-range",
    "interval": "example-interval"
  }
}'
```

**Use expressions for dynamic values**

Payload fields can use workflow expressions such as `{{$trigger.body.amount}}`, `{{$nodes.fetch.result.price}}`, and `{{$props.asset}}` when the value should come from a trigger, prior node, or reusable workflow prop.