naftiko: 1.0.0-alpha2 info: label: Broker API — Events description: 'Broker API — Events. 4 operations. Lead operation: Subscribe to account status events (SSE).. Self-contained Naftiko capability covering one Alpaca business surface.' tags: - Alpaca - Events created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: ALPACA_API_KEY: ALPACA_API_KEY capability: consumes: - type: http namespace: broker-events baseUri: https://broker-api.sandbox.alpaca.markets description: Broker API — Events business capability. Self-contained, no shared references. resources: - name: v1-events-accounts-status path: /v1/events/accounts/status operations: - name: suscribetoaccountstatussse method: GET description: Subscribe to account status events (SSE). outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: since in: query type: string description: 'Format: YYYY-MM-DD' - name: until in: query type: string description: 'Format: YYYY-MM-DD' - name: since_id in: query type: integer - name: until_id in: query type: integer - name: v1-events-journals-status path: /v1/events/journals/status operations: - name: subscribetojournalstatussse method: GET description: Subscribe to journal events (SSE). outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: since in: query type: string description: 'Format: YYYY-MM-DD' - name: until in: query type: string description: 'Format: YYYY-MM-DD' - name: since_id in: query type: integer - name: until_id in: query type: integer - name: v1-events-trades path: /v1/events/trades operations: - name: subscribetotradesse method: GET description: Subscribe to Trade Events (SSE) outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: since in: query type: string description: 'Format: YYYY-MM-DD' - name: until in: query type: string description: 'Format: YYYY-MM-DD' - name: since_id in: query type: integer - name: until_id in: query type: integer - name: v1-events-transfers-status path: /v1/events/transfers/status operations: - name: subscribetotransferstatussse method: GET description: Subscribe to Transfer Events (SSE) outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: since in: query type: string description: 'Format: YYYY-MM-DD' - name: until in: query type: string description: 'Format: YYYY-MM-DD' - name: since_id in: query type: integer - name: until_id in: query type: integer authentication: type: basic username: '{{env.ALPACA_USER}}' password: '{{env.ALPACA_PASS}}' exposes: - type: rest namespace: broker-events-rest port: 8080 description: REST adapter for Broker API — Events. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/v1/events/accounts/status name: v1-events-accounts-status description: REST surface for v1-events-accounts-status. operations: - method: GET name: suscribetoaccountstatussse description: Subscribe to account status events (SSE). call: broker-events.suscribetoaccountstatussse with: since: rest.since until: rest.until since_id: rest.since_id until_id: rest.until_id outputParameters: - type: object mapping: $. - path: /v1/v1/events/journals/status name: v1-events-journals-status description: REST surface for v1-events-journals-status. operations: - method: GET name: subscribetojournalstatussse description: Subscribe to journal events (SSE). call: broker-events.subscribetojournalstatussse with: since: rest.since until: rest.until since_id: rest.since_id until_id: rest.until_id outputParameters: - type: object mapping: $. - path: /v1/v1/events/trades name: v1-events-trades description: REST surface for v1-events-trades. operations: - method: GET name: subscribetotradesse description: Subscribe to Trade Events (SSE) call: broker-events.subscribetotradesse with: since: rest.since until: rest.until since_id: rest.since_id until_id: rest.until_id outputParameters: - type: object mapping: $. - path: /v1/v1/events/transfers/status name: v1-events-transfers-status description: REST surface for v1-events-transfers-status. operations: - method: GET name: subscribetotransferstatussse description: Subscribe to Transfer Events (SSE) call: broker-events.subscribetotransferstatussse with: since: rest.since until: rest.until since_id: rest.since_id until_id: rest.until_id outputParameters: - type: object mapping: $. - type: mcp namespace: broker-events-mcp port: 9090 transport: http description: MCP adapter for Broker API — Events. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: subscribe-account-status-events-sse description: Subscribe to account status events (SSE). hints: readOnly: true destructive: false idempotent: true call: broker-events.suscribetoaccountstatussse with: since: tools.since until: tools.until since_id: tools.since_id until_id: tools.until_id outputParameters: - type: object mapping: $. - name: subscribe-journal-events-sse description: Subscribe to journal events (SSE). hints: readOnly: true destructive: false idempotent: true call: broker-events.subscribetojournalstatussse with: since: tools.since until: tools.until since_id: tools.since_id until_id: tools.until_id outputParameters: - type: object mapping: $. - name: subscribe-trade-events-sse description: Subscribe to Trade Events (SSE) hints: readOnly: true destructive: false idempotent: true call: broker-events.subscribetotradesse with: since: tools.since until: tools.until since_id: tools.since_id until_id: tools.until_id outputParameters: - type: object mapping: $. - name: subscribe-transfer-events-sse description: Subscribe to Transfer Events (SSE) hints: readOnly: true destructive: false idempotent: true call: broker-events.subscribetotransferstatussse with: since: tools.since until: tools.until since_id: tools.since_id until_id: tools.until_id outputParameters: - type: object mapping: $.