#[repr(C)]pub struct TradeData {Show 23 fields
pub flags: u8,
pub padding_0: [u8; 7],
pub trade_id: u64,
pub authority: Pubkey,
pub store: Pubkey,
pub market_token: Pubkey,
pub user: Pubkey,
pub position: Pubkey,
pub order: Pubkey,
pub final_output_token: Pubkey,
pub ts: i64,
pub slot: u64,
pub before: PositionState,
pub after: PositionState,
pub transfer_out: TransferOut,
pub padding_1: [u8; 8],
pub prices: TradePrices,
pub execution_price: u128,
pub price_impact_value: i128,
pub price_impact_diff: u128,
pub pnl: TradePnl,
pub fees: TradeFees,
pub output_amounts: TradeOutputAmounts,
}Expand description
Trade event data.
Fields§
§flags: u8§padding_0: [u8; 7]§trade_id: u64§store: Pubkey§market_token: Pubkey§user: Pubkey§position: Pubkey§order: Pubkey§final_output_token: Pubkey§ts: i64§slot: u64§before: PositionState§after: PositionState§transfer_out: TransferOut§padding_1: [u8; 8]§prices: TradePrices§execution_price: u128§price_impact_value: i128§price_impact_diff: u128§pnl: TradePnl§fees: TradeFees§output_amounts: TradeOutputAmountsTrait Implementations§
Source§impl AccountDeserialize for TradeData
impl AccountDeserialize for TradeData
Source§fn try_deserialize(buf: &mut &[u8]) -> Result<Self>
fn try_deserialize(buf: &mut &[u8]) -> Result<Self>
Deserializes previously initialized account data. Should fail for all
uninitialized accounts, where the bytes are zeroed. Implementations
should be unique to a particular account type so that one can never
successfully deserialize the data of one account type into another.
For example, if the SPL token program were to implement this trait,
it should be impossible to deserialize a
Mint account into a token
Account.Source§fn try_deserialize_unchecked(buf: &mut &[u8]) -> Result<Self>
fn try_deserialize_unchecked(buf: &mut &[u8]) -> Result<Self>
Deserializes account data without checking the account discriminator.
This should only be used on account initialization, when the bytes of
the account are zeroed.
Source§impl Discriminator for TradeData
impl Discriminator for TradeData
Source§const DISCRIMINATOR: &'static [u8]
const DISCRIMINATOR: &'static [u8]
Discriminator slice. Read more
impl Copy for TradeData
impl Pod for TradeData
impl ZeroCopy for TradeData
Auto Trait Implementations§
impl Freeze for TradeData
impl RefUnwindSafe for TradeData
impl Send for TradeData
impl Sync for TradeData
impl Unpin for TradeData
impl UnwindSafe for TradeData
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.