deepbook-margin-orders
Installation
SKILL.md
DeepBook Margin: Trading & Orders
The pool_proxy module provides wrapper functions that allow a MarginManager to place, modify, and cancel orders on DeepBook V3 trading pools. It also exposes interfaces for staking, governance, and rebate collections.
1. Move Smart Contract API
All actions require the MarginManager to be associated with the target DeepBook trading pool.
Order Placement
public fun place_limit_order<BaseAsset, QuoteAsset>(manager: &mut MarginManager, pool: &mut Pool<BaseAsset, QuoteAsset>, price: u64, quantity: u64, is_bid: bool, expire_timestamp: u64, restriction: u8, self_matching_option: u8, clock: &Clock, ctx: &mut TxContext)Places a limit order. Active borrow positions are verified against risk limits dynamically.public fun place_market_order<BaseAsset, QuoteAsset>(manager: &mut MarginManager, pool: &mut Pool<BaseAsset, QuoteAsset>, quantity: u64, is_bid: bool, self_matching_option: u8, clock: &Clock, ctx: &mut TxContext)Places a market order.