Models

Account

class alpaca.broker.models.accounts.Account(*, id: UUID, account_number: str, account_type: AccountType | str | None = None, account_sub_type: AccountSubType | str | None = None, status: AccountStatus, crypto_status: AccountStatus | None = None, kyc_results: KycResults | None = None, currency: str, last_equity: str, created_at: str, contact: Contact | None = None, identity: Identity | None = None, disclosures: Disclosures | None = None, agreements: List[Agreement] | None = None, documents: List[AccountDocument] | None = None, trusted_contact: TrustedContact | None = None)

Contains information pertaining to a specific brokerage account

see https://alpaca.markets/docs/broker/api-references/accounts/accounts/#the-account-model

The fields contact, identity, disclosures, agreements, documents, trusted_contact, and trading_configurations are all optional and won’t always be provided by the api depending on what endpoint you use and what options you pass

id

The account uuid used to reference this account

Type:

str

account_number

A more human friendly identifier for this account

Type:

str

account_type

The type of account

Type:

Optional[Union[AccountType, str]]

account_sub_type

The sub type of account

Type:

Optional[Union[AccountSubType, str]]

status

The approval status of this account

Type:

AccountStatus

crypto_status

The crypto trading status. Only present if crypto trading is enabled.

Type:

Optional[AccountStatus]

kyc_results

Hold information about the result of KYC.

Type:

Optional[KycResult]

currency

The currency the account’s values are returned in

Type:

str

last_equity

The total equity value stored in the account

Type:

str

created_at

The timestamp when the account was created

Type:

str

contact

The contact details for the account holder

Type:

Optional[Contact]

identity

The identity details for the account holder

Type:

Optional[Identity]

disclosures

The account holder’s political disclosures

Type:

Optional[Disclosures]

agreements

The agreements the account holder has signed

Type:

Optional[List[Agreement]]

documents

The documents the account holder has submitted

Type:

Optional[List[AccountDocument]]

trusted_contact

The account holder’s trusted contact details

Type:

Optional[TrustedContact]

Contact

class alpaca.broker.models.accounts.Contact(*, email_address: str, phone_number: str | None = None, street_address: List[str], unit: str | None = None, city: str, state: str | None = None, postal_code: str | None = None, country: str | None = None)

User contact details within Account Model

see https://alpaca.markets/docs/broker/api-references/accounts/accounts/#the-account-model

email_address

The user’s email address

Type:

str

phone_number

The user’s phone number. It should include the country code.

Type:

str

street_address

The user’s street address lines.

Type:

List[str]

unit

The user’s apartment unit, if any.

Type:

Optional[str]

city

The city the user resides in.

Type:

str

state

The state the user resides in. This is required if country is ‘USA’.

Type:

Optional[str]

postal_code

The user’s postal

Type:

str

country

The country the user resides in. 3 letter country code is permissible.

Type:

str

Identity

class alpaca.broker.models.accounts.Identity(*, given_name: str, middle_name: str | None = None, family_name: str, date_of_birth: str | None = None, tax_id: str | None = None, tax_id_type: TaxIdType | None = None, country_of_citizenship: str | None = None, country_of_birth: str | None = None, country_of_tax_residence: str, visa_type: VisaType | None = None, visa_expiration_date: str | None = None, date_of_departure_from_usa: str | None = None, permanent_resident: bool | None = None, funding_source: List[FundingSource] | None = None, annual_income_min: float | None = None, annual_income_max: float | None = None, liquid_net_worth_min: float | None = None, liquid_net_worth_max: float | None = None, total_net_worth_min: float | None = None, total_net_worth_max: float | None = None)

User identity details within Account Model

see https://alpaca.markets/docs/broker/api-references/accounts/accounts/#the-account-model

given_name

The user’s first name

Type:

str

middle_name

The user’s middle name, if any

Type:

Optional[str]

family_name

The user’s last name

Type:

str

date_of_birth

The user’s date of birth

Type:

str

tax_id

The user’s country specific tax id, required if tax_id_type is provided

Type:

Optional[str]

tax_id_type

The tax_id_type for the tax_id provided, required if tax_id provided

Type:

Optional[TaxIdType]

country_of_citizenship

The country the user is a citizen

Type:

Optional[str]

country_of_birth

The country the user was born

Type:

Optional[str]

country_of_tax_residence

The country the user files taxes

Type:

str

visa_type

