Skip to content
This repository was archived by the owner on Apr 11, 2025. It is now read-only.
151 changes: 100 additions & 51 deletions oas/broker/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,41 @@ components:
type: string
description: 'TODO: find a good way to generalize the description of page_tokens'
schemas:
OathClientStatus:
type: string
enum:
- ACTIVE
- DISABLED
description: ACTIVE or DISABLED
example: ACTIVE
AssetStatus:
type: string
enum:
- active
- inactive
description: active or inactive
example: active
BankAccountType:
type: string
minLength: 1
enum:
- CHECKING
- SAVINGS
description: Must be CHECKING or SAVINGS
AchStatus:
type: string
enum:
- QUEUED
- APPROVED
- PENDING
- CANCEL_REQUESTED
- SENT_TO_CLEARING
BankCodeType:
type: string
enum:
- ABA
- BIC
description: ABA (Domestic) or BIC (International)
Account:
type: object
title: ''
Expand Down Expand Up @@ -516,6 +551,7 @@ components:
- DISABLE_PENDING
- ACCOUNT_CLOSED
- PAPER_ONLY
- INACTIVE
description: |
Designates the current status of this account

Expand Down Expand Up @@ -604,6 +640,7 @@ components:
city: San Mateo
state: CA
postal_code: '94401'
unit: '31'
identity:
given_name: Strange
family_name: Elbakyan
Expand Down Expand Up @@ -722,6 +759,7 @@ components:
city: San Mateo
state: CA
postal_code: '94401'
unit: '42'
identity:
given_name: John
family_name: Doe
Expand Down Expand Up @@ -816,6 +854,7 @@ components:
- email
AccountConfigurations:
title: AccountConfigurations
nullable: true
type: object
description: Represents additional configuration settings for an account
properties:
Expand Down Expand Up @@ -1217,7 +1256,7 @@ components:
description: Valid only for trading activity types. Null for non-trading activites.
qty:
type: string
format: decimal
pattern: ([0-9]*[.])?[0-9]+
example: '0.38921'
description: Valid only for trading activity types. Null for non-trading activites.
side:
Expand All @@ -1228,7 +1267,7 @@ components:
description: Valid only for trading activity types. Null for non-trading activites.
leaves_qty:
type: string
format: decimal
pattern: ([0-9]*[.])?[0-9]+
example: '0.5123'
description: Valid only for trading activity types. Null for non-trading activites.
order_id:
Expand All @@ -1238,7 +1277,7 @@ components:
description: Valid only for trading activity types. Null for non-trading activites.
cum_qty:
type: string
format: decimal
pattern: ([0-9]*[.])?[0-9]+
example: '0.9723'
description: Valid only for trading activity types. Null for non-trading activites.
order_status:
Expand Down Expand Up @@ -1391,6 +1430,9 @@ components:
postal_code:
type: string
example: '94401'
unit:
type: string
example: '31'
Identity:
type: object
description: |
Expand Down Expand Up @@ -1449,17 +1491,29 @@ components:
- savings
- family
annual_income_min:
type: number
type: string
pattern: ([0-9]*[.])?[0-9]+
example: '1.0'
annual_income_max:
type: number
type: string
pattern: ([0-9]*[.])?[0-9]+
example: '1.0'
liquid_net_worth_min:
type: number
type: string
pattern: ([0-9]*[.])?[0-9]+
example: '1.0'
liquid_net_worth_max:
type: number
type: string
pattern: ([0-9]*[.])?[0-9]+
example: '1.0'
total_net_worth_min:
type: number
type: string
pattern: ([0-9]*[.])?[0-9]+
example: '1.0'
total_net_worth_max:
type: number
type: string
pattern: ([0-9]*[.])?[0-9]+
example: '1.0'
extra:
type: object
description: |
Expand Down Expand Up @@ -1525,7 +1579,6 @@ components:
signed_at:
type: string
example: '2019-09-11T18:09:33Z'
format: date-time
ip_address:
type: string
format: ipv4
Expand Down Expand Up @@ -1731,6 +1784,7 @@ components:
- bracket
- oco
- oto
- ''
example: bracket
TimeInForce:
type: string
Expand Down Expand Up @@ -1983,11 +2037,7 @@ components:
type: string
description: 9-Digit ABA RTN (Routing Number) or BIC
bank_code_type:
type: string
enum:
- ABA
- BIC
description: ABA (Domestic) or BIC (International)
$ref: '#/components/schemas/BankCodeType'
country:
type: string
description: Only for international banks
Expand Down Expand Up @@ -2024,11 +2074,7 @@ components:
type: string
description: 9-Digit ABA RTN (Routing Number) or BIC
bank_code_type:
type: string
enum:
- ABA
- BIC
description: ABA (Domestic) or BIC (International)
$ref: '#/components/schemas/BankCodeType'
country:
type: string
description: Only for international banks
Expand Down Expand Up @@ -2103,23 +2149,13 @@ components:
type: string
format: uuid
status:
type: string
enum:
- QUEUED
- APPROVED
- PENDING
- CANCEL_REQUESTED
$ref: '#/components/schemas/AchStatus'
account_owner_name:
type: string
minLength: 1
description: Name of the account owner
bank_account_type:
type: string
minLength: 1
enum:
- CHECKING
- SAVINGS
description: Must be CHECKING or SAVINGS
$ref: '#/components/schemas/BankAccountType'
bank_account_number:
type: string
minLength: 1
Expand Down Expand Up @@ -2150,12 +2186,7 @@ components:
type: string
minLength: 1
bank_account_type:
type: string
minLength: 1
enum:
- CHECKING
- SAVINGS
description: Must be CHECKING or SAVINGS
$ref: '#/components/schemas/BankAccountType'
bank_account_number:
type: string
minLength: 1
Expand All @@ -2169,7 +2200,8 @@ components:
minLength: 1
processor_token:
type: string
description: 'If using Plaid, you can specify a Plaid processor token here '
default: ""
description: 'If using Plaid, you can specify a Plaid processor token here'
required:
- account_owner_name
- bank_account_type
Expand Down Expand Up @@ -2875,12 +2907,7 @@ components:
example: Apple Inc. Common Stock
description: The official name of the asset
status:
type: string
enum:
- active
- inactive
description: active or inactive
example: active
$ref: '#/components/schemas/AssetStatus'
tradable:
type: boolean
example: true
Expand Down Expand Up @@ -3843,12 +3870,7 @@ components:
type: string
description: URL of Privacy Policy
status:
type: string
enum:
- ACTIVE
- DISABLED
description: ACTIVE or DISABLED
example: ACTIVE
$ref: '#/components/schemas/OathClientStatus'
redirect_uri:
type: array
items:
Expand Down Expand Up @@ -5012,6 +5034,33 @@ paths:
'404':
$ref: '#/components/responses/NotFound'
operationId: deleteAllOrdersForAccount
'/v1/trading/accounts/{account_id}/orders:by_client_order_id':
parameters:
- $ref: '#/components/parameters/AccountID'
get:
parameters:
- name: client_order_id
required: true
in: query
schema:
type: string
summary: 'Retrieves orders for the account by client_order_id parameter.'
tags:
- Trading
description: |-
Retrieves orders for the account by client_order_id parameter.
responses:
'200':
description: 'Retrieves orders for the account by client_order_id parameter.'
content:
application/json:
schema:
$ref: '#/components/schemas/Order'
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
operationId: getOrderForAccountByClientOrderId
/v1/assets:
get:
tags:
Expand Down