# Coinbase Exchange

> Read the live market data of Coinbase Exchange, the institutional venue behind Coinbase. Get what any of its 500-plus markets is trading at, how it has moved over the last 24 hours, and its price history as candles going back years. Look into the order book, follow the trades as they print, and work out what buying or selling a given amount would actually cost once it eats through the book. Every price comes back as a number rather than text, so a step can compare it straight away. No account or API key required - and every action reads, so nothing here can reach an account or move money.

App · Cryptocurrency · 9 actions. Web page: https://docs.lodol.com/docs/integrations/coinbase-exchange

## Actions

### Estimate the cost to buy or sell

Work out what buying or selling a given amount would cost at the prices actually on the order book - the average price you would get, and how far that is from the headline price. A small trade fills at the top of the book; a large one eats into the levels behind it, and that difference is worth knowing before you commit. Say the amount in coin ('buy 2 ETH') or in money ('spend 5,000 USD'). This is an estimate from the book at one instant and excludes fees; it does not place anything. No API key required.

**Inputs**

- Market (`market`, text): Which market to price the trade on. Default: `BTC-USD`.
- Buying or selling (`side`, text): Which way the trade runs. One of: `buy`, `sell`. Default: `buy`.
- Amount (`amount`, number, required): How much to buy or sell.
- Amount is in (`amount_in`, text): Whether the amount above counts the coin ('buy 2 ETH') or the money ('spend 5,000 USD'). One of: `coin` (Units of the coin - buy 2 ETH), `money` (Money - spend 5,000 USD). Default: `coin`.

**Outputs**

- `average_price` (number): The price the whole trade would average out at - the number to compare against a limit.
- `best_price` (number): The price at the top of the book - what the first fraction of the trade would get.
- `captured_at` (text): When the book was read, as a UTC timestamp.
- `coin` (text): The coin being traded, such as BTC.
- `coin_amount` (number): How much of the coin the trade covers.
- `filled` (true/false): False when the book does not hold enough to cover the amount asked for. The other figures then describe as much of it as the book could fill.
- `levels_used` (number): How many price levels the trade would reach through. One means it fills at the top of the book.
- `market` (text): The market this reading is from, such as BTC-USD. The value to feed straight into another step.
- `money_amount` (number): What the trade would cost, or raise, in the pricing currency. Fees are not in it.
- `note` (text): The caveat in words, ready to show alongside the figures.
- `priced_in` (text): The currency the market is priced in, such as USD.
- `side` (text): 'buy' or 'sell', as asked for.
- `slippage_percent` (number): How much worse the average price is than the best one, as a percentage. Near zero means the book is deep enough not to notice this trade.
- `summary` (text): The result as a sentence, ready to show someone.
- `unfilled_coin_amount` (number): How much of the coin the book could not cover, when the amount was given in coin.

**Example output**

```json
{
  "average_price": 77199.16,
  "best_price": 77196.81,
  "captured_at": "2026-09-12T06:06:31Z",
  "coin": "BTC",
  "coin_amount": 2.0,
  "filled": true,
  "levels_used": 14,
  "market": "BTC-USD",
  "money_amount": 154398.32,
  "note": "An estimate from the orders resting on the book at 2026-09-12T06:06:31Z, before any fees. The book moves constantly, so a real order may fill differently.",
  "priced_in": "USD",
  "side": "buy",
  "slippage_percent": 0.003,
  "summary": "Buying 2 BTC would cost about 154,398.32 USD, an average of 77,199.16 against a best price of 77,196.81.",
  "unfilled_coin_amount": 0.0
}
```

### Get coin details

Look up a coin or currency on Coinbase Exchange: its full name, whether it is a cryptocurrency or cash, how finely it can be counted, and - for a crypto asset - every blockchain the exchange will move it over with the minimum and maximum it will move. Use it to turn a ticker into a name for a report, or to check an asset is available before a workflow relies on it. No API key required.

**Inputs**

- Coin (`coin`, text): Which coin or currency to look up. Default: `BTC`.

**Outputs**