Only used to collect visa types for users residing in the USA.

Type:

Optional[VisaType]

visa_expiration_date

The date of expiration for visa, Required if visa_type is set.

Type:

Optional[str]

date_of_departure_from_usa

Required if visa_type = B1 or B2

Type:

Optional[str]

permanent_resident

Only used to collect permanent residence status in the USA.

Type:

Optional[bool]

funding_source

How the user will fund their account

Type:

Optional[List[FundingSource]]

annual_income_min

The minimum of the user’s income range

Type:

Optional[float]

annual_income_max

The maximum of the user’s income range

Type:

Optional[float]

liquid_net_worth_min

The minimum of the user’s liquid net worth range

Type:

Optional[float]

liquid_net_worth_max

The maximum of the user’s liquid net worth range

Type:

Optional[float]

total_net_worth_min

The minimum of the user’s total net worth range

Type:

Optional[float]

total_net_worth_max

The maximum of the user’s total net worth range

Type:

Optional[float]

Disclosures

class alpaca.broker.models.accounts.Disclosures(*, is_control_person: bool | None = None, is_affiliated_exchange_or_finra: bool | None = None, is_politically_exposed: bool | None = None, immediate_family_exposed: bool, employment_status: EmploymentStatus | None = None, employer_name: str | None = None, employer_address: str | None = None, employment_position: str | None = None)

User disclosures within Account Model

see https://alpaca.markets/docs/broker/api-references/accounts/accounts/#the-account-model

is_control_person

Whether user holds a controlling position in a publicly traded company

Type:

bool

is_affiliated_exchange_or_finra

If user is affiliated with any exchanges or FINRA

Type:

bool

is_politically_exposed

If user is politically exposed

Type:

bool

immediate_family_exposed

If user’s immediate family member is either politically exposed or holds a control position.

Type:

bool

employment_status

The employment status of the user

Type:

EmploymentStatus

employer_name

The user’s employer’s name, if any

Type:

str

employer_address

The user’s employer’s address, if any

Type:

str

employment_position

The user’s employment position, if any

Type:

str

Agreement

class alpaca.broker.models.accounts.Agreement(*, agreement: AgreementType, signed_at: str, ip_address: str, revision: str | None = None)

User agreements signed within Account Model

see https://alpaca.markets/docs/broker/api-references/accounts/accounts/#the-account-model

agreement

The type of agreement signed by the user

Type:

Agreement

signed_at

The timestamp the agreement was signed

Type:

str

ip_address

The ip_address the signed agreements were sent from by the user

Type:

str

revision

The revision date

Type:

str

TrustedContact

class alpaca.broker.models.accounts.TrustedContact(*, given_name: str, family_name: str, email_address: str | None = None, phone_number: str | None = None, street_address: Annotated[str | None, _TrustedStreetAddressSchema, BeforeValidator(func=_validate_trusted_street_address, json_schema_input_type=PydanticUndefined), PlainSerializer(func=_serialize_trusted_street_address, return_type=List[str] | None, when_used=always)] = None, city: str | None = None, state: str | None = None, postal_code: str | None = None, country: str | None = None)

User’s trusted contact details within Account Model

see https://alpaca.markets/docs/broker/api-references/accounts/accounts/#the-account-model

Attributes:given_name

given_name (str): The first name of the user’s trusted contact family_name (str): The last name of the user’s trusted contact email_address (Optional[str]): The email address of the user’s trusted contact phone_number (Optional[str]): The email address of the user’s trusted contact city (Optional[str]): The email address of the user’s trusted contact state (Optional[str]): The email address of the user’s trusted contact postal_code (Optional[str]): The email address of the user’s trusted contact country (Optional[str]): The email address of the user’s trusted contact street_address (Optional[str]): Street address. The Broker API stores an array of strings. A string still works and is stored as a string, but it is deprecated and will be removed in the next release; it is sent as a one-item list.

AccountDocument

class alpaca.broker.models.documents.AccountDocument(*, id: UUID | None, document_type: DocumentType | None, document_sub_type: str | None = None, content: str | None = None, mime_type: str | None = None, created_at: datetime | None = None)

User documents provided within Account Model.

This model is different from the TradeDocument model in that this model represents documents having to do with a brokerage Account.

see https://alpaca.markets/docs/broker/api-references/accounts/accounts/#the-account-model

id

ID of the Document

Type:

