跳转至主要内容

Solana WebSocket Billing

更新于
Jul 01, 2026

Solana WebSocket Billing

As of July 1, 2026, Solana WebSocket billing has transitioned from per-message billing to metered data billing based on the uncompressed size of data delivered. This change provides more fair and transparent pricing that better reflects actual infrastructure costs and aligns with industry standards.

What Changed

方面Before (Per-Message Billing)After (Metered Data Billing)
Billing ModelFlat rate per messageBased on uncompressed data size
Rate20 API credits per message0.1 MB = 15 API credits
Message Size ImpactNo impact - all messages cost the sameDirectly affects cost - smaller messages cost less
Subscription Responses20 credits per responseMetered by data size (0.1 MB = 15 credits)
Unsubscribe RequestsFlat API credit costFlat API credit cost (unchanged)
Example: slotSubscribe (~100 bytes)20 credits per notification~0.015 credits per notification (99.93% reduction)

Why This Change?

WebSocket message sizes vary significantly across different subscription methods. For example:


  • Small messages: slotSubscribe, signatureSubscribe, voteSubscribe typically return only a few hundred bytes per notification
  • Large messages: blockSubscribe returns full Solana blocks averaging ~4 MB each

Under the previous flat-rate billing, users of small-message methods were effectively subsidizing the infrastructure costs of large-message methods. Metered billing ensures you only pay for the data you actually receive.

Impact on Your Usage

Lower Costs for Most Users

Most users will see lower API credit usage under the new rate of 0.1 MB = 15 API credits. Methods that return small amounts of data per notification will cost less than the previous flat rate of 20 credits per message:


  • accountSubscribe
  • logsSubscribe
  • programSubscribe
  • rootSubscribe
  • shredTransactionSubscribe
  • signatureSubscribe
  • slotSubscribe
  • slotsUpdatesSubscribe
  • transactionSubscribe
  • voteSubscribe

These methods typically return small amounts of data per notification, resulting in much lower costs under metered billing compared to the previous flat rate of 20 credits per message.

示例: A slotSubscribe notification is typically ~100 bytes. Under metered billing, this costs approximately 0.015 API credits (compared to 20 credits previously), resulting in a 99.93% cost reduction.

blockSubscribe Considerations

blockSubscribe returns complete Solana blocks, which can exceed 30 MB per notification. Most applications don't need every byte. With metered billing, optimizing what you subscribe to directly reduces your cost.

How to optimize your blockSubscribe usage for metered billing

  • Filter by account or program. If you only care about transactions involving specific accounts or programs, use the mentionsAccountOrProgram filter instead of "all". Blocks with no matching transactions won't generate notifications at all.

  • Reduce transaction detail.transactionDetails parameter accepts 完整, accounts, 签名,或 none. If you don't need full transaction data, stepping down to 签名accounts cuts payload size significantly.

  • Turn off rewards. Set showRewardsfalse if your application doesn't use reward data.

  • Choose the right encoding.encoding parameter controls how account data is returned. base64 以及 jsonParsed are common choices. Pick the one your application actually consumes.

If you need the full block data for every block or expanded filtering options, or you're a heavy user of blockSubscribe, consider these alternatives that may be more cost-effective for your use case:


  • Quicknode Streams: Managed data pipeline with flat pricing per block
  • Solana gRPC: High-performance Yellowstone-compatible Geyser gRPC streaming with advanced filtering

Affected Methods

The following WebSocket subscription methods are now billed based on metered data:

方法Typical Data Size
accountSubscribeSmall (~100-500 bytes)
blockSubscribeLarge (~4 MB)
logsSubscribeSmall-Medium (~500-2000 bytes)
programSubscribeSmall-Medium (~100-1000 bytes)
rootSubscribeSmall (~100 bytes)
shredTransactionSubscribeMedium-Large (~1-10 KB)
signatureSubscribeSmall (~200 bytes)
slotSubscribeSmall (~100 bytes)
slotsUpdatesSubscribeSmall (~200-400 bytes)
transactionSubscribeMedium-Large (~1-10 KB)
voteSubscribeSmall (~300 bytes)

Understanding Your Usage

You can monitor your WebSocket usage in your Quicknode dashboard:

  1. Navigate to your endpoint page
  2. Click the Metrics tab
  3. View the following charts:
    • API Credits - Track total API credits consumed over time
    • Metered endpoint data - Monitor data volume for metered methods
    • Metered endpoint credits - Track credits consumed by metered WebSocket methods

Questions?

If you have any questions about WebSocket billing or need help optimizing your usage, please contact billing@quicknode.com.

分享此文档