pub enum Action<'a> {
Order(OrderRequest<'a>, bool),
Amend(AmendOrderRequest<'a>, bool),
Cancel(CancelOrderRequest<'a>, bool),
}Expand description
Creates an order with various options for different account types and contract types.
§Account Coverage
- Unified account: Spot, USDT perpetual, USDC contract, Inverse contract, Option
- Classic account: Spot, USDT perpetual, Inverse contract
§Order Types
- Limit Order: Must specify quantity and price.
- Market Order: Executes at the best market price. Price parameter can be empty.
- Conditional Order: Set
triggerPriceto convert to a conditional order.
§Time In Force Strategies
- GTC (Good Till Cancelled)
- IOC (Immediate Or Cancel)
- FOK (Fill Or Kill)
- PostOnly: Cancelled if it would be filled immediately when submitted.
§Take Profit / Stop Loss
- Can be set during order placement and modified later.
§Order Quantity
- Only positive numbers are supported for perpetual contract orders.
§Order Price
- Required for limit orders. Must be higher than liquidation price if in position.
§Order Link ID
- Custom active order ID up to 36 characters.
§Order Limits
- Futures: 500 active orders per contract, 10 conditional orders per account.
- Spot: 500 total orders, 30 open TP/SL orders, 30 open conditional orders.
- Option: 50 open orders.
§Rate Limit
- Refer to the rate limit table. Contact client manager for increases.
§Risk Control
- Bybit monitors API requests. Exceeding daily limits may lead to restrictions.
§Spot Stop Order in Different Account Types
- Classic account: New order ID upon stop order trigger.
- Unified account: Order ID remains unchanged upon stop order trigger.
Variants§
Order(OrderRequest<'a>, bool)
Amend(AmendOrderRequest<'a>, bool)
Cancel(CancelOrderRequest<'a>, bool)
Auto Trait Implementations§
impl<'a> Freeze for Action<'a>
impl<'a> RefUnwindSafe for Action<'a>
impl<'a> Send for Action<'a>
impl<'a> Sync for Action<'a>
impl<'a> Unpin for Action<'a>
impl<'a> UnwindSafe for Action<'a>
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