Struct psyoptions::market::OptionMarket [−][src]
#[repr(C)]pub struct OptionMarket {Show 13 fields
pub option_mint: Pubkey,
pub writer_token_mint: Pubkey,
pub underlying_asset_mint: Pubkey,
pub quote_asset_mint: Pubkey,
pub underlying_amount_per_contract: u64,
pub quote_amount_per_contract: u64,
pub expiration_unix_timestamp: UnixTimestamp,
pub underlying_asset_pool: Pubkey,
pub quote_asset_pool: Pubkey,
pub mint_fee_account: Pubkey,
pub exercise_fee_account: Pubkey,
pub bump_seed: u8,
pub initialized: bool,
}
Expand description
Data structure that contains all the information needed to maintain an open option market.
Fields
option_mint: Pubkey
The SPL Token mint address for the tokens that denote an option
writer_token_mint: Pubkey
The SPL Token mint address for Writer Tokens that denote a written option
underlying_asset_mint: Pubkey
The SPL Token Address that is held in the program’s pool when an option is written
quote_asset_mint: Pubkey
The SPL Token Address that denominates the strike price
underlying_amount_per_contract: u64
The amount of the underlying asset that derives a single option
quote_amount_per_contract: u64
The amount of quote asset that must be transfered when an option is exercised
expiration_unix_timestamp: UnixTimestamp
The Unix timestamp at which the contracts in this market expire
underlying_asset_pool: Pubkey
Address for the liquidity pool that contains the underlying assset
quote_asset_pool: Pubkey
Address for the liquidity pool that contains the quote asset when options are exercised
mint_fee_account: Pubkey
The SPL Token account (from the Associated Token Program) that collects fees on mint.
exercise_fee_account: Pubkey
The SPL Token account (from the Associated Token Program) that collects fees on exercise.
bump_seed: u8
Bump seed for program derived addresses
initialized: bool
whether the OptionMarket has been initialized or not
Implementations
pub fn from_account_info(
account_info: &AccountInfo<'_>,
program_id: &Pubkey
) -> Result<Self, ProgramError>
Trait Implementations
Is initialized
Get the packed length
Unpack from slice and check if initialized
Unpack from slice without checking if initialized
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for OptionMarket
impl Send for OptionMarket
impl Sync for OptionMarket
impl Unpin for OptionMarket
impl UnwindSafe for OptionMarket
Blanket Implementations
pub default fn example() -> T
Mutably borrows from an owned value. Read more