WebSocket RPC

Osmosis WebSocket RPC

Stream Osmosis data in real time over a WebSocket connection instead of polling: new blocks and transactions through CometBFT event subscriptions. Every SwiftNodes plan includes a Osmosis WebSocket endpoint alongside HTTP, with flat-rate pricing and no KYC.

Endpoint

wss://rpc.swiftnodes.io/ws/osmosis?key=YOUR_API_KEY

The HTTP endpoint for Osmosis is https://rpc.swiftnodes.io/rpc/osmosis?key=YOUR_API_KEY. One API key works for both, and across all 75+ supported chains.

Subscribe to Osmosis in real time

// CometBFT event subscription (the same socket speaks the chain's native RPC, not eth_*)
const ws = new WebSocket("wss://rpc.swiftnodes.io/ws/osmosis?key=YOUR_API_KEY");

ws.onopen = () => ws.send(JSON.stringify({
  jsonrpc: "2.0", id: 1, method: "subscribe",
  params: { query: "tm.event='NewBlock'" },
}));

// CometBFT delivers events with the subscribe request's id; the first frame is the acknowledgement.
ws.onmessage = (msg) => {
  const j = JSON.parse(msg.data);
  if (j.result?.data) console.log("new Osmosis block", j.result.data.value.block.header.height);
};

What you can subscribe to

  • New blocks (tm.event='NewBlock'): the subscription our checks open on this chain
  • Transactions (tm.event='Tx'), narrowed with CometBFT event queries such as message.sender

Osmosis is a Layer 1 appchain (Cosmos SDK DEX), with ~~5-6 seconds block times and instant single-block finality (cometbft/tendermint bft) finality. That cadence sets how frequently new-block subscriptions fire.

Frequently asked questions

Does SwiftNodes support Osmosis WebSocket?

Yes. Every Osmosis plan includes a WebSocket (wss://) endpoint alongside HTTP, with no separate add-on. Connect to wss://rpc.swiftnodes.io/ws/osmosis?key=<key> and open subscriptions immediately.

What is the Osmosis WebSocket URL?

wss://rpc.swiftnodes.io/ws/osmosis?key=YOUR_API_KEY — replace YOUR_API_KEY with the key from your dashboard. The matching HTTP endpoint is https://rpc.swiftnodes.io/rpc/osmosis?key=YOUR_API_KEY.

Is there a message rate limit on the WebSocket?

Yes — WebSocket throughput scales with your plan (1 msg/s on Free up to 250 msg/s on Pro), with concurrent-connection limits per plan. Within those limits, subscriptions stream in real time.

See the full Osmosis RPC page for chain details, or the WebSocket docs for the complete method list.

Get a Osmosis endpoint free

HTTP + WebSocket, flat-rate, pay with crypto or card, no KYC. Live in 30 seconds.

Get your API key