## Get Account By ID `AccountGetAccountByIdResponse v1().accounts().getAccountById(AccountGetAccountByIdParamsparams = AccountGetAccountByIdParams.none(), RequestOptionsrequestOptions = RequestOptions.none())` **get** `/v1/accounts/{account_id}` Fetch account details by ID ### Parameters - `AccountGetAccountByIdParams params` - `Optional accountId` ### Returns - `class AccountGetAccountByIdResponse:` - `Account data` Represents a trading account - `long id` The unique identifier for the account - `long accountHolderEntityId` The account holder entity identifier - `String fullName` The full legal name of the account - `LocalDate openDate` The date the account was opened - `long optionsLevel` The options level of the account - `String shortName` The short name of the account - `AccountStatus status` The current status of the account - `ACTIVE("ACTIVE")` - `INACTIVE("INACTIVE")` - `CLOSED("CLOSED")` - `AccountSubtype subtype` The sub-type of account - `CASH("CASH")` - `MARGIN("MARGIN")` - `OTHER("OTHER")` - `AccountType type` The type of account - `CUSTOMER("CUSTOMER")` - `OTHER("OTHER")` - `Optional closeDate` The date the account was closed, if applicable ### Example ```java package com.clear_street.api.example; import com.clear_street.api.client.ClearStreetClient; import com.clear_street.api.client.okhttp.ClearStreetOkHttpClient; import com.clear_street.api.models.v1.accounts.AccountGetAccountByIdParams; import com.clear_street.api.models.v1.accounts.AccountGetAccountByIdResponse; public final class Main { private Main() {} public static void main(String[] args) { ClearStreetClient client = ClearStreetOkHttpClient.builder() .fromEnv() .apiKey("My API Key") .build(); AccountGetAccountByIdResponse response = client.v1().accounts().getAccountById(0L); } } ``` #### Response ```json { "data": { "account_holder_entity_id": 987654321, "close_date": null, "full_name": "Test Trading Account", "id": 19816, "open_date": "2023-01-15", "short_name": "TST-ACCOUNT-01", "status": "ACTIVE", "subtype": "MARGIN", "type": "CUSTOMER" }, "error": null, "metadata": { "request_id": "b7e2d3f4-a1b2-4c3d-8e4f-5a6b7c8d9e0f" } } ```