Skip to main content

SpotEvent

Enum SpotEvent 

Source
pub enum SpotEvent {
    SpotNewMarketPrice {
        client_ids: Vec<Vec<u8>>,
        pair_id: Vec<u8>,
        base_asset_id: Vec<u8>,
        quote_asset_id: Vec<u8>,
        price: u64,
        timestamp: i64,
    },
    SpotPairRebate {
        pair_id: Vec<u8>,
        base_asset_id: Vec<u8>,
        quote_asset_id: Vec<u8>,
        price: u64,
        is_bid: bool,
        account_id: Vec<u8>,
        is_maker: bool,
        fee_bps: i16,
        base_volume: u64,
        quote_volume: u64,
        timestamp: i64,
    },
    SpotPairClientAccountChanged {
        pair_id: Vec<u8>,
        cid: Option<Vec<u8>>,
        admin_account_id: Option<Vec<u8>>,
        fee_account_id: Option<Vec<u8>>,
        timestamp: i64,
    },
    SpotPairAdded {
        cid: Vec<u8>,
        pair_id: Vec<u8>,
        timestamp: i64,
    },
    Transfer {
        cid: Vec<u8>,
        from: Vec<u8>,
        to: Vec<u8>,
        asset: Vec<u8>,
        amnt: u64,
        timestamp: i64,
    },
    SpotPriceLevelChanged {
        pair_id: Vec<u8>,
        is_bid: bool,
        price: u64,
        pqty: u64,
        cqty: u64,
        timestamp: i64,
    },
    SpotOrderPlaced {
Show 14 fields cid: Vec<u8>, pair_id: Vec<u8>, base_asset_id: Vec<u8>, quote_asset_id: Vec<u8>, order_id: Vec<u8>, maker_account_id: Vec<u8>, is_bid: bool, price: u64, amnt: u64, iqty: u64, cqty: u64, pqty: u64, timestamp: i64, expires_at: i64,
}, SpotOrderPartiallyFilled {
Show 25 fields is_taker_event: bool, taker_cid: Vec<u8>, maker_cid: Vec<u8>, taker_order_id: Vec<u8>, maker_order_id: Vec<u8>, taker_account_id: Vec<u8>, maker_account_id: Vec<u8>, taker_order_is_bid: bool, maker_order_is_bid: bool, price: u64, pair_id: Vec<u8>, base_asset_id: Vec<u8>, quote_asset_id: Vec<u8>, base_volume: u64, quote_volume: u64, base_fee: u64, quote_fee: u64, maker_fee_bps: i16, taker_fee_bps: i16, amnt: u64, iqty: u64, pqty: u64, cqty: u64, timestamp: i64, expires_at: i64,
}, SpotOrderFullyFilled {
Show 25 fields is_taker_event: bool, taker_cid: Vec<u8>, maker_cid: Vec<u8>, taker_order_id: Vec<u8>, maker_order_id: Vec<u8>, maker_account_id: Vec<u8>, taker_account_id: Vec<u8>, taker_order_is_bid: bool, maker_order_is_bid: bool, price: u64, pair_id: Vec<u8>, base_asset_id: Vec<u8>, quote_asset_id: Vec<u8>, base_volume: u64, quote_volume: u64, base_fee: u64, quote_fee: u64, maker_fee_bps: i16, taker_fee_bps: i16, amnt: u64, iqty: u64, pqty: u64, cqty: u64, timestamp: i64, expires_at: i64,
}, SpotOrderCancelled { cid: Vec<u8>, order_id: Vec<u8>, maker_account_id: Vec<u8>, is_bid: bool, price: u64, amnt: u64, iqty: u64, pqty: u64, cqty: u64, timestamp: i64, expires_at: i64, }, SpotOrderExpired { cid: Vec<u8>, order_id: Vec<u8>, maker_account_id: Vec<u8>, is_bid: bool, price: u64, amnt: u64, iqty: u64, pqty: u64, cqty: u64, timestamp: i64, expires_at: i64, }, SpotOrderIcebergQuantityChanged { cid: Vec<u8>, order_id: Vec<u8>, amnt: u64, iqty: u64, pqty: u64, cqty: u64, timestamp: i64, expires_at: i64, }, }

Variants§

§

SpotNewMarketPrice

New market price event in Spot

Fields

§client_ids: Vec<Vec<u8>>

client id multiple client ids can be provided for the same event

§pair_id: Vec<u8>

pair id

§base_asset_id: Vec<u8>

base asset id

§quote_asset_id: Vec<u8>

quote asset id

§price: u64

price

§timestamp: i64

timestamp in milliseconds i64 is chosen because of js type compatibility

§

SpotPairRebate

Spot pair rebate happened when maker fee bps is lower than 0

Fields

§pair_id: Vec<u8>

pair id

§base_asset_id: Vec<u8>

base asset id

§quote_asset_id: Vec<u8>

quote asset id

§price: u64

price

§is_bid: bool

is bid

§account_id: Vec<u8>

account id

§is_maker: bool

happened on maker/taker side

§fee_bps: i16

fee bps

§base_volume: u64

asset volume

§quote_volume: u64

quote volume

§timestamp: i64

timestamp

§

SpotPairClientAccountChanged

Spot pair client account changed

Fields

§pair_id: Vec<u8>

pair id

§cid: Option<Vec<u8>>

client id

§admin_account_id: Option<Vec<u8>>

admin account id

§fee_account_id: Option<Vec<u8>>

fee account id

§timestamp: i64

timestamp i64 is chosen because of js type compatibility

§

SpotPairAdded

Pair added to the matching engine

Fields

§cid: Vec<u8>

client id

§pair_id: Vec<u8>

pair id

§timestamp: i64

timestamp i64 is chosen because of js type compatibility

