Struct solana_exchange_program::exchange_state::OrderInfo [−][src]
pub struct OrderInfo {
pub owner: Pubkey,
pub side: OrderSide,
pub pair: AssetPair,
pub tokens: u64,
pub price: u64,
pub tokens_settled: u64,
}
Expand description
Trade accounts are populated with this structure
Fields
owner: Pubkey
Owner of the trade order
side: OrderSide
side of the order in the market (bid/ask)
pair: AssetPair
Token pair indicating two tokens to exchange, first is primary
tokens: u64
Number of tokens to exchange; primary or secondary depending on side. Once this number goes to zero this trade order will be converted into a regular token account
price: u64
Scaled price of the secondary token given the primary is equal to the scale value If scale is 1 and price is 2 then ratio is 1:2 or 1 primary token for 2 secondary tokens
tokens_settled: u64
Number of tokens that have been settled so far. These nay be transferred to another token account by the owner.
Implementations
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for OrderInfo
impl UnwindSafe for OrderInfo
Blanket Implementations
pub default fn visit_for_abi(
&self,
digester: &mut AbiDigester
) -> Result<AbiDigester, DigestError>
pub default fn visit_for_abi(
&self,
_digester: &mut AbiDigester
) -> Result<AbiDigester, DigestError>
pub default fn example() -> T
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more