The
Drift integration must be enabled before using these commands:Drift Protocol
User Management
Initialize User
Initialize a Drift user account (sub-account) for the vault.--sub-account-id,-s: Sub-account ID (default: 0)--pool-id,-p: Isolated pool ID (default: 0)
List Users
List all Drift user sub-accounts for the vault.Delete User
Delete a Drift user sub-account.Update User Pool ID
Update a Drift user’s pool ID.Deposits & Withdrawals
Deposit
Deposit to a Drift spot market.market_index: Spot market index (e.g., 0 for USDC, 1 for SOL)amount: Amount to deposit--sub-account-id,-s: Sub-account ID (default: 0)
Withdraw
Withdraw from a Drift spot market. If withdrawing more than your balance with sufficient collateral, this becomes a borrow.Trading
Enable/Disable Margin
Enable or disable margin trading for a sub-account.Spot Order
Place a limit spot order.direction:longorshortmarket_index: Spot market indexamount: Order sizeprice_limit: Limit price in USD
Perp Order
Place a limit perpetual order.List Orders
List open orders.Cancel Orders
Cancel one or more orders by ID.Positions
List Positions
List all Drift positions (spot and perp).Settle PnL
Settle PnL for a perp market.Policy Management
View Policy
Allowlist Market
Remove Market
Allowlist Borrowable Asset
Remove Borrowable Asset
Drift Vaults
List Depositors
List Drift vault depositor accounts owned by the GLAM vault.Deposit
Deposit to a Drift vault.Request Withdraw
Request to withdraw from a Drift vault.amount: Amount in vault shares