§

Transfer

Transfer event from an account to another account

Fields

§cid: Vec<u8>

client id

§from: Vec<u8>

from account id

§to: Vec<u8>

to account id

§asset: Vec<u8>

asset id

§amnt: u64

amount

§timestamp: i64

timestamp

§

SpotPriceLevelChanged

Spot order block changed in the orderbook

Fields

§pair_id: Vec<u8>

pair id

§is_bid: bool

is bid

§price: u64

price

§pqty: u64

public quantity

§cqty: u64

current quantity

§timestamp: i64

timestamp

§

SpotOrderPlaced

Spot order placed in the orderbook being a maker

Fields

§cid: Vec<u8>

client id

§pair_id: Vec<u8>

pair id

§base_asset_id: Vec<u8>

base asset id

§quote_asset_id: Vec<u8>

quote asset id

§order_id: Vec<u8>

order id

§maker_account_id: Vec<u8>

maker account id

§is_bid: bool

maker order is bid

§price: u64

price

§amnt: u64

whole amount

§iqty: u64

iceberg quantity

§cqty: u64

current quantity

§pqty: u64

public quantity

§timestamp: i64

timestamp, i64 is chosen because of js type compatibility

§expires_at: i64

expires at timestamp, i64 is chosen because of js type compatibility

§

SpotOrderPartiallyFilled

Spot order partially filled in the orderbook being a taker for taker spot order history

Fields

§is_taker_event: bool

whether the event is for a taker order

§taker_cid: Vec<u8>

taker client id

§maker_cid: Vec<u8>

maker client id

§taker_order_id: Vec<u8>

taker order id

§maker_order_id: Vec<u8>

maker order id

§taker_account_id: Vec<u8>

maker account id

§maker_account_id: Vec<u8>

taker account id

§taker_order_is_bid: bool

taker order is bid

§maker_order_is_bid: bool

maker order is bid

§price: u64

price

§pair_id: Vec<u8>

pair id

§base_asset_id: Vec<u8>

base asset id

§quote_asset_id: Vec<u8>

quote asset id

§base_volume: u64

base volume

§quote_volume: u64

quote volume

§base_fee: u64

base fee

§quote_fee: u64

quote fee

§maker_fee_bps: i16

maker fee bps

§taker_fee_bps: i16

taker fee bps

§amnt: u64

whole amount

§iqty: u64

iceberg quantity

§pqty: u64

public quantity

§cqty: u64

current quantity

§timestamp: i64

timestamp, i64 is chosen because of js type compatibility

§expires_at: i64

expires at timestamp, i64 is chosen because of js type compatibility

§

SpotOrderFullyFilled

Spot order fully filled in the orderbook being a taker for taker spot order history

Fields

§is_taker_event: bool

whether the event is for a taker order

§taker_cid: Vec<u8>

taker client id

§maker_cid: Vec<u8>

maker client id

§taker_order_id: Vec<u8>

taker order id

§maker_order_id: Vec<u8>

maker order id

§maker_account_id: Vec<u8>

maker account id

§taker_account_id: Vec<u8>

taker account id

§taker_order_is_bid: bool

taker order is bid

§maker_order_is_bid: bool

maker order is bid

§price: u64

price

§pair_id: Vec<u8>

pair id

§base_asset_id: Vec<u8>

base asset id

§quote_asset_id: Vec<u8>

quote asset id

§base_volume: u64

base volume

§quote_volume: u64

quote volume

§base_fee: u64

base fee

§quote_fee: u64

quote fee

§maker_fee_bps: i16

maker fee bps

§taker_fee_bps: i16

taker fee bps

§amnt: u64

whole amount

§iqty: u64

iceberg quantity

§pqty: u64

public quantity

§cqty: u64

current quantity

§timestamp: i64

timestamp, i64 is chosen because of js type compatibility

§expires_at: i64

expires at timestamp, i64 is chosen because of js type compatibility

§

SpotOrderCancelled

Spot order cancelled in the orderbook regardless of being a maker or taker

Fields

§cid: Vec<u8>

client id

§order_id: Vec<u8>

order id

§maker_account_id: Vec<u8>

maker account id

§is_bid: bool

is bid

§price: u64

price

§amnt: u64

whole amount

§iqty: u64

iceberg quantity

§pqty: u64

public quantity

§cqty: u64

current quantity

§timestamp: i64

timestamp, i64 is chosen because of js type compatibility

§expires_at: i64

expires at timestamp, i64 is chosen because of js type compatibility

§

SpotOrderExpired

Spot order expired in the orderbook regardless of being a maker

Fields

§cid: Vec<u8>

client id

§order_id: Vec<u8>

order id

§maker_account_id: Vec<u8>

maker account id

§is_bid: bool

is bid

§price: u64

price

§amnt: u64

whole amount

§iqty: u64

iceberg quantity

§pqty: u64

public quantity

§cqty: u64

current quantity

§timestamp: i64

timestamp, i64 is chosen because of js type compatibility

§expires_at: i64

expires at timestamp, i64 is chosen because of js type compatibility

§

SpotOrderIcebergQuantityChanged

Fields

§cid: Vec<u8>

client id

§order_id: Vec<u8>

order id

§amnt: u64

whole initial amount

§iqty: u64

iceberg quantity

§pqty: u64

public quantity

§cqty: u64

current quantity

§timestamp: i64

timestamp, i64 is chosen because of js type compatibility

§expires_at: i64

expires at timestamp, i64 is chosen because of js type compatibility

Trait Implementations§

Source§

impl Clone for SpotEvent

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SpotEvent

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for SpotEvent

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for SpotEvent

Source§

impl PartialEq for SpotEvent

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for SpotEvent

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for SpotEvent

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

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

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V