pub struct Order {
pub side: Side,
pub status: Status,
pub arr_time: Nanos,
pub end_time: Nanos,
pub vol: Vol,
pub start_vol: Vol,
pub price: Price,
pub trader_id: TraderId,
pub order_id: OrderId,
}Expand description
Order data
Fields§
§side: SideOrder side
status: StatusStatus of the order
arr_time: NanosArrival time of the order
end_time: NanosEnd time of the order (filled, cancelled etc.)
vol: VolCurrent volume of the order
start_vol: VolOriginal volume when the order was placed
price: PricePrice of the order
trader_id: TraderIdId of the trader/agent who placed the order
order_id: OrderIdId of the order
Implementations§
Source§impl Order
impl Order
Sourcepub fn buy_limit(
t: Nanos,
vol: Vol,
price: Price,
trader_id: TraderId,
order_id: OrderId,
) -> Order
pub fn buy_limit( t: Nanos, vol: Vol, price: Price, trader_id: TraderId, order_id: OrderId, ) -> Order
Initialise a buy limit-order
§Arguments
t- Order creation timevol- Order volumeprice- Limit price of the ordertrader_id- Id of the agent/traderorder_id- Id of the order
Sourcepub fn buy_market(
t: Nanos,
vol: Vol,
trader_id: TraderId,
order_id: OrderId,
) -> Order
pub fn buy_market( t: Nanos, vol: Vol, trader_id: TraderId, order_id: OrderId, ) -> Order
Initialise a buy market-order
§Arguments
t- Order creation timevol- Order volumetrader_id- Id of the agent/traderorder_id- Id of the order
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Order
impl<'de> Deserialize<'de> for Order
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for Order
Auto Trait Implementations§
impl Freeze for Order
impl RefUnwindSafe for Order
impl Send for Order
impl Sync for Order
impl Unpin for Order
impl UnwindSafe for Order
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more