Skip to content

getSubAccountIds

Returns all subaccount IDs associated with a wallet address.

Endpoint

POST https://papi.synthetix.io/v1/info

Request

Request Format

{
  "params": {
    "action": "getSubAccountIds",
    "walletAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb"
  }
}

Request Parameters

ParameterTypeRequiredDescription
actionstringYesMust be getSubAccountIds
walletAddressstringYesEthereum wallet address to query

Response

Success Response

{
  "status": "ok",
  "response": [
    "1867542890123456789",
    "1867542890123456790",
    "1867542890123456791"
  ],
  "request_id": "5ccf215d37e3ae6d"
}

Response Fields

The response is an array of subaccount ID strings. Each ID is a uint64 represented as a string for precision.

Error Response

ErrorDescription
Invalid signatureEIP-712 signature validation failed
Invalid market symbolMarket symbol not recognized
Nonce already usedNonce must be greater than previous value
Rate limit exceededToo many requests in time window
Request expiredexpiresAfter timestamp has passed

Code Examples

TypeScript

const response = await fetch('https://papi.synthetix.io/v1/info', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    params: {
      action: 'getSubAccountIds',
      walletAddress: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb'
    }
  })
});
 
const data = await response.json();
console.log('Subaccounts:', data.response);  // Array of subaccount IDs

Implementation Notes

  • No authentication required (public endpoint)
  • Returns all subaccounts ever created for the wallet address
  • Subaccount IDs are returned as strings to preserve uint64 precision