UUID

document_type

The type of document uploaded

Type:

DocumentType

document_sub_type

The specific type of document, e.g. passport

Type:

Optional[str]

name

Name of the document if present

Type:

Optional(str)

content

Base64 string representing the document

Type:

str

mime_type

The format of content encoded by the string

Type:

str

created_at

When the document was stored. Returned on account documents.

Type:

Optional[datetime]

TradeAccount

class alpaca.broker.models.accounts.TradeAccount(*, id: UUID, account_number: str, status: AccountStatus, crypto_status: AccountStatus | None = None, crypto_tier: int | None = None, currency: str | None = None, buying_power: str | None = None, effective_buying_power: str | None = None, regt_buying_power: str | None = None, daytrading_buying_power: str | None = None, non_marginable_buying_power: str | None = None, cash: str | None = None, accrued_fees: str | None = None, pending_transfer_out: str | None = None, pending_transfer_in: str | None = None, portfolio_value: str | None = None, pattern_day_trader: bool | None = None, trading_blocked: bool | None = None, transfers_blocked: bool | None = None, account_blocked: bool | None = None, created_at: datetime | None = None, trade_suspended_by_user: bool | None = None, multiplier: str | None = None, shorting_enabled: bool | None = None, equity: str | None = None, last_equity: str | None = None, long_market_value: str | None = None, short_market_value: str | None = None, position_market_value: str | None = None, initial_margin: str | None = None, maintenance_margin: str | None = None, last_maintenance_margin: str | None = None, sma: str | None = None, daytrade_count: int | None = None, options_buying_power: str | None = None, options_approved_level: int | None = None, options_trading_level: int | None = None, balance_asof: str | None = None, intraday_adjustments: str | None = None, pending_reg_taf_fees: str | None = None, cash_withdrawable: str | None, cash_transferable: str | None, previous_close: datetime | None, last_long_market_value: str | None, last_short_market_value: str | None, last_cash: str | None, last_initial_margin: str | None, last_regt_buying_power: str | None, last_daytrading_buying_power: str | None = None, last_daytrade_count: int | None = None, last_buying_power: str | None, clearing_broker: ClearingBroker | None)

See Base TradeAccount model in common for full details on available fields. Represents trading account information for an Account.

cash_withdrawable

Cash available for withdrawal from the account

Type:

Optional[str]

cash_transferable

Cash available for transfer (JNLC) from the account

Type:

Optional[str]

previous_close

Previous sessions close time

Type:

Optional[datetime]

last_long_market_value

Value of all long positions as of previous trading day at 16:00:00 ET

Type:

Optional[str]

last_short_market_value

Value of all short positions as of previous trading day at 16:00:00 ET

Type:

Optional[str]

last_cash

Value of all cash as of previous trading day at 16:00:00 ET

Type:

Optional[str]

last_initial_margin

Value of initial_margin as of previous trading day at 16:00:00 ET

Type:

Optional[str]

last_regt_buying_power

Value of regt_buying_power as of previous trading day at 16:00:00 ET

Type:

Optional[str]

last_daytrading_buying_power

Value of daytrading_buying_power as of previous trading day at 16:00:00 ET. Deprecated; removed from Alpaca responses on 2026-07-06 (FINRA intraday-margin migration) and defaults to None.

Type:

Optional[str]

last_daytrade_count

Value of daytrade_count as of previous trading day at 16:00:00 ET. Deprecated; removed from Alpaca responses on 2026-07-06 (FINRA intraday-margin migration) and defaults to None.

Type:

Optional[int]

last_buying_power

Value of buying_power as of previous trading day at 16:00:00 ET

Type:

Optional[str]

clearing_broker

The Clearing broker for this account

Type:

Optional[ClearingBroker]

TradeDocument

class alpaca.broker.models.documents.TradeDocument(*, id: UUID, name: str, type: TradeDocumentType, sub_type: TradeDocumentSubType | None = None, date: date)

Similar to the AccountDocument model but this represents documents having to do with a TradeAccount not a regular Account.

IE: Account Monthly Statements or Trade Confirmations.

id

Unique id of the TradeDocument

Type:

UUID

name

Name of the document

Type:

str

type

The kind of TradeDocument this is

Type:

TradeDocumentType

sub_type

The subtype of the document. The API returns “” in the case of this not being specified, however we transform this case into None for convenience.

Type:

