Method Name
public/create_subaccount_debug
public/create_subaccount_debugUsed for debugging only, do not use in production. Will return the incremental encoded and hashed data.
See guides in Documentation for more.
Parameters
|
amount
string required Amount of the asset to deposit |
|
asset_name
string required Name of asset to deposit |
margin_type
string requiredPM (Portfolio Margin), PM2 (Portfolio Margin 2), orSM` (Standard Margin))enum PM SM PM2
|
|
nonce
integer required Unique nonce defined as (UTC_timestamp in ms)(random_number_up_to_6_digits) (e.g. 1695836058725001, where 001 is the random number) |
|
signature_expiry_sec
integer required Unix timestamp in seconds. Expiry MUST be >5min from now |
|
signer
string required Ethereum wallet address that is signing the deposit |
|
wallet
string required Ethereum wallet address |
|
currency
string Base currency of the subaccount (only for PM)
|
Response
| id string or integer required |
| result object required |
|
result.
action_hash
string required Keccak hashed action data |
|
result.
encoded_data
string required ABI encoded deposit data |
|
result.
encoded_data_hashed
string required Keccak hashed encoded_data |
|
result.
typed_data_hash
string required EIP 712 typed data hash |
Example
{request_example_shell}{request_example_javascript}{request_example_python}The above command returns JSON structured like this:
{response_example_json}