@somnia-chain/markets-sdk / index / DepositMarginParams
Interface: DepositMarginParams
Defined in: trade.ts:352
Inputs to Trader.depositMargin — fund the signer's cross-margin MarginBank balance (one balance backs every perp pool on that bank).
Properties
marginBank?
optionalmarginBank?:`0x${string}`
Defined in: trade.ts:354
MarginBank address (from the PerpMarket row), or pass pool to resolve it.
pool?
optionalpool?:`0x${string}`
Defined in: trade.ts:356
A PerpPool — its marginBank() is read (and cached) when marginBank is omitted.
amount
amount:
bigint
Defined in: trade.ts:358
Collateral amount to deposit, raw units (e.g. USDso 18dp).
collateral?
optionalcollateral?:`0x${string}`
Defined in: trade.ts:360
Collateral token; read from the bank's getSystemConfig (cached) if omitted.
autoApprove?
optionalautoApprove?:boolean
Defined in: trade.ts:362
Approve the collateral to the BANK if allowance is short (default true).
gas?
optionalgas?:bigint
Defined in: trade.ts:364
Gas ceiling for this tx.
Default Value
TraderConfig.gas (10,000,000)