Files

3.2 KiB

Subaccounts

Rate limits

  • 1200 requests/min or 200 requests/10secs per IP address. (weight = 2)

{% hint style="info" %} See more details in API Rate limits {% endhint %}

Request

{% tabs %} {% tab title="List subaccounts" %} Query subaccounts ordered by subaccount id ASC.

POST [ARCHIVE_ENDPOINT]

Body

{
  "subaccounts": {
    "start": 100,
    "limit": 10,
  }
}

{% endtab %}

{% tab title="Find subaccounts by address" %} Query all subaccounts associated to an address ordered by subaccount id ASC.

POST [ARCHIVE_ENDPOINT]

Body

{
  "subaccounts": {
    "address": "0x79CC76364b5Fb263A25bD52930E3d9788fCfEEA8"
  }
}

{% endtab %} {% endtabs %}

Request Parameters

ParameterTypeRequiredDescription
startstring/numberNoSubaccount id to start from (used for pagination). Defaults to 0.
limitstring/numberNoMax number of subaccounts to return. Defaults to 100, max of 500.
addressstringNoAn optional wallet address to find all subaccounts associated to it.

Response

{
    "subaccounts": [
        {
            "id": "25",
            "subaccount": "0x12a0b4888021576eb10a67616dd3dd3d9ce206b664656661756c740000000000",
            "address": "0x12a0b4888021576eb10a67616dd3dd3d9ce206b6",
            "subaccount_name": "default",
            "created_at": "1699949771",
            "isolated": false
        },
        {
            "id": "948",
            "subaccount": "0x12a0b4888021576eb10a67616dd3dd3d9ce206b664656661756c745f31000000",
            "address": "0x12a0b4888021576eb10a67616dd3dd3d9ce206b6",
            "subaccount_name": "default_1",
            "created_at": "1738000782",
            "isolated": false
        },
        {
            "id": "1094",
            "subaccount": "0x12a0b4888021576eb10a67616dd3dd3d9ce206b600000000000000020069736f",
            "address": "0x12a0b4888021576eb10a67616dd3dd3d9ce206b6",
            "subaccount_name": "0x00000000000000020069736f",
            "created_at": "1748982886",
            "isolated": true
        }
    ]
}

Response Fields

Subaccounts

Field nameDescription
idInternal subaccount id
subaccountHex string of the subaccount (wallet + subaccount name)
addressHex string of wallet address
subaccount_nameSubaccount identifier
created_atWhen subaccount was created
isolatedWhether it's a subaccount for an isolated position