Coinbase · Capability

Coinbase Advanced Trade API — Market Data

Coinbase Advanced Trade API — Market Data. 2 operations. Lead operation: Get best bid and ask. Self-contained Naftiko capability covering one Coinbase business surface.

Run with Naftiko CoinbaseMarket Data

What You Can Do

GET
Getbestbidask — Get best bid and ask
/v1/best-bid-ask
GET
Getproductbook — Get product book
/v1/product-book

MCP Tools

get-best-bid-and-ask

Get best bid and ask

read-only idempotent
get-product-book

Get product book

read-only idempotent

Capability Spec

advanced-trade-market-data.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Coinbase Advanced Trade API — Market Data
  description: 'Coinbase Advanced Trade API — Market Data. 2 operations. Lead operation: Get best bid and ask. Self-contained
    Naftiko capability covering one Coinbase business surface.'
  tags:
  - Coinbase
  - Market Data
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    COINBASE_API_KEY: COINBASE_API_KEY
capability:
  consumes:
  - type: http
    namespace: advanced-trade-market-data
    baseUri: https://api.coinbase.com/api/v3/brokerage
    description: Coinbase Advanced Trade API — Market Data business capability. Self-contained, no shared references.
    resources:
    - name: best_bid_ask
      path: /best_bid_ask
      operations:
      - name: getbestbidask
        method: GET
        description: Get best bid and ask
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: product_ids
          in: query
          type: array
          description: List of product IDs to get bid/ask for
    - name: product_book
      path: /product_book
      operations:
      - name: getproductbook
        method: GET
        description: Get product book
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: product_id
          in: query
          type: string
          description: Product ID to get the order book for
          required: true
    authentication:
      type: apikey
      key: CB-ACCESS-KEY
      value: '{{env.COINBASE_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: advanced-trade-market-data-rest
    port: 8080
    description: REST adapter for Coinbase Advanced Trade API — Market Data. One Spectral-compliant resource per consumed
      operation, prefixed with /v1.
    resources:
    - path: /v1/best-bid-ask
      name: best-bid-ask
      description: REST surface for best_bid_ask.
      operations:
      - method: GET
        name: getbestbidask
        description: Get best bid and ask
        call: advanced-trade-market-data.getbestbidask
        with:
          product_ids: rest.product_ids
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/product-book
      name: product-book
      description: REST surface for product_book.
      operations:
      - method: GET
        name: getproductbook
        description: Get product book
        call: advanced-trade-market-data.getproductbook
        with:
          product_id: rest.product_id
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: advanced-trade-market-data-mcp
    port: 9090
    transport: http
    description: MCP adapter for Coinbase Advanced Trade API — Market Data. One tool per consumed operation, routed inline
      through this capability's consumes block.
    tools:
    - name: get-best-bid-and-ask
      description: Get best bid and ask
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: advanced-trade-market-data.getbestbidask
      with:
        product_ids: tools.product_ids
      outputParameters:
      - type: object
        mapping: $.
    - name: get-product-book
      description: Get product book
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: advanced-trade-market-data.getproductbook
      with:
        product_id: tools.product_id
      outputParameters:
      - type: object
        mapping: $.