asyncapi: 2.0.0 info: title: PredictIt Market Predictions on Ably Hub version: 1.0.0 contact: name: Ably url: 'https://www.ably.io/contact' email: support@ably.io description: | GTFS-R data on PredictIt Market Predictions servers: ably: url: 'ws://realtime.ably.io' description: Endpoint used by Ably's Realtime client libraries protocol: ws security: - apiKey: [] - jwt: [] - httpBearerToken: [] mqtt: url: 'mqtt://mqtt.ably.io:{port}' description: Ably's MQTT endpoint variables: port: description: Secure connection (TLS) is available through port 8883. default: '8883' enum: - '1883' - '8883' security: - mqttApiKey: [] - mqttJwt: [] protocol: mqtt protocolVersion: 3.1.1 rest: url: 'https://rest.ably.io' description: Ably REST API protocol: https defaultContentType: application/json channels: '[product:ably-predictit/predictions]trade:{tradeId}': subscribe: summary: Trade details message: payload: type: object properties: id: type: integer description: The trade ID name: type: string description: The name of the trade shortName: type: string description: The short name of the trade image: type: string description: Link to the image for the trade url: type: string description: Link to the trade's main page contracts: type: array items: $ref: '#/components/schemas/contract' timestamp: type: string format: dateTime description: Date and time of the update status: type: string description: Indicates if open or closed enum: - Open - Close parameters: tradeId: description: Id of the trade schema: type: integer components: schemas: contract: type: object properties: id: type: string description: ID of the contract dateEnd: type: string description: End date image: type: string description: Link to image for contract name: type: string description: Name of contract shortName: type: string description: Name of contract status: type: string description: Status of contract enum: - Open - Closed lastTradePrice: type: number description: Last trade price bestBuyYesCost: type: number description: Best buy yes value bestBuyNoCost: type: number description: Best buy no value bestSellYesCost: type: number description: Best sell yes value bestSellNoCost: type: number description: Best sell no value lastClosePrice: type: number description: Last clost price displayOrder: type: integer description: Display order securitySchemes: mqttApiKey: type: apiKey in: user description: >- Provide your API key's public part as the user and the API key's secret part as the password. Only usable over a secure connection. apiKey: type: apiKey in: user description: Provide your API key jwt: type: http scheme: bearer bearerFormat: JWT description: >- JWT generated matching the [Ably JWT requirements](https://www.ably.io/documentation/core-features/authentication#ably-jwt) mqttJwt: type: http scheme: bearer bearerFormat: JWT description: >- JWT generated matching the [Ably JWT requirements](https://www.ably.io/documentation/core-features/authentication#ably-jwt). Use the token as your user, and keep the password blank httpBearerToken: type: http scheme: bearer