HomeDocumentationAPI Reference
Log In
API Reference

Create Subaccount Debug

Method Name

public/create_subaccount_debug

Used for debugging only, do not use in production. Will return the incremental encoded and hashed data.

See guides in Documentation for more.

Parameters

amountstringrequired
Amount of the asset to deposit
asset_namestringrequired
Name of asset to deposit
margin_typestringrequired
PM (Portfolio Margin), PM2 (Portfolio Margin 2), orSM` (Standard Margin))
enum PMSMPM2
nonceintegerrequired
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_secintegerrequired
Unix timestamp in seconds. Expiry MUST be >5min from now
signerstringrequired
Ethereum wallet address that is signing the deposit
walletstringrequired
Ethereum wallet address
currencystring
Base currency of the subaccount (only for PM)

Response

idstring or integerrequired
resultobjectrequired
result.action_hashstringrequired
Keccak hashed action data
result.encoded_datastringrequired
ABI encoded deposit data
result.encoded_data_hashedstringrequired
Keccak hashed encoded_data
result.typed_data_hashstringrequired
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}