Skip to content
Get started

Get Accounts

$ clear-street v1:accounts get-accounts
GET/v1/accounts

List accounts the authenticated user has permission to access

ParametersExpand Collapse
--page-size: optional number

The number of items to return per page. Only used when page_token is not provided.

--page-token: optional string

Token for retrieving the next or previous page of results. Contains encoded pagination state; when provided, page_size is ignored.

ReturnsExpand Collapse
V1AccountGetAccountsResponse: BaseResponse { metadata, error }
data: array of Account { id, account_holder_entity_id, full_name, 7 more }
id: number

The unique identifier for the account

account_holder_entity_id: number

The account holder entity identifier

full_name: string

The full legal name of the account

open_date: string

The date the account was opened

options_level: number

The options level of the account

short_name: string

The short name of the account

status: "ACTIVE" or "INACTIVE" or "CLOSED"

The current status of the account

"ACTIVE"
"INACTIVE"
"CLOSED"
subtype: "CASH" or "MARGIN" or "OTHER"

The sub-type of account

"CASH"
"MARGIN"
"OTHER"
type: "CUSTOMER" or "OTHER"

The type of account

"CUSTOMER"
"OTHER"
close_date: optional string

The date the account was closed, if applicable

Get Accounts

clear-street v1:accounts get-accounts \
  --api-key 'My API Key'
{
  "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"
    },
    {
      "account_holder_entity_id": 987654322,
      "close_date": "2024-08-01",
      "full_name": "Old Test Account",
      "id": 19817,
      "open_date": "2021-05-20",
      "short_name": "TST-ACCOUNT-02-CLOSED",
      "status": "CLOSED",
      "subtype": "CASH",
      "type": "CUSTOMER"
    }
  ],
  "error": null,
  "metadata": {
    "next_page_token": "cGFnZT0yJmxhc3RfaWQ9MTk4MTc=",
    "page_number": 1,
    "request_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
    "total_items": 25,
    "total_pages": 3
  }
}
{
  "error": {
    "code": 403,
    "message": "The caller does not have permission to execute the specified operation"
  },
  "metadata": {
    "request_id": "5518f0c6-58ff-4b4a-81a5-701556d41206"
  }
}
Returns Examples
{
  "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"
    },
    {
      "account_holder_entity_id": 987654322,
      "close_date": "2024-08-01",
      "full_name": "Old Test Account",
      "id": 19817,
      "open_date": "2021-05-20",
      "short_name": "TST-ACCOUNT-02-CLOSED",
      "status": "CLOSED",
      "subtype": "CASH",
      "type": "CUSTOMER"
    }
  ],
  "error": null,
  "metadata": {
    "next_page_token": "cGFnZT0yJmxhc3RfaWQ9MTk4MTc=",
    "page_number": 1,
    "request_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
    "total_items": 25,
    "total_pages": 3
  }
}
{
  "error": {
    "code": 403,
    "message": "The caller does not have permission to execute the specified operation"
  },
  "metadata": {
    "request_id": "5518f0c6-58ff-4b4a-81a5-701556d41206"
  }
}