Get Subaccount
Fetches details of a specific subaccount based on its owner's address and the subaccount's unique number.
Method Declaration
Python
async def get_subaccount(
self,
address: str,
account_number: int,
) -> Optional[subaccount_type.Subaccount]Unification Plan
- Rust uses
Subaccount- a wrapper that combinesAddresswithSubaccountNumber, it's safer to create the same type for Python and TypeScript
Parameters
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
owner | query | Address | true | The wallet address that owns the account. |
number | query | SubaccountNumber | true | The identifier for the specific subaccount withing the wallet address. |
Response
| Status | Meaning | Schema | Description |
|---|---|---|---|
200 | OK | SubaccountInfo | The response containing the subaccount. |
400 | Bad Request | The request was malformed or invalid. | |
404 | Not Found | The subaccount was not found. |
Examples: Python | TypeScript | Rust | API | Guide - Get Subaccount