Live events
GET
/v1/stream
const url = 'https://api.tako.wtf/v1/stream';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.tako.wtf/v1/streamA Server-Sent Events stream of new events, oldest first. Each message has event: <name>, id: <lt>:<index> and the event as JSON in data, the same object as in /v1/events. After a reconnect, browsers send the last id as Last-Event-ID and the stream resends what was missed, up to 1,000 events; after does the same for clients that set no header. A comment line every 15 seconds keeps the connection open.
Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”name
string
Only these event names, comma separated
owner
string
Only events of this wallet
account
string
Only events logged by this contract
after
string
Resend events after this id, <lt>:<index>
Responses
Section titled “Responses”OK
Media typetext/event-stream
Server-Sent Events; each data line is a Event as JSON
string
Invalid parameter
Media typeapplication/json
object
error
required
string
Example generated
{ "error": "example"}No snapshot or stream capacity yet
Media typeapplication/json
object
error
required
string
Example generated
{ "error": "example"}