naftiko: 1.0.0-alpha2 info: label: Kraken Spot WebSocket API v2 — Streams description: Kraken Spot WebSocket API v2 — Streams. 12 channel operations covering ticker, book, ohlc, trade, instrument, and the connection-level ping/heartbeat/status frames. Self-contained Naftiko capability covering one Kraken business surface. tags: - Kraken - Cryptocurrency - Streams created: '2026-05-30' modified: '2026-05-30' binds: - namespace: env keys: KRAKEN_WS_TOKEN: KRAKEN_WS_TOKEN capability: consumes: - type: websocket namespace: spot-websocket-v2-streams baseUri: wss://ws.kraken.com/v2 description: Kraken Spot WebSocket API v2 — Streams business capability. Self-contained, no shared references. authentication: type: bearer token: '{{env.KRAKEN_WS_TOKEN}}' resources: - name: channels path: / operations: - name: subscribe-ticker method: RECEIVE description: Receive ticker snapshot and updates from the server. inputParameters: - name: channel in: body type: string required: true description: Channel name. - name: params in: body type: object required: false description: Channel-specific subscribe params. outputRawFormat: json outputParameters: - name: result type: object value: $. - name: publish-ticker method: SUBSCRIBE description: Subscribe or unsubscribe from the ticker channel. inputParameters: - name: channel in: body type: string required: true description: Channel name. - name: params in: body type: object required: false description: Channel-specific subscribe params. outputRawFormat: json outputParameters: - name: result type: object value: $. - name: subscribe-book method: RECEIVE description: Receive book snapshot and update messages. inputParameters: - name: channel in: body type: string required: true description: Channel name. - name: params in: body type: object required: false description: Channel-specific subscribe params. outputRawFormat: json outputParameters: - name: result type: object value: $. - name: publish-book method: SUBSCRIBE description: Subscribe or unsubscribe from the book channel. inputParameters: - name: channel in: body type: string required: true description: Channel name. - name: params in: body type: object required: false description: Channel-specific subscribe params. outputRawFormat: json outputParameters: - name: result type: object value: $. - name: subscribe-ohlc method: RECEIVE description: Receive OHLC snapshot and update messages. inputParameters: - name: channel in: body type: string required: true description: Channel name. - name: params in: body type: object required: false description: Channel-specific subscribe params. outputRawFormat: json outputParameters: - name: result type: object value: $. - name: publish-ohlc method: SUBSCRIBE description: Subscribe or unsubscribe from the ohlc channel. inputParameters: - name: channel in: body type: string required: true description: Channel name. - name: params in: body type: object required: false description: Channel-specific subscribe params. outputRawFormat: json outputParameters: - name: result type: object value: $. - name: subscribe-trade method: RECEIVE description: Receive trade snapshot and update messages. inputParameters: - name: channel in: body type: string required: true description: Channel name. - name: params in: body type: object required: false description: Channel-specific subscribe params. outputRawFormat: json outputParameters: - name: result type: object value: $. - name: publish-trade method: SUBSCRIBE description: Subscribe or unsubscribe from the trade channel. inputParameters: - name: channel in: body type: string required: true description: Channel name. - name: params in: body type: object required: false description: Channel-specific subscribe params. outputRawFormat: json outputParameters: - name: result type: object value: $. - name: subscribe-instrument method: RECEIVE description: Receive instrument snapshot and update messages. inputParameters: - name: channel in: body type: string required: true description: Channel name. - name: params in: body type: object required: false description: Channel-specific subscribe params. outputRawFormat: json outputParameters: - name: result type: object value: $. - name: publish-instrument method: SUBSCRIBE description: Subscribe or unsubscribe from the instrument channel. inputParameters: - name: channel in: body type: string required: true description: Channel name. - name: params in: body type: object required: false description: Channel-specific subscribe params. outputRawFormat: json outputParameters: - name: result type: object value: $. - name: subscribe-ping method: RECEIVE description: Receive pong response from the server. inputParameters: - name: channel in: body type: string required: true description: Channel name. - name: params in: body type: object required: false description: Channel-specific subscribe params. outputRawFormat: json outputParameters: - name: result type: object value: $. - name: publish-ping method: SUBSCRIBE description: Send a ping to the server. inputParameters: - name: channel in: body type: string required: true description: Channel name. - name: params in: body type: object required: false description: Channel-specific subscribe params. outputRawFormat: json outputParameters: - name: result type: object value: $. exposes: - type: rest namespace: spot-websocket-v2-streams-rest port: 8080 description: REST adapter for Kraken Spot WebSocket API v2 — Streams. resources: - path: /v1/streams/ticker/subscribe name: ticker-subscribe description: REST surface for ticker subscribe. operations: - method: POST name: subscribe-ticker description: Receive ticker snapshot and updates from the server. call: spot-websocket-v2-streams.subscribe-ticker with: channel: rest.channel params: rest.params outputParameters: - type: object mapping: $. - path: /v1/streams/ticker/publish name: ticker-publish description: REST surface for ticker publish. operations: - method: POST name: publish-ticker description: Subscribe or unsubscribe from the ticker channel. call: spot-websocket-v2-streams.publish-ticker with: channel: rest.channel params: rest.params outputParameters: - type: object mapping: $. - path: /v1/streams/book/subscribe name: book-subscribe description: REST surface for book subscribe. operations: - method: POST name: subscribe-book description: Receive book snapshot and update messages. call: spot-websocket-v2-streams.subscribe-book with: channel: rest.channel params: rest.params outputParameters: - type: object mapping: $. - path: /v1/streams/book/publish name: book-publish description: REST surface for book publish. operations: - method: POST name: publish-book description: Subscribe or unsubscribe from the book channel. call: spot-websocket-v2-streams.publish-book with: channel: rest.channel params: rest.params outputParameters: - type: object mapping: $. - path: /v1/streams/ohlc/subscribe name: ohlc-subscribe description: REST surface for ohlc subscribe. operations: - method: POST name: subscribe-ohlc description: Receive OHLC snapshot and update messages. call: spot-websocket-v2-streams.subscribe-ohlc with: channel: rest.channel params: rest.params outputParameters: - type: object mapping: $. - path: /v1/streams/ohlc/publish name: ohlc-publish description: REST surface for ohlc publish. operations: - method: POST name: publish-ohlc description: Subscribe or unsubscribe from the ohlc channel. call: spot-websocket-v2-streams.publish-ohlc with: channel: rest.channel params: rest.params outputParameters: - type: object mapping: $. - path: /v1/streams/trade/subscribe name: trade-subscribe description: REST surface for trade subscribe. operations: - method: POST name: subscribe-trade description: Receive trade snapshot and update messages. call: spot-websocket-v2-streams.subscribe-trade with: channel: rest.channel params: rest.params outputParameters: - type: object mapping: $. - path: /v1/streams/trade/publish name: trade-publish description: REST surface for trade publish. operations: - method: POST name: publish-trade description: Subscribe or unsubscribe from the trade channel. call: spot-websocket-v2-streams.publish-trade with: channel: rest.channel params: rest.params outputParameters: - type: object mapping: $. - path: /v1/streams/instrument/subscribe name: instrument-subscribe description: REST surface for instrument subscribe. operations: - method: POST name: subscribe-instrument description: Receive instrument snapshot and update messages. call: spot-websocket-v2-streams.subscribe-instrument with: channel: rest.channel params: rest.params outputParameters: - type: object mapping: $. - path: /v1/streams/instrument/publish name: instrument-publish description: REST surface for instrument publish. operations: - method: POST name: publish-instrument description: Subscribe or unsubscribe from the instrument channel. call: spot-websocket-v2-streams.publish-instrument with: channel: rest.channel params: rest.params outputParameters: - type: object mapping: $. - path: /v1/streams/ping/subscribe name: ping-subscribe description: REST surface for ping subscribe. operations: - method: POST name: subscribe-ping description: Receive pong response from the server. call: spot-websocket-v2-streams.subscribe-ping with: channel: rest.channel params: rest.params outputParameters: - type: object mapping: $. - path: /v1/streams/ping/publish name: ping-publish description: REST surface for ping publish. operations: - method: POST name: publish-ping description: Send a ping to the server. call: spot-websocket-v2-streams.publish-ping with: channel: rest.channel params: rest.params outputParameters: - type: object mapping: $. - type: mcp namespace: spot-websocket-v2-streams-mcp port: 9090 transport: http description: MCP adapter for Kraken Spot WebSocket API v2 — Streams. tools: - name: receive-ticker-snapshot-and-updates description: Receive ticker snapshot and updates from the server. hints: readOnly: true destructive: false idempotent: true call: spot-websocket-v2-streams.subscribe-ticker with: channel: tools.channel params: tools.params outputParameters: - type: object mapping: $. - name: subscribe-unsubscribe-ticker-channel description: Subscribe or unsubscribe from the ticker channel. hints: readOnly: false destructive: false idempotent: true call: spot-websocket-v2-streams.publish-ticker with: channel: tools.channel params: tools.params outputParameters: - type: object mapping: $. - name: receive-book-snapshot-and-update description: Receive book snapshot and update messages. hints: readOnly: true destructive: false idempotent: true call: spot-websocket-v2-streams.subscribe-book with: channel: tools.channel params: tools.params outputParameters: - type: object mapping: $. - name: subscribe-unsubscribe-book-channel description: Subscribe or unsubscribe from the book channel. hints: readOnly: false destructive: false idempotent: true call: spot-websocket-v2-streams.publish-book with: channel: tools.channel params: tools.params outputParameters: - type: object mapping: $. - name: receive-ohlc-snapshot-and-update description: Receive OHLC snapshot and update messages. hints: readOnly: true destructive: false idempotent: true call: spot-websocket-v2-streams.subscribe-ohlc with: channel: tools.channel params: tools.params outputParameters: - type: object mapping: $. - name: subscribe-unsubscribe-ohlc-channel description: Subscribe or unsubscribe from the ohlc channel. hints: readOnly: false destructive: false idempotent: true call: spot-websocket-v2-streams.publish-ohlc with: channel: tools.channel params: tools.params outputParameters: - type: object mapping: $. - name: receive-trade-snapshot-and-update description: Receive trade snapshot and update messages. hints: readOnly: true destructive: false idempotent: true call: spot-websocket-v2-streams.subscribe-trade with: channel: tools.channel params: tools.params outputParameters: - type: object mapping: $. - name: subscribe-unsubscribe-trade-channel description: Subscribe or unsubscribe from the trade channel. hints: readOnly: false destructive: false idempotent: true call: spot-websocket-v2-streams.publish-trade with: channel: tools.channel params: tools.params outputParameters: - type: object mapping: $. - name: receive-instrument-snapshot-and-update description: Receive instrument snapshot and update messages. hints: readOnly: true destructive: false idempotent: true call: spot-websocket-v2-streams.subscribe-instrument with: channel: tools.channel params: tools.params outputParameters: - type: object mapping: $. - name: subscribe-unsubscribe-instrument-channel description: Subscribe or unsubscribe from the instrument channel. hints: readOnly: false destructive: false idempotent: true call: spot-websocket-v2-streams.publish-instrument with: channel: tools.channel params: tools.params outputParameters: - type: object mapping: $. - name: receive-pong-response-server description: Receive pong response from the server. hints: readOnly: true destructive: false idempotent: true call: spot-websocket-v2-streams.subscribe-ping with: channel: tools.channel params: tools.params outputParameters: - type: object mapping: $. - name: send-ping-server description: Send a ping to the server. hints: readOnly: false destructive: false idempotent: true call: spot-websocket-v2-streams.publish-ping with: channel: tools.channel params: tools.params outputParameters: - type: object mapping: $.