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

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Is initialized

The length, in bytes, of the packed representation

Get the packed length

Unpack from slice and check if initialized

Unpack from slice without checking if initialized

Pack into slice

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.