asyncapi3-1.0.0.0: test/golden/examples/reference-examples-kraken-websocket-request-reply-message-filter-in-reply-asyncapi.yml.json
{"asyncapi":"3.1.0","info":{"title":"Kraken Websockets API","version":"1.8.0","description":"WebSockets API offers real-time market data updates. WebSockets is a bidirectional protocol offering fastest real-time data, helping you build real-time applications. The public message types presented below do not require authentication. Private-data messages can be subscribed on a separate authenticated endpoint. \n\n### General Considerations\n\n- TLS with SNI (Server Name Indication) is required in order to establish a Kraken WebSockets API connection. See Cloudflare's [What is SNI?](https://www.cloudflare.com/learning/ssl/what-is-sni/) guide for more details.\n- All messages sent and received via WebSockets are encoded in JSON format\n- All decimal fields (including timestamps) are quoted to preserve precision.\n- Timestamps should not be considered unique and not be considered as aliases for transaction IDs. Also, the granularity of timestamps is not representative of transaction rates.\n- At least one private message should be subscribed to keep the authenticated client connection open.\n- Please use REST API endpoint [AssetPairs](https://www.kraken.com/features/api#get-tradable-pairs) to fetch the list of pairs which can be subscribed via WebSockets API. For example, field 'wsname' gives the supported pairs name which can be used to subscribe.\n- Cloudflare imposes a connection/re-connection rate limit (per IP address) of approximately 150 attempts per rolling 10 minutes. If this is exceeded, the IP is banned for 10 minutes.\n- Recommended reconnection behaviour is to (1) attempt reconnection instantly up to a handful of times if the websocket is dropped randomly during normal operation but (2) after maintenance or extended downtime, attempt to reconnect no more quickly than once every 5 seconds. There is no advantage to reconnecting more rapidly after maintenance during cancel_only mode.\n"},"channels":{"currencyExchange":{"address":"/","messages":{"dummyCurrencyInfo":{"$ref":"#/components/messages/dummyCurrencyInfo"},"heartbeat":{"$ref":"#/components/messages/heartbeat"},"ping":{"$ref":"#/components/messages/ping"},"pong":{"$ref":"#/components/messages/pong"},"subscribe":{"$ref":"#/components/messages/subscribe"},"subscriptionStatus":{"$ref":"#/components/messages/subscriptionStatus"},"systemStatus":{"$ref":"#/components/messages/systemStatus"},"unsubscribe":{"$ref":"#/components/messages/unsubscribe"}}}},"operations":{"receivePing":{"action":"receive","channel":{"$ref":"#/channels/currencyExchange"},"messages":[{"$ref":"#/channels/currencyExchange/messages/ping"}],"reply":{"channel":{"$ref":"#/channels/currencyExchange"},"messages":[{"$ref":"#/channels/currencyExchange/messages/pong"}]}},"receiveSubscribeRequest":{"action":"receive","channel":{"$ref":"#/channels/currencyExchange"},"messages":[{"$ref":"#/channels/currencyExchange/messages/subscribe"}],"reply":{"channel":{"$ref":"#/channels/currencyExchange"},"messages":[{"$ref":"#/channels/currencyExchange/messages/subscriptionStatus"},{"$ref":"#/channels/currencyExchange/messages/dummyCurrencyInfo"}]}},"receiveUnsubscribeRequest":{"action":"receive","channel":{"$ref":"#/channels/currencyExchange"},"messages":[{"$ref":"#/channels/currencyExchange/messages/unsubscribe"}],"reply":{"channel":{"$ref":"#/channels/currencyExchange"},"messages":[{"$ref":"#/channels/currencyExchange/messages/subscriptionStatus"}]}},"sendHeartbeat":{"action":"send","channel":{"$ref":"#/channels/currencyExchange"},"messages":[{"$ref":"#/channels/currencyExchange/messages/heartbeat"}]},"systemStatus":{"action":"send","channel":{"$ref":"#/channels/currencyExchange"},"messages":[{"$ref":"#/channels/currencyExchange/messages/systemStatus"}]}},"components":{"schemas":{"depth":{"type":"integer","enum":[10,25,100,500,1000],"description":"Depth associated with book subscription in number of levels each side.","default":10},"heartbeat":{"type":"object","properties":{"event":{"type":"string","const":"heartbeat"}}},"interval":{"type":"integer","enum":[1,5,15,30,60,240,1440,10080,21600],"description":"Time interval associated with ohlc subscription in minutes.","default":1},"maxratecount":{"type":"integer","description":"Max rate-limit budget. Compare to the ratecounter field in the openOrders updates to check whether you are approaching the rate limit."},"name":{"type":"string","enum":["book","ohlc","openOrders","ownTrades","spread","ticker","trade"],"description":"The name of the channel you subscribe too."},"pair":{"type":"array","items":{"type":"string","pattern":"[A-Z\\s]+\\/[A-Z\\s]+","description":"Format of each pair is \"A/B\", where A and B are ISO 4217-A3 for standardized assets and popular unique symbol if not standardized."},"description":"Array of currency pairs."},"ping":{"type":"object","required":["event"],"properties":{"event":{"type":"string","const":"ping"},"reqid":{"$ref":"#/components/schemas/reqid"}}},"pong":{"type":"object","properties":{"event":{"type":"string","const":"pong"},"reqid":{"$ref":"#/components/schemas/reqid"}}},"ratecounter":{"type":"boolean","description":"Whether to send rate-limit counter in updates (supported only for openOrders subscriptions)","default":false},"reqid":{"type":"integer","description":"client originated ID reflected in response message."},"snapshot":{"type":"boolean","description":"Whether to send historical feed data snapshot upon subscription (supported only for ownTrades subscriptions)","default":true},"status":{"type":"string","enum":["online","maintenance","cancel_only","limit_only","post_only"]},"subscribe":{"type":"object","required":["event"],"properties":{"event":{"type":"string","const":"subscribe"},"pair":{"$ref":"#/components/schemas/pair"},"reqid":{"$ref":"#/components/schemas/reqid"},"subscription":{"type":"object","required":["name"],"properties":{"depth":{"$ref":"#/components/schemas/depth"},"interval":{"$ref":"#/components/schemas/interval"},"name":{"$ref":"#/components/schemas/name"},"ratecounter":{"$ref":"#/components/schemas/ratecounter"},"snapshot":{"$ref":"#/components/schemas/snapshot"},"token":{"$ref":"#/components/schemas/token"}}}}},"subscriptionStatus":{"type":"object","oneOf":[{"$ref":"#/components/schemas/subscriptionStatusError"},{"$ref":"#/components/schemas/subscriptionStatusSuccess"}]},"subscriptionStatusCommon":{"type":"object","required":["event"],"properties":{"event":{"type":"string","const":"subscriptionStatus"},"pair":{"$ref":"#/components/schemas/pair"},"reqid":{"$ref":"#/components/schemas/reqid"},"status":{"$ref":"#/components/schemas/status"},"subscription":{"type":"object","required":["name"],"properties":{"depth":{"$ref":"#/components/schemas/depth"},"interval":{"$ref":"#/components/schemas/interval"},"maxratecount":{"$ref":"#/components/schemas/maxratecount"},"name":{"$ref":"#/components/schemas/name"},"token":{"$ref":"#/components/schemas/token"}}}}},"subscriptionStatusError":{"allOf":[{"required":["errorMessage"],"properties":{"errorMessage":{"type":"string"}}},{"$ref":"#/components/schemas/subscriptionStatusCommon"}]},"subscriptionStatusSuccess":{"allOf":[{"required":["channelID","channelName"],"properties":{"channelID":{"type":"integer","description":"ChannelID on successful subscription, applicable to public messages only."},"channelName":{"type":"string","description":"Channel Name on successful subscription. For payloads 'ohlc' and 'book', respective interval or depth will be added as suffix."}}},{"$ref":"#/components/schemas/subscriptionStatusCommon"}]},"systemStatus":{"type":"object","properties":{"connectionID":{"type":"integer","description":"The ID of the connection"},"event":{"type":"string","const":"systemStatus"},"status":{"$ref":"#/components/schemas/status"},"version":{"type":"string"}}},"token":{"type":"string","description":"base64-encoded authentication token for private-data endpoints."},"unsubscribe":{"type":"object","required":["event"],"properties":{"event":{"type":"string","const":"unsubscribe"},"pair":{"$ref":"#/components/schemas/pair"},"reqid":{"$ref":"#/components/schemas/reqid"},"subscription":{"type":"object","required":["name"],"properties":{"depth":{"$ref":"#/components/schemas/depth"},"interval":{"$ref":"#/components/schemas/interval"},"name":{"$ref":"#/components/schemas/name"},"token":{"$ref":"#/components/schemas/token"}}}}}},"messages":{"dummyCurrencyInfo":{"payload":{"type":"object","required":["event"],"properties":{"data":{"type":"object"},"event":{"type":"string","const":"currencyInfo"},"reqid":{"$ref":"#/components/schemas/reqid"}}},"correlationId":{"location":"$message.payload#/reqid"},"summary":"Dummy message with no real life details","description":"It is here in this example to showcase that there is an additional message that normally is of a complex structure. It represents actually currency exchange value to show a reply to operation receiveSubscribeRequest with more than one possible message."},"heartbeat":{"payload":{"$ref":"#/components/schemas/heartbeat"},"description":"Server heartbeat sent if no subscription traffic within 1 second (approximately)"},"ping":{"payload":{"$ref":"#/components/schemas/ping"},"correlationId":{"location":"$message.payload#/reqid"},"summary":"Ping server to determine whether connection is alive","description":"Client can ping server to determine whether connection is alive, server responds with pong. This is an application level ping as opposed to default ping in websockets standard which is server initiated"},"pong":{"payload":{"$ref":"#/components/schemas/pong"},"correlationId":{"location":"$message.payload#/reqid"},"summary":"Pong is a response to ping message","description":"Server pong response to a ping to determine whether connection is alive. This is an application level pong as opposed to default pong in websockets standard which is sent by client in response to a ping"},"subscribe":{"payload":{"$ref":"#/components/schemas/subscribe"},"correlationId":{"location":"$message.payload#/reqid"},"description":"Subscribe to a topic on a single or multiple currency pairs."},"subscriptionStatus":{"payload":{"$ref":"#/components/schemas/subscriptionStatus"},"description":"Subscription status response to subscribe, unsubscribe or exchange initiated unsubscribe.","examples":[{"payload":{"channelID":10001,"channelName":"ohlc-5","event":"subscriptionStatus","pair":"XBT/EUR","reqid":42,"status":"unsubscribed","subscription":{"interval":5,"name":"ohlc"}}},{"payload":{"errorMessage":"Subscription depth not supported","event":"subscriptionStatus","pair":"XBT/USD","status":"error","subscription":{"depth":42,"name":"book"}}}]},"systemStatus":{"payload":{"$ref":"#/components/schemas/systemStatus"},"description":"Status sent on connection or system status changes."},"unsubscribe":{"payload":{"$ref":"#/components/schemas/unsubscribe"},"correlationId":{"location":"$message.payload#/reqid"},"description":"Unsubscribe, can specify a channelID or multiple currency pairs."}}}}