Skip to main content
OrderBook
ferromatch_
core
0.2.0
Order
Book
Fields
symbol
Associated Functions
new
with_max_order_id
with_max_order_id_and_capacity
with_capacity
Methods
best_ask
best_bid
cancel
contains_order
depth
max_order_id
order_count
recover_order
set_next_fill_id
spread
submit
submit_ext
submit_limit
submit_limit_with_tif
Auto Trait Implementations
Freeze
RefUnwindSafe
Send
Sync
Unpin
UnsafeUnpin
UnwindSafe
Blanket Implementations
Any
Borrow<T>
BorrowMut<T>
From<T>
Into<U>
TryFrom<U>
TryInto<U>
In ferromatch_
core::
book
ferromatch_core
::
book
Struct
Order
Book
Copy item path
pub struct OrderBook { pub symbol:
String
,
/* private fields */
}
Fields
§
§
symbol:
String
Implementations
§
§
impl
OrderBook
pub fn
new
(symbol: &
str
) -> Self
pub fn
with_max_order_id
(symbol: &
str
, max_order_id:
usize
) -> Self
pub fn
with_max_order_id_and_capacity
( symbol: &
str
, max_order_id:
usize
, order_capacity:
usize
, ) -> Self
pub fn
with_capacity
(symbol: &
str
, order_capacity:
usize
) -> Self
pub fn
submit_limit
( &mut self, order_id:
u64
, price:
i64
, quantity:
u64
, side:
Side
, ) ->
Result
<
MatchResult
,
MatchError
>
pub fn
submit_limit_with_tif
( &mut self, order_id:
u64
, price:
i64
, quantity:
u64
, side:
Side
, time_in_force:
TimeInForce
, ) ->
Result
<
MatchResult
,
MatchError
>
pub fn
submit
(&mut self, order:
Order
) ->
Result
<
MatchResult
,
MatchError
>
pub fn
submit_ext
(&mut self, order:
Order
) ->
Result
<
MatchResultExt
,
MatchError
>
pub fn
recover_order
(&mut self, order:
Order
) ->
Result
<
()
,
MatchError
>
pub fn
max_order_id
(&self) ->
usize
pub fn
set_next_fill_id
(&mut self, next_fill_id:
u64
)
pub fn
cancel
(&mut self, order_id:
u64
) ->
Result
<
Order
,
MatchError
>
pub fn
best_bid
(&self) ->
Option
<
i64
>
pub fn
best_ask
(&self) ->
Option
<
i64
>
pub fn
spread
(&self) ->
Option
<
i64
>
pub fn
depth
(&self, side:
Side
, levels:
usize
) ->
Vec
<(
i64
,
u64
)>
pub fn
order_count
(&self) ->
usize
pub fn
contains_order
(&self, order_id:
u64
) ->
bool
Auto Trait Implementations
§
§
impl
Freeze
for
OrderBook
§
impl
RefUnwindSafe
for
OrderBook
§
impl
Send
for
OrderBook
§
impl
Sync
for
OrderBook
§
impl
Unpin
for
OrderBook
§
impl
UnsafeUnpin
for
OrderBook
§
impl
UnwindSafe
for
OrderBook
Blanket Implementations
§
§
impl<T>
Any
for T
where T: 'static + ?
Sized
,
§
fn
type_id
(&self) ->
TypeId
§
impl<T>
Borrow
<T> for T
where T: ?
Sized
,
§
fn
borrow
(&self) ->
&T
§
impl<T>
BorrowMut
<T> for T
where T: ?
Sized
,
§
fn
borrow_mut
(&mut self) ->
&mut T
§
impl<T>
From
<T> for T
§
fn
from
(t: T) -> T
§
impl<T, U>
Into
<U> for T
where U:
From
<T>,
§
fn
into
(self) -> U
§
impl<T, U>
TryFrom
<U> for T
where U:
Into
<T>,
§
type
Error
=
Infallible
§
fn
try_from
(value: U) ->
Result
<T, <T as
TryFrom
<U>>::
Error
>
§
impl<T, U>
TryInto
<U> for T
where U:
TryFrom
<T>,
§
type
Error
= <U as
TryFrom
<T>>::
Error
§
fn
try_into
(self) ->
Result
<U, <U as
TryFrom
<T>>::
Error
>