[][src]Struct solana_exchange_api::exchange_state::OrderInfo

pub struct OrderInfo {
    pub owner: Pubkey,
    pub side: OrderSide,
    pub pair: AssetPair,
    pub tokens: u64,
    pub price: u64,
    pub tokens_settled: u64,
}

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.

Methods

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 Default for OrderInfo[src]

impl Eq for OrderInfo[src]

impl PartialEq<OrderInfo> for OrderInfo[src]

impl Debug for OrderInfo[src]

impl StructuralPartialEq for OrderInfo[src]

impl StructuralEq for OrderInfo[src]

impl Serialize for OrderInfo[src]

impl<'de> Deserialize<'de> for OrderInfo[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> Clear for T where
    T: InitializableFromZeroed + ?Sized

impl<T> InitializableFromZeroed for T where
    T: Default

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err