Optional[TradeDocumentSubType]

date

Date on when this TradeDocument was generated

Type:

date

W8BenDocument

class alpaca.broker.models.documents.W8BenDocument(*, country_citizen: str, date: date, date_of_birth: date, full_name: str, ip_address: IPv4Address | IPv6Address, permanent_address_city_state: str, permanent_address_country: str, permanent_address_street: str, revision: str, signer_full_name: str, timestamp: datetime, additional_conditions: str | None = None, foreign_tax_id: str | None = None, ftin_not_required: bool | None = None, income_type: str | None = None, mailing_address_city_state: str | None = None, mailing_address_country: str | None = None, mailing_address_street: str | None = None, paragraph_number: str | None = None, percent_rate_withholding: str | None = None, reference_number: str | None = None, residency: str | None = None, tax_id_ssn: str | None = None)

Represents the information normally contained in a W8BEN document as fields for convenience if you don’t want to upload a file.

Please see https://docs.alpaca.markets/docs/international-accounts for more information.

TODO: None of the docs or code explain what any of these fields mean. Guessing based on name alone for

all of them; but we really need the docs updated.

additional_conditions

Any additional conditions to specify

Type:

Optional[str]

country_citizen

The Country that the applicant is a citizen of

Type:

str

date

date signed

Type:

date

date_of_birth

DOB of applicant

Type:

date

foreign_tax_id

Applicant’s tax id in their home country

Type:

Optional[str]

ftin_not_required

Required if foreign_tax_id and tax_id_ssn are empty.

Type:

Optional[bool]

full_name

Full name of applicant

Type:

str

income_type

income type of applicant

Type:

Optional[str]

ip_address

ip address of applicant when signed

Type:

IPAddress

mailing_address_city_state

mailing city/state of applicant

Type:

Optional[str]

mailing_address_country

mailing country for applicant

Type:

Optional[str]

mailing_address_street

mailing street address for applicant

Type:

Optional[str]

paragraph_number

TODO: get documentation for this field

Type:

Optional[str]

percent_rate_withholding

TODO: get documentation for this field

Type:

Optional[str]

permanent_address_city_state

permanent city/state of applicant

Type:

str

permanent_address_country

permanent country of residence of applicant

Type:

str

permanent_address_street

permanent street address of applicant

Type:

str

reference_number

TODO: Get documentation for this field

Type:

Optional[str]

residency

Country of residency of applicant TODO: get real documentation for this field. current is just guess based on example

Type:

Optional[str]

revision

Revision of the W8BEN form

Type:

str

signer_full_name

Full name of signing user

Type:

str

tax_id_ssn

TaxID/SSN of applicant

Type:

Optional[str]

timestamp

timestamp when form data was gathered

Type:

datetime

CIPKYCInfo

class alpaca.broker.models.cip.CIPKYCInfo(*, id: str, risk_score: int | None = None, risk_level: str | None = None, risk_categories: List[str] | None = None, applicant_name: str | None = None, email_address: str | None = None, nationality: str | None = None, date_of_birth: datetime | None = None, address: str | None = None, postal_code: str | None = None, country_of_residency: str | None = None, kyc_completed_at: datetime | None = None, ip_address: str | None = None, check_initiated_at: datetime | None = None, check_completed_at: datetime | None = None, approval_status: CIPApprovalStatus | None = None, approved_by: str | None = None, approved_reason: str | None = None, approved_at: datetime | None = None)

Represents Know Your Customer (KYC) info for a CIPInfo

id

Your internal ID of check

Type:

str

risk_score

Overall risk score returned by KYC provider or assessed

Type:

Optional[int]

risk_level

Overall risk level returned by KYC provider or assessed

Type:

Optional[str]

risk_categories

The list of risk categories returned by the KYC provider or assessed

Type:

Optional[List[str]]

applicant_name

Given and family name of applicant

Type:

Optional[str]

email_address

email address of applicant

Type:

Optional[str]

nationality

nationality of applicant

Type:

Optional[str]

date_of_birth

DOB of applicant

Type:

Optional[datetime]

address

Concatenated street address, city, state and country of applicant

Type:

Optional[str]

postal_code

postal code for address field

Type:

Optional[str]

country_of_residency

country for address field

Type:

Optional[str]

kyc_completed_at

Datetime that KYC check was completed at

Type:

Optional[datetime]

ip_address

ip address of applicant at time of KYC check

