Orders
The pool_proxy module provides wrapper functions for trading with margin managers. These functions enable placing orders, modifying and canceling them, and managing staking and governance participation through a margin manager. All trading operations require the margin manager to be associated with the correct DeepBook pool.
API​
Following are the different public functions for managing orders with margin managers.
Place orders
Place limit and market orders through a margin manager. Orders can only be placed if margin trading is enabled for the pool.
packages/deepbook_margin/sources/pool_proxy.move. You probably need to run `pnpm prebuild` and restart the site.Place reduce-only orders
Place reduce-only orders that can only decrease your debt position. These orders are useful when margin trading is disabled and you need to close existing positions.
packages/deepbook_margin/sources/pool_proxy.move. You probably need to run `pnpm prebuild` and restart the site.Modify order
Modify an existing order by changing its quantity.
packages/deepbook_margin/sources/pool_proxy.move. You probably need to run `pnpm prebuild` and restart the site.Cancel orders
Cancel one, multiple, or all orders for the margin manager.
packages/deepbook_margin/sources/pool_proxy.move. You probably need to run `pnpm prebuild` and restart the site.Withdraw settled amounts
Withdraw settled amounts from completed trades back to the margin manager's balance manager.
packages/deepbook_margin/sources/pool_proxy.move. You probably need to run `pnpm prebuild` and restart the site.Staking
Stake and unstake DEEP tokens through the margin manager. Note that margin managers for pools with DEEP as base or quote asset cannot stake.
packages/deepbook_margin/sources/pool_proxy.move. You probably need to run `pnpm prebuild` and restart the site.Governance
Submit proposals and vote on governance decisions through the margin manager.
packages/deepbook_margin/sources/pool_proxy.move. You probably need to run `pnpm prebuild` and restart the site.Claim rebates
Claim trading rebates earned through the margin manager.
packages/deepbook_margin/sources/pool_proxy.move. You probably need to run `pnpm prebuild` and restart the site.