Solana IDL reference › OpenBook V2 › Market

Market account layout

OpenBook V2 account type. Program ID opnb2LAfJYbRMAHHvqjCwQxanZn7ReEHp1k81EohpZb. Data starts with the 8-byte account discriminator, computed with the standard Anchor rule: first 8 bytes of sha256("account:Market").

Discriminator (computed with the standard Anchor rule: first 8 bytes of sha256("account:Market"))

hex 0xdbbed53700e3c69a

bytes [219, 190, 213, 55, 0, 227, 198, 154]

base58 dkokXHR3DTw

Fields (offsets include the 8-byte discriminator)

FieldTypeOffsetSize
bumpu881
baseDecimalsu891
quoteDecimalsu8101
padding1[u8; 5]115
marketAuthoritypubkey1632
timeExpiryi64488
collectFeeAdminpubkey5632
openOrdersAdminNonZeroPubkeyOption8832
keypubkey8832
consumeEventsAdminNonZeroPubkeyOption12032
keypubkey12032
closeMarketAdminNonZeroPubkeyOption15232
keypubkey15232
name[u8; 16]18416
bidspubkey20032
askspubkey23232
eventHeappubkey26432
oracleANonZeroPubkeyOption29632
keypubkey29632
oracleBNonZeroPubkeyOption32832
keypubkey32832
oracleConfigOracleConfig36088
confFilterf643608
maxStalenessSlotsi643688
reserved[u8; 72]37672
quoteLotSizei644488
baseLotSizei644568
seqNumu644648
registrationTimei644728
makerFeei644808
takerFeei644888
feesAccruedu12849616
feesToReferrersu12851216
referrerRebatesAccruedu645288
feesAvailableu645368
makerVolumeu12854416
takerVolumeWoOou12856016
baseMintpubkey57632
quoteMintpubkey60832
marketBaseVaultpubkey64032
baseDepositTotalu646728
marketQuoteVaultpubkey68032
quoteDepositTotalu647128
reserved[u8; 128]720128

getProgramAccounts filter

Every Market account starts with the same discriminator, so a memcmp at offset 0 selects this account type. The second filter matches marketAuthority at offset 16. A dataSize: 848 filter would also work only while live accounts still have the snapshot size; programs often add fields in upgrades, so it is left out here. getProgramAccounts on a large program is heavy; many RPC providers limit or disable it.

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getProgramAccounts",
  "params": [
    "opnb2LAfJYbRMAHHvqjCwQxanZn7ReEHp1k81EohpZb",
    {
      "encoding": "base64",
      "filters": [
        {
          "memcmp": {
            "offset": 0,
            "bytes": "dkokXHR3DTw"
          }
        },
        {
          "memcmp": {
            "offset": 16,
            "bytes": "<marketAuthority as base58>"
          }
        }
      ]
    }
  ]
}

Decode account data

Decoding runs on Rugsight's server against the bundled snapshot. Nothing is fetched from the chain. Paste public account data only; never paste a private key or seed phrase.

Other OpenBook V2 account types

OpenBook V2 instructions · Explain a transaction

Data: solana-idls@1.2.1 (MIT, © Obsidian Protocol) and SPL Token / Token-2022 state layouts (Apache-2.0), snapshot 2026-11-17. Programs can upgrade and an IDL snapshot can lag the deployed program, so check important offsets against current account data.