- `available` (true/false): True when the exchange has it online - the field to branch on.
- `coin` (text): Its code, such as BTC.
- `convertible_to` (list): Codes this one can be converted into directly, such as USD into USDC.
- `default_network` (text): The one the exchange uses unless told otherwise.
- `kind` (text): 'Cryptocurrency' or 'Cash'.
- `min_order_size` (number): The smallest amount that can be traded.
- `name` (text): The coin's full name, such as Bitcoin.
- `network_count` (number): How many networks there are.
- `networks` (list): Every blockchain the exchange will move this coin over. Empty for cash currencies.
- `smallest_amount` (number): The smallest amount of it the exchange counts - round amounts to this.
- `status` (text): Coinbase's own word for its state.
- `status_message` (text): Anything the exchange wants to say about it, usually empty.
- `summary` (text): The result as a sentence, ready to show someone.
- `symbol` (text): Its currency symbol, where it has one.

**Example output**

```json
{
  "available": true,
  "coin": "BTC",
  "convertible_to": [],
  "default_network": "bitcoin",
  "kind": "Cryptocurrency",
  "min_order_size": 1e-08,
  "name": "Bitcoin",
  "network_count": 2,
  "networks": [
    {
      "available": true,
      "confirmations": 2,
      "max_withdrawal": 2400.0,
      "min_withdrawal": 0.0001,
      "name": "Bitcoin",
      "network": "bitcoin",
      "status": "online"
    },
    {
      "available": true,
      "confirmations": null,
      "max_withdrawal": 200.0,
      "min_withdrawal": 2e-05,
      "name": "Base",
      "network": "base",
      "status": "online"
    }
  ],
  "smallest_amount": 1e-08,
  "status": "online",
  "status_message": "",
  "summary": "Bitcoin (BTC) is cryptocurrency on Coinbase Exchange and is available right now.",
  "symbol": "\u20bf"
}
```

### Get market details

Get one market's trading rules: the smallest order it accepts, the increments it prices and sizes in, and whether it is trading normally, halted, or delisted. Worth a step before acting on a price - rounding an amount to the market's own increments, or checking that trading has not been stopped before relying on the figure. Unlike 'List markets', this also answers for a market that has been delisted. No API key required.

**Inputs**

- Market (`market`, text): Which market to look up. Default: `BTC-USD`.

**Outputs**

- `coin` (text): The coin being traded, such as BTC.
- `margin_enabled` (true/false): Whether the market can be traded on margin.
- `market` (text): The market this reading is from, such as BTC-USD. The value to feed straight into another step.
- `min_order_value` (number): The smallest order the market accepts, in the pricing currency.
- `price_increment` (number): The smallest step a price can move in - round prices to this.
- `priced_in` (text): The currency the market is priced in, such as USD.
- `size_increment` (number): The smallest amount of the coin that can be traded - round sizes to this.
- `status` (text): Coinbase's own word for it: 'online' or 'delisted'.
- `summary` (text): The result as a sentence, ready to show someone.
- `tradable` (true/false): True when the market is listed and trading - the field to branch on before acting on a price.
- `trading_state` (text): Whether and how the market is taking orders right now, in a sentence.

**Example output**

```json
{
  "coin": "BTC",
  "margin_enabled": false,
  "market": "BTC-USD",
  "min_order_value": 1.0,
  "price_increment": 0.01,
  "priced_in": "USD",
  "size_increment": 1e-08,
  "status": "online",
  "summary": "BTC-USD: Open for trading.",
  "tradable": true,
  "trading_state": "Open for trading."
}
```

### Get price history

Get a market's price over time as candles - the open, high, low, close and volume of each minute, hour, six hours or day - for a chart, a moving average, or comparing this week against last. Coinbase caps a single request at 300 candles; a longer window is fetched in pages here, so ask for the window you want. Candles come back oldest first with named fields, along with the high, the low and the change across the whole window. No API key required.

**Inputs**

- Market (`market`, text): Which market's history to read. Default: `BTC-USD`.
- Candle size (`interval`, text): How much time each candle covers. A daily candle over a year is 365 rows; a one-minute candle over the same year is half a million, so pick the size to suit the window. One of: `60` (1 minute), `300` (5 minutes), `900` (15 minutes), `3600` (1 hour), `21600` (6 hours), `86400` (1 day). Default: `86400`.
- From (`start`, date and time): Optional. The earliest moment to read from. Leave both dates empty for the most recent 30 candles.
- To (`end`, date and time): Optional. The latest moment to read up to. Defaults to now.

**Outputs**

