pub struct OrderMarketParams {
pub atomic_resolution: i32,
pub clob_pair_id: u32,
pub oracle_price: Option<Decimal>,
pub quantum_conversion_exponent: i32,
pub step_base_quantums: u64,
pub subticks_per_tick: u32,
}Expand description
Market parameters required for price and size quantizations.
These quantizations are required for Order placement.
See also how to interpret block data for trades.
Fields§
§atomic_resolution: i32Atomic resolution.
clob_pair_id: u32CLOB pair ID.
oracle_price: Option<Decimal>Oracle price.
quantum_conversion_exponent: i32Quantum conversion exponent.
step_base_quantums: u64Step base quantums.
subticks_per_tick: u32Subticks per tick.
Implementations§
Source§impl OrderMarketParams
impl OrderMarketParams
Sourcepub fn quantize_price(&self, price: Decimal) -> Result<u64, Error>
pub fn quantize_price(&self, price: Decimal) -> Result<u64, Error>
Sourcepub fn quantize_quantity(&self, quantity: Decimal) -> Result<u64, Error>
pub fn quantize_quantity(&self, quantity: Decimal) -> Result<u64, Error>
Sourcepub fn clob_pair_id(&self) -> u32
pub fn clob_pair_id(&self) -> u32
Get orderbook pair id.
Trait Implementations§
Source§impl Clone for OrderMarketParams
impl Clone for OrderMarketParams
Source§fn clone(&self) -> OrderMarketParams
fn clone(&self) -> OrderMarketParams
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for OrderMarketParams
impl RefUnwindSafe for OrderMarketParams
impl Send for OrderMarketParams
impl Sync for OrderMarketParams
impl Unpin for OrderMarketParams
impl UnwindSafe for OrderMarketParams
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
Mutably borrows from an owned value. Read more
§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)
🔬This is a nightly-only experimental API. (
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>
Converts
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>
Converts
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>
Wrap the input message
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>,
Applies the layer to a service and wraps it in [
Layered].