Manage Drift user accounts, vaults, and trading on Solana
Parameter | Type | Required | Description |
---|---|---|---|
amount | number | Yes | Initial deposit amount |
symbol | string | Yes | Token symbol (e.g., “USDC”) |
Parameter | Type | Required | Description |
---|---|---|---|
name | string | Yes | Unique vault name |
marketName | string | Yes | Market in TOKEN-SPOT format |
redeemPeriod | number | Yes | Days until redemption |
maxTokens | number | Yes | Maximum vault capacity |
minDepositAmount | number | Yes | Minimum deposit |
managementFee | number | Yes | Management fee percentage |
profitShare | number | Yes | Profit share percentage |
hurdleRate | number | No | Optional hurdle rate |
permissioned | boolean | No | Whether vault uses whitelist |
Parameter | Type | Required | Description |
---|---|---|---|
amount | number | Yes | Trade amount in USD |
symbol | string | Yes | Token symbol |
action | string | Yes | ”long” or “short” |
type | string | Yes | ”market” or “limit” |
price | number | No | Required for limit orders |
Parameter | Type | Required | Description |
---|---|---|---|
amount | number | Yes | Amount to deposit |
symbol | string | Yes | Token symbol |
isRepay | boolean | No | Whether deposit is loan repayment |
createDriftUserAccount
: Create new user accountdepositToDriftUserAccount
: Deposit to accountwithdrawFromDriftAccount
: Withdraw from accounttradeUsingDriftPerpAccount
: Execute tradesgetDriftVaultInfo
: Get vault informationcreateDriftVault
: Create new vaultdepositIntoDriftVault
: Deposit to vaultwithdrawFromDriftVault
: Withdraw from vault