Struct MarketParam
pub struct MarketParam {
pub id: u32,
pub pair: String,
pub exponent: i32,
pub min_exchanges: u32,
pub min_price_change_ppm: u32,
pub exchange_config_json: String,
}Expand description
MarketParam represents the x/prices configuration for markets, including representing price values, resolving markets on individual exchanges, and generating price updates. This configuration is specific to the quote currency.
Fields§
§id: u32Unique, sequentially-generated value.
pair: StringThe human-readable name of the market pair (e.g. BTC-USD).
exponent: i32Static value. The exponent of the price.
For example if Exponent == -5 then a Value of 1,000,000,000
represents ``$10,000. Therefore 10 ^ Exponent` represents the smallest
price step (in dollars) that can be recorded.
Deprecated since v8.x. This value is now determined from the marketmap.
min_exchanges: u32The minimum number of exchanges that should be reporting a live price for a price update to be considered valid.
Deprecated since v8.x. This value is now determined from the marketmap.
min_price_change_ppm: u32The minimum allowable change in price value that would cause a price
update on the network. Measured as 1e-6 (parts per million).
exchange_config_json: StringA string of json that encodes the configuration for resolving the price of this market on various exchanges.
Deprecated since v8.x. This is now determined from the marketmap.
Trait Implementations§
§impl Clone for MarketParam
impl Clone for MarketParam
§fn clone(&self) -> MarketParam
fn clone(&self) -> MarketParam
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for MarketParam
impl Debug for MarketParam
§impl Default for MarketParam
impl Default for MarketParam
§fn default() -> MarketParam
fn default() -> MarketParam
§impl Message for MarketParam
impl Message for MarketParam
§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.§impl Name for MarketParam
impl Name for MarketParam
§const NAME: &'static str = "MarketParam"
const NAME: &'static str = "MarketParam"
Message.
This name is the same as it appears in the source .proto file, e.g. FooBar.§const PACKAGE: &'static str = "dydxprotocol.prices"
const PACKAGE: &'static str = "dydxprotocol.prices"
., e.g. google.protobuf.§fn full_name() -> String
fn full_name() -> String
Message.
It’s prefixed with the package name and names of any parent messages,
e.g. google.rpc.BadRequest.FieldViolation.
By default, this is the package name followed by the message name.
Fully-qualified names must be unique within a domain of Type URLs.§impl PartialEq for MarketParam
impl PartialEq for MarketParam
impl StructuralPartialEq for MarketParam
Auto Trait Implementations§
impl Freeze for MarketParam
impl RefUnwindSafe for MarketParam
impl Send for MarketParam
impl Sync for MarketParam
impl Unpin for MarketParam
impl UnwindSafe for MarketParam
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].