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

# Advanced Trade WebSocket Endpoints

> WebSocket channels for Advanced Trade across spot, US derivatives, and Global Derivatives.

Public and private channels use different hosts on each venue.

<Tabs>
  <Tab title="Spot and US Derivatives">
    <CardGroup cols={2}>
      <Card title="API Reference" icon="code" href="/api-reference/advanced-trade-api/websocket/heartbeats">
        Channel schemas, subscribe payloads, and examples.
      </Card>

      <Card title="AsyncAPI spec" icon="download">
        Download the <a href="/api-reference/advanced-trade-api/advanced-trade-asyncapi.json" download target="_blank">AsyncAPI spec</a>.
      </Card>
    </CardGroup>

    ### Public

    Public market data for spot crypto and US futures.

    #### Public URL

    `wss://advanced-trade-ws.coinbase.com`

    #### Endpoints

    | Endpoint | Description |
    | :- | :- |
    | [`heartbeats`](/api-reference/advanced-trade-api/websocket/heartbeats) | Server pings every second so idle subscriptions stay open |
    | [`candles`](/api-reference/advanced-trade-api/websocket/candles) | Product candles in five-minute buckets, updated every second |
    | [`status`](/api-reference/advanced-trade-api/websocket/product-status) | Product and currency status on a preset interval |
    | [`ticker`](/api-reference/advanced-trade-api/websocket/ticker) | Price updates on every match, batched during cascading matches |
    | [`ticker_batch`](/api-reference/advanced-trade-api/websocket/ticker-batch) | Latest price every 5 seconds when it changes; no best bid or ask |
    | [`level2`](/api-reference/advanced-trade-api/websocket/level2) | Order book snapshot and incremental updates |
    | [`market_trades`](/api-reference/advanced-trade-api/websocket/market-trades) | Public trades, batched over the last 250 ms |

    #### Notes

    * A JWT is not required.
    * Most channels close within 60-90 seconds when no updates arrive. Subscribe to `heartbeats` to keep the connection open.
    * `-USDC` product IDs other than `USDT-USDC` and `EURC-USDC` return the same data as the matching `-USD` product.

    ***

    ### Private

    The user's open orders, positions, and US futures balances.

    #### Private URL

    `wss://advanced-trade-ws-user.coinbase.com`

    #### Endpoints

    | Endpoint | Description |
    | :- | :- |
    | [`user`](/api-reference/advanced-trade-api/websocket/user) | The user's open orders and positions |
    | [`futures_balance_summary`](/api-reference/advanced-trade-api/websocket/futures-balance-summary) | The user's US futures balances |

    #### Notes

    * A CDP JWT is required. See [WebSocket authentication](/coinbase-app/advanced-trade-apis/websocket/websocket-authentication).
    * The `user` channel is the only one that accepts `-USDC` product IDs.
    * If `advanced-trade-ws-user` is your primary connection, use `advanced-trade-ws` as a failover.
  </Tab>

  <Tab title="Global Derivatives">
    <CardGroup cols={2}>
      <Card title="API Reference" icon="code" href="/api-reference/advanced-trade-api/rest-api/introduction">
        Hosts, specs, and the Global Derivatives stream playground.
      </Card>

      <Card title="AsyncAPI spec" icon="download">
        Download the <a href="/api-reference/coinbase-deribit-app-api/adv-starbase-asyncapi.json" download target="_blank">AsyncAPI spec</a>.
      </Card>
    </CardGroup>

    ### Public

    Public market data for options, futures, and perpetuals.

    #### Public URL

    `wss://streams.drb.coinbase.com/ws/api/v2`

    #### Endpoints

    | Endpoint | Description |
    | :- | :- |
    | [`announcements`](/api-reference/coinbase-deribit-app-api/websocket/announcements/announcements) | Platform notices |
    | [`book.{instrument_name}.{group}.{depth}.{interval}`](/api-reference/coinbase-deribit-app-api/websocket/orderbook/bookinstrument_namegroupdepthinterval) | Grouped order book |
    | [`book.{instrument_name}.{interval}`](/api-reference/coinbase-deribit-app-api/websocket/orderbook/bookinstrument_nameinterval) | Order book |
    | [`chart.trades.{instrument_name}.{resolution}`](/api-reference/coinbase-deribit-app-api/websocket/market-data/charttradesinstrument_nameresolution) | Chart / candle updates |
    | [`deribit_price_index.{index_name}`](/api-reference/coinbase-deribit-app-api/websocket/market-data/deribit_price_indexindex_name) | Index price |
    | [`deribit_price_ranking.{index_name}`](/api-reference/coinbase-deribit-app-api/websocket/market-data/deribit_price_rankingindex_name) | Index constituents ranking |
    | [`deribit_price_statistics.{index_name}`](/api-reference/coinbase-deribit-app-api/websocket/market-data/deribit_price_statisticsindex_name) | 24h index statistics |
    | [`deribit_volatility_index.{index_name}`](/api-reference/coinbase-deribit-app-api/websocket/market-data/deribit_volatility_indexindex_name) | Volatility index |
    | [`estimated_expiration_price.{index_name}`](/api-reference/coinbase-deribit-app-api/websocket/market-data/estimated_expiration_priceindex_name) | Estimated expiration price |
    | [`incremental_ticker.{instrument_name}`](/api-reference/coinbase-deribit-app-api/websocket/market-data/incremental_tickerinstrument_name) | Incremental ticker |
    | [`instrument.creation.{kind}.{currency}`](/api-reference/coinbase-deribit-app-api/websocket/market-data/instrumentcreationkindcurrency) | Newly created instrument details |
    | [`instrument.state.{kind}.{currency}`](/api-reference/coinbase-deribit-app-api/websocket/market-data/instrumentstatekindcurrency) | Instrument state |
    | [`markprice.options.{index_name}`](/api-reference/coinbase-deribit-app-api/websocket/market-data/markpriceoptionsindex_name) | Options mark price |
    | [`perpetual.{instrument_name}.{interval}`](/api-reference/coinbase-deribit-app-api/websocket/market-data/perpetualinstrument_nameinterval) | Perpetual funding |
    | [`platform_state`](/api-reference/coinbase-deribit-app-api/websocket/platform/platform_state) | Platform status |
    | [`platform_state.public_methods_state`](/api-reference/coinbase-deribit-app-api/websocket/platform/platform_statepublic_methods_state) | Public-methods status |
    | [`quote.{instrument_name}`](/api-reference/coinbase-deribit-app-api/websocket/market-data/quoteinstrument_name) | Top of book quote |
    | [`ticker.{instrument_name}.{interval}`](/api-reference/coinbase-deribit-app-api/websocket/market-data/tickerinstrument_nameinterval) | Ticker |
    | [`trades.{instrument_name}.{interval}`](/api-reference/coinbase-deribit-app-api/websocket/trades/tradesinstrument_nameinterval) | Public trades |
    | [`trades.{kind}.{currency}.{interval}`](/api-reference/coinbase-deribit-app-api/websocket/trades/tradeskindcurrencyinterval) | Public trades by kind and currency |

    #### Notes

    * Subscribe with `public/subscribe`. No authentication.
    * Every public stream uses this host. Private channels are on the private URL below.
    * HTTP methods such as `public/get_index_price` run on the main WebSocket only, not this host.
    * Channel names such as `quote.BTC-PERPETUAL` go in `params.channels` on the subscribe call.

    ***

    ### Private

    The user's account events, orders, fills, positions, and portfolio updates.

    #### Private URL

    `wss://drb.coinbase.com/ws/api/v2`

    #### Endpoints

    | Endpoint | Description |
    | :- | :- |
    | [`user.access_log`](/api-reference/coinbase-deribit-app-api/websocket/user/useraccess_log) | Account access events |
    | [`user.changes.{instrument_name}.{interval}`](/api-reference/coinbase-deribit-app-api/websocket/user/userchangesinstrument_nameinterval) | Order and position changes, one instrument |
    | [`user.changes.{kind}.{currency}.{interval}`](/api-reference/coinbase-deribit-app-api/websocket/user/userchangeskindcurrencyinterval) | Order and position changes by kind and currency |
    | [`user.combo_trades.{instrument_name}.{interval}`](/api-reference/coinbase-deribit-app-api/websocket/user/usercombo_tradesinstrument_nameinterval) | Combo trades, one instrument |
    | [`user.combo_trades.{kind}.{currency}.{interval}`](/api-reference/coinbase-deribit-app-api/websocket/user/usercombo_tradeskindcurrencyinterval) | Combo trades by kind and currency |
    | [`user.isolated.changes.{instrument_name}.{interval}`](/api-reference/coinbase-deribit-app-api/websocket/user/userisolatedchangesinstrument_nameinterval) | Isolated-subaccount changes, one instrument |
    | [`user.isolated.changes.{kind}.{currency}.{interval}`](/api-reference/coinbase-deribit-app-api/websocket/user/userisolatedchangeskindcurrencyinterval) | Isolated-subaccount changes by kind and currency |
    | [`user.isolated.liquidation`](/api-reference/coinbase-deribit-app-api/websocket/user/userisolatedliquidation) | Isolated-subaccount liquidation events |
    | [`user.isolated.orders.{instrument_name}.{interval}`](/api-reference/coinbase-deribit-app-api/websocket/user/userisolatedordersinstrument_nameinterval) | Isolated-subaccount orders, one instrument |
    | [`user.isolated.orders.{kind}.{currency}.{interval}`](/api-reference/coinbase-deribit-app-api/websocket/user/userisolatedorderskindcurrencyinterval) | Isolated-subaccount orders by kind and currency |
    | [`user.isolated.portfolio.{currency}`](/api-reference/coinbase-deribit-app-api/websocket/user/userisolatedportfoliocurrency) | Isolated-subaccount portfolio and balances |
    | [`user.isolated.trades.{instrument_name}.{interval}`](/api-reference/coinbase-deribit-app-api/websocket/user/userisolatedtradesinstrument_nameinterval) | Isolated-subaccount fills, one instrument |
    | [`user.isolated.trades.{kind}.{currency}.{interval}`](/api-reference/coinbase-deribit-app-api/websocket/user/userisolatedtradeskindcurrencyinterval) | Isolated-subaccount fills by kind and currency |
    | [`user.lock`](/api-reference/coinbase-deribit-app-api/websocket/user/userlock) | Account lock and unlock events |
    | [`user.orders.{instrument_name}.{interval}`](/api-reference/coinbase-deribit-app-api/websocket/user/userordersinstrument_nameinterval) | Your orders, one instrument |
    | [`user.orders.{instrument_name}.raw`](/api-reference/coinbase-deribit-app-api/websocket/user/userordersinstrument_nameraw) | Your orders, one instrument, every update |
    | [`user.orders.{kind}.{currency}.{interval}`](/api-reference/coinbase-deribit-app-api/websocket/user/userorderskindcurrencyinterval) | Your orders by kind and currency |
    | [`user.orders.{kind}.{currency}.raw`](/api-reference/coinbase-deribit-app-api/websocket/user/userorderskindcurrencyraw) | Your orders by kind and currency, every update |
    | [`user.portfolio.{currency}`](/api-reference/coinbase-deribit-app-api/websocket/user/userportfoliocurrency) | Portfolio and balances |
    | [`user.position_lock`](/api-reference/coinbase-deribit-app-api/websocket/user/userposition_lock) | Position lock state changes |
    | [`user.trades.{instrument_name}.{interval}`](/api-reference/coinbase-deribit-app-api/websocket/user/usertradesinstrument_nameinterval) | Your fills, one instrument |
    | [`user.trades.{kind}.{currency}.{interval}`](/api-reference/coinbase-deribit-app-api/websocket/user/usertradeskindcurrencyinterval) | Your fills by kind and currency |
    | [`user.trailing_orders.trigger_price.{currency}`](/api-reference/coinbase-deribit-app-api/websocket/user/usertrailing_orderstrigger_pricecurrency) | Trailing order trigger-price updates |

    #### Notes

    * This is a different host from the public WebSocket.
    * HTTP methods from REST Endpoints run on this connection only. They are not available on the public streams host.
    * Subscribe with `private/subscribe` after `public/auth`.
    * A `.raw` interval needs a private connection, so those channels stay on the private host.
    * A public `public/subscribe` on this host is rejected (`-32601`).
  </Tab>
</Tabs>
