naftiko: 1.0.0-alpha2 info: label: Broker API — Watchlist description: 'Broker API — Watchlist. 5 operations. Lead operation: Manage watchlists. Self-contained Naftiko capability covering one Alpaca business surface.' tags: - Alpaca - Watchlist created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: ALPACA_API_KEY: ALPACA_API_KEY capability: consumes: - type: http namespace: broker-watchlist baseUri: https://broker-api.sandbox.alpaca.markets description: Broker API — Watchlist business capability. Self-contained, no shared references. resources: - name: v1-accounts-account_id-watchlists-watchlist_id path: /v1/accounts/{account_id}/watchlists/{watchlist_id} operations: - name: getwatchlistforaccountbyid method: GET description: Manage watchlists outputRawFormat: json outputParameters: - name: result type: object value: $. - name: replacewatchlistforaccountbyid method: PUT description: Update an existing watchlist outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: false - name: deletewatchlistfromaccountbyid method: DELETE description: Remove a watchlist outputRawFormat: json outputParameters: - name: result type: object value: $. - name: v1-trading-accounts-account_id-watchlists path: /v1/trading/accounts/{account_id}/watchlists operations: - name: getallwatchlistsforaccount method: GET description: Retrieve all watchlists outputRawFormat: json outputParameters: - name: result type: object value: $. - name: createwatchlistforaccount method: POST description: Create a new watchlist outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: false authentication: type: basic username: '{{env.ALPACA_USER}}' password: '{{env.ALPACA_PASS}}' exposes: - type: rest namespace: broker-watchlist-rest port: 8080 description: REST adapter for Broker API — Watchlist. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/v1/accounts/{account-id}/watchlists/{watchlist-id} name: v1-accounts-account-id-watchlists-watchlist-id description: REST surface for v1-accounts-account_id-watchlists-watchlist_id. operations: - method: GET name: getwatchlistforaccountbyid description: Manage watchlists call: broker-watchlist.getwatchlistforaccountbyid outputParameters: - type: object mapping: $. - method: PUT name: replacewatchlistforaccountbyid description: Update an existing watchlist call: broker-watchlist.replacewatchlistforaccountbyid with: body: rest.body outputParameters: - type: object mapping: $. - method: DELETE name: deletewatchlistfromaccountbyid description: Remove a watchlist call: broker-watchlist.deletewatchlistfromaccountbyid outputParameters: - type: object mapping: $. - path: /v1/v1/trading/accounts/{account-id}/watchlists name: v1-trading-accounts-account-id-watchlists description: REST surface for v1-trading-accounts-account_id-watchlists. operations: - method: GET name: getallwatchlistsforaccount description: Retrieve all watchlists call: broker-watchlist.getallwatchlistsforaccount outputParameters: - type: object mapping: $. - method: POST name: createwatchlistforaccount description: Create a new watchlist call: broker-watchlist.createwatchlistforaccount with: body: rest.body outputParameters: - type: object mapping: $. - type: mcp namespace: broker-watchlist-mcp port: 9090 transport: http description: MCP adapter for Broker API — Watchlist. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: manage-watchlists description: Manage watchlists hints: readOnly: true destructive: false idempotent: true call: broker-watchlist.getwatchlistforaccountbyid outputParameters: - type: object mapping: $. - name: update-existing-watchlist description: Update an existing watchlist hints: readOnly: false destructive: false idempotent: true call: broker-watchlist.replacewatchlistforaccountbyid with: body: tools.body outputParameters: - type: object mapping: $. - name: remove-watchlist description: Remove a watchlist hints: readOnly: false destructive: true idempotent: true call: broker-watchlist.deletewatchlistfromaccountbyid outputParameters: - type: object mapping: $. - name: retrieve-all-watchlists description: Retrieve all watchlists hints: readOnly: true destructive: false idempotent: true call: broker-watchlist.getallwatchlistsforaccount outputParameters: - type: object mapping: $. - name: create-new-watchlist description: Create a new watchlist hints: readOnly: false destructive: false idempotent: false call: broker-watchlist.createwatchlistforaccount with: body: tools.body outputParameters: - type: object mapping: $.