- `candles` (list): One entry per period, oldest first - the shape to loop over or chart.
- `change` (number): The move from the window's open to its close, in the pricing currency.
- `change_percent` (number): The same move as a percentage.
- `close_price` (number): The price the window closed at.
- `coin` (text): The coin being traded, such as BTC.
- `count` (number): How many candles came back.
- `direction` (text): 'up', 'down' or 'flat' - the one field to branch on.
- `from_date` (text): The first candle's period start.
- `high_at` (text): Which candle held the high.
- `high_price` (number): The highest price anywhere in the window.
- `interval` (text): How many seconds each candle covers.
- `interval_label` (text): The same in words, such as '1 day'.
- `low_at` (text): Which candle held the low.
- `low_price` (number): The lowest price anywhere in the window.
- `market` (text): The market this reading is from, such as BTC-USD. The value to feed straight into another step.
- `open_price` (number): The price the window opened at.
- `priced_in` (text): The currency the market is priced in, such as USD.
- `summary` (text): The result as a sentence, ready to show someone.
- `to_date` (text): The last candle's period start.
- `truncated` (true/false): True when the window asked for was too long to fetch in full and only its most recent stretch came back. Ask for larger candles to cover the whole of it.

**Example output**

```json
{
  "candles": [
    {
      "close": 77398.69,
      "high": 79195.32,
      "low": 76366.12,
      "open": 78562.74,
      "period_start": "2026-09-10T00:00:00Z",
      "volume": 7523.97854815
    },
    {
      "close": 77307.36,
      "high": 77750.0,
      "low": 76219.18,
      "open": 77398.7,
      "period_start": "2026-09-11T00:00:00Z",
      "volume": 4983.63357935
    }
  ],
  "change": -1255.38,
  "change_percent": -1.598,
  "close_price": 77307.36,
  "coin": "BTC",
  "count": 2,
  "direction": "down",
  "from_date": "2026-09-10T00:00:00Z",
  "high_at": "2026-09-10T00:00:00Z",
  "high_price": 79195.32,
  "interval": "86400",
  "interval_label": "1 day",
  "low_at": "2026-09-11T00:00:00Z",
  "low_price": 76219.18,
  "market": "BTC-USD",
  "open_price": 78562.74,
  "priced_in": "USD",
  "summary": "BTC is down 1.60% across 2 1 day candles, closing at 77,307.36 USD.",
  "to_date": "2026-09-11T00:00:00Z",
  "truncated": false
}
```

### Get recent trades

Get the trades that have just gone through on a market - each one's price, size, time and which way it went - with the buying and the selling totalled up so you can see which side is pushing. Coinbase reports a trade from the side of the order that was already resting on the book, so its 'buy' means somebody sold; each trade here is reported from the side that crossed the spread instead, which is the one people mean. No API key required.

**Inputs**

- Market (`market`, text): Which market's trades to read. Default: `BTC-USD`.
- How many trades (`limit`, number): How many of the most recent trades to bring back. From 1 to 100. Default: `25`.

**Outputs**

- `average_price` (number): The average price across these trades, weighted by size - a steadier figure than the last price on a jumpy market.
- `buy_count` (number): How many of them were buys.
- `buy_volume` (number): How much of the coin was bought - compare it against sell_volume to read the pressure.
- `coin` (text): The coin being traded, such as BTC.
- `count` (number): How many trades came back.
- `latest_price` (number): The price of the most recent trade.
- `latest_traded_at` (text): When that most recent trade went through.
- `market` (text): The market this reading is from, such as BTC-USD. The value to feed straight into another step.
- `priced_in` (text): The currency the market is priced in, such as USD.
- `sell_count` (number): How many were sells.
- `sell_volume` (number): How much of the coin was sold.
- `summary` (text): The result as a sentence, ready to show someone.
- `trades` (list): The most recent trades, newest first.
- `turnover` (number): What they were worth in the pricing currency.
- `volume` (number): How much of the coin these trades moved in total.

**Example output**

```json
{
  "average_price": 77191.99,
  "buy_count": 1,
  "buy_volume": 0.00061806,
  "coin": "BTC",
  "count": 2,
  "latest_price": 77191.15,
  "latest_traded_at": "2026-09-12T06:15:00Z",
  "market": "BTC-USD",
  "priced_in": "USD",
  "sell_count": 1,
  "sell_volume": 0.00127081,
  "summary": "2 trades on BTC-USD: 1 bought 0.00061806 BTC and 1 sold 0.00127081 BTC.",
  "trades": [
    {
      "direction": "down",
      "price": 77191.15,
      "side": "sell",
      "size": 0.00127081,
      "trade_id": 1091871699,
      "traded_at": "2026-09-12T06:15:00Z",
      "value": 98.08
    },
    {
      "direction": "up",
      "price": 77193.72,
      "side": "buy",
      "size": 0.00061806,
      "trade_id": 1091871697,
      "traded_at": "2026-09-12T06:14:58Z",
      "value": 47.7
    }
  ],
  "turnover": 145.78,
  "volume": 0.00188887
}
```

