Enum psyoptions::instruction::OptionsInstruction [−][src]
#[repr(C)] pub enum OptionsInstruction { InitializeMarket { underlying_amount_per_contract: u64, quote_amount_per_contract: u64, expiration_unix_timestamp: UnixTimestamp, bump_seed: u8, }, MintCoveredCall {}, ExerciseCoveredCall {}, ClosePostExpiration {}, ClosePosition {}, ExchangeWriterTokenForQuote {}, }
Expand description
Instructions supported by the Options program
Variants
Initializes a new OptionMarket
Accounts expected by this instruction:
[]
Underlying Asset Mint[]
Quote Asset Mint[writeable]
Option Mint (uninitialized)[writeable]
Writer Token Mint (uninitialized)[writeable]
Option Market[]
Option Mint Authority[writeable]
Underlying Asset Pool (uninitialized)[writeable]
Quote Asset Pool (uninitialized)[]
Fee Owner Account - should match declaration in fees.rs[]
Mint Fee Key - An SPL Token account that recieves fees in the underlying asset[]
Rent Sysvar[]
SPL Token Program Account[]
System Program[]
SPL Associated Token Program Account
Show fields
Fields of InitializeMarket
underlying_amount_per_contract: u64
The amount of the underlying asset that derives a single contract
quote_amount_per_contract: u64
Pre-computed quote amount for the new market, equal to strike price * amount_per_contract
expiration_unix_timestamp: UnixTimestamp
The Unix timestamp at which the contracts in this market expire
bump_seed: u8
Bump Seed for the Program Derived Address
Mints an Options token to represent a Covered Call
[writeable]
Funding Account[writeable]
Option Mint[writeable]
Destination account for minted Option[writeable]
Writer Token Mint[writeable]
Destination account for minted Writer Token[writeable]
Source account forOptionWriter
’s underlying asset[writeable]
Destination account for underlying asset pool[writeable]
OptionMarket
data account[writeable]
Mint fee account (associated token address derived from thefee_owner_key
)[]
Fee owner key[signer]
Authority account for underlying asset source[]
SPL Token Program[]
Program Derived Address for the authority over the Option Mint[]
SysVar clock account[]
System Program account
Show fields
Fields of MintCoveredCall
Exercise an Options token representing a Covered Call
[]
Sysvar clock[]
SPL Token Program[]
Option Market[writeable]
Exerciser Quote Asset Source[signer]
Exerciser Authority[writeable]
Exerciser Underlying Asset Source[writeable]
Underlying Asset Pool[writeable]
Quote Asset Pool[]
Option Mint Authority[writeable]
Option Mint[writeable]
Option Token Account[signer]
Option Token Account Authority
Show fields
Fields of ExerciseCoveredCall
Close a single option contract post expiration. Transfers the underlying asset back to the Option Writer
[]
Option Market[]
Option Mint[]
Option Mint Authority[writeable]
Writer Token Mint[writeable]
Writer Token Source (to be burned)[signer]
Writer Token Source Authority[writeable]
Option Writer Underlying Asset Destination[writeable]
Underlying Asset Pool[]
Sysvar clock[]
SPL Token Program
Show fields
Fields of ClosePostExpiration
Close a single option contract prior to expiration. Burns the option token and the writer token and returns the underlying asset back to the writer (or address specified).
[]
SPL Token porgram[]
Option Market[writable]
Option Mint[]
Option Mint Authority[writable]
Option Token Source[signer]
Option Token Source Authority[writable]
Writer Token Mint[writable]
Writer Token Source[]
Writer Token Source Authority[writable]
Underlying Asset Destination[writable]
Underlying Asset Pool
Show fields
Fields of ClosePosition
Allow a user to exchange their Writer Token for Quote Asset. Burns the Writer Token and transfers the Quote Asset amount relative to the option market
[]
Option Market[]
Option Mint[]
Option Market Authority[writeable]
Writer Token Mint[writeable]
Writer Token Source (to be burned)[signer]
Writer Token Source Authority[writeable]
Quote Asset Destination[writeable]
Quote Asset Pool[]
SPL token program
Show fields
Fields of ExchangeWriterTokenForQuote
Implementations
Trait Implementations
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 OptionsInstruction
impl Send for OptionsInstruction
impl Sync for OptionsInstruction
impl Unpin for OptionsInstruction
impl UnwindSafe for OptionsInstruction