TGViewer
Lighter API/MM Updates Lighter API/MM Updates @lighter_api_updates · 1.02K subscribers
Post #174 604
Legacy market IDs were bounded to [0, 255) for perp markets, and [2048, 4096) for spot markets. Testnet now adopts a new logic for assigning IDs to new markets, using 64 bit integers, starting at 4095. It is expected for market IDs to differ from mainnet, with current ones on testnet visible here: https://testnet.zklighter.elliot.ai/api/v1/orderBookDetails

This change will be deployed to Lighter Core Mainnet this Sunday (the exact time will be shared shortly), there will be no breaking changes for existing markets, which will maintain their current index - however, newly deployed markets (both perpetual, and spot ones) will pick the next free index >= 4095. For both cases, no other changes are required.

Traders can differentiate the type of market using the "market_type" field returned by the orderBookDetails, orderBooks endpoints - we strongly advise against making assumptions based on IDs going forward, e.g. assuming that whenever market_id >= 2048, it'll be a spot market.

That is particularly important for using WebSockets, as some channels are specific to a certain type of markets (e.g. spot_market_stats; market_stats); or when updating perp-specific parameters, such as isolated/cross margining of a position.

Mind that you're required to update your SDK to the latest version in order to support trading for these newly deployed markets.
  • 👍 4
More from @lighter_api_updates
  1. Sep 18, 2026gm We will be performing a network upgrade on Sunday, September 20 at 11:00 AM UTC. Expect…
  2. Sep 16, 2026- The fun.xyz deposit flow now allows to generate a quote to estimate fees, received amoun…
  3. Sep 13, 2026- Starting tomorrow, the following changes to partner attribution will be deployed: https:…
  4. Sep 11, 2026gm We will be performing a network upgrade on Sunday, September 13 at 11:00 AM UTC. Expect…
  5. Sep 9, 2026- Rate limits for L1Withdrawal have been increased to 10 per hour, per user - Fees for fas…
  6. Sep 4, 2026- Users can now export individual days of global trade events with the newly added histori…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →