Search by name, SuiNS, address, digest, object ID, coin type or checkpoint.

API

WebSocket subscriptions

Subscribe with JSON-RPC over one socket. Each topic has its own method and an unsubscribe.

Connect

Connect to wss://api.tide.ad/ (also /ws) with your key in the api-key query parameter. A key is required, and your plan sets how many streams you can hold open at once.

Methods

SubscribeUnsubscribe
transactionSubscribetransactionUnsubscribe
eventSubscribeeventUnsubscribe
checkpointSubscribecheckpointUnsubscribe
balanceSubscribebalanceUnsubscribe
objectSubscribeobjectUnsubscribe

The params take a filter object and an options object: [filter, options]. Options are view, fromCheckpoint, cursor and pending (checkpoints only). You can also put the options inside the filter object. The filters and views are the same as on SSE and webhooks, see Topics and filters.

MessageMeaning
<topic>NotificationOne item, with subscription, cursor and result.
subscriptionProgressEvery checkpoint up to this one is delivered. Sent after each replay chunk and every 15 seconds when it moved.
subscriptionErrorThe subscription ended, with a code and a message.

Example

TypeScript
const ws = new WebSocket(`wss://api.tide.ad/?api-key=${process.env.TIDE_API_KEY}`);
ws.onopen = () =>
  ws.send(
    JSON.stringify({
      jsonrpc: "2.0",
      id: 1,
      method: "transactionSubscribe",
      params: [{ accounts: ["0xYOUR_ADDRESS"] }, { view: "enhanced", fromCheckpoint: 123456789 }],
    }),
  );
ws.onmessage = (e) => console.log(JSON.parse(e.data));

Resume

Messages are ordered by checkpoint and transaction index and deduplicated by digest. Each carries a cursor. After a drop, connect again and subscribe with cursor set to the last cursor you handled, or the checkpoint from the last subscriptionProgress if that is newer. The stream continues after it with no gap and no duplicate.

Close code 1012 means the server is restarting. Reconnect and subscribe again the same way.

One credit covers 10 delivered events, replayed events included.