## Get Account By ID `client.V1.Accounts.GetAccountByID(ctx, accountID) (*V1AccountGetAccountByIDResponse, error)` **get** `/v1/accounts/{account_id}` Fetch account details by ID ### Parameters - `accountID int64` ### Returns - `type V1AccountGetAccountByIDResponse struct{…}` - `Data Account` Represents a trading account - `ID int64` The unique identifier for the account - `AccountHolderEntityID int64` The account holder entity identifier - `FullName string` The full legal name of the account - `OpenDate Time` The date the account was opened - `OptionsLevel int64` The options level of the account - `ShortName string` The short name of the account - `Status AccountStatus` The current status of the account - `const AccountStatusActive AccountStatus = "ACTIVE"` - `const AccountStatusInactive AccountStatus = "INACTIVE"` - `const AccountStatusClosed AccountStatus = "CLOSED"` - `Subtype AccountSubtype` The sub-type of account - `const AccountSubtypeCash AccountSubtype = "CASH"` - `const AccountSubtypeMargin AccountSubtype = "MARGIN"` - `const AccountSubtypeOther AccountSubtype = "OTHER"` - `Type AccountType` The type of account - `const AccountTypeCustomer AccountType = "CUSTOMER"` - `const AccountTypeOther AccountType = "OTHER"` - `CloseDate Time` The date the account was closed, if applicable ### Example ```go package main import ( "context" "fmt" "github.com/clear-street/clear-street-go" "github.com/clear-street/clear-street-go/option" ) func main() { client := clearstreet.NewClient( option.WithAPIKey("My API Key"), ) response, err := client.V1.Accounts.GetAccountByID(context.TODO(), 0) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response) } ``` #### 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" } } ```