WebSocketReal time
Stream ticket
POST
/
View as MarkdownTry in Playground →
Issues a one-time ticket for opening a connection, valid for 30 seconds. The call is authenticated, rate-limited and counted against your usage exactly like any other /v2 request, and it takes no request body.
Response
- data
{ ticket: string; url: string; expiresInSeconds: number }- errors
- 403
ws_not_available— WebSocket access is not part of your plan
Any /v2 call can also come back with one of the common errors.
Example
$ curl -X POST -H "Authorization: Bearer sk_live_…" https://api.datasportsapi.com/v2/stream/ticket
{ "data": { "ticket": "8373e1…", "url": "wss://api.datasportsapi.com/?ticket=8373e1…", "expiresInSeconds": 30 } }