### Get the 24-hour summary

Get how a market has moved over the last 24 hours: where it opened, its high and low, where it is now, and the change between - as a number and as a percentage, worked out for you. Use this for a daily digest or to branch on a move of more than a few percent. The window rolls: the open is the price 24 hours ago, not at midnight. No API key required.

**Inputs**

- Market (`market`, text): Which market to summarise. Default: `BTC-USD`.

**Outputs**

- `change` (number): The move over the 24 hours in the pricing currency. Negative when it has fallen.
- `change_percent` (number): How far the price has moved over the 24 hours, as a percentage. Negative when it has fallen.
- `checked_at` (text): When this summary was read, as a UTC timestamp.
- `coin` (text): The coin being traded, such as BTC.
- `direction` (text): 'up', 'down' or 'flat' - the one field to branch on.
- `high_price` (number): The highest price over the 24 hours.
- `low_price` (number): The lowest price over the 24 hours.
- `market` (text): The market this reading is from, such as BTC-USD. The value to feed straight into another step.
- `open_price` (number): The price 24 hours ago.
- `price` (number): The most recent price.
- `priced_in` (text): The currency the market is priced in, such as USD.
- `summary` (text): The result as a sentence, ready to show someone.
- `volume_24h` (number): How much of the coin changed hands over the 24 hours, counted in the coin itself.
- `volume_30d` (number): The same over 30 days - the figure to judge whether a market is liquid enough to rely on.

**Example output**

```json
{
  "change": -65.84,
  "change_percent": -0.0852,
  "checked_at": "2026-09-12T06:06:31Z",
  "coin": "BTC",
  "direction": "down",
  "high_price": 79852.22,
  "low_price": 76030.0,
  "market": "BTC-USD",
  "open_price": 77265.11,
  "price": 77199.27,
  "priced_in": "USD",
  "summary": "BTC is down 0.09% over the last 24 hours, at 77,199.27 USD.",
  "volume_24h": 6732.62788881,
  "volume_30d": 209308.85906354
}
```

### Get the order book

See what is waiting to be bought and sold on a market, and at what prices. Each side comes back with a running total, so 'how much could I sell before the price drops below X' is a value to read rather than a sum to do. Coinbase's own book runs to about 21,000 price levels; this brings back the ones nearest the current price, which is where trading actually happens. No API key required.

**Inputs**

- Market (`market`, text): Which market's order book to read. Default: `BTC-USD`.
- How many price levels (`levels`, number): How far down each side of the book to look. Ten is usually enough to see where the liquidity sits. From 1 to 50. Default: `10`.

**Outputs**

- `ask_depth` (number): How much of the coin is being offered across the levels returned.
- `asks` (list): Offers to sell, best price first - what you would buy from.
- `best_ask` (number): The lowest price anyone is currently offering to sell at.
- `best_bid` (number): The highest price anyone is currently offering to buy at.
- `bid_depth` (number): How much of the coin is being bid for across the levels returned.
- `bids` (list): Offers to buy, best price first - what you would sell into.
- `captured_at` (text): When this snapshot was taken, as a UTC timestamp. An order book is only true for the instant it was read.
- `coin` (text): The coin being traded, such as BTC.
- `levels` (number): How many levels a side came back.
- `market` (text): The market this reading is from, such as BTC-USD. The value to feed straight into another step.
- `mid_price` (number): Halfway between the best bid and the best ask.
- `priced_in` (text): The currency the market is priced in, such as USD.
- `spread` (number): The gap between the best bid and the best ask, in the pricing currency. A wide one means a thin market.
- `spread_percent` (number): The same gap as a percentage of the mid price.
- `summary` (text): The result as a sentence, ready to show someone.

**Example output**

