Clear Street Entities API

The Entities API from Clear Street — 2 operation(s) for entities.

OpenAPI Specification

clear-street-entities-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Common API Models Entities API
  description: Common API models for all of Studio's APIs
  version: 2.0.0
servers:
- url: https://api.clearstreet.io/studio/v2
  description: Production environment
- url: https://sandbox-api.clearstreet.io/studio/v2
  description: Sandbox environment
tags:
- name: Entities
  x-displayName: Entities
paths:
  /entities:
    get:
      operationId: listEntities
      summary: List entities
      description: List all available entities.
      tags:
      - Entities
      responses:
        '200':
          description: A list of entities
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Entity'
        default:
          $ref: '#/components/responses/error'
      security:
      - BearerAuth: []
  /entities/{entity_id}:
    get:
      operationId: getEntity
      summary: Get entity
      description: Get an entity by its ID.
      tags:
      - Entities
      parameters:
      - name: entity_id
        in: path
        required: true
        description: The ID of the entity to get.
        schema:
          $ref: '#/components/schemas/EntityId'
      responses:
        '200':
          description: The entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Entity'
        default:
          $ref: '#/components/responses/error'
      security:
      - BearerAuth: []
components:
  schemas:
    EntityId:
      type: string
      minLength: 1
      maxLength: 256
      example: '100000'
      description: Entity ID for the legal entity.
    Entity:
      type: object
      properties:
        entity_id:
          $ref: '#/components/schemas/EntityId'
        legal_name:
          type: string
          example: Clear Street
        client_code:
          type: string
          example: CLST
      required:
      - entity_id
      - name
      - client_code
    ProblemDetails:
      type: object
      properties:
        type:
          type: string
          format: uri
          description: A URI reference that identifies the problem type.
        title:
          type: string
          description: A short, human-readable summary of the problem type.
        status:
          type: number
          minimum: 100
          maximum: 599
          description: The HTTP status code generated by the origin server for this occurrence of the problem.
        detail:
          type: string
          description: A human-readable explanation specific to this occurrence of the problem.
        instance:
          type: string
          format: uri
          description: An absolute URI that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
      additionalProperties: false
      description: A Problem Details object (RFC 9457)
  responses:
    error:
      description: Error response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ProblemDetails'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
externalDocs:
  url: https://docs.clearstreet.io/
x-tagGroups:
- name: Custodial API
  tags:
  - Performance
  - Holdings
- name: Execution API
  tags:
  - Orders
  - Trades
  - Positions
- name: Lending API
  tags:
  - Locates
  - Rates
  - Inventories
- name: Reference API
  tags:
  - Entities
  - Accounts
  - Instruments
- name: Risk & Margin API
  tags:
  - PNL
  - Margin
  - Margin Simulations