Market object used for reading data from a manifest market.

Properties

address: PublicKey

Public key for the market account.

Methods

  • Get the most competitive ask price.

    Returns undefined | number

    number | undefined

  • Get the most competitive bid price

    Returns undefined | number

    number | undefined

  • Get the amount in tokens of balance that is deposited on this market, split by base, quote, and whether in orders or not.

    Parameters

    • trader: PublicKey

      PublicKey of the trader to check balance of

    Returns {
        baseOpenOrdersBalanceTokens: number;
        baseWithdrawableBalanceTokens: number;
        quoteOpenOrdersBalanceTokens: number;
        quoteWithdrawableBalanceTokens: number;
    }

    • baseOpenOrdersBalanceTokens: number
    • baseWithdrawableBalanceTokens: number
    • quoteOpenOrdersBalanceTokens: number
    • quoteWithdrawableBalanceTokens: number
  • Get the amount in tokens of balance that is deposited on this market, does not include tokens currently in open orders.

    Parameters

    • trader: PublicKey

      PublicKey of the trader to check balance of

    • isBase: boolean

      boolean for whether this is checking base or quote

    Returns number

    number in tokens

  • Check whether a given public key has a claimed seat on the market

    Parameters

    • trader: PublicKey

      PublicKey of the trader

    Returns boolean

    boolean

  • Print all information loaded about the market in a human readable format.

    Returns void

  • Gets the quote volume traded over the lifetime of the market.

    Returns bigint

    bigint

  • Updates the data in a Market.

    Parameters

    • connection: Connection

      The Solana Connection object

    Returns Promise<void>

  • Parameters

    • connection: Connection
    • baseMint: PublicKey
    • quoteMint: PublicKey

    Returns Promise<Market[]>

  • Returns a Market for a given address, a data buffer

    Parameters

    • __namedParameters: {
          address: PublicKey;
          connection: Connection;
      }
      • address: PublicKey
      • connection: Connection

    Returns Promise<Market>

  • Returns a Market for a given address, a data buffer

    Parameters

    • __namedParameters: {
          address: PublicKey;
          buffer: Buffer;
          slot?: number;
      }
      • address: PublicKey
      • buffer: Buffer
      • Optionalslot?: number

    Returns Market

  • Parameters

    • connection: Connection
    • baseMint: PublicKey
    • quoteMint: PublicKey
    • payer: PublicKey

    Returns Promise<{
        ixs: TransactionInstruction[];
        signers: Signer[];
    }>