Struct solana_exchange_program::exchange_state::OrderInfo [−][src]
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
impl OrderInfo
[src][−]
pub fn pair(self, pair: AssetPair) -> Self
[src]
pub fn side(self, side: OrderSide) -> Self
[src]
pub fn tokens(self, tokens: u64) -> Self
[src]
pub fn price(self, price: u64) -> Self
[src]
Trait Implementations
impl Clone for OrderInfo
[src][+]
impl Copy for OrderInfo
[src]
impl Debug for OrderInfo
[src][+]
impl Default for OrderInfo
[src][+]
impl<'de> Deserialize<'de> for OrderInfo
[src][+]
impl Eq for OrderInfo
[src]
impl PartialEq<OrderInfo> for OrderInfo
[src][+]
impl Serialize for OrderInfo
[src][+]
impl StructuralEq for OrderInfo
[src]
impl StructuralPartialEq for OrderInfo
[src]
Auto Trait Implementations
impl RefUnwindSafe for OrderInfo
impl Send for OrderInfo
impl Sync for OrderInfo
impl Unpin for OrderInfo
impl UnwindSafe for OrderInfo
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src][+]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
impl<T> From<T> for T
[src][+]
impl<T> Instrument for T
[src][+]
impl<T> Instrument for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T> MaybeDebug for T where
T: Debug,
[src]
T: Debug,
impl<T> Pointable for T
[src][+]
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src][+]
T: Clone,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,
impl<T> Typeable for T where
T: Any,
[+]
T: Any,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src][+]
V: MultiLane<T>,