Coinbase · Capability

Coinbase Exchange API — Orders

Coinbase Exchange API — Orders. 6 operations. Lead operation: List fills. Self-contained Naftiko capability covering one Coinbase business surface.

Run with Naftiko CoinbaseOrders

What You Can Do

GET
Listfills — List fills
/v1/fills
GET
Listorders — List orders
/v1/orders
POST
Createorder — Create order
/v1/orders
DELETE
Cancelallorders — Cancel all orders
/v1/orders
GET
Getorder — Get order
/v1/orders/{order-id}
DELETE
Cancelorder — Cancel order
/v1/orders/{order-id}

MCP Tools

list-fills

List fills

read-only idempotent
list-orders

List orders

read-only idempotent
create-order

Create order

cancel-all-orders

Cancel all orders

idempotent
get-order

Get order

read-only idempotent
cancel-order

Cancel order

idempotent

Capability Spec

exchange-orders.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Coinbase Exchange API — Orders
  description: 'Coinbase Exchange API — Orders. 6 operations. Lead operation: List fills. Self-contained Naftiko capability
    covering one Coinbase business surface.'
  tags:
  - Coinbase
  - Orders
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    COINBASE_API_KEY: COINBASE_API_KEY
capability:
  consumes:
  - type: http
    namespace: exchange-orders
    baseUri: https://api.exchange.coinbase.com
    description: Coinbase Exchange API — Orders business capability. Self-contained, no shared references.
    resources:
    - name: fills
      path: /fills
      operations:
      - name: listfills
        method: GET
        description: List fills
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: order_id
          in: query
          type: string
          description: Filter fills by order ID
        - name: product_id
          in: query
          type: string
          description: Filter fills by product ID
    - name: orders
      path: /orders
      operations:
      - name: listorders
        method: GET
        description: List orders
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: product_id
          in: query
          type: string
          description: Filter orders by product ID
        - name: status
          in: query
          type: string
          description: Filter by order status
      - name: createorder
        method: POST
        description: Create order
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: cancelallorders
        method: DELETE
        description: Cancel all orders
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: product_id
          in: query
          type: string
          description: Only cancel orders for this product
    - name: orders-order_id
      path: /orders/{order_id}
      operations:
      - name: getorder
        method: GET
        description: Get order
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: order_id
          in: path
          type: string
          description: Order ID
          required: true
      - name: cancelorder
        method: DELETE
        description: Cancel order
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: order_id
          in: path
          type: string
          description: Order ID to cancel
          required: true
    authentication:
      type: apikey
      key: CB-ACCESS-KEY
      value: '{{env.COINBASE_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: exchange-orders-rest
    port: 8080
    description: REST adapter for Coinbase Exchange API — Orders. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/fills
      name: fills
      description: REST surface for fills.
      operations:
      - method: GET
        name: listfills
        description: List fills
        call: exchange-orders.listfills
        with:
          order_id: rest.order_id
          product_id: rest.product_id
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/orders
      name: orders
      description: REST surface for orders.
      operations:
      - method: GET
        name: listorders
        description: List orders
        call: exchange-orders.listorders
        with:
          product_id: rest.product_id
          status: rest.status
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createorder
        description: Create order
        call: exchange-orders.createorder
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: cancelallorders
        description: Cancel all orders
        call: exchange-orders.cancelallorders
        with:
          product_id: rest.product_id
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/orders/{order-id}
      name: orders-order-id
      description: REST surface for orders-order_id.
      operations:
      - method: GET
        name: getorder
        description: Get order
        call: exchange-orders.getorder
        with:
          order_id: rest.order_id
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: cancelorder
        description: Cancel order
        call: exchange-orders.cancelorder
        with:
          order_id: rest.order_id
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: exchange-orders-mcp
    port: 9090
    transport: http
    description: MCP adapter for Coinbase Exchange API — Orders. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: list-fills
      description: List fills
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: exchange-orders.listfills
      with:
        order_id: tools.order_id
        product_id: tools.product_id
      outputParameters:
      - type: object
        mapping: $.
    - name: list-orders
      description: List orders
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: exchange-orders.listorders
      with:
        product_id: tools.product_id
        status: tools.status
      outputParameters:
      - type: object
        mapping: $.
    - name: create-order
      description: Create order
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: exchange-orders.createorder
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: cancel-all-orders
      description: Cancel all orders
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: exchange-orders.cancelallorders
      with:
        product_id: tools.product_id
      outputParameters:
      - type: object
        mapping: $.
    - name: get-order
      description: Get order
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: exchange-orders.getorder
      with:
        order_id: tools.order_id
      outputParameters:
      - type: object
        mapping: $.
    - name: cancel-order
      description: Cancel order
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: exchange-orders.cancelorder
      with:
        order_id: tools.order_id
      outputParameters:
      - type: object
        mapping: $.