naftiko: 1.0.0-alpha2 info: label: Coinbase Prime API — Orders description: 'Coinbase Prime API — Orders. 5 operations. Lead operation: List portfolio orders. 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: prime-orders baseUri: https://api.prime.coinbase.com/v1 description: Coinbase Prime API — Orders business capability. Self-contained, no shared references. resources: - name: portfolios-portfolio_id-orders path: /portfolios/{portfolio_id}/orders operations: - name: listportfolioorders method: GET description: List portfolio orders outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: product_ids in: query type: string description: Filter by product IDs - name: order_statuses in: query type: array description: Filter by order statuses - name: order_type in: query type: string description: Filter by order type - name: start_date in: query type: string description: Start date for filtering - name: end_date in: query type: string description: End date for filtering - 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: portfolios-portfolio_id-orders-order_id path: /portfolios/{portfolio_id}/orders/{order_id} operations: - name: getorder method: GET description: Get order outputRawFormat: json outputParameters: - name: result type: object value: $. - name: portfolios-portfolio_id-orders-order_id-cancel path: /portfolios/{portfolio_id}/orders/{order_id}/cancel operations: - name: cancelorder method: POST description: Cancel order outputRawFormat: json outputParameters: - name: result type: object value: $. - name: portfolios-portfolio_id-orders-order_id-fills path: /portfolios/{portfolio_id}/orders/{order_id}/fills operations: - name: listorderfills method: GET description: List order fills outputRawFormat: json outputParameters: - name: result type: object value: $. authentication: type: apikey key: X-CB-ACCESS-KEY value: '{{env.COINBASE_API_KEY}}' placement: header exposes: - type: rest namespace: prime-orders-rest port: 8080 description: REST adapter for Coinbase Prime API — Orders. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/portfolios/{portfolio-id}/orders name: portfolios-portfolio-id-orders description: REST surface for portfolios-portfolio_id-orders. operations: - method: GET name: listportfolioorders description: List portfolio orders call: prime-orders.listportfolioorders with: product_ids: rest.product_ids order_statuses: rest.order_statuses order_type: rest.order_type start_date: rest.start_date end_date: rest.end_date outputParameters: - type: object mapping: $. - method: POST name: createorder description: Create order call: prime-orders.createorder with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/portfolios/{portfolio-id}/orders/{order-id} name: portfolios-portfolio-id-orders-order-id description: REST surface for portfolios-portfolio_id-orders-order_id. operations: - method: GET name: getorder description: Get order call: prime-orders.getorder outputParameters: - type: object mapping: $. - path: /v1/portfolios/{portfolio-id}/orders/{order-id}/cancel name: portfolios-portfolio-id-orders-order-id-cancel description: REST surface for portfolios-portfolio_id-orders-order_id-cancel. operations: - method: POST name: cancelorder description: Cancel order call: prime-orders.cancelorder outputParameters: - type: object mapping: $. - path: /v1/portfolios/{portfolio-id}/orders/{order-id}/fills name: portfolios-portfolio-id-orders-order-id-fills description: REST surface for portfolios-portfolio_id-orders-order_id-fills. operations: - method: GET name: listorderfills description: List order fills call: prime-orders.listorderfills outputParameters: - type: object mapping: $. - type: mcp namespace: prime-orders-mcp port: 9090 transport: http description: MCP adapter for Coinbase Prime API — Orders. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: list-portfolio-orders description: List portfolio orders hints: readOnly: true destructive: false idempotent: true call: prime-orders.listportfolioorders with: product_ids: tools.product_ids order_statuses: tools.order_statuses order_type: tools.order_type start_date: tools.start_date end_date: tools.end_date outputParameters: - type: object mapping: $. - name: create-order description: Create order hints: readOnly: false destructive: false idempotent: false call: prime-orders.createorder with: body: tools.body outputParameters: - type: object mapping: $. - name: get-order description: Get order hints: readOnly: true destructive: false idempotent: true call: prime-orders.getorder outputParameters: - type: object mapping: $. - name: cancel-order description: Cancel order hints: readOnly: false destructive: false idempotent: false call: prime-orders.cancelorder outputParameters: - type: object mapping: $. - name: list-order-fills description: List order fills hints: readOnly: true destructive: false idempotent: true call: prime-orders.listorderfills outputParameters: - type: object mapping: $.