Namespace: serum utils
Functions
deriveCoinVault
▸ Const
deriveCoinVault(program
, optionMarketKey
, priceCurrencyKey
): Promise
<[PublicKey
, number
]>
Parameters
Name | Type |
---|---|
| |
|
|
|
|
Returns
Promise
<[PublicKey
, number
]>
Defined in
deriveMarketAuthority
▸ Const
deriveMarketAuthority(program
, dexProgramId
, serumMarketKey
): Promise
<[PublicKey
, number
]>
Parameters
Name | Type |
---|---|
| |
|
|
|
|
Returns
Promise
<[PublicKey
, number
]>
Defined in
derivePCVault
▸ Const
derivePCVault(program
, optionMarketKey
, priceCurrencyKey
): Promise
<[PublicKey
, number
]>
Parameters
Name | Type |
---|---|
| |
|
|
|
|
Returns
Promise
<[PublicKey
, number
]>
Defined in
deriveRequestQueue
▸ Const
deriveRequestQueue(program
, optionMarketKey
, priceCurrencyKey
): Promise
<[PublicKey
, number
]>
Parameters
Name | Type |
---|---|
| |
|
|
|
|
Returns
Promise
<[PublicKey
, number
]>
Defined in
deriveSerumMarketAddress
▸ Const
deriveSerumMarketAddress(program
, optionMarketKey
, priceCurrencyKey
): Promise
<[PublicKey
, number
]>
Parameters
Name | Type |
---|---|
| |
|
|
|
|
Returns
Promise
<[PublicKey
, number
]>
Defined in
findOpenOrdersAccountsForOwner
▸ Const
findOpenOrdersAccountsForOwner(program
, dexProgramId
, serumMarketAddress
): Promise
<OpenOrders
[]>
Load the open orders for a user based on the Serum DEX and Serum Market address.
Parameters
Name | Type | Description |
---|---|---|
| Anchor Psy American program | |
|
| Serum DEX program id |
|
| Serum market address |
Returns
Promise
<OpenOrders
[]>
Defined in
findOpenOrdersForOptionMarkets
▸ 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
Name | Type | Description |
---|---|---|
| Anchor Psy American program | |
|
| Serum DEX program id |
|
| Keys for the Psy American OptionMarket's to load the open orders from |
|
| Key of the pc (aka quote currency) from the serum markets |
| { | Optional list of option meta data to pull serum market data from instead of deriving the address. This is for backwards compatibility |
Returns
Promise
<Record
<string
, OpenOrders
>>
Defined in
getMarketAndAuthorityInfo
▸ 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
Name | Type | Description |
---|---|---|
| PsyOptions American V1 Anchor program | |
|
| The key for the OptionMarket |
|
| Serum DEX public key |
|
| - |
Returns
Promise
<Object
>
Defined in
Last updated