Api set sub account mode request

ApiSetSubAccountModeRequest

Sets the sub account mode (Single Asset Mode or Multi Asset Mode).

Switching modes requires passing validation checks to ensure the account remains healthy.

Name
Lite
Type Required
Default
Description
sub_account_id
sa
string True The sub account ID to set the mode for
sub_account_mode
sa1
SubAccountMode True The target sub account mode to switch to
signature
s
Signature True The signature of this operation
SubAccountMode
Value Description
SINGLE_ASSET_MODE = 1 Single asset mode: the subaccount is only allowed to hold one asset as collateral
Signature
Name
Lite
Type Required
Default
Description
signer
s
string True The address (public key) of the wallet signing the payload
r
r
string True Signature R
s
s1
string True Signature S
v
v
integer True Signature V
expiration
e
string True Timestamp after which this signature expires, expressed in unix nanoseconds. Must be capped at 30 days
nonce
n
integer True Users can randomly generate this value, used as a signature deconflicting key.
ie. You can send the same exact instruction twice with different nonces.
When the same nonce is used, the same payload will generate the same signature.
Our system will consider the payload a duplicate, and ignore it.
Range: 0 to 4,294,967,295 (uint32)
chain_id
ci
string True Chain ID used in EIP-712 domain. Zero value fallbacks to GRVT Chain ID.