Type:

Optional[str]

check_initiated_at

start datetime of KYC check

Type:

Optional[datetime]

check_completed_at

completion datetime of KYC check

Type:

Optional[datetime]

approval_status

Approval status of KYC check

Type:

Optional[CIPApprovalStatus]

approved_by

Identifier of who approved KYC check

Type:

Optional[str]

approved_reason

Reason for approving this KYC check

Type:

Optional[str]

approved_at

Datetime that this KYC check was approved

Type:

Optional[datetime]

CIPDocument

class alpaca.broker.models.cip.CIPDocument(*, id: str, result: CIPResult | None = None, status: CIPStatus | None = None, created_at: datetime | None = None, date_of_birth: datetime | None = None, date_of_expiry: datetime | None = None, document_numbers: List[str] | None = None, document_type: str | None = None, first_name: str | None = None, last_name: str | None = None, gender: str | None = None, issuing_country: str | None = None, nationality: str | None = None, age_validation: CIPResult | None = None, compromised_document: CIPResult | None = None, police_record: CIPStatus | None = None, data_comparison: CIPResult | None = None, data_comparison_breakdown: str | None = None, image_integrity: CIPResult | None = None, image_integrity_breakdown: str | None = None, visual_authenticity: str | None = None)

Represents results of checking a document for CIPInfo

id

Your internal ID of check

Type:

str

result

Overall result of specific check

Type:

Optional[CIPResult]

status

Overall status of specific check

Type:

Optional[CIPStatus]

created_at

Datetime for when this check was done

Type:

Optional[datetime]

date_of_birth

DOB for applicant if found on document

Type:

Optional[datetime]

date_of_expiry

date of expiry for the checked document

Type:

Optional[datetime]

document_numbers

Number of the document that was checked

Type:

Optional[List[str]]

document_type

Type of the document that was checked

Type:

Optional[str]

first_name

First name extracted from the document

Type:

Optional[str]

last_name

Last name extracted from the document

Type:

Optional[str]

gender

Gender info extracted from the document

Type:

Optional[str]

issuing_country

Country for which issued the document

Type:

Optional[str]

nationality

Nationality extracted from the document

Type:

Optional[str]

age_validation

Result of checks on whether the age calculated from the document’s date of birth data point is greater than or equal to the minimum accepted age set at account level

Type:

Optional[CIPResult]

compromised_document

Result of check on whether the image of the document has been found in our internal database of compromised documents

Type:

Optional[CIPResult]

police_record

Result of check on whether the document has been identified as lost, stolen or otherwise compromised

Type:

Optional[CIPStatus]

data_comparison

Result of check on whether data on the document is consistent with data provided when creating an applicant through the API

Type:

Optional[CIPResult]

data_comparison_breakdown

json object representing the results of the various sub-checks done when calculating the result on data_comparison. Example: {“date_of_birth”: “clear”, “date_of_expiry”: “clear” “document_numbers”: “clear”, “document_type”: “clear”, “first_name”: “clear”, “gender”: “clear”, “issuing_country”: “clear”, “last_name”: “clear”}

Type:

Optional[str]

image_integrity

Result of checks on whether the document was of sufficient quality to verify

Type:

Optional[CIPResult]

image_integrity_breakdown

json object representing the results of the various sub-checks done when calculating the result on image_integrity. Example: example: {“colour_picture”: “clear”, “conclusive_document_quality”: “clear”, “image_quality”: “clear”, “supported_document”: “clear”}

Type:

Optional[str]

visual_authenticity

json object representing the the various sub-checks done when determening whether visual (non-textual) elements are correct given the document type. Example: { “digital_tampering”: “clear”, “face_detection”: “clear”, “fonts”: “clear”, “original_document_present”: “clear”, “picture_face_integrity”: “clear”, “security_features”: “clear”, “template”: “clear”}

Type:

Optional[str]

CIPPhoto

class alpaca.broker.models.cip.CIPPhoto(*, id: str, result: CIPResult | None = None, status: CIPStatus | None = None, created_at: datetime | None = None, face_comparision: CIPResult | None = None, face_comparison_breakdown: str | None = None, image_integrity: CIPResult | None = None, image_integrity_breakdown: str | None = None, visual_authenticity: CIPResult | None = None, visual_authenticity_breakdown: str | None = None)

Represents the results of checking a Photo for CIPInfo

