Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DexMarket

Hierarchy

  • DexMarket

Index

Constructors

  • new DexMarket(address: PublicKey, serumMarket: Market, baseCoin: Coin, quoteCoin: Coin): DexMarket

Properties

address: PublicKey
baseCoin: Coin
marketSymbol: string
quoteCoin: Coin
serumMarket: Market

Methods

  • cancelOrder(connection: Connection, owner: Keypair, serumMarket: Market, order: Order): Promise<string>
  • Parameters

    • connection: Connection
    • owner: Keypair
    • serumMarket: Market
    • order: Order

    Returns Promise<string>

  • createMarketAccountsInstructions(accounts: MarketAccounts, payer: Keypair, connection: Connection, dexProgram: PublicKey): Promise<TransactionInstruction[]>
  • Parameters

    • accounts: MarketAccounts
    • payer: Keypair
    • connection: Connection
    • dexProgram: PublicKey

    Returns Promise<TransactionInstruction[]>

  • createMarketVaultsTransaction(payer: Keypair, vaultOwner: PublicKey, baseVault: Keypair, quoteVault: Keypair, baseCoin: Coin, quoteCoin: Coin, connection: Connection): Promise<Transaction>
  • Parameters

    • payer: Keypair
    • vaultOwner: PublicKey
    • baseVault: Keypair
    • quoteVault: Keypair
    • baseCoin: Coin
    • quoteCoin: Coin
    • connection: Connection

    Returns Promise<Transaction>

  • getCancelOrderTransaction(connection: Connection, owner: Keypair, serumMarket: Market, order: Order): Promise<TransactionWithSigners>
  • getOrCreateOpenOrderAccount(owner: Keypair, serumMarket: Market, connection: Connection): Promise<OpenOrders>
  • Parameters

    • owner: Keypair
    • serumMarket: Market
    • connection: Connection

    Returns Promise<OpenOrders>

  • getPlaceOrderTransaction(connection: Connection, owner: Keypair, serumMarket: Market, side: "buy" | "sell", size: number, price: number): Promise<TransactionWithSigners>
  • load(connection: Connection, programID: PublicKey, marketAddress: PublicKey, baseCoin: Coin, quoteCoin: Coin): Promise<DexMarket>
  • Parameters

    • connection: Connection
    • programID: PublicKey
    • marketAddress: PublicKey
    • baseCoin: Coin
    • quoteCoin: Coin

    Returns Promise<DexMarket>

  • placeOrder(connection: Connection, owner: Keypair, serumMarket: Market, side: "buy" | "sell", size: number, price: number): Promise<string>
  • Parameters

    • connection: Connection
    • owner: Keypair
    • serumMarket: Market
    • side: "buy" | "sell"
    • size: number
    • price: number

    Returns Promise<string>

  • sanityCheck(serumMarket: Market, price: number, size: number): void
  • Parameters

    • serumMarket: Market
    • price: number
    • size: number

    Returns void

Generated using TypeDoc