Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

  • cancelAllOpenOrders(program: Program<EuroPrimitive>, euroMetaKey: PublicKey, optionMintKey: PublicKey, dexProgramId: PublicKey, priceCurrencyKey: PublicKey): Promise<TransactionInstruction[]>
  • Create an array of TransactionInstructions to cancel all of the wallet's orders for a given OptionMarket and SerumMarket.

    NOTE: Current implementation does not account for Transaction packet size limitations. It is on the client to slice the instructions to be within the limits.

    Parameters

    • program: Program<EuroPrimitive>

      Anchor Program for Tokenized Euros

    • euroMetaKey: PublicKey

      The address of the EuroMeta account

    • optionMintKey: PublicKey

      The address of the option token traded on the Seurm Market

    • dexProgramId: PublicKey

      The PublicKey of the DEX program

    • priceCurrencyKey: PublicKey

      The address of the price currency mint

    Returns Promise<TransactionInstruction[]>

  • cancelOrderByClientId(program: Program<EuroPrimitive>, euroMetaKey: PublicKey, optionMintKey: PublicKey, dexProgramId: PublicKey, priceCurrencyKey: PublicKey, order: Order): Promise<TransactionInstruction>
  • Generate a TransactionInstruction for canceling an open order by the set clientId

    Parameters

    • program: Program<EuroPrimitive>

      Anchor Program for Tokenized Euros

    • euroMetaKey: PublicKey

      The address of the EuroMeta account

    • optionMintKey: PublicKey

      The address of the option token traded on the Seurm Market

    • dexProgramId: PublicKey

      The PublicKey of the DEX program

    • priceCurrencyKey: PublicKey

      The address of the price currency mint

    • order: Order

      The Serum Order to cancel

    Returns Promise<TransactionInstruction>

  • cancelOrderInstructionV2(program: Program<EuroPrimitive>, euroMetaKey: PublicKey, optionMintKey: PublicKey, dexProgramId: PublicKey, priceCurrencyKey: PublicKey, order: Order): Promise<TransactionInstruction>
  • Create a TransactionInstruction for canceling a specific order

    Parameters

    • program: Program<EuroPrimitive>

      Anchor Program for Tokenized Euros

    • euroMetaKey: PublicKey

      The address of the EuroMeta account

    • optionMintKey: PublicKey

      The address of the option token traded on the Seurm Market

    • dexProgramId: PublicKey

      The PublicKey of the DEX program

    • priceCurrencyKey: PublicKey

      The address of the price currency mint

    • order: Order

      The Serum Order to cancel

    Returns Promise<TransactionInstruction>

  • closeOpenOrdersInstruction(program: Program<EuroPrimitive>, euroMetaKey: PublicKey, optionMintKey: PublicKey, dexProgramId: PublicKey, openOrdersKey: PublicKey, priceCurrencyKey: PublicKey, solWallet?: PublicKey): Promise<TransactionInstruction>
  • Create instruction to close OpenOrders account.

    Parameters

    • program: Program<EuroPrimitive>

      Anchor Psy Tokenized Euros program

    • euroMetaKey: PublicKey

      The EuroMeta address

    • optionMintKey: PublicKey

      The address for the option mint trading

    • dexProgramId: PublicKey

      The Serum DEX program ID

    • openOrdersKey: PublicKey

      The open orders key for the account we're closing

    • priceCurrencyKey: PublicKey

      The key for the price currency mint

    • Optional solWallet: PublicKey

      OPTIONAL: pass in a different address to send the unlocked Sol to

    Returns Promise<TransactionInstruction>

  • initOpenOrdersInstruction(program: Program<EuroPrimitive>, owner: PublicKey, euroMetaKey: PublicKey, optionMintKey: PublicKey, dexProgramId: PublicKey, priceCurrencyKey: PublicKey, marketLoaderOpts?: MarketLoaderOpts): Promise<{ ix: TransactionInstruction }>
  • Create a proxied InitOpenOrdersInstruction

    Parameters

    • program: Program<EuroPrimitive>

      Anchor Psy Tokenized Euros program

    • owner: PublicKey

      The user's wallet address

    • euroMetaKey: PublicKey

      The address of the EuroMeta account

    • optionMintKey: PublicKey

      The address of the option mint that is trading

    • dexProgramId: PublicKey

      Serum DEX id

    • priceCurrencyKey: PublicKey

      The address for the price currency of the serum market

    • marketLoaderOpts: MarketLoaderOpts = ...

      options for the permissioned market loader

    Returns Promise<{ ix: TransactionInstruction }>

  • newOrderInstruction(program: Program<EuroPrimitive>, euroMetaKey: PublicKey, optionMintKey: PublicKey, dexProgramId: PublicKey, priceCurrencyKey: PublicKey, orderArguments: OrderParamsWithFeeRate<PublicKey>, marketLoaderOpts?: MarketLoaderOpts): Promise<{ openOrdersKey: PublicKey; tx: Transaction }>
  • Create a new order proxied through the Psy Tokenized Euro Protocol

    Parameters

    • program: Program<EuroPrimitive>

      Anchor Psy Tokenized Euro program

    • euroMetaKey: PublicKey

      The address of the EuroMeta account

    • optionMintKey: PublicKey

      The address of the option mint

    • dexProgramId: PublicKey

      The Serum DEX program ID

    • priceCurrencyKey: PublicKey

      The price currency mint that is used to quote the Serum market

    • orderArguments: OrderParamsWithFeeRate<PublicKey>

      The Serum OrderParams

    • marketLoaderOpts: MarketLoaderOpts = ...

      Options for the permissioned market proxy

    Returns Promise<{ openOrdersKey: PublicKey; tx: Transaction }>

  • settleFundsInstruction(program: Program<EuroPrimitive>, euroMetaKey: PublicKey, optionMintKey: PublicKey, priceCurrencyKey: PublicKey, dexProgramId: PublicKey, baseWallet: PublicKey, quoteWallet: PublicKey, serumReferralKey: PublicKey, openOrdersKey: PublicKey): Promise<TransactionInstruction>
  • Create a TransactionInstruction for the settleFunds instruction

    Parameters

    • program: Program<EuroPrimitive>

      Anchor Psy Tokenized Euros program

    • euroMetaKey: PublicKey

      The address of the EuroMeta account

    • optionMintKey: PublicKey

      The mint of the option being traded on the serum market

    • priceCurrencyKey: PublicKey

      The address of the mint that the Serum market is quoted in

    • dexProgramId: PublicKey

      The Serum DEX program ID

    • baseWallet: PublicKey

      The wallet address that contains the user's base asset tokens

    • quoteWallet: PublicKey

      The wallet address that contains the user's quote asset tokens

    • serumReferralKey: PublicKey

      The Psy American referral address for the quote asset

    • openOrdersKey: PublicKey

      The open orders keys

    Returns Promise<TransactionInstruction>

  • settleMarketFundsInstruction(program: Program<EuroPrimitive>, euroMetaKey: PublicKey, dexProgramId: PublicKey, serumMarket: Market, baseWallet: PublicKey, quoteWallet: PublicKey, openOrdersKey: PublicKey): Promise<TransactionInstruction>
  • Create a TransactionInstruction for the settleFunds instruction

    Note: this API abstracts the complexity of the serumReferralKey away.

    Parameters

    • program: Program<EuroPrimitive>

      Anchor Psy American Program

    • euroMetaKey: PublicKey

      The address of the EuroMeta account

    • dexProgramId: PublicKey

      The Serum DEX program ID

    • serumMarket: Market

      The Serum market

    • baseWallet: PublicKey

      The wallet address that contains the user's base asset tokens

    • quoteWallet: PublicKey

      The wallet address that contains the user's quote asset tokens

    • openOrdersKey: PublicKey

      The open orders keys

    Returns Promise<TransactionInstruction>

Generated using TypeDoc