id

Your internal ID of check

Type:

str

result

Overall result of check

Type:

Optional[CIPResult]

status

Overall status of check

Type:

Optional[CIPStatus]

created_at

datetime of when check happened

Type:

Optional[datetime]

face_comparision

Checks whether the face in the document matches the face in the live photo

Type:

Optional[CIPResult]

face_comparison_breakdown

a json object representing the breakdown of sub-checks done in face_comparison. Example: {“face_match”:{“result”: “clear”,“properties”:{“score”: “80”}}}

Type:

Optional[str]

image_integrity

Checks whether the quality and integrity of the uploaded files were sufficient to perform a face comparison

Type:

Optional[CIPResult]

image_integrity_breakdown

a json object representing the breakdown of sub-checks done in image_integrity. Example {“face_detected”:{“result”: “clear”},“source_integrity”: {“result”: “clear”}}

Type:

Optional[str]

visual_authenticity

Checks whether the person in the live photo is real (not a spoof)

Type:

Optional[CIPResult]

visual_authenticity_breakdown

a json object representing the breakdown of sub-checks don in visual_authenticity. Example {“spoofing_detection”: {“result”: “clear”,“properties”: {“score”: “26”}}}}

Type:

Optional[str]

CIPIdentity

class alpaca.broker.models.cip.CIPIdentity(*, id: str, result: CIPResult | None = None, status: CIPStatus | None = None, created_at: datetime | None = None, matched_address: CIPResult | None = None, matched_addresses: str | None = None, sources: CIPResult | None = None, sources_breakdown: str | None = None, address: CIPResult | None = None, address_breakdown: str | None = None, date_of_birth: CIPResult | None = None, date_of_birth_breakdown: str | None = None, tax_id: CIPResult | None = None, tax_id_breakdown: str | None = None)

Represents the results of running an identity check for a CIPInfo

id

Your internal ID of check

Type:

str

result

Overall result of check

Type:

Optional[CIPResult]

status

Overall status of check

Type:

Optional[CIPStatus]

created_at

datetime when identity check happened

Type:

Optional[datetime]

matched_address

Represents of the address matched for the applicant

Type:

Optional[CIPResult]

matched_addresses

a json object representing the results of the check done in matched_address Example: [{“id”: “19099121”,“match_types”:[“credit_agencies”,“voting_register”]}]

Type:

Optional[str]

sources

Shows the total number of sources found for applicant’s identity. (TODO: What? This doesnt make any sense its a CIPResult not a number but that’s whats in the docs)

Type:

Optional[CIPResult]

sources_breakdown

a json object representing the breakdown of sources field. For example: {“total_sources”: {“result”: “clear”,“properties”: {“total_number_of_sources”: “3”}}}

Type:

Optional[str]

address

Result if it was cleared against a data source

Type:

Optional[CIPResult]

address_breakdown

