naftiko: 1.0.0-alpha2 info: label: Interactive Brokers Web API — Market Data description: 'Interactive Brokers Web API — Market Data. 2 operations. Lead operation: Get historical market data. Self-contained Naftiko capability covering one Interactive Brokers business surface.' tags: - Interactive Brokers - Market Data created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: INTERACTIVE_BROKERS_API_KEY: INTERACTIVE_BROKERS_API_KEY capability: consumes: - type: http namespace: web-market-data baseUri: https://localhost:5000/v1/api description: Interactive Brokers Web API — Market Data business capability. Self-contained, no shared references. resources: - name: iserver-marketdata-history path: /iserver/marketdata/history operations: - name: getmarketdatahistory method: GET description: Get historical market data outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: conid in: query type: string description: Contract identifier required: true - name: period in: query type: string description: Time period (e.g., 1d, 1w, 1m, 1y) required: true - name: bar in: query type: string description: Bar size (e.g., 1min, 5min, 1h, 1d) required: true - name: iserver-marketdata-snapshot path: /iserver/marketdata/snapshot operations: - name: getmarketdatasnapshot method: GET description: Get market data snapshot outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: conids in: query type: string description: Comma-separated list of contract IDs required: true - name: fields in: query type: string description: Comma-separated list of field IDs to return authentication: type: bearer token: '{{env.INTERACTIVE_BROKERS_API_KEY}}' exposes: - type: rest namespace: web-market-data-rest port: 8080 description: REST adapter for Interactive Brokers Web API — Market Data. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/iserver/marketdata/history name: iserver-marketdata-history description: REST surface for iserver-marketdata-history. operations: - method: GET name: getmarketdatahistory description: Get historical market data call: web-market-data.getmarketdatahistory with: conid: rest.conid period: rest.period bar: rest.bar outputParameters: - type: object mapping: $. - path: /v1/iserver/marketdata/snapshot name: iserver-marketdata-snapshot description: REST surface for iserver-marketdata-snapshot. operations: - method: GET name: getmarketdatasnapshot description: Get market data snapshot call: web-market-data.getmarketdatasnapshot with: conids: rest.conids fields: rest.fields outputParameters: - type: object mapping: $. - type: mcp namespace: web-market-data-mcp port: 9090 transport: http description: MCP adapter for Interactive Brokers Web API — Market Data. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: get-historical-market-data description: Get historical market data hints: readOnly: true destructive: false idempotent: true call: web-market-data.getmarketdatahistory with: conid: tools.conid period: tools.period bar: tools.bar outputParameters: - type: object mapping: $. - name: get-market-data-snapshot description: Get market data snapshot hints: readOnly: true destructive: false idempotent: true call: web-market-data.getmarketdatasnapshot with: conids: tools.conids fields: tools.fields outputParameters: - type: object mapping: $.