MarketData is all information stored on a market account.

interface MarketData {
    asks: RestingOrder[];
    baseMint: PublicKey;
    baseMintDecimals: number;
    bids: RestingOrder[];
    claimedSeats: ClaimedSeat[];
    numBytesAllocated: number;
    orderSequenceNumber: bigint;
    quoteMint: PublicKey;
    quoteMintDecimals: number;
    quoteVolumeAtoms: bigint;
    version: number;
}

Properties

asks: RestingOrder[]

Sorted array of resting orders for asks currently on the orderbook.

baseMint: PublicKey

Public key for the base mint.

baseMintDecimals: number

Number of decimals for the baseMint (i.e. baseMintDecimals = 6 -> 1 baseAtom = .000001 baseToken).

bids: RestingOrder[]

Sorted array of resting orders for bids currently on the orderbook.

claimedSeats: ClaimedSeat[]

Array of all claimed seats.

numBytesAllocated: number

Number of bytes used in the dynamic portion of the market account.

orderSequenceNumber: bigint

Current next order sequence number.

quoteMint: PublicKey

Public key for the quote mint.

quoteMintDecimals: number

Number of decimals for the quoteMint (i.e. quoteMintDecimals = 6 -> 1 quoteAtom = .000001 quoteToken).

quoteVolumeAtoms: bigint

Quote volume in atoms.

version: number

Version of the struct, included in case features are added later which use the padding.