a json object representing the breakdown of the address field. For example: {“credit_agencies”: {“result”: “clear”,“properties”:{“number_of_matches”:“1”}}

Type:

Optional[str]

date_of_birth

Result if it was cleared against a data source

Type:

Optional[CIPResult]

date_of_birth_breakdown

a json object representing the breakdown of the date_of_birth field. For example: example: {“credit_agencies”:{“result”: “clear”,“properties”: {“number_of_matches”: “1”}}

Type:

Optional[str]

tax_id

Result if it was cleared against a data source

Type:

Optional[CIPResult]

tax_id_breakdown

a json object representing the breakdown of the tax_id field

Type:

Optional[str]

CIPWatchlist

class alpaca.broker.models.cip.CIPWatchlist(*, id: str, result: CIPResult | None = None, status: CIPStatus | None = None, created_at: datetime | None = None, records: str | None = None, politically_exposed_person: CIPResult | None = None, sanction: CIPResult | None = None, adverse_media: CIPResult | None = None, monitored_lists: CIPResult | None = None)

Represents the result of checking to see if the applicant is in any watchlists for a CIPInfo

TODO: We’re missing almost entirely documentation in prod for this as well as even internal documentation

no clue what these fields are supposed to be or if they’re even close to correct.

id

Your internal ID of check

Type:

str

result

Overall result of specific check

Type:

Optional[CIPResult]

status

Overall status of specific check

Type:

Optional[CIPStatus]

created_at

datetime when check happened

Type:

Optional[datetime]

records

a json object. Example [{“text”: “Record info”}]

Type:

Optional[str]

politically_exposed_person

Result if it was cleared against a data source

Type:

Optional[CIPResult]

sanction

Result if it was cleared against a data source

Type:

Optional[CIPResult]

adverse_media

Result if it was cleared against a data source

Type:

Optional[CIPResult]

monitored_lists

Result if it was cleared against a data source

Type:

Optional[CIPResult]

CIPInfo

class alpaca.broker.models.cip.CIPInfo(*args, id: UUID, account_id: UUID, provider_name: List[CIPProvider], created_at: datetime, updated_at: datetime, kyc: CIPKYCInfo | None = None, document: CIPDocument | None = None, photo: CIPPhoto | None = None, identity: CIPIdentity | None = None, watchlist: CIPWatchlist | None = None)

The Customer Identification Program (CIP) API allows you to submit the CIP results received from your KYC provider.

This model is how to represent that information when talking to Alpaca

Parameters:
  • id (UUID) – ID of this CIPInfo

  • account_id (UUID) – UUID of the Account instance this CIPInfo is for

  • provider_name (List[CIPProvider]) – List of KYC providers this information came from

  • created_at (datetime) – date and time this CIPInfo was first uploaded to Alpaca

  • updated_at (datetime) – date and time that this CIPInfo was last update

  • kyc (Optional[CIPKYCInfo]) – KYC info for this Account if any

  • document (Optional[CIPDocument]) – Any CIP documents uploaded for this Account

  • photo (Optional[CIPPhoto]) – Any photos attached for CIP

  • identity (Optional[CIPIdentity]) – Any CIP Identity information

  • watchlist (Optional[CIPWatchlist]) – Any CIP watchlist information

ACHRelationship

class alpaca.broker.models.funding.ACHRelationship(*, id: UUID, account_id: UUID, created_at: datetime, updated_at: datetime, status: ACHRelationshipStatus, account_owner_name: str, bank_account_type: BankAccountType, bank_account_number: str, bank_routing_number: str, nickname: str | None = None, processor_token: str | None = None)
id

ID of Relationship

Type:

UUID

account_id

ID of the Account this ACHRelationship is tied to

Type:

UUID

created_at

Date and time this relationship was created

Type:

datetime

updated_at

Date and time of when this relationship was last updated

Type:

datetime

status

Current status of the relationship

Type:

ACHRelationshipStatus

account_owner_name

Full name of the account owner

Type:

str

bank_account_type

The kind of bank account this relationship points to

Type:

BankAccountType

bank_account_number

The number of bank account that the relationship points to

Type:

str

bank_routing_number

Routing number for the bank account

Type:

str

nickname

User provided name for account

Type:

str

processor_token

If you are using Plaid, then this is a Plaid processor token.

Type:

Optional[str]

Bank

class alpaca.broker.models.funding.Bank(*, id: UUID, account_id: UUID, created_at: datetime, updated_at: datetime, name: str, status: BankStatus, country: str, state_province: str, postal_code: str, city: str, street_address: str, account_number: str, bank_code: str, bank_code_type: IdentifierType, extra_fields: BankAdditionalFields | None = None)
id

ID of Bank.

Type:

UUID

account_id

ID of the Account this Bank is tied to.

Type:

UUID

created_at

Date and time this Bank was created.

Type:

datetime

updated_at

Date and time of when this Bank was last updated.

Type:

datetime

name

Name of the bank.

Type:

str

status

The status of the bank connection.

Type:

BankStatus

country

Country where bank account is located.

Type:

str

state_province

State/Province where bank is located.

Type:

str

postal_code

Postal code where bank is located.

Type:

str

city

City where bank is located.

Type:

str

street_address

Street address where bank is located.

Type:

str

account_number

The bank account number.

Type:

str

bank_code

The bank account code.

Type:

str

bank_code_type

The bank identifier.

Type:

IdentifierType

extra_fields

Intermediary-bank wire instructions.

Type:

Optional[BankAdditionalFields]

Transfer

class alpaca.broker.models.funding.Transfer(*, id: UUID, account_id: UUID, created_at: datetime, updated_at: datetime | None = None, expires_at: datetime | None = None, relationship_id: UUID | None = None, bank_id: UUID | None = None, amount: str, type: TransferType, status: TransferStatus, direction: TransferDirection, reason: str | None = None, requested_amount: str | None = None, fee: str | None = None, fee_payment_method: FeePaymentMethod | None = None, additional_information: str | None = None, ira: TransferIRADetails | None = None)
id

ID of Transfer.

Type:

UUID

account_id

ID of the Account this Transfer is tied to.

Type:

UUID

created_at

Date and time when this Transfer was created.

Type:

datetime

updated_at

Date and time of when this Transfer was last updated.

Type:

datetime

expires_at

Date and time of when this Transfer will expire.

Type:

datetime

relationship_id

ID of the funding relationship used to make the transfer.

Type:

UUID

amount

The amount the recipient will receive after any applicable fees are deducted.

Type:

str

type

The type of transfer.

Type:

TransferType

status

The status of the transfer.

Type:

TransferStatus

direction

The direction of the transfer.

Type:

TransferDirection

reason

Reasoning associated with the current status.

Type:

Optional[str]

requested_amount

Amount entered upon creation of a transfer entity.

Type:

Optional[str]

fee

Dollar amount of any applicable fees.

Type:

Optional[str]

fee_payment_method

Denotes how any applicable fees will be paid.

Type:

Optional[FeePaymentMethod]

additional_information

Additional information provided with wire transfers.

Type:

Optional[str]

ira

IRA distribution and withholding details.

Type:

Optional[TransferIRADetails]

Journal

class alpaca.broker.models.journals.Journal(*, id: UUID, to_account: UUID, from_account: UUID, entry_type: JournalEntryType, status: JournalStatus, net_amount: float | None = None, symbol: str | None = None, qty: float | None = None, price: float | None = None, description: str | None = None, settle_date: date | None = None, system_date: date | None = None, transmitter_name: str | None = None, transmitter_account_number: str | None = None, transmitter_address: str | None = None, transmitter_financial_institution: str | None = None, transmitter_timestamp: str | None = None, currency: SupportedCurrencies | None = None)

Represents a transfer of cash or securities from one account to another.

There are two types of journals Cash Journals and Security Journals.

Travel Rule In an effort to fight the criminal financial transactions, FinCEN enacted the Travel Rule that applies to fund transfers of more than $3,000. When you use Journal API to bundle a bulk of transfers for the end-users, you will need to tell about the breakdown and each transmitter information using the optional fields of the POST request.

Learn more about journals here: https://alpaca.markets/docs/api-references/broker-api/journals/

id

The journal ID

Type:

UUID

to_account

The account ID that received the journal.

Type:

UUID

from_account

The account ID that initiates the journal.

Type:

UUID

entry_type

Whether the journal is a cash or security journal.

Type:

JournalEntryType

status

The lifecycle status of the journal.

Type:

JournalStatus

symbol

For security journals, the symbol identifier of the security being journaled.

Type:

Optional[str]

qty

For security journals, the quantity of the security being journaled.

Type:

Optional[float]

price

For security journals, the price at which the security is being journaled at.

Type:

Optional[float]

net_amount

For cash journals, the total cash amount journaled

Type:

Optional[float]

description

Journal description. It can include fixtures for sandbox API.

Type:

Optional[str]

settle_date
Type:

Optional[date]

system_date
Type:

Optional[date]

transmitter_name

For cash journals, travel rule related name info.

Type:

Optional[str]

transmitter_account_number

For cash journals, travel rule account number info.

Type:

Optional[str]

transmitter_address

For cash journals, travel rule related address info.

Type:

Optional[str]

transmitter_financial_institution

For cash journals, travel rule related institution info.

Type:

Optional[str]

transmitter_timestamp

For cash journals, travel rule related timestamp info.

Type:

Optional[str]

BatchJournalResponse

class alpaca.broker.models.journals.BatchJournalResponse(*, id: UUID, to_account: UUID, from_account: UUID, entry_type: JournalEntryType, status: JournalStatus, net_amount: float | None = None, symbol: str | None = None, qty: float | None = None, price: float | None = None, description: str | None = None, settle_date: date | None = None, system_date: date | None = None, transmitter_name: str | None = None, transmitter_account_number: str | None = None, transmitter_address: str | None = None, transmitter_financial_institution: str | None = None, transmitter_timestamp: str | None = None, currency: SupportedCurrencies | None = None, error_message: str | None = None)

Represents a journal response from a batch journal request.

error_message

An message that contains error details for failed journals.

Type:

Optional[str]