Options
All
  • Public
  • Public/Protected
  • All
Menu

Class OpenOrders

Open Orders class

Hierarchy

  • OpenOrders

Index

Constructors

constructor

  • new OpenOrders(address: PublicKey, market: PublicKey, owner: PublicKey, baseTokenFree: BN, baseTokenTotal: BN, quoteTokenFree: BN, quoteTokenTotal: BN, orders: BN[], accumulatedRebates: BN): OpenOrders
  • Parameters

    • address: PublicKey
    • market: PublicKey
    • owner: PublicKey
    • baseTokenFree: BN
    • baseTokenTotal: BN
    • quoteTokenFree: BN
    • quoteTokenTotal: BN
    • orders: BN[]
    • accumulatedRebates: BN

    Returns OpenOrders

Properties

Private _accumulatedRebates

_accumulatedRebates: BN

Amount of accumulated rebates

Private _address

_address: PublicKey

Address of the open orders account

Private _baseTokenFree

_baseTokenFree: BN

Amount of free base tokens

Private _baseTokenTotal

_baseTokenTotal: BN

Total amount of base tokens

Private _market

_market: PublicKey

Address of the market of the open order account

Private _orders

_orders: BN[]

List of orders of the open order account

Private _owner

_owner: PublicKey

Address of the owner of the open order account

Private _quoteTokenFree

_quoteTokenFree: BN

Amount of free quote tokens

Private _quoteTokenTotal

_quoteTokenTotal: BN

Total amount of quote tokens

Accessors

accumulatedRebates

  • get accumulatedRebates(): BN
  • Returns the amount of accumulated fee rebates

    Returns BN

address

  • get address(): PublicKey
  • Returns the address of the open order account

    Returns PublicKey

baseTokenFree

  • get baseTokenFree(): BN

baseTokenTotal

  • get baseTokenTotal(): BN

market

  • get market(): PublicKey
  • Returns the market address of the open order account

    Returns PublicKey

orders

  • get orders(): BN[]
  • Returns the list of orders of the open orders account

    Returns BN[]

owner

  • get owner(): PublicKey
  • Returns the owner of the open order account

    Returns PublicKey

quoteTokenFree

  • get quoteTokenFree(): BN

quoteTokenTotal

  • get quoteTokenTotal(): BN

Methods

makeCloseAccountTransaction

  • makeCloseAccountTransaction(): Promise<TransactionInstruction>
  • Returns Promise<TransactionInstruction>

    Returns a TransactionInstruction object to close the OpenOrder account

Static load

  • load(connection: Connection, market: PublicKey, owner: PublicKey): Promise<OpenOrders>
  • Loads the open orders account

    Parameters

    • connection: Connection

      The solana connection object to the RPC node

    • market: PublicKey

      The market address of the open orders account

    • owner: PublicKey

      The owner of the open orders account

    Returns Promise<OpenOrders>

    An OpenOrders object

Static makeCreateAccountTransaction

  • makeCreateAccountTransaction(market: PublicKey, owner: PublicKey, maxOrders?: number): Promise<TransactionInstruction>
  • Static method to make the transaction instruction that initializes an open order account

    Parameters

    • market: PublicKey

      The market address of the open orders account to initialize

    • owner: PublicKey

      The owner of the open orders account to initialize

    • maxOrders: number = 20

      The max number of open orders the account will be able to hold

    Returns Promise<TransactionInstruction>

    A TransactionInstruction object

Generated using TypeDoc