Skip to main content

TickerResponse

Struct TickerResponse 

Source
pub struct TickerResponse {
Show 33 fields pub symbol: String, pub last_quantity_e9: String, pub last_time_at_millis: i64, pub last_price_e9: String, pub last_funding_rate_e9: String, pub next_funding_time_at_millis: i64, pub avg_funding_rate8hr_e9: String, pub oracle_price_e9: String, pub oracle_price_direction: i64, pub mark_price_e9: String, pub mark_price_direction: i64, pub market_price_e9: String, pub market_price_direction: i32, pub best_bid_price_e9: String, pub best_bid_quantity_e9: String, pub best_ask_price_e9: String, pub best_ask_quantity_e9: String, pub open_interest_e9: String, pub high_price24hr_e9: String, pub low_price24hr_e9: String, pub volume24hr_e9: String, pub quote_volume24hr_e9: String, pub close_price24hr_e9: String, pub open_price24hr_e9: String, pub close_time24hr_at_millis: i64, pub open_time24hr_at_millis: i64, pub first_id24hr: i64, pub last_id24hr: i64, pub count24hr: String, pub price_change24hr_e9: String, pub price_change_percent24hr_e9: String, pub updated_at_millis: i64, pub estimated_funding_rate_e9: String,
}

Fields§

§symbol: String

Market symbol.

§last_quantity_e9: String

Last trade quantity (e9 format).

§last_time_at_millis: i64

Last trade time in milliseconds.

§last_price_e9: String

Last trade price (e9 format).

§last_funding_rate_e9: String

Funding rate value (e9 format).

§next_funding_time_at_millis: i64

Time in milliseconds of next funding rate update.

§avg_funding_rate8hr_e9: String

8 hr average funding rate (e9 format).

§oracle_price_e9: String

Oracle price of the asset (e9 format).

§oracle_price_direction: i64

Direction of oracle price computed by comparing current oracle price to last oracle price. 0 = no change, -1 = negative trend (current < last), 1 positive trend (current > last).

§mark_price_e9: String

Mark price on the exchange (e9 format).

§mark_price_direction: i64

Direction of mark price computed by comparing current mark price to last mark price. 0 = no change, -1 = negative trend (current < last), 1 positive trend (current > last).

§market_price_e9: String

Simple average of bestBid and bestAsk. lastPrice if either is not present (e9 format).

§market_price_direction: i32

Direction of market price computed by comparing current market price to last market price. 0 = no change, -1 = negative trend (current < last), 1 positive trend (current > last).

§best_bid_price_e9: String

Best bid price (e9 format).

§best_bid_quantity_e9: String

Best bid quantity (e9 format).

§best_ask_price_e9: String

Best ask price (e9 format).

§best_ask_quantity_e9: String

Best ask quantity (e9 format).

§open_interest_e9: String

Open interest value (e9 format).

§high_price24hr_e9: String

Highest Price in the last 24hrs (e9 format).

§low_price24hr_e9: String

Lowest Price in the last 24hrs (e9 format).

§volume24hr_e9: String

Total market volume in last 24hrs of asset (e9 format).

§quote_volume24hr_e9: String

Total market volume in last 24hrs in USDC (e9 format).

§close_price24hr_e9: String

Close price 24hrs ago (e9 format).

§open_price24hr_e9: String

Open price in the last 24hrs (e9 format).

§close_time24hr_at_millis: i64

24 hour close time in milliseconds.

§open_time24hr_at_millis: i64

24 hour open time in milliseconds.

§first_id24hr: i64

First trade id in 24hr.

§last_id24hr: i64

Last trade id in 24hr.

§count24hr: String

Total number of trades in 24hr.

§price_change24hr_e9: String

24hr Market price change (e9 format).

§price_change_percent24hr_e9: String

24hr Market price change in percentage (e9 format).

§updated_at_millis: i64

Last update time in milliseconds.

§estimated_funding_rate_e9: String

Live estimated funding rate based on current hour’s average market and oracle prices (e9 format).

Implementations§

Source§

impl TickerResponse

Source

pub fn new( symbol: String, last_quantity_e9: String, last_time_at_millis: i64, last_price_e9: String, last_funding_rate_e9: String, next_funding_time_at_millis: i64, avg_funding_rate8hr_e9: String, oracle_price_e9: String, oracle_price_direction: i64, mark_price_e9: String, mark_price_direction: i64, market_price_e9: String, market_price_direction: i32, best_bid_price_e9: String, best_bid_quantity_e9: String, best_ask_price_e9: String, best_ask_quantity_e9: String, open_interest_e9: String, high_price24hr_e9: String, low_price24hr_e9: String, volume24hr_e9: String, quote_volume24hr_e9: String, close_price24hr_e9: String, open_price24hr_e9: String, close_time24hr_at_millis: i64, open_time24hr_at_millis: i64, first_id24hr: i64, last_id24hr: i64, count24hr: String, price_change24hr_e9: String, price_change_percent24hr_e9: String, updated_at_millis: i64, estimated_funding_rate_e9: String, ) -> TickerResponse

Trait Implementations§

Source§

impl Clone for TickerResponse

Source§

fn clone(&self) -> TickerResponse

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for TickerResponse

Source§

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

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

impl Default for TickerResponse

Source§

fn default() -> TickerResponse

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for TickerResponse

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 PartialEq for TickerResponse

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for TickerResponse

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 TickerResponse

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

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