```json
{
  "ask_depth": 0.32742467,
  "asks": [
    {
      "cumulative_size": 0.22382992,
      "orders": 4,
      "price": 77196.81,
      "size": 0.22382992
    },
    {
      "cumulative_size": 0.32742467,
      "orders": 1,
      "price": 77198.4,
      "size": 0.10359475
    }
  ],
  "best_ask": 77196.81,
  "best_bid": 77196.8,
  "bid_depth": 0.04083065,
  "bids": [
    {
      "cumulative_size": 0.01492233,
      "orders": 3,
      "price": 77196.8,
      "size": 0.01492233
    },
    {
      "cumulative_size": 0.04083065,
      "orders": 2,
      "price": 77195.25,
      "size": 0.02590832
    }
  ],
  "captured_at": "2026-09-12T06:06:31Z",
  "coin": "BTC",
  "levels": 2,
  "market": "BTC-USD",
  "mid_price": 77196.805,
  "priced_in": "USD",
  "spread": 0.01,
  "spread_percent": 0.0,
  "summary": "BTC is bid 77,196.80 and offered 77,196.81 USD, a spread of 0.01."
}
```

### Get the price

Get what a market is trading at right now on Coinbase Exchange - the last traded price, plus the best bid, the best ask and the spread between them. This is the action for a price alert, a morning summary, or a figure to drop into a message. Every number comes back as a number, so a step can compare it against a threshold directly. No API key required.

**Inputs**

- Market (`market`, text): Which market to price. Default: `BTC-USD`.

**Outputs**

- `best_ask` (number): The lowest price anyone is currently offering to sell at.
- `best_bid` (number): The highest price anyone is currently offering to buy at.
- `coin` (text): The coin being traded, such as BTC.
- `last_trade_size` (number): How much of the coin that last trade was for.
- `market` (text): The market this reading is from, such as BTC-USD. The value to feed straight into another step.
- `mid_price` (number): Halfway between the best bid and the best ask.
- `price` (number): The price the last trade went through at.
- `priced_at` (text): When this price was set, as a UTC timestamp. Worth reading on a thin market, where the last trade can be hours old.
- `priced_in` (text): The currency the market is priced in, such as USD.
- `spread` (number): The gap between the best bid and the best ask, in the pricing currency. A wide one means a thin market.
- `spread_percent` (number): The same gap as a percentage of the mid price.
- `summary` (text): The result as a sentence, ready to show someone.
- `volume_24h` (number): How much of the coin has changed hands in the last 24 hours, counted in the coin itself.

**Example output**

```json
{
  "best_ask": 77196.81,
  "best_bid": 77196.8,
  "coin": "BTC",
  "last_trade_size": 1.2e-07,
  "market": "BTC-USD",
  "mid_price": 77196.805,
  "price": 77196.8,
  "priced_at": "2026-09-12T06:06:30Z",
  "priced_in": "USD",
  "spread": 0.01,
  "spread_percent": 0.0,
  "summary": "BTC is trading at 77,196.80 USD.",
  "volume_24h": 6732.72153612
}
```

### List markets

List the markets Coinbase Exchange is trading, with each one's minimum order and the increments it prices and sizes in. Narrow it to one coin to see everything that coin trades against, or to one pricing currency to see everything quoted in dollars. Delisted markets are left out: they cannot be traded, so a list of them would be a list of things a workflow cannot act on. No API key required.

**Inputs**

- Coin (`coin`, text): Optional. Only markets trading this coin - ETH brings back ETH-USD, ETH-EUR and ETH-BTC. Leave empty for every coin.
- Priced in (`priced_in`, text): Optional. Only markets priced in this currency. Leave empty for all of them.

**Outputs**

- `coin` (text): The coin the list was narrowed to, if any.
- `count` (number): How many markets came back.
- `market_ids` (list): Just the names, for feeding into another step or checking whether one is in the list.
- `markets` (list): One entry per market, alphabetically by name - the shape to loop over or put in a table.
- `priced_in` (text): The pricing currency the list was narrowed to, if there was one.
- `summary` (text): The result as a sentence, ready to show someone.

**Example output**

```json
{
  "coin": "BTC",
  "count": 2,
  "market_ids": [
    "BTC-EUR",
    "BTC-USD"
  ],
  "markets": [
    {
      "coin": "BTC",
      "market": "BTC-EUR",
      "min_order_value": 1.0,
      "price_increment": 0.01,
      "priced_in": "EUR",
      "size_increment": 1e-08,
      "trading_state": "Open for trading."
    },
    {
      "coin": "BTC",
      "market": "BTC-USD",
      "min_order_value": 1.0,
      "price_increment": 0.01,
      "priced_in": "USD",
      "size_increment": 1e-08,
      "trading_state": "Open for trading."
    }
  ],
  "priced_in": "",
  "summary": "Coinbase Exchange trades 2 markets for BTC."
}
```
