{
  "opencollection": "1.0.0",
  "info": {
    "name": "Clear Street Accounts API",
    "version": "1.0"
  },
  "items": [
    {
      "info": {
        "name": "Accounts",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List accounts",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.clearstreet.io/studio/v2/accounts",
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "List all available accounts."
        },
        {
          "info": {
            "name": "Get account",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.clearstreet.io/studio/v2/accounts/:account_id",
            "params": [
              {
                "name": "account_id",
                "value": "",
                "type": "path",
                "description": "The ID or number of the account to get."
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Get an account by its ID or number."
        },
        {
          "info": {
            "name": "Get Accounts",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.clearstreet.io/studio/v2/v1/accounts",
            "params": [
              {
                "name": "page_size",
                "value": "",
                "type": "query",
                "description": "The number of items to return per page. Only used when page_token is not provided."
              },
              {
                "name": "page_token",
                "value": "eyJvZmZzZXQiOjEwMCwibGltaXQiOjEwMH0=",
                "type": "query",
                "description": "Token for retrieving the next or previous page of results. Contains encoded pagination state; when provided, page_size is ignored."
              },
              {
                "name": "account_id",
                "value": "",
                "type": "query",
                "description": "Filter to accounts whose id starts with this value (lexicographic prefix match on the decimal id, e.g. `100` matches `100345`)."
              },
              {
                "name": "account_name",
                "value": "",
                "type": "query",
                "description": "Filter to accounts whose full name contains this value (case-insensitive substring match)."
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "List accounts the authenticated user has permission to access.\n\nResults can be narrowed with the optional `account_id` and `account_name`\nfilters. `account_id` is a lexicographic prefix match on the decimal account\nid (e.g. `100` matches `100345` and `100567`); `account_name` is a\ncase-insensitive substring match on the account's full name. When both are\nsupplied an account must match both. When neither is supplied every\naccessible account is returned."
        },
        {
          "info": {
            "name": "Get Account By ID",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.clearstreet.io/studio/v2/v1/accounts/:account_id",
            "params": [
              {
                "name": "account_id",
                "value": "",
                "type": "path",
                "description": "Account identifier"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Fetch account details by ID, including the mailing address, date of\nbirth, phone number, and country of tax residency of the account-holder\nentity when on file."
        },
        {
          "info": {
            "name": "Patch Account By ID",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "https://api.clearstreet.io/studio/v2/v1/accounts/:account_id",
            "params": [
              {
                "name": "account_id",
                "value": "",
                "type": "path",
                "description": "Account identifier"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Update account risk settings"
        },
        {
          "info": {
            "name": "Get Account Balances",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.clearstreet.io/studio/v2/v1/accounts/:account_id/balances",
            "params": [
              {
                "name": "account_id",
                "value": "",
                "type": "path",
                "description": "Account identifier"
              },
              {
                "name": "top_margin_contributors_limit",
                "value": "10",
                "type": "query",
                "description": "Limit the number of top margin contributors returned."
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Fetch account balance information"
        },
        {
          "info": {
            "name": "Get Portfolio History",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.clearstreet.io/studio/v2/v1/accounts/:account_id/portfolio-history",
            "params": [
              {
                "name": "account_id",
                "value": "",
                "type": "path",
                "description": "Account identifier"
              },
              {
                "name": "start_date",
                "value": "",
                "type": "query",
                "description": "Start date for the portfolio history range, in YYYY-MM-DD format."
              },
              {
                "name": "end_date",
                "value": "",
                "type": "query",
                "description": "Defaults to today in America/New_York when omitted."
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Retrieves daily portfolio history for the specified account."
        }
      ]
    }
  ],
  "bundled": true
}