Expand description
Orders: the wire every order type ends in (Order, PlaceOrder), what an order’s t
says, its client id, and one module per type. Keys go in the order the venue hashes:
a b p s r t c for an order, then grouping, then builder last.
Re-exports§
pub use cloid::Cloid;pub use close::Close;pub use close::close;pub use entry::OrderIntent;pub use entry::Price;pub use entry::order;pub use order_type::Grouping;pub use order_type::OrderType;pub use order_type::Tif;pub use order_type::Tpsl;pub use scale::LEAST_LEVELS;pub use scale::MOST_LEVELS;pub use scale::Scale;pub use scale::scale;pub use tpsl::Covers;pub use tpsl::TriggerIntent;pub use tpsl::trigger;pub use trigger::Exit;pub use trigger::ExitPrice;pub use trigger::TRIGGER_SLIPPAGE;pub use twap::MINIMUM_TWAP_VALUE;pub use twap::Twap;pub use twap::TwapCancel;pub use twap::TwapIntent;pub use twap::twap;pub use crate::markets::Side;
Modules§
- cloid
- A client order id: 128 bits the caller picks, written as
0xand 32 hex digits, on an order as it is placed and on the order and fills read back. - close
- Closing a position at market: reduce only, the other way,
FrontendMarket. - entry
- An entry: one order at market or at a limit, with its take profit and stop loss grouped
normalTpslwhen it has them. Each order is worth at leastMINIMUM_ORDER_VALUE. - limit
- Limit orders:
Gtc,IocorAloat a price brought onto the grid, never against the trader. A limit is neverFrontendMarket. - market
- Market orders:
FrontendMarketat the reference (the mid, or else the mark) moved by the slippage, on the grid. NeverGtc, which would rest whatever did not fill. - order_
type - What an order’s
tsays and how the orders of one action relate: a limit’s time in force, or a trigger and which way it fires, and the action’s grouping. - scale
- Scale orders: resting limits evenly spaced between two prices, the size split evenly between them, in one action.
- tpsl
- Take profit and stop loss: on their own for a fixed size (
na) or the whole position (positionTpsl), or attached to an entry (normalTpsl). - trigger
- Trigger orders: they rest off the book until the mark crosses the trigger, then fill at market within a slippage or as a limit. Every take profit and stop loss is one.
- twap
- TWAP: the venue slices an order into one every thirty seconds for 5 minutes to a day.
twapOrderandtwapCancelcarry no builder: the slices cannot name one.
Structs§
- Order
- One order on any market. Price and size go on the wire exactly as given,
so put them on the asset’s grid first (
crate::utils::Grid). - Place
Order order: one or more orders, grouped, optionally through a builder.