Ogmios Websocket API

The Ogmios WebSocket interface carries the same JSON-RPC 2.0 protocol as the HTTP interface, over a persistent connection. It is required for the stateful Ouroboros mini-protocols, which hold session state across messages: chain synchronization, ledger-state acquisition, and mempool monitoring. The stateless queries documented under the JSON-RPC API also work over this connection.

Base URL

wss://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/

Replace <ACCESS-TOKEN> with the access token from the GetBlock dashboard. Open a WebSocket to this URL and exchange JSON-RPC 2.0 messages.

Chain Synchronization

Find a starting point on the node's chain, then stream forward blocks and backward rollbacks.

MethodDescription
findIntersectionFind a chain intersection point
nextBlockStream the next block or a rollback

Ledger-State Acquisition

Pin a fixed ledger point so a batch of state queries is answered consistently.

MethodDescription
acquireLedgerStateAcquire a fixed ledger state
releaseLedgerStateRelease the acquired ledger state

Mempool Monitoring

Acquire a mempool snapshot, then list and inspect pending transactions.

MethodDescription
acquireMempoolAcquire a mempool snapshot
nextTransactionRead the next mempool transaction
hasTransactionCheck if a transaction is in the mempool
sizeOfMempoolRead mempool size and capacity
releaseMempoolRelease the mempool snapshot

Support

For technical support and questions:

See Also