Namespace: serum utils
Last updated
Last updated
▸ Const
deriveCoinVault(program
, optionMarketKey
, priceCurrencyKey
): Promise
<[PublicKey
, number
]>
Parameters
Name | Type |
---|---|
Returns
Promise
<[PublicKey
, number
]>
Defined in
▸ Const
deriveMarketAuthority(program
, dexProgramId
, serumMarketKey
): Promise
<[PublicKey
, number
]>
Parameters
Name | Type |
---|---|
Returns
Promise
<[PublicKey
, number
]>
Defined in
▸ Const
derivePCVault(program
, optionMarketKey
, priceCurrencyKey
): Promise
<[PublicKey
, number
]>
Parameters
Returns
Promise
<[PublicKey
, number
]>
Defined in
▸ Const
deriveRequestQueue(program
, optionMarketKey
, priceCurrencyKey
): Promise
<[PublicKey
, number
]>
Parameters
Returns
Promise
<[PublicKey
, number
]>
Defined in
▸ Const
deriveSerumMarketAddress(program
, optionMarketKey
, priceCurrencyKey
): Promise
<[PublicKey
, number
]>
Parameters
Returns
Promise
<[PublicKey
, number
]>
Defined in
▸ Const
findOpenOrdersAccountsForOwner(program
, dexProgramId
, serumMarketAddress
): Promise
<OpenOrders
[]>
Load the open orders for a user based on the Serum DEX and Serum Market address.
Parameters
Returns
Promise
<OpenOrders
[]>
Defined in
▸ Const
findOpenOrdersForOptionMarkets(program
, serumProgramId
, optionMarketKeys
, priceCurrencyKey
, optionMetaList?
): Promise
<Record
<string
, OpenOrders
>>
Load all the open orders for a user based on the Serum DEX and the option market keys.
Parameters
Returns
Promise
<Record
<string
, OpenOrders
>>
Defined in
▸ Const
getMarketAndAuthorityInfo(program
, optionMarketKey
, dexProgramId
, priceCurrencyKey
): Promise
<Object
>
Given an OptionMarket address and DEX program, generate the Serum market key, market authority, and authority bump seed.
Parameters
Returns
Promise
<Object
>
Defined in
Name | Type |
---|---|
Name | Type |
---|---|
Name | Type |
---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
program
Program
<PsyAmerican
>
optionMarketKey
PublicKey
priceCurrencyKey
PublicKey
program
Program
<PsyAmerican
>
dexProgramId
PublicKey
serumMarketKey
PublicKey
program
Program
<PsyAmerican
>
optionMarketKey
PublicKey
priceCurrencyKey
PublicKey
program
Program
<PsyAmerican
>
optionMarketKey
PublicKey
priceCurrencyKey
PublicKey
program
Program
<PsyAmerican
>
optionMarketKey
PublicKey
priceCurrencyKey
PublicKey
program
Program
<PsyAmerican
>
Anchor Psy American program
dexProgramId
PublicKey
Serum DEX program id
serumMarketAddress
PublicKey
Serum market address
program
Program
<PsyAmerican
>
Anchor Psy American program
serumProgramId
PublicKey
Serum DEX program id
optionMarketKeys
PublicKey
[]
Keys for the Psy American OptionMarket's to load the open orders from
priceCurrencyKey
PublicKey
Key of the pc (aka quote currency) from the serum markets
optionMetaList?
{ expiration
: number
; optionContractMintAddress
: string
; optionMarketAddress
: string
; optionWriterTokenMintAddress
: string
; psyOptionsProgramId
: string
; quoteAssetMint
: string
; quoteAssetPerContract
: string
; quoteAssetPoolAddress
: string
; serumMarketAddress
: string
; serumProgramId
: string
; underlyingAssetMint
: string
; underlyingAssetPerContract
: string
; underlyingAssetPoolAddress
: string
}[]
Optional list of option meta data to pull serum market data from instead of deriving the address. This is for backwards compatibility
program
Program
<PsyAmerican
>
PsyOptions American V1 Anchor program
optionMarketKey
PublicKey
The key for the OptionMarket
dexProgramId
PublicKey
Serum DEX public key
priceCurrencyKey
PublicKey
-