{"components":{"examples":{"CryptoOrderResponse":{"value":{"asset_class":"crypto","asset_id":"a1733398-6acc-4e92-af24-0d0667f78713","canceled_at":null,"client_order_id":"5b5d3d67-06ad-4ffa-af65-a117d0fc5a59","created_at":"2023-12-12T22:36:51.337711497Z","expired_at":null,"extended_hours":false,"failed_at":null,"filled_at":null,"filled_avg_price":null,"filled_qty":"0","hwm":null,"id":"38e482f3-79a8-4f75-a057-f07a1ec6a397","legs":null,"limit_price":"2100","notional":null,"order_class":"","order_type":"limit","qty":"0.02","replaced_at":null,"replaced_by":null,"replaces":null,"side":"buy","source":null,"status":"pending_new","stop_price":null,"submitted_at":"2023-12-12T22:36:51.313261061Z","subtag":null,"symbol":"ETH/USD","time_in_force":"gtc","trail_percent":null,"trail_price":null,"type":"limit","updated_at":"2023-12-12T22:36:51.337754768Z"}},"EquityOrderResponse":{"value":{"asset_class":"us_equity","asset_id":"b0b6dd9d-8b9b-48a9-ba46-b9d54906e415","canceled_at":null,"client_order_id":"5680c4bc-9ac1-4a12-a44c-df427ba53032","created_at":"2023-12-12T22:31:24.668464435Z","expired_at":null,"extended_hours":false,"failed_at":null,"filled_at":null,"filled_avg_price":null,"filled_qty":"0","hwm":null,"id":"7b08df51-c1ac-453c-99f9-323a5f075f0d","legs":null,"limit_price":"150","notional":null,"order_class":"","order_type":"limit","qty":"2","replaced_at":null,"replaced_by":null,"replaces":null,"side":"buy","source":null,"status":"accepted","stop_price":null,"submitted_at":"2023-12-12T22:31:24.577215743Z","subtag":null,"symbol":"AAPL","time_in_force":"gtc","trail_percent":null,"trail_price":null,"type":"limit","updated_at":"2023-12-12T22:31:24.668464435Z"}},"IPOOrderResponse":{"value":{"asset_class":"ipo","asset_id":"9b6c7c1a-9eb2-4d4a-8a3a-1bf4c1d5cbaa","canceled_at":null,"client_order_id":"0b3a90b6-6b5c-4d83-8c0e-9b3eaf4a8d11","created_at":"2025-09-15T13:30:42.117344821Z","expired_at":null,"extended_hours":false,"failed_at":null,"filled_at":null,"filled_avg_price":null,"filled_qty":"0","hwm":null,"id":"5e2a8f1a-9c10-4d3a-8c64-7f59c1d18c11","legs":null,"limit_price":null,"notional":"500","order_class":"","order_type":"market","qty":null,"replaced_at":null,"replaced_by":null,"replaces":null,"side":"buy","source":null,"status":"accepted","stop_price":null,"submitted_at":"2025-09-15T13:30:42.094518219Z","subtag":null,"symbol":"FI111225","time_in_force":"gtc","trail_percent":null,"trail_price":null,"type":"market","updated_at":"2025-09-15T13:30:42.117344821Z"}},"MultilegOptionsOrderResponse":{"value":{"asset_class":"","asset_id":"","canceled_at":null,"client_order_id":"646b1fe6-b212-4f54-94c6-429e7bcdee04","created_at":"2024-12-10T16:15:53.677230742Z","expired_at":null,"extended_hours":false,"failed_at":null,"filled_at":"2024-12-10T16:15:53.694Z","filled_avg_price":"1.28","filled_qty":"1","hwm":null,"id":"83f37e9f-6b1f-49ed-8fc6-3e6af716323f","legs":[{"asset_class":"us_option","asset_id":"f0ea14b2-8a49-4e9b-89d1-894c6e518a76","canceled_at":null,"client_order_id":"cc8cc104-fe43-476c-b25c-f62650fb73f9","created_at":"2024-12-10T16:15:53.677230742Z","expired_at":null,"expires_at":"2024-12-10T21:00:00Z","extended_hours":false,"failed_at":null,"filled_at":"2024-12-10T16:15:53.694Z","filled_avg_price":"0.43","filled_qty":"3","hwm":null,"id":"df4ff24a-c58a-4e37-8b9f-ef32b83a11f2","legs":null,"limit_price":null,"notional":null,"order_class":"mleg","order_type":"","position_intent":"buy_to_open","qty":"3","ratio_qty":"3","replaced_at":null,"replaced_by":null,"replaces":null,"side":"buy","source":null,"status":"filled","stop_price":null,"submitted_at":"2024-12-10T16:15:53.684952901Z","subtag":null,"symbol":"AAPL241213C00250000","time_in_force":"day","trail_percent":null,"trail_price":null,"type":"","updated_at":"2024-12-10T16:15:53.725091158Z"},{"asset_class":"us_option","asset_id":"f89940db-eeb1-46e6-8f9b-bb1f27a0b395","canceled_at":null,"client_order_id":"0bd2d36d-4af2-4dfb-8418-333a5d5026fa","created_at":"2024-12-10T16:15:53.677230742Z","expired_at":null,"expires_at":"2024-12-10T21:00:00Z","extended_hours":false,"failed_at":null,"filled_at":"2024-12-10T16:15:53.694Z","filled_avg_price":"0.01","filled_qty":"1","hwm":null,"id":"ecd91110-c34d-4e9d-a7bf-a9c27c40f8b5","legs":null,"limit_price":null,"notional":null,"order_class":"mleg","order_type":"","position_intent":"sell_to_open","qty":"1","ratio_qty":"1","replaced_at":null,"replaced_by":null,"replaces":null,"side":"sell","source":null,"status":"filled","stop_price":null,"submitted_at":"2024-12-10T16:15:53.684952901Z","subtag":null,"symbol":"AAPL241213C00260000","time_in_force":"day","trail_percent":null,"trail_price":null,"type":"","updated_at":"2024-12-10T16:15:53.708983759Z"}],"limit_price":"10","notional":null,"order_class":"mleg","order_type":"limit","qty":"1","replaced_at":null,"replaced_by":null,"replaces":null,"side":"","source":null,"status":"filled","stop_price":null,"submitted_at":"2024-12-10T16:15:53.684952901Z","subtag":null,"symbol":"","time_in_force":"day","trail_percent":null,"trail_price":null,"type":"limit","updated_at":"2024-12-10T16:15:53.725139688Z"}},"OptionOrderResponse":{"value":{"asset_class":"us_option","asset_id":"98359ef7-5124-49f3-85ea-5cf02df6defa","canceled_at":null,"client_order_id":"58cd43a7-029e-457e-b77f-cd4f61f00f2a","created_at":"2023-12-12T21:35:49.102449524Z","expired_at":null,"extended_hours":false,"failed_at":null,"filled_at":null,"filled_avg_price":null,"filled_qty":"0","hwm":null,"id":"30a077fa-96f6-4f20-a052-4b921ee2f243","legs":null,"limit_price":"10","notional":null,"order_class":"simple","order_type":"limit","qty":"2","replaced_at":null,"replaced_by":null,"replaces":null,"side":"buy","source":null,"status":"pending_new","stop_price":null,"submitted_at":"2023-12-12T21:35:49.056332248Z","subtag":null,"symbol":"AAPL250620C00100000","time_in_force":"day","trail_percent":null,"trail_price":null,"type":"limit","updated_at":"2023-12-12T21:35:49.102504673Z"}},"SystemEventV2":{"value":{"at":"2026-01-05T10:28:23.163857Z","description":"End-of-day balances are now available.","event_id":"01F535Y1FVY8WZHE763HCNS8SZ","system_date":"2026-01-05","type":"eod_balances_ready"}},"TradeUpdateEventV2MultilegOptionsFill":{"value":{"account_id":"529248ad-c4cc-4a50-bea4-6bfd2953f83a","at":"2025-01-14T16:05:51.872012Z","event":"fill","event_id":"01G112NTT0XAXKDZK3AABK68TH","legs":[{"execution_id":"ccf7d1dc-78e1-4eb5-92c6-5c86b2bcca8f","order_id":"8d58279f-7dc8-415f-8495-32f394935509","price":"0.04","qty":"1","symbol":"AAPL250117P00200000","timestamp":"2025-01-14T16:05:51.867802561Z"},{"execution_id":"06f94555-6db7-4059-a4c4-0b993084ccd0","order_id":"8b0e2cff-eace-4e6a-8810-cad42c63df59","price":"0.03","qty":"1","symbol":"AAPL250117C00250000","timestamp":"2025-01-14T16:05:51.867813051Z"}],"order":{"asset_class":"","asset_id":"00000000-0000-0000-0000-000000000000","cancel_requested_at":null,"canceled_at":null,"client_order_id":"9d2f39de-adae-4dae-a67e-838bf21fb5ae","created_at":"2025-01-14T16:05:51.79424769Z","expired_at":null,"extended_hours":false,"failed_at":null,"filled_at":"2025-01-14T16:05:51.867813051Z","filled_avg_price":"0.07","filled_qty":"1","hwm":null,"id":"8af45a94-0b35-4053-ad4e-716c6783fcc9","legs":[{"asset_class":"us_option","asset_id":"8d1ba989-d98b-4551-889f-4647c2e86e20","cancel_requested_at":null,"canceled_at":null,"client_order_id":"9c5ce763-bd6f-41eb-b1b1-ed2c0b99d268","created_at":"2025-01-14T16:05:51.79424769Z","expired_at":null,"expires_at":"2025-01-14T21:00:00Z","extended_hours":false,"failed_at":null,"filled_at":"2025-01-14T16:05:51.867802561Z","filled_avg_price":"0.04","filled_qty":"1","hwm":null,"id":"8d58279f-7dc8-415f-8495-32f394935509","legs":null,"limit_price":null,"notional":null,"order_class":"mleg","order_type":"","position_intent":"buy_to_open","qty":"1","ratio_qty":"1","replaced_at":null,"replaced_by":null,"replaces":null,"side":"buy","status":"filled","stop_price":null,"submitted_at":"2025-01-14T16:05:51.800245966Z","symbol":"AAPL250117P00200000","time_in_force":"day","trail_percent":null,"trail_price":null,"type":"","updated_at":"2025-01-14T16:05:51.869810922Z"},{"asset_class":"us_option","asset_id":"e9f8c9ba-de7c-4e51-9eef-629f4cb79049","cancel_requested_at":null,"canceled_at":null,"client_order_id":"9cda9826-8fd5-4c01-8ee1-30c5286e2387","created_at":"2025-01-14T16:05:51.79424769Z","expired_at":null,"expires_at":"2025-01-14T21:00:00Z","extended_hours":false,"failed_at":null,"filled_at":"2025-01-14T16:05:51.867813051Z","filled_avg_price":"0.03","filled_qty":"1","hwm":null,"id":"8b0e2cff-eace-4e6a-8810-cad42c63df59","legs":null,"limit_price":null,"notional":null,"order_class":"mleg","order_type":"","position_intent":"buy_to_open","qty":"1","ratio_qty":"1","replaced_at":null,"replaced_by":null,"replaces":null,"side":"buy","status":"filled","stop_price":null,"submitted_at":"2025-01-14T16:05:51.802310606Z","symbol":"AAPL250117C00250000","time_in_force":"day","trail_percent":null,"trail_price":null,"type":"","updated_at":"2025-01-14T16:05:51.870879612Z"}],"limit_price":"0.6","notional":null,"order_class":"mleg","order_type":"limit","position_intent":"","qty":"1","replaced_at":null,"replaced_by":null,"replaces":null,"side":"buy","status":"filled","stop_price":null,"submitted_at":"2025-01-14T16:05:51.802310606Z","symbol":"","time_in_force":"day","trail_percent":null,"trail_price":null,"type":"limit","updated_at":"2025-01-14T16:05:51.870937762Z"},"position_qtys":{"AAPL250117C00250000":"1","AAPL250117P00200000":"1"},"price":"0.07","qty":"1","timestamp":"2025-01-14T16:05:51.867813051Z"}},"TradeUpdateEventV2New":{"value":{"account_id":"529248ad-c4cc-4a50-bea4-6bfd2953f83a","at":"2022-04-19T14:12:30.656741Z","event":"new","event_id":"01G112NTT0XAXKDZK3AABK68TH","execution_id":"7e544af3-3104-4e1a-8cbc-dab2624949ff","order":{"asset_class":"us_equity","asset_id":"a4778bc8-fad1-47b7-87fe-d5cde10d43f4","cancel_requested_at":null,"canceled_at":null,"client_order_id":"6d873193-dac6-4f72-8e13-c57853a9339d","commission":"1","created_at":"2022-04-19T10:12:30.57117938-04:00","expired_at":null,"expires_at":"2022-04-19T21:00:00Z","extended_hours":false,"failed_at":null,"filled_at":null,"filled_avg_price":null,"filled_qty":"0","hwm":null,"id":"edada91a-8b55-4916-a153-8c7a9817e708","legs":null,"limit_price":"700","notional":null,"order_class":"","order_type":"limit","position_intent":"buy_to_open","qty":"4","replaced_at":null,"replaced_by":null,"replaces":null,"side":"buy","status":"new","stop_price":null,"submitted_at":"2022-04-19T10:12:30.403135025-04:00","symbol":"TSLA","time_in_force":"day","trail_percent":null,"trail_price":null,"type":"limit","updated_at":"2022-04-19T10:12:30.609783218-04:00"},"previous_execution_id":"aeb60660-412f-4537-8d1f-1101b3fc8f64","timestamp":"2022-04-19T14:12:30.602193534Z"}}},"headers":{"ratelimit_limit":{"description":"Request limit per minute.","example":100,"schema":{"type":"integer"}},"ratelimit_remaining":{"description":"Request limit per minute remaining.","example":90,"schema":{"type":"integer"}},"ratelimit_reset":{"description":"The UNIX epoch when the remaining quota changes.","example":1674044551,"schema":{"type":"integer"}}},"parameters":{"AccountDocumentType":{"description":"The type of the account document","in":"query","name":"type","required":false,"schema":{"enum":["account_application","account_statement","crypto_account_statement","options_application","tax_statement","trade_confirmation_json","trade_confirmation"],"example":"account_statement","type":"string"}},"AccountID":{"description":"Account identifier.","in":"path","name":"account_id","required":true,"schema":{"format":"uuid","type":"string"}},"ActivityType":{"description":"see ActivityType model for details about what the different types mean","in":"path","name":"activity_type","required":true,"schema":{"enum":["FILL","ACATC","ACATS","CGD","CIL","CSD","CSW","DIV","DIVCGL","DIVCGS","DIVNRA","DIVROC","DIVTXEX","FEE","INT","MEM","JNLC","JNLS","MA","OPASN","OPCA","OPCSH","OPEXC","OPEXP","OPTRD","PTC","REORG","SPIN","SPLIT","FOPT"],"type":"string"}},"After":{"description":"The response will include only ones submitted after this timestamp (exclusive)","in":"query","name":"after","schema":{"example":"2021-03-16T18:38:01.942282Z","format":"date-time","type":"string"}},"AssetClass":{"description":"A comma-separated list of asset classes, the response will include only orders in the specified asset classes. By specifying `us_option` as the class, you can query option orders by underlying symbol using the symbols parameter.","in":"query","name":"asset_class","schema":{"items":{"enum":["us_equity","us_option","crypto","all"],"type":"string"},"type":"array"}},"Direction":{"description":"The chronological order of response based on the submission time. asc or desc. Defaults to desc.","in":"query","name":"direction","schema":{"enum":["asc","desc"],"example":"desc","type":"string"}},"DocumentID":{"description":"Document identifier.","in":"path","name":"document_id","required":true,"schema":{"format":"uuid","type":"string"}},"OrderID":{"description":"Order identifier.","in":"path","name":"order_id","required":true,"schema":{"type":"string"}},"PageToken":{"description":"Used for pagination, this token retrieves the next page of results. It is obtained from the response of the preceding page when additional pages are available.","in":"query","name":"page_token","required":false,"schema":{"example":"MA==","type":"string"}},"Sort":{"description":"The chronological order of response based on the submission time. asc or desc. Defaults to desc.","in":"query","name":"sort","schema":{"enum":["asc","desc"],"example":"desc","type":"string"}},"Symbols":{"description":"A comma-separated list of symbols to filter by.","in":"query","name":"symbols","schema":{"example":"AAPL,TSLA,MSFT","type":"string"}},"Until":{"description":"The response will include only ones submitted until this timestamp (exclusive)","in":"query","name":"until","schema":{"example":"2021-03-16T18:38:01.942282Z","format":"date-time","type":"string"}},"end":{"description":"The last date to retrieve data for (inclusive). Default: one week from the start date.\n","example":"2030-01-01","in":"query","name":"end","required":false,"schema":{"format":"date","type":"string"}},"market":{"description":"The market identifier. MIC, BIC, or acronym.\n\nAvailable market codes by region:\n\n**United States**\n- `BMO`: Bank of Montreal. US banking calendar (US operations).\n- `BNYM`: The Bank of New York Mellon. US banking calendar.\n- `BOATS`: Blue Ocean Alternative Trading System. US overnight trading.\n- `IEX`: Investors Exchange. US equities.\n- `IEXG`: Investors Exchange. US equities.\n- `NASDAQ`: National Association of Securities Dealers Automated Quotations. US equities.\n- `NYSE`: New York Stock Exchange. US equities.\n- `OCEA`: BlueOcean ATS. US overnight trading.\n- `OPRA`: Options Price Reporting Authority. US options.\n- `OTC`: Over-The-Counter. US OTC equities.\n- `OTCM`: OTC Markets. US OTC equities.\n- `SIFMA`: Securities Industry and Financial Markets Association. US bonds.\n- `XNAS`: NASDAQ. US equities.\n- `XNYS`: New York Stock Exchange. US equities.\n\n**Europe**\n- `CEUX`: Cboe CEUX Europe. European equities (Cboe Netherlands).\n- `CHIX`: Cboe CHIX Europe. European equities (Cboe UK).\n- `ISE`: Euronext Dublin. Irish equities.\n- `LSE`: London Stock Exchange. UK equities.\n- `MTA`: Euronext Milan. Italian equities.\n- `MTAA`: Euronext Milan. Italian equities.\n- `XAMS`: Euronext Amsterdam. Dutch equities.\n- `XBRU`: Euronext Brussels. Belgian equities.\n- `XDUB`: Euronext Dublin. Irish equities.\n- `XETR`: Frankfurt Stock Exchange. German equities.\n- `XETRA`: Frankfurt Stock Exchange. German equities.\n- `XLIS`: Euronext Lisbon. Portuguese equities.\n- `XLON`: London Stock Exchange. UK equities.\n- `XPAR`: Euronext Paris. French equities.\n\n**Asia & Middle East**\n- `HKEX`: Hong Kong Stock Exchange. Hong Kong equities.\n- `JPX`: Japan Exchange Group. Japanese equities.\n- `TADAWUL`: Saudi Stock Exchange. Saudi equities.\n- `XHKG`: Hong Kong Stock Exchange. Hong Kong equities.\n- `XSAU`: Saudi Stock Exchange. Saudi equities.\n- `XTKS`: Japan Exchange Group. Japanese equities.\n","in":"path","name":"market","required":true,"schema":{"$ref":"#/components/schemas/market"}},"markets":{"description":"Comma-separated list of markets. Available market codes by region:\n\n**United States**\n- `BMO`: Bank of Montreal. US banking calendar (US operations).\n- `BNYM`: The Bank of New York Mellon. US banking calendar.\n- `BOATS`: Blue Ocean Alternative Trading System. US overnight trading.\n- `IEX`: Investors Exchange. US equities.\n- `IEXG`: Investors Exchange. US equities.\n- `NASDAQ`: National Association of Securities Dealers Automated Quotations. US equities.\n- `NYSE`: New York Stock Exchange. US equities.\n- `OCEA`: BlueOcean ATS. US overnight trading.\n- `OPRA`: Options Price Reporting Authority. US options.\n- `OTC`: Over-The-Counter. US OTC equities.\n- `OTCM`: OTC Markets. US OTC equities.\n- `SIFMA`: Securities Industry and Financial Markets Association. US bonds.\n- `XNAS`: NASDAQ. US equities.\n- `XNYS`: New York Stock Exchange. US equities.\n\n**Europe**\n- `CEUX`: Cboe CEUX Europe. European equities (Cboe Netherlands).\n- `CHIX`: Cboe CHIX Europe. European equities (Cboe UK).\n- `ISE`: Euronext Dublin. Irish equities.\n- `LSE`: London Stock Exchange. UK equities.\n- `MTA`: Euronext Milan. Italian equities.\n- `MTAA`: Euronext Milan. Italian equities.\n- `XAMS`: Euronext Amsterdam. Dutch equities.\n- `XBRU`: Euronext Brussels. Belgian equities.\n- `XDUB`: Euronext Dublin. Irish equities.\n- `XETR`: Frankfurt Stock Exchange. German equities.\n- `XETRA`: Frankfurt Stock Exchange. German equities.\n- `XLIS`: Euronext Lisbon. Portuguese equities.\n- `XLON`: London Stock Exchange. UK equities.\n- `XPAR`: Euronext Paris. French equities.\n\n**Asia & Middle East**\n- `HKEX`: Hong Kong Stock Exchange. Hong Kong equities.\n- `JPX`: Japan Exchange Group. Japanese equities.\n- `TADAWUL`: Saudi Stock Exchange. Saudi equities.\n- `XHKG`: Hong Kong Stock Exchange. Hong Kong equities.\n- `XSAU`: Saudi Stock Exchange. Saudi equities.\n- `XTKS`: Japan Exchange Group. Japanese equities.\n","example":"NYSE,LSE","in":"query","name":"markets","schema":{"type":"string"}},"start":{"description":"The first date to retrieve data for (inclusive). Default: today.\n","example":"2025-01-01","in":"query","name":"start","required":false,"schema":{"format":"date","type":"string"}},"time":{"description":"Instead of the current time, use this time for the clock.","in":"query","name":"time","required":false,"schema":{"format":"date-time","type":"string"}},"timezone":{"description":"Timezone of the times. Default: the timezone of the market.\n","in":"query","name":"timezone","required":false,"schema":{"enum":["UTC"],"type":"string"}}},"responses":{"400":{"description":"One of the request parameters is invalid. See the returned message for details.\n","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}}},"429":{"description":"Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you're under the rate limit.\n","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}}},"500":{"description":"Internal server error. We recommend retrying these later. If the issue persists, please contact us on Slack or on the Community Forum.\n"},"BadRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Malformed input."},"Forbidden":{"content":{"application/json":{"schema":{"type":"string"}}},"description":"Request is forbidden"},"NotFound":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Resource does not exist."}},"schemas":{"Account":{"description":"Represents high level account info. Used when returning entire account information would not be useful like the getAllAccounts operation","properties":{"account_number":{"description":"A human-readable account number that can be shown to the end user","nullable":true,"type":"string"},"account_type":{"$ref":"#/components/schemas/AccountType"},"agreements":{"items":{"$ref":"#/components/schemas/Agreement"},"type":"array"},"cash_interest":{"$ref":"#/components/schemas/AccountCashInterestResponse"},"contact":{"$ref":"#/components/schemas/Contact"},"created_at":{"description":"Timestamp (RFC3339) of account creation.","format":"date-time","type":"string"},"crypto_status":{"$ref":"#/components/schemas/AccountStatus"},"currency":{"$ref":"#/components/schemas/Currency"},"disclosures":{"$ref":"#/components/schemas/Disclosures"},"documents":{"description":"The documents associated with the primary owner of the account","items":{"$ref":"#/components/schemas/OwnerDocument"},"type":"array"},"enabled_assets":{"description":"Assets the user has enabled and is able to trade once status and/or crypto_status are ACTIVE","items":{"$ref":"#/components/schemas/AssetClass"},"type":"array"},"fpsl":{"$ref":"#/components/schemas/AccountFPSLResponse"},"id":{"description":"UUID that identifies the account for later reference","format":"uuid","type":"string"},"identity":{"$ref":"#/components/schemas/Identity"},"last_equity":{"description":"EOD equity calculation (cash + long market value + short market value)","format":"decimal","type":"string"},"primary_account_holder_id":{"description":"UUID that identifies the primary account holder (party) for accounts opened under the Multi-Live Accounts (MLA) flow.\nOnly populated when the account was created by referencing an existing account holder via `primary_account_holder_id`\non `POST /v1/accounts`. Otherwise `null`. Currently only supported for `account_type` of `trading` and `ira`.\n","format":"uuid","nullable":true,"type":"string"},"status":{"$ref":"#/components/schemas/AccountStatus"},"trusted_contact":{"$ref":"#/components/schemas/TrustedContact"}},"required":["id","account_number","status","currency","created_at","last_equity"],"type":"object","x-examples":{"example-1":{"account_number":"9034005019","created_at":"2019-09-30T23:55:31.185998Z","currency":"USD","id":"0d18ae51-3c94-4511-b209-101e1666416b","last_equity":"1500.65","primary_account_holder_id":null,"status":"APPROVED"}}},"AccountCashInterestEvent":{"description":"This property is included when the account's cash interest program had changed due to an enrollment, APR tier change, or unenrollment.\nThe from and to status or APR tier name will be included in the event, depending on the change.\n","properties":{"apr_tier_name_from":{"description":"The APR tier name before the change","type":"string"},"apr_tier_name_to":{"description":"The APR tier name after the change","type":"string"},"currency":{"description":"The currency of the cash interest program that changed.","example":"USD","type":"string"},"status_from":{"description":"The cash_interest program status of the account before the change","type":"string"},"status_to":{"description":"The cash_interest program status of the account after the change","type":"string"}},"type":"object"},"AccountCashInterestPatch":{"description":"Use this property to change the account's configuration for the USD cash interest program.\nTo enroll the account, specify the apr_tier_name. The status should not be specified on enrollment.\nTo change the APR tier, specify the new apr_tier_name. The status should not be specified on tier changes.\nThe unenroll, set the status to INACTIVE.\nAfter any change, the response will contain a status of PENDING_CHANGE.\nAn event showing the status change to ACTIVE (for enrollment or tier changes) or INACTIVE (for unenrollment) will be generated when the change is complete.\n","properties":{"USD":{"$ref":"#/components/schemas/AccountCashInterestProgram"}},"type":"object"},"AccountCashInterestPost":{"description":"The configuration of the account's USD cash interest program when creating an account.\nIf cash_interest is not provided and there is a default APR tier defined, that tier will be used.\nTo enroll the account in a non-default APR tier, provide the cash_interest object with the desired apr_tier_name. The status should not be specified on enrollment.\nThe response will contain a status of PENDING_CHANGE. An event showing the status change to ACTIVE will be generated when the enrollment is complete.\n","properties":{"USD":{"$ref":"#/components/schemas/AccountCashInterestProgram"}},"type":"object"},"AccountCashInterestProgram":{"properties":{"apr_tier_name":{"description":"The unique name of the APR tier for a specific program","example":"gold","type":"string"},"status":{"description":"The status of the account within a cash interest program. One of:\n- **ACTIVE**\nThe account is enrolled and eligible for idle cash to be swept at the end of day (EOD).\n- **INACTIVE**\nThe account is not enrolled due to it either not being eligible (e.g. the updated Alpaca Customer Agreement has not been signed), an APR tier needs to be assigned, or they have been unenrolled.\n- **PENDING_CHANGE**\nAn enrollment, APR Tier change, or unenrollment is in progress\n","example":"ACTIVE","type":"string"}},"type":"object"},"AccountCashInterestResponse":{"description":"The configuration and status of the account's USD cash interest program\n","properties":{"USD":{"$ref":"#/components/schemas/AccountCashInterestProgram"}},"type":"object"},"AccountConfigurations":{"description":"Represents additional configuration settings for an account","properties":{"disable_overnight_trading":{"description":"If true, overnight trading is disabled.","type":"boolean"},"dtbp_check":{"deprecated":true,"description":"both, entry, or exit. Controls Day Trading Margin Call (DTMC) checks.","enum":["both","entry","exit"],"example":"both","type":"string","x-deprecation":{"reason":"See https://docs.alpaca.markets/us/docs/understanding-finras-new-intraday-margin-rule-and-the-end-of-pdt","since":"2026-04-27T00:00:00Z","sunset":"2026-07-06T00:00:00Z"}},"fractional_trading":{"description":"If true, account is able to participate in fractional trading","type":"boolean"},"max_margin_multiplier":{"description":"Can be \"1\" or \"2\"","type":"string"},"max_options_trading_level":{"description":"The desired maximum options trading level. 0=disabled, 1=Covered Call/Cash-Secured Put, 2=Long Call/Put, 3=Spreads/Straddles.","enum":[0,1,2,3],"type":"integer"},"no_shorting":{"description":"If true, account becomes long-only mode.","type":"boolean"},"pdt_check":{"deprecated":true,"example":"entry","type":"string","x-deprecation":{"reason":"See https://docs.alpaca.markets/us/docs/understanding-finras-new-intraday-margin-rule-and-the-end-of-pdt","since":"2026-04-27T00:00:00Z","sunset":"2026-07-06T00:00:00Z"}},"ptp_no_exception_entry":{"description":"If set to true then Alpaca will accept orders for PTP symbols with no exception. Default is false.","type":"string"},"suspend_trade":{"description":"If true, new orders are blocked.","type":"boolean"},"trade_confirm_email":{"description":"all or none. If none, emails for order fills are not sent.","enum":["all","none"],"type":"string"}},"title":"AccountConfigurations","type":"object"},"AccountCreationRequest":{"description":"Represents the fields required to create a new account","properties":{"account_sub_type":{"$ref":"#/components/schemas/AccountSubType"},"account_type":{"$ref":"#/components/schemas/AccountType"},"agreements":{"description":"The client must present the Alpaca Account and Margin Agreements to the end user, and confirm they have read and agreed to the agreement.","items":{"$ref":"#/components/schemas/Agreement"},"type":"array"},"beneficiaries":{"description":"IRA Account only. A user can submit max 6 beneficiaries.","items":{"$ref":"#/components/schemas/Beneficiary"},"type":"array"},"cash_interest":{"$ref":"#/components/schemas/AccountCashInterestPost"},"contact":{"$ref":"#/components/schemas/Contact"},"currency":{"$ref":"#/components/schemas/Currency","description":"Base currency of the new account."},"disclosures":{"$ref":"#/components/schemas/Disclosures"},"documents":{"items":{"$ref":"#/components/schemas/OwnerDocumentUploadRequest"},"type":"array"},"enabled_assets":{"description":"Will default to `us_equity`. Alpaca has the ability to update the default value upon request.","items":{"$ref":"#/components/schemas/AssetClass"},"type":"array"},"fpsl":{"$ref":"#/components/schemas/AccountFPSLPost"},"identity":{"$ref":"#/components/schemas/Identity"},"investment_objective":{"description":"The user's investment objective. This field should be used instead of the deprecated `investment_objective` under identity.\n","enum":["generate_income","preserve_wealth","market_speculation","growth","balance_preserve_wealth_with_growth"],"type":"string"},"investment_time_horizon":{"description":"The expected period of time the user plan to invest to achieve his/her financial goal(s). This field should be used instead of the deprecated `investment_time_horizon` under identity.\n","enum":["less_than_1_year","1_to_2_years","3_to_5_years","6_to_10_years","more_than_10_years"],"type":"string"},"liquidity_needs":{"description":"The user's ability to quickly and easily convert to cash all or a portion of the investments in this account without experiencing significant loss in value. This field should be used instead of the deprecated `liquidity_needs` under identity.\n","enum":["very_important","important","somewhat_important","does_not_matter"],"type":"string"},"primary_account_holder_id":{"description":"UUID of an existing account holder (party) to use as the primary account holder for the new account.\nUsed to open additional accounts under the Multi-Live Accounts (MLA) flow.\n\nWhen present:\n- `contact` and `identity` must be omitted (returns HTTP 400 otherwise).\n- `agreements` must still be supplied (e.g. `customer_agreement` for trading; `customer_agreement` and `etc_agreement` for IRA).\n- Only `account_type` values of `trading` and `ira` are supported.\n","format":"uuid","type":"string"},"risk_tolerance":{"description":"The user's investment risk tolerance. This field should be used instead of the deprecated `risk_tolerance` under identity.\n","enum":["conservative","moderate","significant_risk"],"type":"string"},"trading_configurations":{"$ref":"#/components/schemas/AccountConfigurations"},"trusted_contact":{"$ref":"#/components/schemas/TrustedContact"}},"required":["contact","identity","disclosures","agreements"],"title":"AccountCreationRequest","type":"object","x-examples":{"multi-live-accounts":{"summary":"Opening an additional account for an existing account holder (MLA)","value":{"account_sub_type":"traditional","account_type":"ira","agreements":[{"agreement":"customer_agreement","ip_address":"185.13.21.99","signed_at":"2020-09-11T18:13:44Z"},{"agreement":"etc_agreement","ip_address":"185.13.21.99","signed_at":"2020-09-11T18:13:44Z"}],"enabled_assets":["us_equity"],"primary_account_holder_id":"8b5b7e4c-9f2d-4f4a-9a7b-1b2c3d4e5f60","trusted_contact":{"email_address":"jane.doe@example.com","family_name":"Doe","given_name":"Jane"}}}}},"AccountDocument":{"description":"A document associated with an account","example":{"date":"2019-09-30","id":"0d18ae51-3c94-4511-b209-101e1666416b","sub_type":"1099-Comp","type":"account_statement"},"properties":{"date":{"format":"date","type":"string"},"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"sub_type":{"description":"The sub-type of the document. This is a free-form property.","type":"string"},"type":{"$ref":"#/components/schemas/AccountDocumentType"}},"required":["id","type","date"],"type":"object"},"AccountDocumentType":{"description":"The type of the account document\n","enum":["account_application","account_statement","crypto_account_statement","options_application","tax_statement","trade_confirmation_json","trade_confirmation"],"example":"account_application","type":"string"},"AccountExtended":{"description":"Represents an account with all data available. If your api response is missing some of these fields, there is a good chance you are using a route that returns `Account` instances instead of these.","properties":{"account_name":{"type":"string"},"account_number":{"nullable":true,"type":"string"},"account_sub_type":{"$ref":"#/components/schemas/AccountSubType"},"account_type":{"$ref":"#/components/schemas/AccountType"},"agreements":{"items":{"$ref":"#/components/schemas/Agreement"},"type":"array"},"beneficiaries":{"items":{"$ref":"#/components/schemas/Beneficiary"},"type":"array"},"cash_interest":{"$ref":"#/components/schemas/AccountCashInterestResponse"},"contact":{"$ref":"#/components/schemas/Contact"},"created_at":{"format":"date-time","type":"string"},"crypto_status":{"$ref":"#/components/schemas/AccountStatus"},"currency":{"$ref":"#/components/schemas/Currency"},"custodial_account_type":{"$ref":"#/components/schemas/CustodialAccountType"},"disclosures":{"$ref":"#/components/schemas/Disclosures"},"documents":{"description":"The documents associated with the primary owner of the account","items":{"$ref":"#/components/schemas/OwnerDocument"},"type":"array"},"enabled_assets":{"items":{"$ref":"#/components/schemas/AssetClass"},"type":"array"},"fpsl":{"$ref":"#/components/schemas/AccountFPSLResponse"},"id":{"format":"uuid","type":"string"},"identity":{"$ref":"#/components/schemas/Identity"},"investment_objective":{"description":"The user's investment objective. This field should be used instead of the deprecated `investment_objective` under identity.\n","enum":["generate_income","preserve_wealth","market_speculation","growth","balance_preserve_wealth_with_growth"],"type":"string"},"investment_time_horizon":{"description":"The expected period of time the user plan to invest to achieve his/her financial goal(s). This field should be used instead of the deprecated `investment_time_horizon` under identity.\n","enum":["less_than_1_year","1_to_2_years","3_to_5_years","6_to_10_years","more_than_10_years"],"type":"string"},"kyc_results":{"$ref":"#/components/schemas/KYCResults"},"last_equity":{"format":"decimal","type":"string"},"liquidity_needs":{"description":"The user's ability to quickly and easily convert to cash all or a portion of the investments in this account without experiencing significant loss in value. This field should be used instead of the deprecated `liquidity_needs` under identity.\n","enum":["very_important","important","somewhat_important","does_not_matter"],"type":"string"},"minor_identity":{"$ref":"#/components/schemas/CustodialAccountMinorIdentity"},"primary_account_holder_id":{"description":"UUID that identifies the primary account holder (party) for accounts opened under the Multi-Live Accounts (MLA) flow.\nOnly populated when the account was created by referencing an existing account holder via `primary_account_holder_id`\non `POST /v1/accounts`. Otherwise `null`. Currently only supported for `account_type` of `trading` and `ira`.\n","format":"uuid","nullable":true,"type":"string"},"risk_tolerance":{"description":"The user's investment risk tolerance. This field should be used instead of the deprecated `risk_tolerance` under identity.\n","enum":["conservative","moderate","significant_risk"],"type":"string"},"status":{"$ref":"#/components/schemas/AccountStatus"},"trading_configurations":{"$ref":"#/components/schemas/AccountConfigurations"},"trusted_contact":{"$ref":"#/components/schemas/TrustedContact"},"usd":{"description":"values in USD. This is returned for LCT (non-USD) accounts only.","properties":{"last_equity":{"example":"123.45","format":"decimal","type":"string"}},"type":"object"}},"required":["id","account_number","status","currency","last_equity","created_at","account_type"],"type":"object","x-examples":{"example-1":{"account_number":"601842165","account_sub_type":null,"account_type":"trading","agreements":[{"agreement":"margin_agreement","ip_address":"127.0.0.1","revision":"16.2021.05","signed_at":"2022-01-21T21:25:26.579487214Z"},{"agreement":"customer_agreement","ip_address":"127.0.0.1","revision":"22.2024.08","signed_at":"2022-01-21T21:25:26.579487214Z"}],"beneficiaries":[{"date_of_birth":"1970-01-01","family_name":"Smith","given_name":"John","middle_name":"P","relationship":"spouse","share_pct":"100","tax_id":"xxx-xx-xxxx","tax_id_type":"USA_SSN","type":"primary"}],"contact":{"city":"San Mateo","country":"USA","email_address":"strange_elbakyan_97324509@example.com","phone_number":"614-555-0697","postal_code":"94401","state":"CA","street_address":["20 N San Mateo Dr"]},"created_at":"2022-01-21T21:25:26.583576Z","crypto_status":"INACTIVE","currency":"USD","disclosures":{"immediate_family_exposed":false,"is_affiliated_exchange_or_finra":false,"is_control_person":false,"is_discretionary":false,"is_politically_exposed":false},"documents":[{"content":"https://s3.amazonaws.com/stg.alpaca.markets/documents/accounts/3dcb795c-3ccc-402a-abb9-07e26a1b1326/2490f5d9-8988-4405-a3e0-d76e65de13c2.jpg","created_at":"2022-01-21T21:25:28.184231Z","document_sub_type":"passport","document_type":"identity_verification","id":"d5af1585-6c60-494d-9ea5-c5df62704229"}],"id":"3dcb795c-3ccc-402a-abb9-07e26a1b1326","identity":{"country_of_birth":"USA","country_of_citizenship":"USA","country_of_tax_residence":"USA","date_of_birth":"1970-01-01","date_of_departure_from_usa":null,"family_name":"Elbakyan","funding_source":["employment_income"],"given_name":"Strange","permanent_resident":null,"tax_id_type":"USA_SNN","visa_expiration_date":null,"visa_type":null},"last_equity":"40645.13","primary_account_holder_id":null,"status":"ACTIVE","trading_configurations":null,"trusted_contact":{"email_address":"strange_elbakyan_97324509@example.com","family_name":"Doe","given_name":"Jane"}}}},"AccountFPSLEvent":{"description":"This property is included when the account's FPSL information had changed due to an enrollment, tier change, or unenrollment.\nThe from and to status or tier id will be included in the event, depending on the change.\n","properties":{"US":{"properties":{"status_from":{"description":"The FPSL program status of the account before the change","type":"string"},"status_to":{"description":"The FPSL program status of the account after the change","type":"string"},"tier_from":{"description":"The tier id before the change","type":"string"},"tier_to":{"description":"The tier id after the change","type":"string"}},"type":"object"}},"type":"object"},"AccountFPSLItem":{"properties":{"status":{"description":"The status of the account for this FPSL market. One of:\n- **ACTIVE**\nThe account is successfully enrolled for FPSL for this market.\n- **INACTIVE**\nThe account is not enrolled for FPSL for this market due to it either not being eligible, an FPSL tier has not been assigned, or it has been unenrolled.\n","example":"ACTIVE","type":"string"},"tier_id":{"description":"The id of the FPSL tier for this market","example":"61e69015-8549-4bfd-b9c3-01e75843f47d","format":"uuid","type":"string"}},"type":"object"},"AccountFPSLItemPost":{"properties":{"tier_id":{"description":"The id of the FPSL tier for this market","example":"61e69015-8549-4bfd-b9c3-01e75843f47d","format":"uuid","type":"string"}},"type":"object"},"AccountFPSLPatch":{"description":"The account's Fully Paid Securities Lending (FPSL) configuration.\nUse this property to change the account's configuration for the FPSL program.\nTo enroll the account for a market, specify the tier_id. The status should not be specified on enrollment.\nTo change the tier, specify the new tier_id. The status should not be specified on tier changes.\nTo unenroll, set the status to INACTIVE.\nTo re-enroll the account, set the status to ACTIVE. You can also specify the tier_id in case you want to change it.\nCurrently only US market is supported.\n","properties":{"US":{"$ref":"#/components/schemas/AccountFPSLItem"}},"type":"object"},"AccountFPSLPost":{"description":"The account's Fully Paid Securities Lending (FPSL) configuration.\nTo enroll the account for a market, specify the tier_id. The status should not be specified on enrollment.\nCurrently only the US market is supported.\n","properties":{"US":{"$ref":"#/components/schemas/AccountFPSLItemPost"}},"type":"object"},"AccountFPSLResponse":{"description":"The account's Fully Paid Securities Lending (FPSL) configuration.\nThis is only returned for accounts that have FPSL enabled.\n","properties":{"US":{"$ref":"#/components/schemas/AccountFPSLItem"}},"type":"object"},"AccountStatus":{"description":"Designates the current status of this account\n\nPossible Values:\n- **INACTIVE**\nAccount not set to trade given asset.\n- **ONBOARDING**\nAn application is expected for this user, but has not been submitted yet.\n- **SUBMITTED**\nThe application has been submitted and is being processed.\n- **SUBMISSION_FAILED**\nUsed to display if failure on submission\n- **ACTION_REQUIRED**\nThe application requires manual action.\n- **ACCOUNT_UPDATED**\nUsed to display when Account has been modified by user\n- **APPROVAL_PENDING**\nInitial value. The application approval process is in progress.\n- **APPROVED**\nThe account application has been approved, and waiting to be ACTIVE\n- **REJECTED**\nThe account application is rejected for some reason\n- **ACTIVE**\nThe account is fully active. Trading and funding are processed under this status.\n- **ACCOUNT_CLOSED**\nThe account is closed.\n","enum":["INACTIVE","ONBOARDING","SUBMITTED","SUBMISSION_FAILED","ACTION_REQUIRED","ACCOUNT_UPDATED","APPROVAL_PENDING","APPROVED","REJECTED","ACTIVE","ACCOUNT_CLOSED"],"example":"ACTIVE","type":"string"},"AccountStatusEvent":{"description":"Represents a change to certain account properties, sent over the events streaming API.\n","properties":{"account_blocked":{"description":"If true the account was blocked, if false, the account got unblocked","type":"boolean"},"account_id":{"description":"The unique identifier of the account that was changed","minLength":1,"type":"string"},"account_number":{"description":"The account number of the account that was changed","minLength":1,"type":"string"},"admin_configurations":{"$ref":"#/components/schemas/AdminConfigurations"},"at":{"description":"timestamp of event","minLength":1,"type":"string"},"cash_interest":{"$ref":"#/components/schemas/AccountCashInterestEvent"},"crypto_status_from":{"description":"account crypto_status changed from","type":"string"},"crypto_status_to":{"description":"account crypto_status changed to","type":"string"},"event_id":{"description":"monotonically increasing 64bit integer","type":"integer"},"event_ulid":{"description":"lexically sortable, monotonically increasing character array","format":"ulid","type":"string"},"fpsl":{"$ref":"#/components/schemas/AccountFPSLEvent"},"kyc_results":{"$ref":"#/components/schemas/KYCResults"},"options":{"$ref":"#/components/schemas/OptionsApprovalEvent"},"pattern_day_trader":{"deprecated":true,"description":"If true the pattern_day_trader flag was set for the account, if false, the flag was reset.","type":"boolean","x-deprecation":{"reason":"See https://docs.alpaca.markets/us/docs/understanding-finras-new-intraday-margin-rule-and-the-end-of-pdt","since":"2026-04-27T00:00:00Z","sunset":"2026-07-06T00:00:00Z"}},"reason":{"deprecated":true,"minLength":1,"type":"string"},"status_from":{"description":"The account status before the change","example":"APPROVED","type":"string"},"status_to":{"description":"The account status after the change","example":"ACTIVE","type":"string"},"trading_blocked":{"description":"If true the account cannot trade going forward, if false, the ban has been lifed","type":"boolean"}},"required":["account_id","at","event_id","event_ulid"],"title":"AccountStatusEvent","type":"object","x-examples":{"example-1":{"account_id":"4db36989-6565-4011-9126-39fe6b3d9bf6","account_number":"","at":"2021-06-14T09:59:15.232782Z","event_id":122039,"event_ulid":"01F84ZC0H0Q1QN7XPNWX44HF5J","kyc_results":null,"status_from":"","status_to":"APPROVED"}}},"AccountSubType":{"description":"IRA Account only\n\nPossible values are:\n\n- traditional\n- roth","enum":["traditional","roth"],"example":"traditional","title":"AccountSubType","type":"string"},"AccountType":{"description":"Possible values are:\n\n- trading\n- custodial\n- donor_advised\n- ira","enum":["trading","custodial","donor_advised","ira"],"example":"trading","title":"AccountType","type":"string"},"AccountUpdateRequest":{"properties":{"agreements":{"description":"Additional agreements, or new revisions of existing agreements, read and signed by the account holder.","items":{"$ref":"#/components/schemas/Agreement"},"type":"array"},"beneficiaries":{"items":{"$ref":"#/components/schemas/Beneficiary"},"type":"array"},"cash_interest":{"$ref":"#/components/schemas/AccountCashInterestPatch"},"contact":{"$ref":"#/components/schemas/Contact"},"disclosures":{"$ref":"#/components/schemas/Disclosures"},"fpsl":{"$ref":"#/components/schemas/AccountFPSLPatch"},"identity":{"$ref":"#/components/schemas/Identity"},"primary_account_holder_id":{"description":"The UUID of the primary account holder. This field is immutable after the account is created.\n\n- Omitting the field, or supplying the value already associated with the account, is a no-op.\n- Supplying a value different from the current primary account holder returns HTTP 400.\n","format":"uuid","type":"string"},"trusted_contact":{"$ref":"#/components/schemas/TrustedContact"}},"type":"object","x-examples":{"example-1":{"beneficiaries":[{"date_of_birth":"1970-01-01","family_name":"Smith","given_name":"John","middle_name":"P","relationship":"spouse","share_pct":"100","tax_id":"xxx-xx-xxxx","tax_id_type":"USA_SSN","type":"primary"}],"contact":{"city":"San Mateo","country":"USA","email_address":"john.doe@example.com","phone_number":"+15556667788","postal_code":"94401","state":"CA","street_address":["20 N San Mateo Dr"]},"disclosures":{"immediate_family_exposed":false,"is_affiliated_exchange_or_finra":false,"is_control_person":false,"is_politically_exposed":false},"identity":{"country_of_birth":"AUS","country_of_citizenship":"AUS","country_of_tax_residence":"USA","date_of_birth":"1990-01-01","family_name":"Doe","funding_source":["employment_income"],"given_name":"John","tax_id":"666-55-4321","tax_id_type":"USA_SSN"},"trusted_contact":{"email_address":"jane.doe@example.com","family_name":"Doe","given_name":"Jane"}}}},"Activity":{"allOf":[{"properties":{"account_id":{"example":"c8f1ef5d-edc0-4f23-9ee4-378f19cb92a4","format":"uuid","type":"string"},"activity_type":{"$ref":"#/components/schemas/ActivityType"},"id":{"example":"20220208125959696::88b5f678-fef5-447b-af15-f21e367e6d8c","type":"string"}},"type":"object"},{"oneOf":[{"$ref":"#/components/schemas/TradeActivity"},{"$ref":"#/components/schemas/NonTradeActivity"}]}],"description":"Base for activity types","required":["id","activity_type"],"title":"Activity"},"ActivitySubType":{"description":"Represents a more specific classification to the `activity_type`.\nThis field is optional and may not always be populated, depending on the activity type and the available data.\nEach `activity_type` has a set of valid `activity_sub_type` values.\n\nFull mapping of `activity_type` to `activity_sub_type`:\n\n- **DIV**: Dividend activity sub-types:\n  - **CDIV**: Cash Dividend\n  - **SDIV**: Stock Dividend\n  - **SPD**: Substitute Payment In Lieu Of Dividend\n\n- **FEE**: Fee-related activity sub-types:\n  - **REG**: Regulatory Fee\n  - **TAF**: Trading Activity Fee\n  - **LCT**: Local Currency Trading Fee\n  - **ORF**: Options Regulatory Fee\n  - **OCC**: Options Clearing Corporation Fee\n  - **NRC**: Non-Retail Commission Fee\n  - **NRV**: Non-Retail Venue Fee\n  - **COM**: Commission\n  - **CAT**: Consolidated Audit Trail Fee\n\n- **INT**: Interest-related activity sub-types:\n  - **MGN**: Margin Interest\n  - **CDT**: Credit Interest\n  - **SWP**: Sweep Interest\n  - **QII**: Qualified Interest\n\n- **MA**: Merger and Acquisition activity sub-types:\n  - **CMA**: Cash Merger\n  - **SMA**: Stock Merger\n  - **SCMA**: Stock & Cash Merger\n\n- **NC**: Name Change activity sub types\n  - **SNC**: Symbol Name Change\n  - **CNC**: CUSIP Name Change\n  - **SCNC**: Symbol & CUSIP Name Change\n\n- **OPCA**: Option Corporate Action activity sub-types:\n  - **DIV.CDIV**: Cash Dividend\n  - **DIV.SDIV**: Stock Dividend\n  - **MA.CMA**: Cash Merger\n  - **MA.SMA**: Stock Merger\n  - **MA.SCMA**: Stock & Cash Merger\n  - **NC.CNC**: CUSIP Name Change\n  - **NC.SNC**: Symbol Name Change\n  - **NC.SCNC**: Symbol & CUSIP Name Change\n  - **SPIN**: Spin-off\n  - **SPLIT.FSPLIT**: Forward Stock Split\n  - **SPLIT.RSPLIT**: Reverse Stock Split\n  - **SPLIT.USPLIT**: Unit Split\n\n- **REORG**: Reorganization activity sub-types:\n  - **WRM**: Worthless Removal\n\n- **SPLIT**: Stock Split activity sub-types:\n  - **FSPLIT**: Forward Stock Split\n  - **RSPLIT**: Reverse Stock Split\n  - **USPLIT**: Unit Split\n\n- **VOF**: Voluntary Offering activity sub-types:\n  - **VTND**: Tender Offer\n  - **VWRT**: Warrant Exercise\n  - **VRGT**: Rights Offer\n  - **VEXH**: Exchange Offer\n\n- **WH**: Withholding activity sub-types:\n  - **SWH**: State Withholding\n  - **FWH**: Federal Withholding\n  - **SLWH**: Sales Withholding","title":"ActivitySubType","type":"string"},"ActivityType":{"description":"Represents the various kinds of activity.\n\nTradeActivity's will always have the type `FILL`\n\n- **FILL**\n  Order Fills (Partial/Full)\n- **ACATC**\n  ACATS IN/OUT (Cash)\n- **ACATS**\n  ACATS IN/OUT (Securities)\n- **CGD**\n  Capital Gain Distribution\n- **CIL**\n  Cash in Lieu of Stock\n- **CSD**\n  Cash Disbursement (+)\n- **CSW**\n  Cash Withdrawable\n- **DIV**\n  Dividend\n- **DIVCGL**\n  Dividend (Capital Gain Long Term)\n- **DIVCGS**\n  Dividend (Capital Gain Short Term)\n- **DIVNRA**\n  Dividend Adjusted (NRA Withheld)\n- **DIVROC**\n  Dividend Return of Capital\n- **DIVTXEX**\n  Dividend (Tax Exempt)\n- **FEE**\n  REG and TAF Fees\n- **INT**\n  Interest (Credit/Margin)\n- **JNLC**\n  Journal Entry (Cash)\n- **JNLS**\n  Journal Entry (Stock)\n- **OPASN**\n   Option Assignment\n- **OPCA**\n  Option Corporate Action\n- **OPCSH**\n   Option cash deliverable for non-standard contracts\n- **OPEXC**\n  Option Exercise\n- **OPEXP**\n  Option Expiration\n- **OPTRD**\n  Option Trade\n- **MA**\n  Merger/Acquisition\n- **PTC**\n  Pass Thru Change\n- **REORG**\n  Reorg CA\n- **SPIN**\n  Stock Spinoff\n- **SPLIT**\n  Stock Split\n- **FOPT**\n  Free of Payment Transfers","enum":["FILL","ACATC","ACATS","CGD","CIL","CSD","CSW","DIV","DIVCGL","DIVCGS","DIVNRA","DIVROC","DIVTXEX","FEE","INT","JNLC","JNLS","MA","OPASN","OPCA","OPCSH","OPEXC","OPEXP","OPTRD","PTC","REORG","SPIN","SPLIT","FOPT"],"title":"ActivityType","type":"string"},"AdminActionBelongsTo":{"description":"Represents structure of an Identifier for all AdminAction type","properties":{"id_reference":{"type":"string"},"kind":{"$ref":"#/components/schemas/AdminActionBelongsToKind"}},"title":"AdminActionBelongsTo","type":"object"},"AdminActionBelongsToKind":{"enum":["account","owner","correspondent"]},"AdminActionCategory":{"description":"Category of the Admin Action","enum":["order","other"]},"AdminActionCreatedBy":{"description":"Represents structure of an Creator's Identifier for all AdminAction type\n","properties":{"id_reference":{"type":"string"},"kind":{"$ref":"#/components/schemas/AdminActionCreatedByKind"}},"title":"AdminActionCreatedBy","type":"object"},"AdminActionCreatedByKind":{"enum":["admin"]},"AdminActionEventGeneral":{"description":"Represents general fields for all AdminAction type","properties":{"at":{"description":"Timestamp of event","format":"date-time","type":"string"},"belongs_to":{"$ref":"#/components/schemas/AdminActionBelongsTo"},"category":{"$ref":"#/components/schemas/AdminActionCategory"},"correspondent":{"description":"Related correspondent","type":"string"},"created_by":{"$ref":"#/components/schemas/AdminActionCreatedBy"},"event_id":{"description":"Lexically sortable, monotonically increasing character array","format":"ulid","type":"string"},"note":{"description":"Free text form description of the admin action","type":"string"},"replaces_event_id":{"description":"Id of the replaced event (optional)","format":"ulid","type":"string"},"type":{"$ref":"#/components/schemas/AdminActionType"},"visibility":{"$ref":"#/components/schemas/AdminActionVisibility"}},"required":["event_id","at","belongs_to","created_by","type","category","visibility","note","correspondent"],"title":"AdminActionEvent","type":"object"},"AdminActionLegacyNote":{"allOf":[{"$ref":"#/components/schemas/AdminActionEventGeneral"},{"properties":{"context":{"description":"Variable schema type which depends on the type","type":"object"}},"required":["context"],"title":"AdminActionContextLegacyNote","type":"object"}],"description":"Represents structure of a LegacyNote type AdminAction","x-examples":{"example-1":{"at":"2023-03-06T16:38:01Z","belongs_to":{"kind":"account","value":"0bbf1dd7-4235-4eca-8b1a-0db63572c735"},"category":"other","context":null,"correspondent":"LPCA","created_by":{"kind":"admin","value":"19455a3c-595f-457f-97b3-64a2b5aeae96"},"event_id":"01GTVS4FVS2KJDTPYH2WM6NAXF","note":"Performed action: Positions split AMZN (long): 1.011266402\n","type":"legacy_note_admin_event","visibility":"internal"}}},"AdminActionLiquidation":{"allOf":[{"$ref":"#/components/schemas/AdminActionEventGeneral"},{"properties":{"context":{"description":"Variable schema type which depends on the type","properties":{"available_qty":{"format":"decimal","type":"string"},"error":{"type":"string"},"reason":{"type":"string"},"requested_qty":{"format":"decimal","type":"string"},"symbol":{"type":"string"}},"type":"object"}},"required":["context"],"title":"AdminActionContextLiquidation","type":"object"}],"description":"Represents structure of a Liquidation type AdminAction","x-examples":{"example-1":{"at":"2023-03-06T16:38:01Z","belongs_to":{"kind":"account","value":"0bbf1dd7-4235-4eca-8b1a-0db63572c735"},"category":"accounts","context":{"available_qty":"0.0001","error":"","reason":"Liquidation due to real time risk","requested_qty":"0.0001","symbol":"TSLA"},"correspondent":"LPCA","created_by":{"kind":"admin","value":"19455a3c-595f-457f-97b3-64a2b5aeae96"},"event_id":"01GTVS4FVS2KJDTPYH2WM6NAXF","note":"Performed action: Position liquidated: Asset: TSLA, Quantity: 0.0001, Reason: Liquidation due to real time risk\n","type":"liquidation_admin_event","visibility":"external"}}},"AdminActionTransactionCancel":{"allOf":[{"$ref":"#/components/schemas/AdminActionEventGeneral"},{"properties":{"context":{"description":"Variable schema type which depends on the type","properties":{"entry_type":{"type":"string"},"external_id":{"type":"string"},"transaction_id":{"format":"uuid","type":"string"}},"type":"object"}},"required":["context"],"title":"AdminActionContextTransactionCancel","type":"object"}],"description":"Represents structure of a TransactionCancel type AdminAction","x-examples":{"example-1":{"at":"2023-03-06T16:38:01Z","belongs_to":{"kind":"account","value":"0bbf1dd7-4235-4eca-8b1a-0db63572c735"},"category":"accounts","context":{"entry_type":"JNLC","external_id":"d5eede2c-1c08-45df-9800-87ad5eefc11f","transaction_id":"fdf18af2-142b-409e-8aad-d1731e276af0"},"correspondent":"LPCA","created_by":{"kind":"admin","value":"19455a3c-595f-457f-97b3-64a2b5aeae96"},"event_id":"01GTVS4FVS2KJDTPYH2WM6NAXF","note":"\"Transaction fdf18af2-142b-409e-8aad-d1731e276af0 cancelled for LPCA-12345678\n","type":"transaction_cancel_admin_event","visibility":"external"}}},"AdminActionType":{"description":"Type of the Admin Action","enum":["liquidation_admin_event","legacy_note_admin_event","transaction_cancel_admin_event"]},"AdminActionVisibility":{"description":"Visibility of the Admin Action","enum":["internal","external","correspondent_only"]},"AdminConfigurations":{"description":"These configurations show account properties that are overriden either by Alpaca Broker Operations or an automated process.\n\nThese values cannot be modified by the Broker Partners.\n\n\nFor the **events** interface we are only broadcasting changes to admin configurations. In case nothing changed for a flag that will not be included in unrelated update events.\n\nDepending on the type of the Admin Configurations the sent event will behave differently. For bool flags we are only sending the new value.\n\nFor example the following payload means, that the disable_shorting flag was set to true from false:\n\n```\n{\n  \"disable_shorting\": false\n}\n```\n\nFor other data types, we are embeding the old and new values into the payload. For example changing the max_margin_multiplier from 4 to 1 will yield this payload:\n\n```\n{\n  \"max_margin_multiplier\": {\n    \"old\": 4,\n    \"new\": 1,\n  }\n}\n```\n\nIntroducing an override value from the default will yield a null value as old. For example restricting the max_margin_multipler to 1 from default will yield the following payload:\n\n```\n{\n  \"max_margin_multiplier\": {\n    \"old\": null,\n    \"new\": 1,\n  }\n}\n```","properties":{"acct_daily_transfer_limit":{"description":"Override the correspondent level daily transfer limits","format":"decimal","type":"string"},"allow_instant_ach":{"description":"If true, the account is allowed to perform instant ACH","type":"boolean"},"disable_algodash_access":{"description":"If true, the account is allowed to access algo dash","type":"boolean"},"disable_api_key":{"description":"If true, the account's API key will be disabled","type":"boolean"},"disable_crypto":{"description":"If true, the account is not allowed to trade cryptos","type":"boolean"},"disable_day_trading":{"description":"If true, the account is not allowed to day trade (e.g. buy and sell the same security on the same day)","type":"boolean"},"disable_fractional":{"description":"If true, the account cannot create orders for fractional share positions","type":"boolean"},"disable_shorting":{"description":"If true the account is not allowed to create short position orders","type":"boolean"},"incoming_transfers_blocked":{"description":"If true, incoming transfers to this account are rejected","type":"boolean"},"max_margin_multiplier":{"description":"Max margin multipler is set by admin to this value","properties":{"from":{"description":"Old value of margin multiplier","type":"string"},"to":{"description":"New value of margin multiplier","type":"string"}},"type":"object"},"max_options_trading_level":{"description":"Max options trading level is set by admin to this value. It can be 0, 1 or 2.","properties":{"from":{"description":"New value of max options trading level","type":"string"},"to":{"description":"New value of max options trading level","type":"string"}},"type":"object"},"outgoing_transfers_blocked":{"description":"If true, outgoing transfers from this account are rejected","type":"boolean"},"pdt_check_mode":{"deprecated":true,"description":"PDT check mode","type":"string","x-deprecation":{"reason":"See https://docs.alpaca.markets/us/docs/understanding-finras-new-intraday-margin-rule-and-the-end-of-pdt","since":"2026-04-27T00:00:00Z","sunset":"2026-07-06T00:00:00Z"}},"restrict_to_liquidation_reasons":{"$ref":"#/components/schemas/RestrictToLiquidationReasons"}},"title":"AdminConfigurations","type":"object"},"AggregatePositionResponse":{"properties":{"asset_type":{"$ref":"#/components/schemas/AssetClass"},"closing_price":{"description":"EOD asset price per share at session close","format":"decimal","type":"string"},"cusip":{"description":"Cusip (9 digits, can start with 0's)","format":"decimal","type":"string"},"long_market_value":{"description":"Aggregate notional dollar amount of the partner's long positions","format":"decimal","type":"string"},"long_qty":{"description":"Aggregate number of shares that the partner is long","format":"decimal","type":"string"},"num_accounts":{"description":"Number of accounts that have a position in this asset (either long or short)","format":"decimal","type":"integer"},"short_market_value":{"description":"Aggregate notional dollar amount of the partner's short positions","format":"decimal","type":"string"},"short_qty":{"description":"Aggregate number of shares that the partner is short","format":"decimal","type":"string"},"symbol":{"description":"Symbol of asset","type":"string"}},"title":"","type":"object","x-examples":{"Example 1":{"asset_type":"us_equity","closing_price":"148.4700","cusip":"037833100","long_market_value":"148.4700","long_qty":"1","num_accounts":"1","short_market_value":"0","short_qty":"0","symbol":"AAPL"}}},"Agreement":{"properties":{"agreement":{"$ref":"#/components/schemas/AgreementType"},"ip_address":{"description":"The ip_address the signed agreements were sent from by the user.","example":"185.13.21.99","format":"ipv4","type":"string"},"revision":{"description":"The agreement revision.\nThe format is XX.YYYY.MM where XX is an incrementing revision number, YYYY is the year and MM is the month.\nIf the revision is not specified in a POST or PATCH request, the active revision will be used, which will align with the [Alpaca Documents Library](https://alpaca.markets/disclosures).\n","type":"string"},"signed_at":{"description":"The timestamp the agreement was signed.","example":"2019-09-11T18:09:33Z","format":"date-time","type":"string"}},"required":["agreement","signed_at","ip_address"],"type":"object"},"AgreementType":{"description":"- margin_agreement: Alpaca Margin Agreement\n- account_agreement: Alpaca Account Agreement\n- customer_agreement: Alpaca Customer Agreement\n- crypto_agreement: Alpaca Crypto agreement\n- options_agreement: Alpaca Option agreement\n- custodial_customer_agreement: Alpaca Custodial Customer agreement\n","enum":["margin_agreement","account_agreement","customer_agreement","crypto_agreement","options_agreement"],"example":"customer_agreement","title":"AgreementType","type":"string"},"Asset":{"description":"Assets are sorted by asset class, exchange and symbol. Some assets are not tradable with Alpaca. These assets will be marked with the flag tradable=false","properties":{"attributes":{"description":"Unique characteristics of the asset. Supported values:\n- `ptp_no_exception`: Asset is a Publicly Traded Partnership (PTP) without a qualified notice; non-U.S. customers may incur 10% withholding on gross proceeds as per IRS guidance, and are blocked from being purchased by default.\n- `ptp_with_exception`: Users can open positions in these PTPs without general restrictions.\n- `ipo`: Accepting limit orders only before the stock begins trading on the secondary market.\n- `has_options`: The underlying equity has listed options available on the platform. Note: if the equity had inactive/expired contracts in the past, this will still show up.\n- `options_late_close`: Indicates the underlying asset's options contracts close at 4:15pm ET instead of the standard 4:00pm ET.\n- `fractional_eh_enabled`: Indicates the asset accepts fractional orders during extended hours sessions (pre-market, post-market, and overnight if enabled).\n- `overnight_tradable`: Asset is eligible for overnight (24x5) trading in supported venues on the platform.\n- `overnight_halted`: Asset is eligible for overnight trading but is currently halted/blocked for overnight sessions due to risk, corporate action, compliance, or venue constraints.","example":["ptp_no_exception","ipo"],"items":{"enum":["ptp_no_exception","ptp_with_exception","ipo","has_options","options_late_close","fractional_eh_enabled","overnight_tradable","overnight_halted"],"type":"string"},"type":"array"},"borrow_status":{"description":"Borrow status for US equity assets. This field is omitted for non-US-equity assets.","enum":["easy_to_borrow","hard_to_borrow"],"example":"easy_to_borrow","type":"string"},"class":{"$ref":"#/components/schemas/AssetClass"},"easy_to_borrow":{"deprecated":true,"description":"**deprecated**: Please use borrow_status instead.\nAsset is easy-to-borrow or not (filtering for easy_to_borrow = True is the best way to check whether the name is currently available to short at Alpaca).\n","example":true,"type":"boolean","x-deprecation":{"reason":"Use borrow_status instead.","since":"2026-06-22","sunset":"2026-09-22"}},"exchange":{"$ref":"#/components/schemas/Exchange"},"fractionable":{"description":"Asset is fractionable or not","example":true,"type":"boolean"},"id":{"description":"Asset ID","example":"904837e3-3b76-47ec-b432-046db621571b","format":"uuid","type":"string"},"maintenance_margin_requirement":{"deprecated":true,"description":"**deprecated**: Please use margin_requirement_long or margin_requirement_short instead. Note that these fields are of type string.\nShows the margin requirement percentage for the asset (equities only).\n","type":"number"},"margin_requirement_long":{"description":"The margin requirement percentage for the asset's long positions (equities only).","type":"string"},"margin_requirement_short":{"description":"The margin requirement percentage for the asset's short positions (equities only).","type":"string"},"marginable":{"description":"Asset is marginable or not","example":true,"type":"boolean"},"min_order_size":{"description":"Minimum order size.  Field available for crypto only.","type":"string"},"min_trade_increment":{"description":"Amount a trade quantity can be incremented by. Field available for crypto only.","type":"string"},"name":{"description":"The official name of the asset","example":"Apple Inc. Common Stock","type":"string"},"price_increment":{"description":"Amount the price can be incremented by. Field available for crypto only.","type":"string"},"shortable":{"description":"Asset is shortable or not","example":true,"type":"boolean"},"status":{"description":"active or inactive","enum":["active","inactive"],"example":"active","type":"string"},"symbol":{"description":"The symbol of the asset","example":"AAPL","type":"string"},"tradable":{"description":"Asset is tradable on Alpaca or not","example":true,"type":"boolean"}},"required":["id","class","exchange","symbol","name","status","tradable","marginable","shortable","easy_to_borrow","fractionable","maintenance_margin_requirement","margin_requirement_long","margin_requirement_short"],"title":"Asset","type":"object"},"AssetClass":{"description":"This represents the category to which the asset belongs to. It serves to identify the nature of the financial instrument, with options including \"us_equity\" for U.S. equities, \"us_option\" for U.S. options, \"crypto\" for cryptocurrencies, and \"ipo\" for IPO indications of interest. This `asset_class: ipo` value is distinct from the assets API `attributes: [\"ipo\"]` flag.","enum":["us_equity","us_option","crypto","ipo"],"type":"string"},"Bank":{"properties":{"account_id":{"format":"uuid","type":"string"},"account_number":{"type":"string"},"bank_code":{"description":"9-Digit ABA RTN (Routing Number) or BIC","type":"string"},"bank_code_type":{"description":"ABA (Domestic) or BIC (International)","enum":["ABA","BIC"],"type":"string"},"city":{"description":"Only for international banks","type":"string"},"country":{"description":"Only for international banks","type":"string"},"created_at":{"description":"Format: 2020-01-01T01:01:01Z","example":"2021-03-16T18:38:01.942282Z","format":"date-time","type":"string"},"extra_fields":{"$ref":"#/components/schemas/BankAdditionalFields"},"id":{"example":"61e69015-8549-4bfd-b9c3-01e75843f47d","format":"uuid","type":"string"},"name":{"description":"Name of recipient bank","type":"string"},"postal_code":{"description":"Only for international banks","type":"string"},"state_province":{"description":"Only for international banks","type":"string"},"status":{"description":"QUEUED, SENT_TO_CLEARING, APPROVED, REJECTED, CANCELED","enum":["QUEUED","SENT_TO_CLEARING","APPROVED","REJECTED","CANCELED"],"type":"string"},"street_address":{"description":"Only for international banks","type":"string"},"updated_at":{"description":"Format: 2020-01-01T01:01:01Z","example":"2021-03-16T18:38:01.942282Z","format":"date-time","type":"string"}},"required":["id","created_at","updated_at","name","bank_code","bank_code_type","account_number"],"type":"object","x-examples":{"example-1":{"account_id":"56712986-9ff7-4d8f-8e52-077e099e533e","account_number":"123456789abc","bank_code":"123456789","bank_code_type":"ABA","city":"","country":"","created_at":"2022-02-11T21:35:19.268681613Z","id":"8475c676-68e3-4cfc-a683-9ca2f47a6172","name":"Bank XYZ","postal_code":"","state_province":"","status":"QUEUED","street_address":"","updated_at":"2022-02-11T21:35:19.268681613Z"}}},"BankAdditionalFields":{"description":"Additional wire instructions used to explicitly specify intermediary (correspondent) banks for international wire transfers. If omitted, intermediary banks may be automatically selected by downstream institutions, which can result in delays or additional charges.\n","properties":{"intermediary_bank1_bic":{"description":"The primary intermediary (correspondent) bank to be used when routing the international wire transfer to the beneficiary bank.","type":"string"},"intermediary_bank2_bic":{"description":"An additional intermediary bank to be used if the wire transfer requires multiple correspondent banks before reaching the beneficiary bank.","type":"string"},"intermediary_bank3_bic":{"description":"A tertiary intermediary bank used in complex international wire routes that require three correspondent banks prior to reaching the beneficiary bank.","type":"string"}},"type":"object"},"Beneficiary":{"description":"Beneficiary of an account","example":{"date_of_birth":"1970-01-01","family_name":"Doe","given_name":"Jane","middle_name":"P","relationship":"spouse","share_pct":"100","tax_id":"xxx-xx-xxxx","tax_id_type":"USA_SSN","type":"primary"},"properties":{"date_of_birth":{"example":"1970-01-01","type":"string"},"family_name":{"example":"Doe","type":"string"},"given_name":{"example":"Jane","type":"string"},"middle_name":{"example":"P","type":"string"},"relationship":{"example":"spouse","type":"string"},"share_pct":{"example":"100","type":"string"},"tax_id":{"example":"xxx-xx-xxxx","type":"string"},"tax_id_type":{"example":"USA_SSN","type":"string"},"type":{"example":"primary","type":"string"}},"required":["given_name","middle_name","family_name","date_of_birth","tax_id","tax_id_type","relationship","type","share_pct"],"type":"object"},"CIPDocument":{"description":"Represents results of checking a document for CIPInfo\n","properties":{"age_validation":{"$ref":"#/components/schemas/CIPResult"},"comprised_document":{"$ref":"#/components/schemas/CIPResult"},"created_at":{"description":"Datetime for when this check was done","format":"date-time","type":"string"},"data_comparison":{"$ref":"#/components/schemas/CIPResult"},"data_comparison_breakdown":{"description":"json object representing the results of the various sub-checks\n          done when calculating the result on `data_comparison`. Example: {\"date_of_birth\": \"clear\",\n          \"date_of_expiry\": \"clear\" \"document_numbers\": \"clear\", \"document_type\": \"clear\", \"first_name\": \"clear\",\n          \"gender\": \"clear\", \"issuing_country\": \"clear\", \"last_name\": \"clear\"}","type":"string"},"date_of_birth":{"description":"Datetime for when this check was done","format":"date","type":"string"},"date_of_expiry":{"description":"Datetime for when this check was done","format":"date","type":"string"},"document_numbers":{"description":"Number of the document that was checked","items":{"type":"string"},"type":"array"},"document_type":{"description":"Type of the document that was checked","type":"string"},"first_name":{"description":"First name extracted from the document","type":"string"},"gender":{"description":"Gender info extracted from the document","type":"string"},"id":{"description":"Your internal ID of check","type":"string"},"image_integrity":{"$ref":"#/components/schemas/CIPResult"},"image_integrity_breakdown":{"description":"json object representing the results of the various sub-checks done\n          when calculating the result on `image_integrity`. Example: example: {\"colour_picture\": \"clear\",\n          \"conclusive_document_quality\": \"clear\", \"image_quality\": \"clear\", \"supported_document\": \"clear\"}","type":"string"},"issuing_country":{"description":"Country for which issued the document","type":"string"},"last_name":{"description":"Last name extracted from the document","type":"string"},"nationality":{"description":"Nationality extracted from the document","type":"string"},"police_record":{"$ref":"#/components/schemas/CIPStatus"},"result":{"$ref":"#/components/schemas/CIPResult"},"status":{"$ref":"#/components/schemas/CIPStatus"},"visual_authenticity":{"description":"json object representing the various sub-checks done when determining\n          whether visual (non-textual) elements are correct given the document type. Example: {\n          \"digital_tampering\": \"clear\", \"face_detection\": \"clear\", \"fonts\": \"clear\", \"original_document_present\":\n          \"clear\", \"picture_face_integrity\": \"clear\", \"security_features\": \"clear\", \"template\": \"clear\"}","type":"string"}},"required":["id"],"type":"object","x-examples":{"Example 1":{"created_at":"2021-06-10T15:37:03Z","id":"55B9931A-3BE6-4BC0-9BDD-0B954E4A4632","image_integrity":"clear","result":"clear","status":"complete"}}},"CIPIdentity":{"properties":{"address":{"$ref":"#/components/schemas/CIPResult"},"address_breakdown":{"description":"a json object representing the breakdown of the `address` field. For example:\n          {\"credit_agencies\": {\"result\": \"clear\",\"properties\":{\"number_of_matches\":\"1\"}}","type":"string"},"created_at":{"description":"datetime when identity check happened","type":"string"},"date_of_birth":{"$ref":"#/components/schemas/CIPResult"},"date_of_birth_breakdown":{"description":"a json object representing the breakdown of the `date_of_birth` field.\n          For example: example: {\"credit_agencies\":{\"result\": \"clear\",\"properties\": {\"number_of_matches\": \"1\"}}","type":"string"},"id":{"description":"Your internal ID of check","type":"string"},"matched_address":{"$ref":"#/components/schemas/CIPResult"},"matched_addresses":{"description":"datetime when identity check happened","type":"string"},"result":{"$ref":"#/components/schemas/CIPResult"},"sources":{"$ref":"#/components/schemas/CIPResult"},"sources_breakdown":{"description":"a json object representing the breakdown of `sources` field. For example:\n          {\"total_sources\": {\"result\": \"clear\",\"properties\": {\"total_number_of_sources\": \"3\"}}}","type":"string"},"status":{"$ref":"#/components/schemas/CIPStatus"},"tax_id":{"$ref":"#/components/schemas/CIPResult"},"tax_id_breakdown":{"description":"a json object representing the breakdown of the `tax_id` field","type":"string"}},"required":["id"],"type":"object","x-examples":{"Example 1":{"address":"clear","created_at":"2021-06-10T15:37:03Z","date_of_birth":"clear","id":"28E1CCE8-1B1A-4472-9AD4-C6C5B7C3A6AF","result":"clear","sources":"clear","status":"complete"}}},"CIPInfo":{"description":"Customer Identification Program (CIP) information for an account applicant.","properties":{"account_id":{"description":"UUID of the Account instance this CIPInfo is for","format":"uuid","type":"string"},"created_at":{"format":"date-time","type":"string"},"document":{"$ref":"#/components/schemas/CIPDocument"},"id":{"description":"ID of this CIPInfo","format":"uuid","type":"string"},"identity":{"$ref":"#/components/schemas/CIPIdentity"},"kyc":{"$ref":"#/components/schemas/CIPKYC"},"photo":{"$ref":"#/components/schemas/CIPPhoto"},"provider_name":{"description":"List of KYC providers this information came from","items":{"$ref":"#/components/schemas/CIPProvider"},"type":"array"},"updated_at":{"format":"date-time","type":"string"},"watchlist":{"$ref":"#/components/schemas/CIPWatchlist"}},"title":"CIPInfo","type":"object"},"CIPKYC":{"description":"Represents Know Your Customer (KYC) info for a CIPInfo","properties":{"address":{"description":"Concatenated street address, city, state and country of applicant","type":"string"},"applicant_name":{"description":"Given and family name of applicant","type":"string"},"approval_status":{"description":"Approval status of KYC check","enum":["approved","rejected"],"example":"approved","type":"string"},"approved_at":{"description":"Reason for approving this KYC check","format":"date-time","type":"string"},"approved_by":{"description":"Identifier of who approved KYC check","type":"string"},"approved_reason":{"description":"Datetime that this KYC check was approved","type":"string"},"check_completed_at":{"description":"completion datetime of KYC check","format":"date-time","type":"string"},"check_initiated_at":{"description":"start datetime of KYC check","format":"date-time","type":"string"},"country_of_residency":{"description":"country for `address` field","type":"string"},"date_of_birth":{"description":"DOB of applicant","format":"date","type":"string"},"email_address":{"description":"email address of applicant","type":"string"},"id":{"description":"Your internal ID of check","format":"uuid","type":"string"},"ip_address":{"description":"IP address of applicant at time of KYC check","type":"string"},"kyc_completed_at":{"description":"Datetime that KYC check was completed at","format":"date-time","type":"string"},"nationality":{"description":"nationality of applicant","type":"string"},"postal_code":{"description":"postal code for `address` field","type":"string"},"risk_categories":{"description":"The list of risk categories returned by the KYC provider or assessed","items":{"type":"string"},"type":"array"},"risk_level":{"description":"Overall risk level returned by KYC provider or assessed","type":"string"},"risk_score":{"description":"Overall risk score returned by KYC provider or assessed","type":"integer"}},"required":["id"],"title":"CIPKYCInfo","type":"object","x-examples":{"Example 1":{"address":"42 Faux St","applicant_name":"John Doe","approval_status":"approved","approved_at":"2021-06-10T15:38:03Z","approved_by":"Jane Doe","check_completed_at":"2021-06-10T15:37:03Z","check_initiated_at":"2021-06-10T15:37:03Z","country_of_residency":"USA","date_of_birth":"1970-12-01","email_address":"johndoe@example.com","id":"CBDAD1C4-1047-450E-BAE5-B6C406F509B4","id_number":"jd0000123456789","ip_address":"127.0.0.1","kyc_completed_at":"2021-06-10T15:37:03Z","nationality":"American","postal_code":"94401","risk_level":"LOW"}}},"CIPPhoto":{"description":"Represents the results of checking a Photo for CIPInfo","properties":{"created_at":{"description":"datetime of when the check happened","type":"string"},"face_comparison":{"$ref":"#/components/schemas/CIPResult"},"face_comparison_breakdown":{"description":"a json object representing the breakdown of sub-checks done in\n          `face_comparison`. Example: {\"face_match\":{\"result\": \"clear\",\"properties\":{\"score\": \"80\"}}}","type":"string"},"id":{"description":"Your internal ID of the check","type":"string"},"image_integrity":{"$ref":"#/components/schemas/CIPResult"},"image_integrity_breakdown":{"description":"a json object representing the breakdown of sub-checks done in\n          `image_integrity`. Example  {\"face_detected\":{\"result\": \"clear\"},\"source_integrity\": {\"result\": \"clear\"}}","type":"string"},"result":{"$ref":"#/components/schemas/CIPResult"},"status":{"description":"Overall status of the check. Either `complete` or `withdrawn`.","enum":["complete","withdrawn"],"type":"string"},"visual_authenticity":{"$ref":"#/components/schemas/CIPResult"},"visual_authenticity_breakdown":{"description":"a json object representing the breakdown of sub-checks don in\n          `visual_authenticity`. Example {\"spoofing_detection\": {\"result\": \"clear\",\"properties\": {\"score\": \"26\"}}}}","type":"string"}},"required":["id"],"type":"object","x-examples":{"Example 1":{"created_at":"2021-06-10T15:37:03Z","face_comparison":"clear","id":"0DD13020-F0FD-4B5A-B58F-BC1885E90A6D","result":"clear","status":"complete"}}},"CIPProvider":{"description":"\"alloy\"   - ALLOY\n\"trulioo\" - TRULIOO\n\"onfido\"  - ONFIDO\n\"veriff\"  - VERIFF\n\"jumio\"   - JUMIO\n\"getmati\" - GETMATI","title":"CIPProvider","type":"string"},"CIPResult":{"description":"The result of the check. Either `clear` or `consider`.","title":"CIPResult","type":"string"},"CIPStatus":{"description":"An enum representing the status of the CIPInfo\n\n\"complete\"\n\n\"withdrawn\"","title":"CIPStatus","type":"string"},"CIPWatchlist":{"description":"Represents the result of checking to see if the applicant is in any watchlists for a CIPInfo","properties":{"adverse_media":{"$ref":"#/components/schemas/CIPResult"},"created_at":{"description":"datetime when check happened","type":"string"},"id":{"description":"Your internal ID of check","type":"string"},"monitored_lists":{"$ref":"#/components/schemas/CIPResult"},"politically_exposed_person":{"$ref":"#/components/schemas/CIPResult"},"records":{"description":"a json object. Example [{\"text\": \"Record info\"}]","type":"string"},"result":{"$ref":"#/components/schemas/CIPResult"},"sanction":{"$ref":"#/components/schemas/CIPResult"},"status":{"$ref":"#/components/schemas/CIPStatus"}},"required":["id"],"type":"object","x-examples":{"Example 1":{"adverse_media":"clear","created_at":"2021-06-10T15:37:03Z","id":"7572B870-EB4C-46A2-8B88-509194CCEE7E","monitored_lists":"clear","politically_exposed_person":"clear","result":"clear","sanction":"clear","status":"complete"}}},"CommissionType":{"default":"notional","description":"An enum to select how to interpret the value provided in the commission field.\n\n- notional:\nCharge commission on a per order basis. (When the `commission_type` field is omitted from the order request, this is used as the default).\n\n- qty:\nCharge commission on a per qty/contract basis, pro rated.\n\n- bps:\nThe percent commission you want to charge the end user on the order (expressed in bps). Alpaca will convert the order to a notional amount for purposes of calculating commission.\nCommission value in bps can have up to two decimal places.","enum":["notional","qty","bps"],"example":"qty","title":"CommissionType","type":"string"},"Contact":{"description":"Contact is the model for the account owner contact information.\n","properties":{"city":{"example":"San Mateo","type":"string"},"country":{"description":"country code in ISO 3166-1 alpha-3 format, representing the country the person/entity resides in.","example":"USA","type":"string"},"email_address":{"example":"john.doe@example.com","format":"email","type":"string"},"phone_number":{"description":"Phone number should include the country code, format: \"+15555555555\"","example":"+15556667788","type":"string"},"postal_code":{"example":"94401","type":"string"},"state":{"description":"Required if the country or country_of_tax_residence (in the identity model below) is 'USA'.","example":"CA","type":"string"},"street_address":{"description":"The user's street address. If multiple lines in address, pass in as additional array elements. Maximum of 3 objects in array","items":{"$ref":"#/components/schemas/StreetAddress"},"type":"array"},"unit":{"description":"The specific apartment number if applicable","type":"string"}},"required":["email_address","phone_number","street_address","city"],"type":"object"},"CreateBankRequest":{"description":"Represents the possible fields to send when creating a new associated Bank resource for an account","properties":{"account_number":{"type":"string"},"bank_code":{"description":"9-Digit ABA RTN (Routing Number) or BIC","type":"string"},"bank_code_type":{"description":"ABA (Domestic) or BIC (International)","enum":["ABA","BIC"],"type":"string"},"city":{"description":"Only for international banks, ie if bank_code_type = BIC","type":"string"},"country":{"description":"Only for international banks, ie if bank_code_type = BIC","type":"string"},"extra_fields":{"$ref":"#/components/schemas/BankAdditionalFields"},"name":{"description":"Name of recipient bank","type":"string"},"postal_code":{"description":"Only for international banks, ie if bank_code_type = BIC. Minimum of 3 characters","type":"string"},"state_province":{"description":"Only for international banks, ie if bank_code_type = BIC","type":"string"},"street_address":{"description":"Only for international banks, ie if bank_code_type = BIC","type":"string"}},"required":["name","bank_code","bank_code_type","account_number"],"title":"CreateBankRequest","type":"object"},"CreateIncomingWireRequest":{"description":"Request body for simulating an incoming wire in Sandbox.","properties":{"amount":{"description":"Must be > 0.00","format":"decimal","type":"string"},"currency":{"$ref":"#/components/schemas/Currency"},"delay_until":{"description":"Optional timestamp before which the wire will not be processed.","format":"date-time","nullable":true,"type":"string"},"wire_instructions":{"description":"FFC (For Further Credit) string identifying the destination account, in the form `FFC <correspondent>-<account_number>`.","type":"string"}},"required":["currency","amount","wire_instructions"],"title":"CreateIncomingWireRequest","type":"object"},"CreateOrderRequest":{"properties":{"client_order_id":{"description":"A unique identifier for the order. Automatically generated if not sent. (<= 128 characters)","example":"eb9e2aaa-f71a-4f51-b5b4-52a6c565dad4","maxLength":128,"type":"string"},"commission":{"description":"The commission you want to collect from the user.","example":"1.0","format":"decimal","type":"string"},"commission_bps":{"deprecated":true,"description":"**deprecated**: Please use the commission_type = bps instead and set the desired bps value in the `commission` field.\nThe percent commission you want to charge the end user on the order (expressed in bps). Alpaca will convert the order to a notional amount for purposes of calculating commission.\n","example":"10","format":"decimal","type":"string"},"commission_type":{"$ref":"#/components/schemas/CommissionType"},"extended_hours":{"description":"Defaults to false. If true, order will be eligible for execution in the pre-market, after-hours, and overnight sessions. Only works with type `limit` and time_in_force set to either `day` or `gtc`.","example":false,"type":"boolean"},"instructions":{"type":"string"},"legs":{"description":"list of order legs (<= 4)","items":{"$ref":"#/components/schemas/MLegOrderLeg"},"maxItems":4,"type":"array"},"limit_price":{"description":"Required if type is `limit` or `stop_limit`.\n- In case of `mleg`, the limit_price parameter is expressed with the following notation:\n  - A positive value indicates a debit, representing a cost or payment to be made.\n  - A negative value signifies a credit, reflecting an amount to be received.\n- In case of Fied Income, the price is expressed in percentage of par value (face value).\nPrice is always clean price, meaning it does not include accrued interest.","example":"3.14","format":"decimal","type":"string"},"notional":{"description":"Dollar amount to trade. Cannot work with qty. Only market and limit orders supported with time_in_force = day; Only limit orders for extended hours.","example":"3","format":"decimal","type":"string"},"order_class":{"$ref":"#/components/schemas/OrderClass"},"position_intent":{"$ref":"#/components/schemas/PositionIntent"},"qty":{"description":"- For equities, the number of shares to trade. Can be fractionable for only market and day order types.\n- Required for `mleg` order class, represents the number of units to trade of this strategy.\n- For Fixed Income securities, qty represents the order size in par value (face value).\nFor example, to place an order for 1 bond with a face value of $1,000, provide a qty of 1000.\n","example":"4.124","format":"decimal","type":"string"},"side":{"$ref":"#/components/schemas/OrderSide"},"source":{"type":"string"},"stop_loss":{"description":"Takes in a string/number values for stop_price and limit_price","properties":{"limit_price":{"example":"3.14","format":"decimal","type":"string"},"stop_price":{"example":"3.14","format":"decimal","type":"string"}},"type":"object"},"stop_price":{"description":"Required if type is stop or stop_limit","example":"3.14","format":"decimal","type":"string"},"subtag":{"type":"string"},"swap_fee_bps":{"format":"decimal","type":"string"},"symbol":{"description":"Symbol or asset ID to identify the asset to trade. Required for all order classes except for `mleg`.","example":"AAPL","type":"string"},"take_profit":{"description":"Takes in a string/number value for limit_price","properties":{"limit_price":{"example":"3.14","format":"decimal","type":"string"}},"type":"object"},"time_in_force":{"$ref":"#/components/schemas/TimeInForce"},"trail_percent":{"description":"If type is trailing_stop, then one of trail_price or trail_percent is required","example":"5.0","format":"decimal","type":"string"},"trail_price":{"description":"If type is trailing_stop, then one of trail_price or trail_percent is required","example":"3.14","format":"decimal","type":"string"},"type":{"$ref":"#/components/schemas/OrderType"}},"required":["type","time_in_force"],"type":"object"},"CreateTransferRequest":{"description":"Request body for initiating an outgoing wire withdrawal from an account.","properties":{"additional_information":{"description":"Additional details for when type = `wire`","nullable":true,"type":"string"},"amount":{"description":"Must be > 0.00","format":"decimal","type":"string"},"bank_id":{"description":"Required if type = `wire`\n\nThe bank_relationship created for the account_id","format":"uuid","type":"string"},"direction":{"$ref":"#/components/schemas/TransferDirection"},"fee_payment_method":{"$ref":"#/components/schemas/FeePaymentMethod"},"ira":{"$ref":"#/components/schemas/TransferIRA"},"relationship_id":{"description":"Required if type = `ach`\n\nThe ach_relationship created for the account_id","format":"uuid","type":"string"},"timing":{"deprecated":true,"description":"Deprecated. Not honored by the API; values sent are silently ignored and this field will be removed.","enum":["immediate"],"example":"immediate","type":"string","x-deprecation":{"reason":"Not honored by the API since January 2021; any value sent is silently ignored. Stop including this field in requests.","since":"2026-05-26T00:00:00Z","sunset":"2026-08-26T00:00:00Z"}},"transfer_type":{"$ref":"#/components/schemas/TransferType"}},"required":["transfer_type","amount","direction"],"title":"CreateTransferRequest","type":"object"},"Currency":{"description":"\"USD\" // US Dollar\n\"JPY\" // Japanese Yen\n\"EUR\" // Euro\n\"CAD\" // Canadian Dollar\n\"GBP\" // British Pound Sterling\n\"CHF\" // Swiss Franc\n\"TRY\" // Turkish Lira\n\"AUD\" // Australian Dollar\n\"CZK\" // Czech Koruna\n\"SEK\" // Swedish Krona\n\"DKK\" // Danish Krone\n\"SGD\" // Singapore Dollar\n\"HKD\" // Hong Kong Dollar\n\"HUF\" // Hungarian Forint\n\"NZD\" // New Zealand Dollar\n\"NOK\" // Norwegian Krone\n\"PLN\" // Poland Złoty","title":"Currency","type":"string"},"CustodialAccountMinorIdentity":{"description":"Represents Identity information for a minor that an account of type \"custodial\" is for","properties":{"country_of_birth":{"type":"string"},"country_of_citizenship":{"type":"string"},"country_of_tax_residence":{"type":"string"},"date_of_birth":{"format":"date","type":"string"},"email":{"format":"email","type":"string"},"family_name":{"type":"string"},"given_name":{"type":"string"},"state":{"type":"string"},"tax_id":{"type":"string"},"tax_id_type":{"$ref":"#/components/schemas/TaxIdType"}},"required":["given_name","family_name","date_of_birth","country_of_tax_residence","state","email"],"type":"object","x-examples":{}},"CustodialAccountType":{"description":"Represents the type of custodial account based on the state where the beneficiary resides.\nThis value is returned only when the `country_of_tax_residence` is `USA`. For other countries, this property is not included in the response.\n\n**Possible Return Values**\n\n`CustodianTypeUTMA` - Indicates that the custodial account is governed by the Uniform Transfers to Minors Act.\n`CustodianTypeUGMA` - Indicates that the custodial account is governed by the Uniform Gifts to Minors Act.","title":"CustodialAccountType","type":"string"},"DisclosureContextAnnotation":{"properties":{"company_city":{"description":"Required for FINRA affiliations and controlled firms.","type":"string"},"company_compliance_email":{"description":"Required for FINRA affiliations and controlled firms.","type":"string"},"company_country":{"description":"Required for FINRA affiliations and controlled firms.","type":"string"},"company_name":{"description":"Required for FINRA affiliations and controlled firms.","type":"string"},"company_state":{"description":"Required if and only if `company_country` is `USA`.","type":"string"},"company_street_address":{"description":"Required for FINRA affiliations and controlled firms.","type":"string"},"context_type":{"description":"Specifies the type of disclosure annotation. Valid types are FINRA affiliations, for users affiliated with or employed by a FINRA member firm, a Stock Exchange Member, FINRA, Registered Investment Advisor, or a Municipal Securities Broker/Dealer; Company control relationships, for senior executives, and 10% or greater shareholders, of a publicly traded company; and immediate family members of politically exposed individuals.","enum":["CONTROLLED_FIRM","IMMEDIATE_FAMILY_EXPOSED","AFFILIATE_FIRM"],"type":"string"},"family_name":{"description":"Required for immediate family members of politically exposed persons.","type":"string"},"given_name":{"description":"Required for immediate family members of politically exposed persons.","type":"string"}},"required":["context_type"],"title":"DisclosureContextAnnotation","type":"object"},"Disclosures":{"description":"Disclosures fields denote if the account owner falls under\neach category defined by FINRA rule. The client has to ask\nquestions for the end user and the values should reflect\ntheir answers.\nIf one of the answers is true (yes), the account goes into\nACTION_REQUIRED status.\n","example":{"immediate_family_exposed":false,"is_affiliated_exchange_or_finra":false,"is_control_person":false,"is_politically_exposed":false},"properties":{"context":{"description":"Array of annotations describing the rationale for marking `is_control_person`, `is_affiliated_exchange_or_finra`, and/or `immediate_family_exposed` as true","items":{"$ref":"#/components/schemas/DisclosureContextAnnotation"},"nullable":true,"type":"array"},"employer_address":{"description":"The employer's address if the user is employed.","type":"string"},"employer_name":{"description":"The name of the employer if the user is employed.","type":"string"},"employment_position":{"description":"The user's position if they are employed.","type":"string"},"employment_sector":{"description":"The industry sector of employment.\nIf the `employment_status` is `unemployed` or `student`, set this property to `not_employed`.\nIf the `employment_status` is `retired`, set this to `self_employed`.\n","enum":["agriculture","business_management","computers_and_it","construction","education","finance","government","healthcare","hospitality","manufacturing","marketing","media","other","science","self_employed","transportation","not_employed"],"type":"string"},"employment_status":{"description":"One of the following: `employed`, `unemployed`, `retired`, or `student`.","enum":["unemployed","employed","student","retired"],"type":"string"},"immediate_family_exposed":{"description":"If your user's immediate family member (sibling, husband/wife, child, parent) is either politically exposed or holds a control position.","type":"boolean"},"is_affiliated_exchange_or_finra":{"description":"Whether user is affiliated with any exchanges or FINRA.","type":"boolean"},"is_control_person":{"description":"Whether user holds a controlling position in a publicly traded company, member of the board of directors or has policy making abilities in a publicly traded company.","type":"boolean"},"is_politically_exposed":{"description":"Whether the user is politically exposed.","type":"boolean"}},"required":["is_control_person","is_affiliated_exchange_or_finra","is_politically_exposed","immediate_family_exposed"],"type":"object"},"Error":{"properties":{"code":{"type":"number"},"message":{"type":"string"}},"required":["code","message"],"title":"Error","type":"object"},"Exchange":{"description":"Represents the exchange where an asset is traded.\n\nFor Stocks:\n- AMEX\n- ARCA\n- BATS\n- NYSE\n- NASDAQ\n- NYSEARCA\n- OTC\n\nFor Crypto:\n- CRYPTO","enum":["AMEX","ARCA","BATS","NYSE","NASDAQ","NYSEARCA","OTC"],"example":"NASDAQ","title":"Exchange","type":"string"},"FeePaymentMethod":{"description":"Only outgoing wire fees are currently supported for automated processing.\n\n- **user** The end user will pay any applicable fees\n- **invoice** Any applicable fees will be billed to the client in the following monthly invoice","title":"FeePaymentMethod","type":"string"},"Identity":{"description":"Identity is the model to provide account owner's identity information.\n","example":{"country_of_birth":"AUS","country_of_citizenship":"AUS","country_of_tax_residence":"USA","date_of_birth":"1990-01-01","family_name":"Doe","funding_source":["employment_income"],"given_name":"John","tax_id":"666-55-4321","tax_id_type":"USA_SSN"},"properties":{"annual_income_max":{"description":"The upper bound of the user's annual income.","type":"number"},"annual_income_min":{"description":"The lower bound of the user's annual income.","type":"number"},"country_of_birth":{"description":"[ISO 3166-1 alpha-3](https://www.iso.org/iso-3166-country-codes.html).\n","example":"USA","type":"string"},"country_of_citizenship":{"description":"[ISO 3166-1 alpha-3](https://www.iso.org/iso-3166-country-codes.html).\n","example":"USA","type":"string"},"country_of_tax_residence":{"description":"[ISO 3166-1 alpha-3](https://www.iso.org/iso-3166-country-codes.html).\n","example":"USA","type":"string"},"date_of_birth":{"description":"The date of birth in \"YYYY-MM-DD\" format.","example":"1990-01-01","format":"date","type":"string"},"date_of_departure_from_usa":{"description":"Required if `visa_type` = B1 or B2","format":"date","type":"string"},"family_name":{"description":"The last name (surname) of the user.","example":"Doe","type":"string"},"funding_source":{"description":"Can be one or more of the following: `employment_income`, `investments`, `inheritance`, `business_income`, `savings`, `family`.","items":{"enum":["employment_income","investments","inheritance","business_income","savings","family"],"type":"string"},"type":"array"},"given_name":{"description":"The first/given name of the user.","example":"John","type":"string"},"investment_experience_with_options":{"description":"The user's level of expertise and familiarity with investing in Options.\n","enum":["none","1_to_5_years","over_5_years"],"type":"string"},"investment_experience_with_stocks":{"description":"The user's level of expertise and familiarity with investing in US Equities.\n","enum":["none","1_to_5_years","over_5_years"],"type":"string"},"investment_objective":{"deprecated":true,"description":"The user's investment objective. This field is deprecated. Please use the top level `investment_objective` field.\n","enum":["generate_income","preserve_wealth","market_speculation","growth","balance_preserve_wealth_with_growth"],"type":"string"},"investment_time_horizon":{"deprecated":true,"description":"The expected period of time the user plan to invest to achieve his/her financial goal(s). This field is deprecated. Please use the top level `investment_time_horizon` field.\n","enum":["less_than_1_year","1_to_2_years","3_to_5_years","6_to_10_years","more_than_10_years"],"type":"string"},"liquid_net_worth_max":{"description":"The upper bound of the user's liquid net worth.","type":"number"},"liquid_net_worth_min":{"description":"The lower bound of the user's liquid net worth.","type":"number"},"liquidity_needs":{"deprecated":true,"description":"The user's ability to quickly and easily convert all or part of their investments in this account to cash without significant loss in value. This field is deprecated. Please use the top level `liquidity_needs` field.\n","enum":["very_important","important","somewhat_important","does_not_matter"],"type":"string"},"marital_status":{"description":"The marital status of the user.\n","enum":["SINGLE","MARRIED","DIVORCED","WIDOWED"],"type":"string"},"middle_name":{"description":"The middle name of the user.","type":"string"},"number_of_dependents":{"description":"The number of dependents the user has.\n","type":"integer"},"permanent_resident":{"description":"Only used to collect permanent residence status in the USA.","type":"boolean"},"risk_tolerance":{"deprecated":true,"description":"The user's investment risk tolerance. This field is deprecated. Please use the top level `risk_tolerance` field.\n","enum":["conservative","moderate","significant_risk"],"type":"string"},"tax_id":{"description":"Required if tax_id_type is set.","example":"666-55-4321","type":"string"},"tax_id_type":{"$ref":"#/components/schemas/TaxIdType"},"total_net_worth_max":{"description":"The upper bound of the user's total net worth.","type":"number"},"total_net_worth_min":{"description":"The lower bound of the user's total net worth.","type":"number"},"visa_expiration_date":{"description":"Required if `visa_type` is set.","format":"date","type":"string"},"visa_type":{"description":"Only used to collect visa types for users residing in the USA.","type":"string"}},"required":["given_name","family_name","date_of_birth","tax_id_type","country_of_tax_residence","funding_source"],"type":"object"},"IncomingWire":{"description":"Represents a simulated inbound wire transfer created via `POST /v1/testing/incoming_wires`.\n\nAvailable in the Sandbox environment only.","properties":{"account_number":{"description":"The destination customer's brokerage account number","type":"string"},"amount":{"format":"decimal","type":"string"},"batch_processed_at":{"description":"Timestamp when the wire was picked up by the worker for processing","format":"date-time","type":"string"},"correspondent":{"description":"The 4-character correspondent code","type":"string"},"create_at":{"description":"Timestamp when the incoming wire was created","format":"date-time","type":"string"},"currency":{"$ref":"#/components/schemas/Currency"},"delay_until":{"format":"date-time","nullable":true,"type":"string"},"id":{"description":"The incoming wire ID","format":"uuid","type":"string"},"status":{"$ref":"#/components/schemas/TransferStatus"},"wire_instructions":{"description":"FFC (For Further Credit) string in the form `FFC <correspondent>-<account_number>`","type":"string"}},"title":"IncomingWire","type":"object"},"KYCResultType":{"description":"IDENTITY_VERIFICATION\tIdentity needs to be verified\n\nTAX_IDENTIFICATION\tTax ID number needs to be verified\n\nADDRESS_VERIFICATION\tAddress needs to be verified\n\nDATE_OF_BIRTH\tDate of birth needs to be verified\n\nINVALID_IDENTITY_PASSPORT\tIdentity needs to be verified via a \ngovernment issued ID. This is commonly used in conjuction with OTHER to describe the exact document needed.\n\nSELFIE_VERIFICATION\tIdentity needs to be verified via a live selfie of the account owner\n\nPEP\tFurther information needs to be submitted if account owner is politically exposed person\n\nFAMILY_MEMBER_PEP\tFurther information needs to be submitted if family member is a politically exposed person\n\nCONTROL_PERSON\tFurther information needs to be submitted if account owner is a control person\n\nAFFILIATED\tFurther information needs to be submitted if account owner is affiliated to finra or an exchange\n\nVISA_TYPE_OTHER\tFurther information needs to be submitted about account owner's visa\n\nW8BEN_CORRECTION\tIdenfitying information submitted by the user was incorrect so a new, corrected, W8BEN needs to be submitted\nCOUNTRY_NOT_SUPPORTED\tThe account owner's country of tax residence is not supported by our KYC providers. In this case, we'll manully perform KYC on the user\n\nWATCHLIST_HIT\tResults from the watchlist screening need further investigation before account opening. No action is needed from the user\n\nOTHER\tA custom message will be sent to describe exactly what is needed from the account owner. The message will be displayed in the additional_information attribute.\n\nOTHER_PARTNER\tA custom message will be sent to relay information relevant only to the partner. The message will be displayed in the additional_information attribute.","title":"KYCResultType","type":"string"},"KYCResults":{"description":"Hold information about the result of KYC. Please see the documentation [here](https://alpaca.markets/docs/api-references/broker-api/events/#kyc-results) for more indepth details","properties":{"accept":{"$ref":"#/components/schemas/KYCResultType"},"additional_information":{"description":"Used to display a custom message.","type":"string"},"indeterminate":{"$ref":"#/components/schemas/KYCResultType"},"reject":{"$ref":"#/components/schemas/KYCResultType"},"summary":{"description":"Either `pass` or `fail`. Used to indicate if KYC has completed and passed or not. This field is used for internal purposes only.","type":"string"}},"type":"object"},"MLegOrderLeg":{"description":"Represents an individual leg of a multileg options order.","properties":{"position_intent":{"$ref":"#/components/schemas/PositionIntent"},"ratio_qty":{"description":"proportional quantity of this leg in relation to the overall multileg order qty","example":"1","type":"string"},"side":{"$ref":"#/components/schemas/OrderSide"},"symbol":{"description":"symbol or asset ID to identify the asset to trade","type":"string"}},"required":["symbol","ratio_qty"],"title":"MLegOrderLeg","type":"object"},"NextPageToken":{"description":"Use this token in your next API call to paginate through the dataset and retrieve the next page of results. A null token indicates there are no more data to fetch.\n","example":"MTAwMA==","nullable":true,"type":"string"},"NonTradeActivity":{"properties":{"activity_sub_type":{"$ref":"#/components/schemas/ActivitySubType"},"created_at":{"description":"Valid only for non-trading activity types. Null for trading activites.","example":"2021-05-10T14:01:04.650275Z","format":"date-time","type":"string"},"currency":{"description":"Currency denomination of the activity.","type":"string"},"cusip":{"description":"Valid only for non-trading activity types. Null for trading activites.","example":"037833100","type":"string"},"date":{"description":"Valid only for non-trading activity types. Null for trading activites.","example":"2021-05-21","format":"date","type":"string"},"description":{"description":"Valid only for non-trading activity types. Null for trading activites.","example":"Example description","type":"string"},"group_id":{"description":"ID used to link activities who share a sibling relationship","example":"13d96cf3-1cbe-4632-b2f2-86a9df5a3b9d","format":"uuid","type":"string"},"net_amount":{"description":"Valid only for non-trading activity types. Null for trading activites.","example":"1234","format":"decimal","type":"string"},"per_share_amount":{"description":"Valid only for non-trading activity types. Null for trading activites.","example":"0.38921","format":"decimal","type":"string"},"qty":{"description":"Valid only for non-trading activity types. Null for trading activites.","example":"0.38921","format":"decimal","type":"string"},"status":{"description":"Valid only for non-trading activity types. Null for trading activites.","enum":["executed","correct","canceled"],"example":"executed","type":"string"},"symbol":{"description":"Valid only for non-trading activity types. Null for trading activites.","example":"AAPL","type":"string"}},"title":"NonTradeActivity","type":"object"},"NonTradeActivityEvent":{"description":"Represents a non-trade activity SSE event","properties":{"account_id":{"description":"Account UUID","format":"uuid","type":"string"},"at":{"description":"Timestamp of when the event was emitted","format":"date-time","type":"string"},"cusip":{"description":"CUSIP the event is associated with, not present when no CUSIP is applicable","example":"037833100","type":"string"},"description":{"description":"Additional information about the event, empty string if not applicable","example":"Example description","type":"string"},"entry_type":{"description":"Type of entry for e.g JNLC, FEE, INT, DIVNRA etc","example":"JNLC","type":"string"},"event_id":{"description":"Monotonically increasing 64bit integer","type":"integer"},"event_ulid":{"description":"lexically sortable, monotonically increasing character array","format":"ulid","type":"string"},"id":{"description":"Record UUID","format":"uuid","type":"string"},"net_amount":{"description":"Net amount if applicable, 0 otherwise","example":1,"format":"decimal","type":"number"},"per_share_amount":{"description":"Per share amount if applicable","example":0.3,"format":"decimal","type":"number"},"price":{"description":"Price if applicable.","example":"0.38921","format":"decimal","type":"string"},"qty":{"description":"Quantity of the stock affected. 0 for cash events","format":"decimal","type":"number"},"settle_date":{"description":"Date of settlement if applicable","format":"date","type":"string"},"status":{"description":"Status of the event","enum":["executed","correct","canceled"],"example":"executed","type":"string"},"symbol":{"description":"Symbol the event is associated with, empty string when no symbol is applicable","example":"AAPL","type":"string"},"system_date":{"description":"Date of the event recorded in the system","format":"date","type":"string"}},"required":["account_id","at","id","event_ulid","system_date","settle_date","net_amount","entry_type","description"],"title":"NonTradeActivityEvent","type":"object","x-examples":{"example-1":{"account_id":"8e00606a-c9ac-409a-ba45-f55e8f77984a","at":"2024-11-26T15:25:17.803914Z","description":null,"entry_type":"JNLC","event_ulid":"01JDMH7BKCCB4XY5F11HN63NZX","id":"afb78fa2-7e4c-4e0a-bca2-2e0d26a87f88","net_amount":10,"qty":0,"settle_date":"2024-11-26","status":"executed","symbol":null,"system_date":"2024-11-26"},"example-2":{"account_id":"11629972-5fd6-4e14-ad9e-0f0cabd2777f","at":"2024-11-12T01:15:53.132425Z","description":"TAF fee for proceed of 0.010052895 shares (1 trades) on 2024-11-11 by 613651765","entry_sub_type":"TAF","entry_type":"FEE","event_ulid":"01JCEZ1ZDCE44GFX6WZ75N4199","id":"d96cea8a-6a77-46cd-bb7b-df6d74442653","net_amount":-0.01,"qty":0,"settle_date":"2024-11-12","status":"executed","symbol":null,"system_date":"2024-11-11"}}},"OptionsApprovalEvent":{"description":"This property is included when the account's approved options level changes.\n","properties":{"approved_level_from":{"description":"The approved options level before the change","type":"integer"},"approved_level_to":{"description":"The approved options level after the change","type":"integer"}},"type":"object"},"Order":{"properties":{"asset_class":{"$ref":"#/components/schemas/AssetClass"},"asset_id":{"description":"The asset ID (For options this represents the option contract ID)","example":"61e69015-8549-4bfd-b9c3-01e75843f47d","format":"uuid","type":"string"},"cancel_requested_at":{"description":"Time when cancellation or bust was requested (if applicable)","example":"2021-03-16T18:38:01.942282Z","format":"date-time","nullable":true,"type":"string"},"canceled_at":{"description":"Can be null","example":"2021-03-16T18:38:01.942282Z","format":"date-time","nullable":true,"type":"string"},"client_order_id":{"description":"Client unique order ID","example":"61e69015-8549-4bfd-b9c3-01e75843f47d","maxLength":128,"type":"string"},"commission":{"description":"The dollar value commission for this order.","example":"3.14","format":"decimal","type":"string"},"commission_bps":{"deprecated":true,"description":"**deprecated**: Please use the commission_type = bps instead and set the desired bps value in the `commission` field.\nThe percent commission you want to charge the end user on the order (expressed in bps). Alpaca will convert the order to a notional amount for purposes of calculating commission.\n","example":"10","format":"decimal","type":"string"},"commission_type":{"$ref":"#/components/schemas/CommissionType"},"created_at":{"description":"Time when order was entered","example":"2021-03-16T18:38:01.942282Z","format":"date-time","type":"string"},"expired_at":{"description":"Can be null","example":"2021-03-16T18:38:01.942282Z","format":"date-time","nullable":true,"type":"string"},"extended_hours":{"example":true,"type":"boolean"},"failed_at":{"description":"Can be null","example":"2021-03-16T18:38:01.942282Z","format":"date-time","nullable":true,"type":"string"},"filled_at":{"description":"Time the order was filled. Can be null if not filled","example":"2021-03-16T18:38:01.942282Z","format":"date-time","nullable":true,"type":"string"},"filled_avg_price":{"description":"Filled average price. Can be 0 until order is processed in case order is passed outside of market hours","example":"4.2","format":"decimal","nullable":true,"type":"string"},"filled_qty":{"description":"Filled quantity","example":"4.2","format":"decimal","type":"string"},"hwm":{"description":"The highest (lowest) market price seen since the trailing stop order was submitted.","example":"3.14","format":"decimal","nullable":true,"type":"string"},"id":{"description":"Order ID generated by Alpaca","example":"61e69015-8549-4bfd-b9c3-01e75843f47d","format":"uuid","type":"string"},"legs":{"description":"When querying non-simple order_class orders in a nested style, an array of Order entities associated with this order. Otherwise, null.","items":{"$ref":"#/components/schemas/OrderLeg"},"nullable":true,"type":"array"},"limit_price":{"description":"Limit price","example":"3.14","format":"decimal","nullable":true,"type":"string"},"notional":{"description":"Ordered notional amount. If entered, qty will be null. Can take up to 2 decimal points.","example":"4.2","format":"decimal","nullable":true,"type":"string"},"order_class":{"$ref":"#/components/schemas/OrderClass"},"order_type":{"$ref":"#/components/schemas/OrderType"},"position_intent":{"$ref":"#/components/schemas/PositionIntent"},"qty":{"description":"Ordered quantity. If entered, notional will be null. Can take up to 2 decimal points.","example":"4.2","format":"decimal","nullable":true,"type":"string"},"replaced_at":{"description":"Can be null","example":"2021-03-16T18:38:01.942282Z","format":"date-time","nullable":true,"type":"string"},"replaced_by":{"description":"The order ID that this order was replaced by. (Can be null)","example":"61e69015-8549-4bfd-b9c3-01e75843f47d","format":"uuid","nullable":true,"type":"string"},"replaces":{"description":"The order ID that this order replaces. (Can be null)","example":"61e69015-8549-4bfd-b9c3-01e75843f47d","format":"uuid","nullable":true,"type":"string"},"side":{"$ref":"#/components/schemas/OrderSide"},"status":{"$ref":"#/components/schemas/OrderStatus"},"stop_price":{"description":"Stop price","example":"3.14","format":"decimal","nullable":true,"type":"string"},"submitted_at":{"description":"Time the order was submitted for execution or, if not yet submitted the created_at time. Because orders are submitted for execution asynchronous to database updates, at times this may be before the created_at time.","example":"2021-03-16T18:38:01.942282Z","format":"date-time","type":"string"},"swap_fee_bps":{"description":"Fee in basis points on top swap rate charged by the correspondent on every order","type":"string"},"swap_rate":{"description":"Swap rate is the exchange rate (without mark-up) used to convert the price into local currency or crypto asset","type":"string"},"symbol":{"description":"The asset symbol","example":"AALP","type":"string"},"time_in_force":{"$ref":"#/components/schemas/TimeInForce"},"trail_percent":{"description":"The percent value away from the high water mark for trailing stop orders.","example":"5.0","format":"decimal","nullable":true,"type":"string"},"trail_price":{"description":"The dollar value away from the high water mark for trailing stop orders.","example":"3.14","format":"decimal","nullable":true,"type":"string"},"type":{"$ref":"#/components/schemas/OrderType"},"updated_at":{"description":"Time of most recent change to the order","example":"2021-03-16T18:38:01.942282Z","format":"date-time","type":"string"},"usd":{"description":"Nested object to encompass the USD equivalent fields for the local currency fields","type":"object"}},"required":["id","symbol"],"type":"object"},"OrderClass":{"description":"The order classes supported by Alpaca vary based on the order's security type. The following provides a comprehensive breakdown of the supported order classes for each category:\n  - Equity trading: simple (or \"\"), oco, oto, bracket.\n  - Options trading:\n    - simple (or \"\")\n    - mleg (required for multi-leg complex option strategies)\n  - Crypto trading: simple (or \"\").","enum":["simple","bracket","oco","oto","mleg"],"example":"bracket","type":"string"},"OrderClosedResponse":{"description":"Represents the result of asking the api to cancel an Order.\n","properties":{"body":{"$ref":"#/components/schemas/Order"},"id":{"description":"UUID of the order that was canceled","format":"uuid","type":"string"},"status":{"description":"Http status code for the attempt to close this Order","type":"integer"}},"required":["id","status"],"title":"OrderClosedResponse","type":"object","x-examples":{}},"OrderLeg":{"properties":{"asset_class":{"$ref":"#/components/schemas/AssetClass"},"asset_id":{"description":"The asset ID (For options this represents the option contract ID)","example":"61e69015-8549-4bfd-b9c3-01e75843f47d","format":"uuid","type":"string"},"canceled_at":{"description":"Can be null","example":"2021-03-16T18:38:01.942282Z","format":"date-time","nullable":true,"type":"string"},"client_order_id":{"description":"Client unique order ID","example":"61e69015-8549-4bfd-b9c3-01e75843f47d","maxLength":128,"type":"string"},"commission":{"description":"The dollar value commission you want to charge the end user.","example":"3.14","format":"decimal","type":"string"},"commission_bps":{"deprecated":true,"description":"**deprecated**: Please use the commission_type = bps instead and set the desired bps value in the `commission` field.\nThe percent commission you want to charge the end user on the order (expressed in bps). Alpaca will convert the order to a notional amount for purposes of calculating commission.\n","example":"10","format":"decimal","type":"string"},"commission_type":{"$ref":"#/components/schemas/CommissionType"},"created_at":{"description":"Time when order was entered","example":"2021-03-16T18:38:01.942282Z","format":"date-time","type":"string"},"expired_at":{"description":"Can be null","example":"2021-03-16T18:38:01.942282Z","format":"date-time","nullable":true,"type":"string"},"extended_hours":{"example":true,"type":"boolean"},"failed_at":{"description":"Can be null","example":"2021-03-16T18:38:01.942282Z","format":"date-time","nullable":true,"type":"string"},"filled_at":{"description":"Time the order was filled. Can be null if not filled","example":"2021-03-16T18:38:01.942282Z","format":"date-time","nullable":true,"type":"string"},"filled_avg_price":{"description":"Filled average price. Can be 0 until order is processed in case order is passed outside of market hours","example":"4.2","format":"decimal","nullable":true,"type":"string"},"filled_qty":{"description":"Filled quantity","example":"4.2","format":"decimal","type":"string"},"hwm":{"description":"The highest (lowest) market price seen since the trailing stop order was submitted.","example":"3.14","format":"decimal","nullable":true,"type":"string"},"id":{"description":"Order ID generated by Alpaca","example":"61e69015-8549-4bfd-b9c3-01e75843f47d","format":"uuid","type":"string"},"legs":{"description":"Always null for an order leg; legs are not nested beyond one level.","example":null,"items":{"type":"object"},"nullable":true,"type":"array"},"limit_price":{"description":"Limit price","example":"3.14","format":"decimal","nullable":true,"type":"string"},"notional":{"description":"Ordered notional amount. If entered, qty will be null. Can take up to 2 decimal points.","example":"4.2","format":"decimal","nullable":true,"type":"string"},"order_class":{"$ref":"#/components/schemas/OrderClass"},"order_type":{"$ref":"#/components/schemas/OrderType"},"position_intent":{"$ref":"#/components/schemas/PositionIntent"},"qty":{"description":"Ordered quantity. If entered, notional will be null. Can take up to 2 decimal points.","example":"4.2","format":"decimal","nullable":true,"type":"string"},"replaced_at":{"description":"Can be null","example":"2021-03-16T18:38:01.942282Z","format":"date-time","nullable":true,"type":"string"},"replaced_by":{"description":"The order ID that this order was replaced by. (Can be null)","example":"61e69015-8549-4bfd-b9c3-01e75843f47d","format":"uuid","nullable":true,"type":"string"},"replaces":{"description":"The order ID that this order replaces. (Can be null)","example":"61e69015-8549-4bfd-b9c3-01e75843f47d","format":"uuid","nullable":true,"type":"string"},"side":{"$ref":"#/components/schemas/OrderSide"},"status":{"$ref":"#/components/schemas/OrderStatus"},"stop_price":{"description":"Stop price","example":"3.14","format":"decimal","nullable":true,"type":"string"},"submitted_at":{"description":"Time the order was submitted for execution or, if not yet submitted the created_at time. Because orders are submitted for execution asynchronous to database updates, at times this may be before the created_at time.","example":"2021-03-16T18:38:01.942282Z","format":"date-time","type":"string"},"swap_fee_bps":{"description":"Fee in basis points on top swap rate charged by the correspondent on every order","type":"string"},"swap_rate":{"description":"Swap rate is the exchange rate (without mark-up) used to convert the price into local currency or crypto asset","type":"string"},"symbol":{"description":"The asset symbol","example":"AALP","type":"string"},"time_in_force":{"$ref":"#/components/schemas/TimeInForce"},"trail_percent":{"description":"The percent value away from the high water mark for trailing stop orders.","example":"5.0","format":"decimal","nullable":true,"type":"string"},"trail_price":{"description":"The dollar value away from the high water mark for trailing stop orders.","example":"3.14","format":"decimal","nullable":true,"type":"string"},"type":{"$ref":"#/components/schemas/OrderType"},"updated_at":{"description":"Time of most recent change to the order","example":"2021-03-16T18:38:01.942282Z","format":"date-time","type":"string"},"usd":{"description":"Nested object to encompass the USD equivalent fields for the local currency fields","type":"object"}},"required":["id","symbol"],"type":"object"},"OrderSide":{"description":"Represents what side of the transaction an order was on. Required for all order classes except for `mleg`.","enum":["buy","sell","buy_minus","sell_plus","sell_short","sell_short_exempt","undisclosed","cross","cross_short"],"example":"buy","type":"string"},"OrderStatus":{"enum":["new","partially_filled","filled","done_for_day","canceled","expired","replaced","pending_cancel","pending_replace","accepted","pending_new","accepted_for_bidding","stopped","rejected","suspended","calculated"],"example":"filled","type":"string"},"OrderType":{"description":"The order types supported by Alpaca vary based on the order's security type. The following provides a comprehensive breakdown of the supported order types for each category:\n - Equity trading: market, limit, stop, stop_limit, trailing_stop.\n - Options trading: market, limit.\n - Options Multileg trading: market, limit.\n - Crypto trading: market, limit, stop_limit.","enum":["market","limit","stop","stop_limit","trailing_stop"],"example":"market","title":"OrderType","type":"string"},"OwnerDocument":{"description":"A document associated with an owner of the account","example":{"created_at":"2019-09-30T23:55:31.185998Z","document_sub_type":"passport","document_type":"identity_verification","id":"0d18ae51-3c94-4511-b209-101e1666416b","mime_type":"image/jpeg"},"properties":{"created_at":{"format":"date-time","type":"string"},"document_sub_type":{"description":"The sub-type of the document. This is a free-form property.","type":"string"},"document_type":{"$ref":"#/components/schemas/OwnerDocumentType"},"id":{"format":"uuid","type":"string"},"mime_type":{"type":"string"}},"required":["id","document_type","created_at"],"type":"object"},"OwnerDocumentType":{"description":"The type of the owner document","enum":["account_approval_letter","address_verification","cip_result","company_formation","date_of_birth_verification","entity_operating_document","entity_registration","hio_declaration_form","identity_verification","limited_trading_authorization","pep_declaration_form","tax_id_verification","w8ben","w9"],"example":"identity_verification","type":"string"},"OwnerDocumentUploadRequest":{"description":"The request to upload a document for an owner of the account","example":{"content":"/9j/Cg==","document_sub_type":"passport","document_type":"identity_verification","mime_type":"image/jpeg"},"properties":{"content":{"description":"The base64 string encoding of the document contents. This property is required unless content_data is provided.","example":"/9j/Cg==","format":"base64","type":"string"},"content_data":{"$ref":"#/components/schemas/W8benDocument"},"document_sub_type":{"description":"The specific type of document, e.g. passport. This is a free-form property.","example":"passport","type":"string"},"document_type":{"$ref":"#/components/schemas/OwnerDocumentType"},"mime_type":{"description":"This field is required if content is specified. ENUM: application/pdf, image/png, or image/jpeg. If document_type is w8ben then application/json is also accepted","example":"image/jpeg","type":"string"}},"required":["document_type","content"],"title":"OwnerDocumentUploadRequest","type":"object","x-examples":{"example-1":{"content":"/9j/Cg==","document_sub_type":"passport","document_type":"identity_verification","mime_type":"image/jpeg"}}},"Position":{"properties":{"asset_class":{"$ref":"#/components/schemas/AssetClass"},"asset_id":{"description":"Asset ID (For options this represents the option contract ID)","example":"904837e3-3b76-47ec-b432-046db621571b","format":"uuid","type":"string"},"asset_marginable":{"description":"Indicates if this asset is marginable","type":"boolean"},"avg_entry_price":{"description":"Average entry price of the position","example":"100.0","type":"string"},"avg_entry_swap_rate":{"description":"The average swap rate of the position. This is only returned for LCT accounts.","example":"1.40","format":"decimal","type":"string"},"change_today":{"description":"Percent change from last day price (by a factor of 1)","example":"0.0084","format":"decimal","type":"string"},"cost_basis":{"description":"Total cost basis","example":"500.0","format":"decimal","type":"string"},"current_price":{"description":"Current asset price per share","example":"120.0","format":"decimal","type":"string"},"exchange":{"description":"Exchange name of the asset","example":"NASDAQ","type":"string"},"lastday_price":{"description":"Last day's asset price per share based on the closing value of the last trading day","example":"119.0","format":"decimal","type":"string"},"market_value":{"description":"Total market value of the position","example":"600.0","format":"decimal","type":"string"},"qty":{"description":"The number of shares","example":"5","type":"string"},"qty_available":{"description":"Total number of shares available minus open orders / locked for options covered call","example":"5","type":"string"},"side":{"enum":["long","short"],"example":"long","type":"string"},"swap_rate":{"description":"The latest swap rate. This is only returned for LCT accounts.","example":"1.50","format":"decimal","type":"string"},"symbol":{"description":"Asset symbol","example":"AAPL","type":"string"},"unrealized_intraday_pl":{"description":"Unrealized profit/loss for the day","example":"10.0","format":"decimal","type":"string"},"unrealized_intraday_plpc":{"description":"Unrealized interday profit/loss percent (by a factor of 1)","example":"0.0084","format":"decimal","type":"string"},"unrealized_pl":{"description":"Unrealized profit/loss","example":"100.0","format":"decimal","type":"string"},"unrealized_plpc":{"description":"Unrealized profit/loss percent (by a factor of 1)","example":"0.20","format":"decimal","type":"string"},"usd":{"$ref":"#/components/schemas/USDPosition"}},"required":["asset_id","symbol","exchange","asset_class","avg_entry_price","qty","qty_available","side","market_value","cost_basis","unrealized_pl","unrealized_plpc","unrealized_intraday_pl","unrealized_intraday_plpc","current_price","lastday_price","change_today"],"type":"object","x-examples":{"example-1":{"asset_class":"us_equity","asset_id":"93f58d0b-6c53-432d-b8ce-2bad264dbd94","asset_marginable":false,"avg_entry_price":"172.08","change_today":"0.0189483657034581","cost_basis":"688.32","current_price":"172.08","exchange":"NASDAQ","lastday_price":"168.88","market_value":"688.32","qty":"4","qty_available":"4","side":"long","symbol":"AAPL","unrealized_intraday_pl":"0","unrealized_intraday_plpc":"0","unrealized_pl":"0","unrealized_plpc":"0"}}},"PositionClosedResponse":{"description":"Represents the result of asking the api to close a position.\n\n`body` is the Order used to close out the position.","properties":{"body":{"$ref":"#/components/schemas/Order"},"status":{"description":"Http status code for the attempt to close this position","type":"integer"},"symbol":{"description":"Symbol name of the asset","type":"string"}},"required":["symbol","status"],"title":"PositionClosedResponse","type":"object","x-examples":{"example-1":{"body":{"asset_class":"us_equity","asset_id":"b0b6dd9d-8b9b-48a9-ba46-b9d54906e415","canceled_at":null,"client_order_id":"52f8574c-96d5-49b6-94c1-2570a268434e","commision":"1.0","created_at":"2022-02-04T16:53:29.53427917Z","expired_at":null,"extended_hours":false,"failed_at":null,"filled_at":null,"filled_avg_price":null,"filled_qty":"0","hwm":null,"id":"f7f25e89-939a-4587-aaf6-414a6b3c341d","legs":null,"limit_price":null,"notional":null,"order_class":"","order_type":"market","qty":"2","replaced_at":null,"replaced_by":null,"replaces":null,"side":"sell","status":"accepted","stop_price":null,"submitted_at":"2022-02-04T16:53:29.533738219Z","symbol":"AAPL","time_in_force":"day","trail_percent":null,"trail_price":null,"type":"market","updated_at":"2022-02-04T16:53:29.53427917Z"},"status":200,"symbol":"AAPL"}}},"PositionIntent":{"description":"Represents the desired position strategy.","enum":["buy_to_open","buy_to_close","sell_to_open","sell_to_close"],"example":"buy_to_open","title":"PositionIntent","type":"string"},"RestrictToLiquidationReasons":{"description":"Reasons why the liquidation only flag was set","properties":{"ach_return":{"description":"Set when an incoming ACH transfer gets rejected","type":"boolean"},"pattern_day_trading":{"deprecated":true,"description":"Set when the trading account is marked as a PDT, but its equity falls below the $25k treshold","type":"boolean","x-deprecation":{"reason":"See https://docs.alpaca.markets/us/docs/understanding-finras-new-intraday-margin-rule-and-the-end-of-pdt","since":"2026-04-27T00:00:00Z","sunset":"2026-07-06T00:00:00Z"}},"position_to_equity_ratio":{"description":"Set when the position to equity ration exceeds the maximum limit","type":"boolean"},"unspecified":{"description":"Default value for unknown reason","type":"boolean"}},"title":"RestrictToLiquidationReasons","type":"object"},"StatusFundingEvent":{"description":"Represents a change in a Funding entity's status, sent over the events streaming api. Currently, the suppported entities are: bank relationships, bank wires, transfers and funding wallets.","properties":{"account_id":{"description":"Account UUID","format":"uuid","minLength":1,"type":"string"},"at":{"description":"Timestamp of when the transfer status changed","minLength":1,"type":"string"},"correspondent":{"description":"Correspondent's code","format":"ABCD","maxLength":4,"minLength":1,"type":"string"},"entity_id":{"description":"Entity's UUID","format":"uuid","minLength":1,"type":"string"},"entity_type":{"description":"Valid values are BankRelationship, WireBank, Transfer and FundingWallet.","format":"uuid","minLength":1,"type":"string"},"event_id":{"description":"lexically sortable, monotonically increasing character array","format":"ulid","minLength":1,"type":"string"},"reason":{"description":"Used when an a bank relationship is rejected, a wire bank is canceled, etc.","type":"string"},"status_from":{"description":"Valid values are based on entity type:\n- BankRelationship:\n  - QUEUED\n  - CANCEL_REQUESTED\n  - CANCEL_SENT\n  - CANCEL_FAILED\n  - PENDING\n  - SENT_TO_CLEARING\n  - APPROVED\n  - CANCELED\n  - REJECTED\n- WireBank:\n  - QUEUED\n  - SENT_TO_CLEARING\n  - APPROVED\n  - CANCELED\n  - REJECTED\n- Transfer:\n  - QUEUED\n  - APPROVAL_PENDING\n  - CANCELED\n  - EXPIRED\n  - APPROVED\n  - REJECTED\n  - SENT_TO_CLEARING\n  - COMPLETE\n  - RETURNED\n- FundingWallet:\n  - active\n  - pending\n","type":"string"},"status_to":{"description":"Valid values are based on entity type:\n- BankRelationship:\n  - QUEUED\n  - CANCEL_REQUESTED\n  - CANCEL_SENT\n  - CANCEL_FAILED\n  - PENDING\n  - SENT_TO_CLEARING\n  - APPROVED\n  - CANCELED\n  - REJECTED\n- WireBank:\n  - QUEUED\n  - SENT_TO_CLEARING\n  - APPROVED\n  - CANCELED\n  - REJECTED\n- Transfer:\n  - QUEUED\n  - APPROVAL_PENDING\n  - CANCELED\n  - EXPIRED\n  - APPROVED\n  - REJECTED\n  - SENT_TO_CLEARING\n  - COMPLETE\n  - RETURNED\n- FundingWallet:\n  - active\n  - pending\n","minLength":1,"type":"string"}},"required":["event_id","at","account_id","correspondent","entity_id","entity_type","status_to"],"title":"StatusFundingEvent","type":"object","x-examples":{"example-1":{"account_id":"8e00606a-c9ac-409a-ba45-f55e8f77984a","at":"2025-04-11T19:52:24.066998Z","correspondent":"LPCA","entity_id":"c4ed4206-697b-4859-ab71-b9de6649859d","entity_type":"BankRelationship","event_id":"01F7VQQ782DM57SJNWAYMD14J9","status_from":null,"status_to":"QUEUED"},"example-2":{"account_id":"8e00606a-c9ac-409a-ba45-f55e8f77984a","at":"2025-04-11T19:52:24.066998Z","correspondent":"LPCA","entity_id":"c4ed4206-697b-4859-ab71-b9de6649859d","entity_type":"BankRelationship","event_id":"01F7VQQ782DM57SJNWAYMD14J9","reason":"bank account owner name does not match brokerage account name","status_from":"QUEUED","status_to":"REJECTED"}}},"StreetAddress":{"example":"20 N San Mateo Dr","type":"string"},"SystemEventV2":{"description":"Represents that system event had occurred and sent over the events streaming api.\n","properties":{"at":{"description":"Timestamp of the event","format":"date-time","type":"string"},"description":{"description":"The human readable description of the system event","type":"string"},"event_id":{"description":"lexically sortable, monotonically increasing character array","format":"ulid","type":"string"},"system_date":{"description":"the system date to which this system event belongs to","format":"date","type":"string"},"type":{"description":"the machine readable type of the system event","enum":["eod_balances_ready","eod_positions_ready"],"type":"string"}},"required":["at","event_id","type","system_date","description"],"title":"SystemEvent","type":"object","x-examples":{"example-1":{"$ref":"#/components/examples/SystemEventV2"}}},"TaxIdType":{"description":"Required if `tax_id` is set.\n\nAn Enum of the various kinds of Tax ID formats Alpaca supports.\n\nPossible Values are:\n\n\n- **USA_SSN**\nUSA Social Security Number\n\n- **USA_ITIN**\nUSA Individual Taxpayer Identification Number\n\n- **ARG_AR_CUIT**\nArgentina CUIT\n\n- **AUS_TFN**\nAustralian Tax File Number\n\n- **AUS_ABN**\nAustralian Business Number\n\n- **BOL_NIT**\nBolivia NIT\n\n- **BRA_CPF**\nBrazil CPF\n\n- **CAN_SIN**\nCanadian Socal Insurance Number\n\n- **CHL_RUT**\nChile RUT\n\n- **COL_NIT**\nColombia NIT\n\n- **CRI_NITE**\nCosta Rica NITE\n\n- **DEU_TAX_ID**\nGermany Tax ID (Identifikationsnummer)\n\n- **DOM_RNC**\nDominican Republic RNC\n\n- **ECU_RUC**\nEcuador RUC\n\n- **FRA_SPI**\nFrance SPI (Reference Tax Number)\n\n- **GBR_UTR**\nUK UTR (Unique Taxpayer Reference)\n\n- **GBR_NINO**\nUK NINO (National Insurance Number)\n\n- **GTM_NIT**\nGuatemala NIT\n\n- **HND_RTN**\nHonduras RTN\n\n- **HUN_TIN**\nHungary TIN Number\n\n- **IDN_KTP**\nIndonesia KTP\n\n- **IND_PAN**\nIndia PAN Number\n\n- **ISR_TAX_ID**\nIsrael Tax ID (Teudat Zehut)\n\n- **ITA_TAX_ID**\nItaly Tax ID (Codice Fiscale)\n\n- **JPN_TAX_ID**\nJapan Tax ID (Koijin Bango)\n\n- **MEX_RFC**\nMexico RFC\n\n- **NIC_RUC**\nNicaragua RUC\n\n- **NLD_TIN**\nNetherlands TIN Number\n\n- **PAN_RUC**\nPanama RUC\n\n- **PER_RUC**\nPeru RUC\n\n- **PRY_RUC**\nParaguay RUC\n\n- **SGP_NRIC**\nSingapore NRIC\n\n- **SGP_FIN**\nSingapore FIN\n\n- **SGP_ASGD**\nSingapore ASGD\n\n- **SGP_ITR**\nSingapore ITR\n\n- **SLV_NIT**\nEl Salvador NIT\n\n- **SWE_TAX_ID**\nSweden Tax ID (Personnummer)\n\n- **URY_RUT**\nUruguay RUT\n\n- **VEN_RIF**\nVenezuela RIF\n\n- **NATIONAL_ID**\nNational ID number, if a tax ID number is not available\n\n- **PASSPORT**\nPassport number, if a tax ID number is not available\n\n- **PERMANENT_RESIDENT**\nPermanent resident number, if a tax ID number is not available\n\n- **DRIVER_LICENSE**\nDriver's license number, if a tax ID number is not available\n\n- **OTHER_GOV_ID**\nOther government issued identifier, if a tax ID number is not available\n\n- **NOT_SPECIFIED**\nOther Tax IDs","enum":["USA_SSN","USA_ITIN","ARG_AG_CUIT","AUS_TFN","AUS_ABN","BOL_NIT","BRA_CPF","CAN_SIN","CHL_RUT","COL_NIT","CRI_NITE","DEU_TAX_ID","DOM_RNC","ECU_RUC","FRA_SPI","GBR_UTR","GBR_NINO","GTM_NIT","HND_RTN","HUN_TIN","IDN_KTP","IND_PAN","ISR_TAX_ID","ITA_TAX_ID","JPN_TAX_ID","MEX_RFC","NIC_RUC","NLD_TIN","PAN_RUC","PER_RUC","PRY_RUC","SGP_NRIC","SGP_FIN","SGP_ASGD","SGP_ITR","SLV_NIT","SWE_TAX_ID","URY_RUT","VEN_RIF","NATIONAL_ID","PASSPORT","PERMANENT_RESIDENT","DRIVER_LICENSE","OTHER_GOV_ID","NOT_SPECIFIED"],"example":"USA_SSN","title":"TaxIdType","type":"string"},"TimeInForce":{"description":"The Time-In-Force values supported by Alpaca vary based on the order's security type. Here is a breakdown of the supported TIFs for each specific security type:\n- Equity trading: day, gtc, opg, cls, ioc, fok.\n- Options trading: day.\n- Crypto trading: gtc, ioc.\n\nBelow are the descriptions of each TIF:\n- day:\n  A day order is eligible for execution only on the day it is live. By default, the order is only valid during Regular Trading Hours (9:30am - 4:00pm ET). If unfilled after the closing auction, it is automatically canceled. If submitted after the close, it is queued and submitted the following trading day. However, if marked as eligible for extended hours, the order can also execute during supported extended hours.\n\n- gtc:\n  The order is good until canceled. Non-marketable GTC limit orders are subject to price adjustments to offset corporate actions affecting the issue. We do not currently support Do Not Reduce (DNR) orders to opt out of such price adjustments.\n\n- opg:\n  Use this TIF with a market/limit order type to submit \"market on open\" (MOO) and \"limit on open\" (LOO) orders. This order is eligible to execute only in the market opening auction. Any unfilled orders after the open will be cancelled. OPG orders submitted after 9:28am but before 7:00pm ET will be rejected. OPG orders submitted after 7:00pm will be queued and routed to the following day's opening auction. On open/on close orders are routed to the primary exchange. Such orders do not necessarily execute exactly at 9:30am / 4:00pm ET but execute per the exchange's auction rules.\n\n- cls:\n  Use this TIF with a market/limit order type to submit \"market on close\" (MOC) and \"limit on close\" (LOC) orders. This order is eligible to execute only in the market closing auction. Any unfilled orders after the close will be cancelled. CLS orders submitted after 3:50pm but before 7:00pm ET will be rejected. CLS orders submitted after 7:00pm will be queued and routed to the following day's closing auction.\n\n- ioc:\n  An Immediate Or Cancel (IOC) order requires all or part of the order to be executed immediately. Any unfilled portion of the order is canceled. Most market makers who receive IOC orders will attempt to fill the order on a principal basis only, and cancel any unfilled balance. On occasion, this can result in the entire order being cancelled if the market maker does not have any existing inventory of the security in question.\n\n- fok:\n  A Fill or Kill (FOK) order is only executed if the entire order quantity can be filled, otherwise the order is canceled.","enum":["day","gtc","opg","cls","ioc","fok"],"example":"gtc","title":"TimeInForce","type":"string"},"TradeAccount":{"description":"This is an extended version of the Account model found [in the trading api](https://alpaca.markets/docs/api-references/trading-api/account/#account-entity).\n\nExtra data has been added that would be useful for brokers.","properties":{"account_blocked":{"description":"If true, the account activity by user is prohibited.","example":false,"type":"boolean"},"account_number":{"description":"The account number","example":"927584925","nullable":true,"type":"string"},"accrued_fees":{"description":"Accrued fees","example":"12345.6789","format":"decimal","type":"string"},"admin_configurations":{"$ref":"#/components/schemas/AdminConfigurations"},"balance_asof":{"description":"The date of the snapshot for `last_*` fields","example":"2021-04-01","type":"string"},"bod_dtbp":{"deprecated":true,"description":"bod_dtbp","example":"12345.6789","format":"decimal","type":"string","x-deprecation":{"reason":"See https://docs.alpaca.markets/us/docs/understanding-finras-new-intraday-margin-rule-and-the-end-of-pdt","since":"2026-04-27T00:00:00Z","sunset":"2026-07-06T00:00:00Z"}},"buying_power":{"description":"Current available cash buying power. If multiplier = 2 then buying_power = max(equity-initial_margin(0) * 2). If multiplier = 1 then buying_power = cash.","example":"12345.6789","format":"decimal","type":"string"},"cash":{"description":"Cash balance","example":"12345.6789","format":"decimal","type":"string"},"cash_transferable":{"description":"Cash available for transfer (JNLC)","example":"12345.6789","type":"string"},"cash_withdrawable":{"description":"Cash available for withdrawal","example":"12345.6789","format":"decimal","type":"string"},"clearing_broker":{"description":"Clearing broker","example":"Velox","type":"string"},"created_at":{"description":"Timestamp this account was created at","example":"2021-03-01T13:28:49.270232Z","type":"string"},"crypto_status":{"$ref":"#/components/schemas/AccountStatus"},"currency":{"description":"Base currency of the account","example":"USD","type":"string"},"daytrade_count":{"deprecated":true,"description":"The current number of daytrades that have been made in the last 5 trading days (inclusive of today)","example":0,"type":"integer","x-deprecation":{"reason":"See https://docs.alpaca.markets/us/docs/understanding-finras-new-intraday-margin-rule-and-the-end-of-pdt","since":"2026-04-27T00:00:00Z","sunset":"2026-07-06T00:00:00Z"}},"daytrading_buying_power":{"deprecated":true,"description":"Your buying power for day trades (continuously updated value)","example":"12345.6789","format":"decimal","type":"string","x-deprecation":{"reason":"See https://docs.alpaca.markets/us/docs/understanding-finras-new-intraday-margin-rule-and-the-end-of-pdt","since":"2026-04-27T00:00:00Z","sunset":"2026-07-06T00:00:00Z"}},"effective_buying_power":{"description":"Effective buying power (duplicate of buying power)","example":"12345.6789","format":"decimal","type":"string"},"equity":{"description":"cash + long_market_value + short_market_value","example":"12345.6789","format":"decimal","type":"string"},"id":{"description":"The account ID","example":"c8f1ef5d-edc0-4f23-9ee4-378f19cb92a4","format":"uuid","type":"string"},"initial_margin":{"description":"Reg T initial margin requirement (continuously updated value)","example":"12345.6789","format":"decimal","type":"string"},"intraday_adjustments":{"description":"The intraday adjustment by non_trade_activities such as fund deposit/withdraw.\n","example":"0","type":"string"},"last_buying_power":{"description":"Value of buying_power as of previous trading day at 16:00:00 ET","example":"12345.6789","type":"string"},"last_cash":{"description":"Value of all cash as of previous trading day at 16:00:00 ET","example":"12345.6789","type":"string"},"last_daytrade_count":{"deprecated":true,"description":"Value of daytrade count as of previous trading day at 16:00:00 ET","example":0,"type":"integer","x-deprecation":{"reason":"See https://docs.alpaca.markets/us/docs/understanding-finras-new-intraday-margin-rule-and-the-end-of-pdt","since":"2026-04-27T00:00:00Z","sunset":"2026-07-06T00:00:00Z"}},"last_daytrading_buying_power":{"deprecated":true,"description":"Value of daytrading buying power as of previous trading day at 16:00:00 ET","example":"12345.6789","type":"string","x-deprecation":{"reason":"See https://docs.alpaca.markets/us/docs/understanding-finras-new-intraday-margin-rule-and-the-end-of-pdt","since":"2026-04-27T00:00:00Z","sunset":"2026-07-06T00:00:00Z"}},"last_equity":{"description":"Equity as of previous trading day at 16:00:00 ET","example":"12345.6789","format":"decimal","type":"string"},"last_initial_margin":{"description":"Value of Reg T margin as of previous trading day at 16:00:00 ET","example":"12345.6789","type":"string"},"last_long_market_value":{"description":"Value of all long positions as of previous trading day at 16:00:00 ET","example":"12345.6789","type":"string"},"last_maintenance_margin":{"description":"Maintenance margin requirement on the previous trading day","example":"12345.6789","format":"decimal","type":"string"},"last_options_buying_power":{"description":"Value of option buying power as of previous trading day at 16:00:00 ET","example":"12345.6789","type":"string"},"last_regt_buying_power":{"description":"Value of Reg T buying power as of previous trading day at 16:00:00 ET","example":"12345.6789","type":"string"},"last_short_market_value":{"description":"Value of all short positions as of previous trading day at 16:00:00 ET","example":"0","type":"string"},"long_market_value":{"description":"Real-time MtM value of all long positions held in the account","example":"12345.6789","format":"decimal","type":"string"},"maintenance_margin":{"description":"Maintenance margin requirement (continuously updated value)","example":"12345.6789","format":"decimal","type":"string"},"memoposts":{"description":"Outstanding memopost value","example":"100","type":"string"},"multiplier":{"description":"\"1\", \"2\", \"3\", or \"4\"","example":"2","format":"decimal","type":"string"},"non_marginable_buying_power":{"description":"Non-marginable buying power (currently used for only crypto trading)","example":"12345.6789","format":"decimal","type":"string"},"options_approved_level":{"description":"The options trading level that was approved for this account.\n0=disabled, 1=Covered Call/Cash-Secured Put, 2=Long Call/Put, 3=Spreads/Straddles.\n","enum":[0,1,2,3],"example":3,"type":"integer"},"options_buying_power":{"description":"Your buying power for options trading","example":"12345.6789","format":"decimal","type":"string"},"options_trading_level":{"description":"The effective options trading level of the account.\nThis is the minimum between account options_approved_level and account configurations max_options_trading_level.\n0=disabled, 1=Covered Call/Cash-Secured Put, 2=Long Call/Put, 3=Spreads/Straddles.\n","enum":[0,1,2,3],"example":3,"type":"integer"},"pattern_day_trader":{"deprecated":true,"description":"Whether account is flagged as pattern day trader or not","example":false,"type":"boolean","x-deprecation":{"reason":"See https://docs.alpaca.markets/us/docs/understanding-finras-new-intraday-margin-rule-and-the-end-of-pdt","since":"2026-04-27T00:00:00Z","sunset":"2026-07-06T00:00:00Z"}},"pending_reg_taf_fees":{"description":"Pending regulatory fees for the account.","example":"0.01","type":"string"},"pending_transfer_out":{"description":"Cash pending transfer out","example":"12345.6789","type":"string"},"portfolio_value":{"description":"Total value of cash + holding positions. (This field is deprecated. It is equivalent to the equity field.)","example":"12345.6789","format":"decimal","type":"string"},"position_market_value":{"description":"Real-time MtM value of all the positions held in the account","example":"0","format":"decimal","type":"string"},"previous_close":{"description":"Previous sessions close time","example":"2021-04-01T19:00:00-04:00","type":"string"},"regt_buying_power":{"description":"User's buying power under Regulation T (excess equity - (equity - margin value) - * margin multiplier)","example":"12345.6789","format":"decimal","type":"string"},"short_market_value":{"description":"Real-time MtM value of all short positions held in the account","example":"0","format":"decimal","type":"string"},"shorting_enabled":{"description":"Flag to denote whether or not the account is permitted to short","example":false,"type":"boolean"},"sma":{"description":"Value of Special Memorandum Account (will be used at a later date to provide additional buying_power)","example":"12345.6789","format":"decimal","type":"string"},"status":{"$ref":"#/components/schemas/AccountStatus"},"trade_suspended_by_user":{"description":"If true, the account is not allowed to place orders.","example":false,"type":"boolean"},"trading_blocked":{"description":"If true, the account is not allowed to place orders.","example":false,"type":"boolean"},"transfers_blocked":{"description":"If true, the account is not allowed to request money transfers.","example":false,"type":"boolean"},"user_configurations":{"$ref":"#/components/schemas/AccountConfigurations"}},"required":["id","admin_configurations","user_configurations","account_number","status","crypto_status","currency","buying_power","regt_buying_power","daytrading_buying_power","effective_buying_power","non_marginable_buying_power","bod_dtbp","accrued_fees","portfolio_value","pattern_day_trader","trading_blocked","transfers_blocked","account_blocked","created_at","trade_suspended_by_user","multiplier","shorting_enabled","equity","last_equity","long_market_value","short_market_value","position_market_value","initial_margin","maintenance_margin","last_maintenance_margin","sma","daytrade_count","balance_asof","cash"],"type":"object","x-examples":{"example-1":{"account_blocked":false,"account_number":"927584925","accrued_fees":"0","balance_asof":"2021-04-01","buying_power":"103556.8572572922","cash":"24861.91","cash_transferable":"24861.91","cash_withdrawable":"17861.91","clearing_broker":"VELOX","created_at":"2021-03-01T13:28:49.270232Z","currency":"USD","daytrade_count":0,"daytrading_buying_power":"103556.8572572922","equity":"28059.3882330664","id":"c8f1ef5d-edc0-4f23-9ee4-378f19cb92a4","initial_margin":"1598.7391165332","intraday_adjustments":"0","last_buying_power":"104433.9158860662","last_cash":"23861.91","last_daytrade_count":0,"last_daytrading_buying_power":"104433.9158860662","last_equity":"26977.323677655","last_initial_margin":"1557.7068388275","last_long_market_value":"3115.413677655","last_maintenance_margin":"934.6241032965","last_options_buying_power":"25419.62","last_regt_buying_power":"50839.233677655","last_short_market_value":"0","long_market_value":"3197.4782330664","maintenance_margin":"959.24346991992","multiplier":"2","options_approved_level":0,"options_buying_power":"26460.65","options_trading_level":0,"pattern_day_trader":true,"pending_reg_taf_fees":"0","pending_transfer_out":"0","portfolio_value":"28059.3882330664","previous_close":"2021-04-01T19:00:00-04:00","regt_buying_power":"52921.2982330664","short_market_value":"0","shorting_enabled":true,"sma":"26758.0590204615","status":"ACTIVE","trade_suspended_by_user":false,"trading_blocked":false,"transfers_blocked":false},"example-2":{"account_blocked":false,"account_number":"601612064","accrued_fees":"0","balance_asof":"2022-02-08","buying_power":"83567.42","cash":"83567.42","cash_transferable":"41783.71","cash_withdrawable":"0","clearing_broker":"VELOX","created_at":"2022-01-21T21:25:26.713802Z","crypto_status":"PAPER_ONLY","currency":"USD","daytrade_count":0,"daytrading_buying_power":"0","equity":"83567.42","id":"56712986-9ff7-4d8f-8e52-077e099e533e","initial_margin":"0","intraday_adjustments":"0","last_buying_power":"41783.71","last_cash":"41783.71","last_daytrade_count":0,"last_daytrading_buying_power":"0","last_equity":"41783.71","last_initial_margin":"0","last_long_market_value":"0","last_maintenance_margin":"0","last_options_buying_power":"41783.71","last_regt_buying_power":"41783.71","last_short_market_value":"0","long_market_value":"0","maintenance_margin":"0","multiplier":"1","non_marginable_buying_power":"41783.71","options_approved_level":2,"options_buying_power":"83567.42","options_trading_level":1,"pattern_day_trader":false,"pending_reg_taf_fees":"0.01","pending_transfer_in":"0","pending_transfer_out":"0","portfolio_value":"83567.42","previous_close":"2022-02-08T19:00:00-05:00","regt_buying_power":"83567.42","short_market_value":"0","shorting_enabled":false,"sma":"0","status":"ACTIVE","trade_suspended_by_user":false,"trading_blocked":false,"transfers_blocked":false}}},"TradeActivity":{"properties":{"cum_qty":{"description":"Valid only for trading activity types. Null for non-trading activites.","example":"0.9723","format":"decimal","type":"string"},"leaves_qty":{"description":"Valid only for trading activity types. Null for non-trading activites.","example":"0.5123","format":"decimal","type":"string"},"order_id":{"description":"Valid only for trading activity types. Null for non-trading activites.","example":"fe060a1b-5b45-4eba-ba46-c3a3345d8255","format":"uuid","type":"string"},"order_status":{"$ref":"#/components/schemas/OrderStatus"},"price":{"description":"Valid only for trading activity types. Null for non-trading activites.","example":"3.1415","format":"decimal","type":"string"},"qty":{"description":"Valid only for trading activity types. Null for non-trading activites.","example":"0.38921","format":"decimal","type":"string"},"side":{"$ref":"#/components/schemas/OrderSide"},"symbol":{"description":"Valid only for trading activity types. Null for non-trading activites.","example":"AAPL","type":"string"},"transaction_time":{"description":"Valid only for trading activity types. Null for non-trading activites.","example":"2021-05-10T14:01:04.650275Z","format":"date-time","type":"string"},"type":{"description":"Valid only for trading activity types. Null for non-trading activites.","enum":["fill","partial_fill"],"example":"fill","type":"string"}},"title":"TradeActivity","type":"object"},"TradeUpdateEventType":{"description":"**Common events**\n\nThese are the events that are the expected results of actions you may have taken by sending API requests.\n\nThe meaning of the `timestamp` field changes for each type; the meanings have been specified here for which types the\ntimestamp field will be present.\n\n- `new`: Sent when an order has been routed to exchanges for execution.\n- `fill`: Sent when your order has been completely filled.\n  - `timestamp`: The time at which the order was filled.\n- `partial_fill`: Sent when a number of shares less than the total remaining quantity on your order has been filled.\n  - `timestamp`: The time at which the shares were filled.\n- `canceled`: Sent when your requested cancellation of an order is processed.\n  - `timestamp`: The time at which the order was canceled.\n- `expired`: Sent when an order has reached the end of its lifespan, as determined by the order's time in force value.\n  - `timestamp`: The time at which the order expired.\n- `done_for_day`: Sent when the order is done executing for the day, and will not receive further updates until the next trading day.\n- `replaced`: Sent when your requested replacement of an order is processed.\n  - `timestamp`: The time at which the order was replaced.\n\n**Rarer events**\n\nThese are events that may rarely be sent due to unexpected circumstances on the exchanges. It is unlikely you will need to design your code around them, but you may still wish to account for the possibility that they will occur.\n\n- `rejected`: Sent when your order has been rejected.\n  - `timestamp`: The time at which the rejection occurred.\n- `pending_new`: Sent when the order has been received by Alpaca and routed to the exchanges, but has not yet been accepted for execution.\n- `stopped`: Sent when your order has been stopped, and a trade is guaranteed for the order, usually at a stated price or better, but has not yet occurred.\n- `pending_cancel`: Sent when the order is awaiting cancellation. Most cancellations will occur without the order entering this state.\n- `pending_replace`: Sent when the order is awaiting replacement.\n- `calculated`: Sent when the order has been completed for the day - it is either `filled` or `done_for_day` - but remaining settlement calculations are still pending.\n- `suspended`: Sent when the order has been suspended and is not eligible for trading.\n- `order_replace_rejected`: Sent when the order replace has been rejected.\n- `order_cancel_rejected`: Sent when the order cancel has been rejected.\n- `trade_bust`: Sent when a previously reported execution has been canceled (\"busted\") by the upstream exchange.\n- `trade_correct`: Sent when a previously reported trade has been corrected. For example, the exchange may have updated the price, quantity, or another execution parameter after the trade was initially reported.\n- `restated`: Sent when the order is manually modified.\n","enum":["new","fill","partial_fill","canceled","expired","done_for_day","replaced","rejected","pending_new","stopped","pending_cancel","pending_replace","calculated","suspended","order_replace_rejected","order_cancel_rejected","trade_bust","trade_correct"],"type":"string"},"TradeUpdateEventV2":{"description":"Represents an update to an order/trade, sent over the events streaming api.","properties":{"account_id":{"description":"Account UUID","format":"uuid","minLength":1,"type":"string"},"at":{"description":"Timestamp of event","format":"date-time","minLength":1,"type":"string"},"event":{"$ref":"#/components/schemas/TradeUpdateEventType"},"event_id":{"description":"lexically sortable, monotonically increasing character array","format":"ulid","type":"string"},"execution_id":{"description":"Corresponding execution of an order. If an order gets filled over two executions (a partial_fill for example), you will receive two events with different IDs.\nNot present for `MultilegOptions`\n","format":"uui","type":"string"},"legs":{"description":"Only present when event is for `MultilegOptions`. Represents filled qty/price of legs.\n","items":{"$ref":"#/components/schemas/TradeUpdateEventV2Leg"},"type":"array"},"order":{"$ref":"#/components/schemas/Order"},"position_qty":{"description":"Only present when event is either `fill` or `partial_fill` other than `MultilegOptions`. The size of your total position, after this fill event, in shares. Positive for long positions, negative for short positions.\n","type":"string"},"position_qtys":{"description":"Only present when event is either `fill` or `partial_fill` for `MultilegOptions`. The size of your total position, after this fill event, in shares. Positive for long positions, negative for short positions.\n","type":"string"},"previous_execution_id":{"description":"ID of the original execution that was busted or corrected (present only in trade_bust and trade_correct events).","format":"uuid","type":"string"},"price":{"description":"Only present when event is either `fill` or `partial_fill`. The average price per share at which the order was filled.","type":"string"},"qty":{"description":"Only present when event is either `fill`, `partial_fill`, `trade_bust` and `trade_correct`. The amount of shares this Trade order was for. <br /> For `trade_bust` events, the qty field may be negative, representing a reversal of the original quantity.","type":"string"},"settle_date":{"description":"Settlement date of the trade in format `YYYY-MM-DD` for `fill` and `partial_fill` events","example":"2026-03-03","format":"date","type":"string"},"swap_rate":{"description":"Only present for `local currency trading account` or `crypto asset trade` when event is either `fill` or `partial_fill`. The swap rate at which the current trade was filled.","type":"string"},"timestamp":{"description":"Has various different meanings depending on the value of `event`, please see the [Trading Events](https://alpaca.markets/docs/api-references/broker-api/events/#trade-events)\nEnum in the documentation or the TradeUpdateEventType model for more details on when it means different things.\n","format":"date-time","type":"string"}},"title":"TradeUpdateEvent","type":"object"},"TradeUpdateEventV2Leg":{"description":"Represents filled qty/price of legs.","properties":{"execution_id":{"description":"Corresponding execution of an order. If an order gets filled over two executions (a partial_fill for example), you will receive two events with different IDs.","format":"uuid","type":"string"},"order_id":{"description":"Order UUID","format":"uuid","minLength":1,"type":"string"},"price":{"description":"The average price per share for this event.","type":"string"},"qty":{"description":"The amount of shares filled for this event","type":"string"},"symbol":{"description":"Symbol of an asset","type":"string"},"timestamp":{"description":"Timestamp of this event leg\n","format":"date-time","type":"string"}},"title":"TradeUpdateEventV2Leg","type":"object"},"Transfer":{"description":"Transfers allow you to transfer money/balance into your end customers' account (deposits) or out (withdrawal).\n\n[Main docs here](https://alpaca.markets/docs/api-references/broker-api/funding/transfers/#the-transfer-object)","properties":{"account_id":{"description":"The account ID","format":"uuid","type":"string"},"additional_information":{"description":"Additional information. Only applies when type = \"wire\".","nullable":true,"type":"string"},"amount":{"description":"Must be > 0.00","format":"decimal","type":"string"},"bank_id":{"description":"The ID of the Bank","format":"uuid","type":"string"},"created_at":{"description":"Timestamp when transfer was created","format":"date-time","type":"string"},"direction":{"$ref":"#/components/schemas/TransferDirection"},"expires_at":{"description":"Timestamp when transfer expires","format":"date-time","type":"string"},"fee":{"description":"Fee amount to be collected. Only applies when type = \"wire\".","format":"decimal","nullable":true,"type":"string"},"fee_payment_method":{"description":"Either \"user\" or \"invoice\". Only applies when type = \"wire\".","nullable":true,"type":"string"},"hold_until":{"format":"date-time","type":"string"},"id":{"description":"The transfer ID","format":"uuid","type":"string"},"instant_amount":{"type":"string"},"ira":{"$ref":"#/components/schemas/TransferIRADetails"},"reason":{"description":"Cause of the status","nullable":true,"type":"string"},"relationship_id":{"description":"The ACH relationship ID only present if type = \"ach\"","format":"uuid","type":"string"},"requested_amount":{"description":"Must be > 0.00. Only applies when type = \"wire\".","format":"decimal","nullable":true,"type":"string"},"status":{"$ref":"#/components/schemas/TransferStatus"},"type":{"$ref":"#/components/schemas/TransferType"},"updated_at":{"description":"Timestamp when transfer was updated","format":"date-time","type":"string"}},"required":["id","account_id","type","status","amount","direction","created_at"],"title":"Transfer","type":"object","x-examples":{"example-1":{"account_id":"449e7a5c-69d3-4b8a-aaaf-5c9b713ebc65","additional_information":"string","amount":"string","bank_id":"f1ae96de-94c1-468e-93a3-6b7213930ca8","created_at":"2019-08-24T14:15:22Z","direction":"INCOMING","expires_at":"2019-08-24T14:15:22Z","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","ira":{"distribution_reason":"normal","fed_withholding_amount":"102.5","fed_withholding_pct":"10.25","state_withholding_amount":"97.5","state_withholding_pct":"9.75","tax_year":"2024"},"reason":"string","relationship_id":"81412018-ffa2-43f9-a3eb-d39f1c5e0f87","status":"QUEUED","type":"wire","updated_at":"2019-08-24T14:15:22Z"}}},"TransferDirection":{"description":"- **INCOMING**\nFunds incoming to user's account (deposit).\n- **OUTGOING**\nFunds outgoing from user's account (withdrawal).\n","enum":["INCOMING","OUTGOING"],"example":"INCOMING","type":"string"},"TransferIRA":{"description":"This field is used for IRA Account only","properties":{"distribution_reason":{"example":"normal","type":"string"},"tax_withholding":{"$ref":"#/components/schemas/TransferIRATaxWithholding"},"tax_year":{"example":"2024","type":"string"}},"type":"object"},"TransferIRADetails":{"properties":{"distribution_reason":{"example":"normal","type":"string"},"fed_withholding_amount":{"example":"102.5","type":"string"},"fed_withholding_pct":{"example":"10.25","type":"string"},"state_withholding_amount":{"example":"97.5","type":"string"},"state_withholding_pct":{"example":"9.75","type":"string"},"tax_year":{"example":"2024","type":"string"}},"type":"object"},"TransferIRATaxWithholding":{"properties":{"fed_pct":{"example":"10.25","type":"string"},"state_pct":{"example":"8.25","type":"string"}},"type":"object"},"TransferStatus":{"description":"- **QUEUED**\nTransfer is in queue to be processed.\n- **APPROVAL_PENDING**\nTransfer is pending approval.\n- **PENDING**\nTransfer is pending processing.\n- **SENT_TO_CLEARING**\nTransfer is being processed by the clearing firm.\n- **REJECTED**\nTransfer is rejected.\n- **CANCELED**\nClient initiated transfer cancellation.\n- **APPROVED**\nTransfer is approved.\n- **COMPLETE**\nTransfer is completed.\n- **RETURNED**\nThe bank issued an ACH return for the transfer.\n","enum":["QUEUED","APPROVAL_PENDING","PENDING","SENT_TO_CLEARING","REJECTED","CANCELED","APPROVED","COMPLETE","RETURNED"],"example":"QUEUED","type":"string"},"TransferType":{"description":"Only `wire` is currently supported.\n","enum":["ach","wire"],"example":"wire","title":"TransferType","type":"string"},"TrustedContact":{"description":"This model input is optional. However, the client should\nmake reasonable effort to obtain the trusted contact information.\nSee more details in [FINRA Notice 17-11](https://www.finra.org/sites/default/files/Regulatory-Notice-17-11.pdf)\n\nOnly one of the following is required:\n\n* email_address\t\n* phone_number\t\n* street_address\t\n","example":{"email_address":"jane.doe@example.com","family_name":"Doe","given_name":"Jane"},"properties":{"city":{"description":"required if `street_address` is set\n","type":"string"},"country":{"description":"[ISO 3166-1 alpha-3](https://www.iso.org/iso-3166-country-codes.html).\nrequired if `street_address` is set\n","type":"string"},"email_address":{"description":"at least one of `email_address`, `phone_number` or\n`street_address` is required\n","example":"jane.doe@example.com","format":"email","type":"string"},"family_name":{"example":"Doe","type":"string"},"given_name":{"example":"Jane","type":"string"},"phone_number":{"description":"at least one of `email_address`, `phone_number` or\n`street_address` is required\n","type":"string"},"postal_code":{"description":"required if `street_address` is set\n","type":"string"},"state":{"description":"required if `street_address` is set\n","type":"string"},"street_address":{"description":"at least one of `email_address`, `phone_number` or\n`street_address` is required\n","items":{"type":"string"},"type":"array"}},"required":["given_name","family_name"],"type":"object"},"USDPosition":{"description":"Position values in USD. This is returned for LCT (non-USD) accounts only.","properties":{"avg_entry_price":{"description":"Average entry price of the position in USD","example":"71.43","format":"decimal","type":"string"},"change_today":{"description":"Percent change from last day price (by a factor of 1)","example":"0.67","format":"decimal","type":"string"},"cost_basis":{"description":"Total cost basis in USD","example":"333.33","format":"decimal","type":"string"},"current_price":{"description":"Current asset price per share in USD","example":"80.0","format":"decimal","type":"string"},"lastday_price":{"description":"Last day's asset price per share based on the closing value of the last trading day in USD","example":"79.33","format":"decimal","type":"string"},"market_value":{"description":"Total market value of the position in USD","example":"400.00","format":"decimal","type":"string"},"unrealized_intraday_pl":{"description":"Unrealized profit/loss in USD for the day","example":"6.67","format":"decimal","type":"string"},"unrealized_intraday_plpc":{"description":"Unrealized interday profit/loss percent (by a factor of 1)","example":"0.0084","format":"decimal","type":"string"},"unrealized_pl":{"description":"Unrealized profit/loss in USD","example":"66.67","format":"decimal","type":"string"},"unrealized_plpc":{"description":"Unrealized profit/loss percent (by a factor of 1)","example":"0.2","format":"decimal","type":"string"}},"title":"USDPosition","type":"object"},"UpdateOrderRequest":{"description":"Represents the fields that are editable in an order replace/update call.\n\nNote: client_order_id is currently not editable on its own, one of the other fields must be changed at the same time to effectively replace the order.\n\nNote: `qty` and `notional` are mutually exclusive on a single replace request. `notional` is only valid for IPO indications of interest (`asset_class: \"ipo\"`); non-IPO notional orders cannot be replaced at all.","properties":{"client_order_id":{"description":"A unique identifier for the new order. Automatically generated if not sent. (<= 128 characters)","example":"61e69015-8549-4bfd-b9c3-01e75843f47d","maxLength":128,"type":"string"},"limit_price":{"description":"Required if original order's `type` field was `limit` or `stop_limit`.\nIn case of `mleg`, the limit_price parameter is expressed with the following notation:\n- A positive value indicates a debit, representing a cost or payment to be made.\n- A negative value signifies a credit, reflecting an amount to be received.","example":"3.14","format":"decimal","type":"string"},"notional":{"description":"New notional (dollar amount) for the order. Only valid for IPO indications of interest (`asset_class: \"ipo\"`); will be rejected for any other asset class.\nMutually exclusive with `qty` on the same replace request.","example":"750","format":"decimal","type":"string"},"qty":{"description":"You can only patch full shares for now.\n\nQty of equity fractional orders are not allowed to change. Non-IPO notional orders cannot be replaced at all - no fields (qty, limit_price, stop_price, etc.) can be modified; cancel and resubmit instead.\nIn case of multi-leg orders represents the number of units to trade of this strategy.","example":"4","format":"decimal","type":"string"},"stop_price":{"description":"Required if original order's `type` field was stop or stop_limit","example":"3.14","format":"decimal","type":"string"},"time_in_force":{"$ref":"#/components/schemas/TimeInForce"},"trail":{"description":"The new value of the trail_price or trail_percent","example":"3.14","format":"decimal","type":"string"}},"title":"OrderUpdateRequest","type":"object"},"W8benDocument":{"description":"Use this property (instead of the content property) to upload W-8 BEN data in JSON format.","properties":{"additional_conditions":{"description":"Any additional conditions to specify","type":"string"},"country_citizen":{"description":"The country that the applicant is a citizen of","type":"string"},"date":{"description":"date signed","format":"date","type":"string"},"date_of_birth":{"description":"date of birth of applicant","format":"date","type":"string"},"foreign_tax_id":{"description":"Applicant's tax id in their home country","type":"string"},"ftin_not_required":{"description":"Required if foreign_tax_id and tax_id_ssn are empty.","type":"boolean"},"full_name":{"description":"Full name of applicant","type":"string"},"income_type":{"description":"Income type of applicant","type":"string"},"ip_address":{"description":"IP address of applicant when signed","type":"string"},"mailing_address_city_state":{"description":"Mailing city/state of applicant","type":"string"},"mailing_address_country":{"description":"Mailing country for applicant","type":"string"},"mailing_address_street":{"description":"Mailing street address for applicant","type":"string"},"paragraph_number":{"type":"string"},"percent_rate_withholding":{"type":"integer"},"permanent_address_city_state":{"description":"Permanent city/state of applicant","type":"string"},"permanent_address_country":{"description":"Permanent country of residence of applicant","type":"string"},"permanent_address_street":{"description":"Permanent street address of applicant","type":"string"},"reference_number":{"type":"string"},"residency":{"description":"Country of residency of applicant","type":"string"},"revision":{"description":"Revision of the W8BEN form","type":"string"},"signer_full_name":{"description":"Full name of signing user","type":"string"},"tax_id_ssn":{"description":"TaxID/SSN of applicant","type":"string"},"timestamp":{"description":"Timestamp when form data was gathered","format":"time","type":"string"}},"required":["country_citizen","date","date_of_birth","full_name","ip_address","permanent_address_city_state","permanent_address_country","permanent_address_street","revision","timestamp","signer_full_name"],"type":"object","x-examples":{"Example 1":{"additional_conditions":"None","country_citizen":"Australia","date":"2021-06-14","date_of_birth":"1970-01-01","foreign_tax_id":"123 456 789","ftin_not_required":false,"full_name":"John Doe","income_type":"interest","ip_address":"127.0.0.1","mailing_address_city_state":"Adelaide, South Australia","mailing_address_country":"Australia","mailing_address_street":"51 Main St","paragraph_number":"15","percent_rate_withholding":5,"permanent_address_city_state":"Adelaide, South Australia","permanent_address_country":"Australia","permanent_address_street":"20 Main St","reference_number":"abc123","residency":"Australia","revision":"10-2021","signer_full_name":"Mr. Signing User","tax_id_ssn":"123-00-456","timestamp":"2021-06-14T09:31:05Z"}}},"bic":{"description":"Business Identifier Code (BIC/SWIFT).","example":"IRVTUS3NXXX","maxLength":11,"minLength":11,"pattern":"^[A-Z0-9]{11}$","type":"string"},"calendar_day":{"description":"A calendar day.","properties":{"core_end":{"description":"The end time of the core market session.","example":"2025-01-02T16:00:00-05:00","format":"date-time","type":"string"},"core_start":{"description":"The start time of the core market session.","example":"2025-01-02T09:30:00-05:00","format":"date-time","type":"string"},"date":{"description":"The date of the calendar day.","example":"2025-01-02","format":"date","type":"string"},"lunch_end":{"description":"The end time of the lunch session.","format":"date-time","type":"string"},"lunch_start":{"description":"The start time of the lunch session.","format":"date-time","type":"string"},"post_end":{"description":"The end time of the after-hours session.","example":"2025-01-02T20:00:00-05:00","format":"date-time","type":"string"},"post_start":{"description":"The start time of the after-hours session.","example":"2025-01-02T16:00:00-05:00","format":"date-time","type":"string"},"pre_end":{"description":"The end time of the pre-market session.","example":"2025-01-02T09:30:00-05:00","format":"date-time","type":"string"},"pre_start":{"description":"The start time of the pre-market session.","example":"2025-01-02T04:00:00-05:00","format":"date-time","type":"string"},"settlement_date":{"description":"The settlement date.","example":"2025-01-03","format":"date","type":"string"}},"required":["date","core_start","core_end"],"type":"object"},"clock":{"properties":{"is_market_day":{"description":"Whether the clock is on a market day.","type":"boolean"},"market":{"$ref":"#/components/schemas/public_market"},"next_market_close":{"description":"Next market close timestamp","format":"date-time","type":"string"},"next_market_open":{"description":"Next market open timestamp","format":"date-time","type":"string"},"phase":{"$ref":"#/components/schemas/phase"},"phase_until":{"description":"The end of the current phase.","format":"date-time","type":"string"},"timestamp":{"description":"The time on the clock.","format":"date-time","type":"string"}},"required":["market","timestamp","is_market_day","next_market_open","next_market_close","phase","phase_until"],"type":"object"},"clock_resp":{"description":"Clock response.","properties":{"clocks":{"items":{"$ref":"#/components/schemas/clock"},"type":"array"}},"required":["clocks"],"type":"object","x-go-name":"ClockResp"},"market":{"description":"The market identifier (MIC, BIC, or acronym).","enum":["BMO","BNYM","BOATS","CEUX","CHIX","HKEX","IEX","IEXG","ISE","LSE","MTA","MTAA","NASDAQ","NYSE","OCEA","OPRA","OTC","OTCM","SIFMA","TADAWUL","XAMS","XBRU","XDUB","XETR","XETRA","XHKG","XLIS","XLON","XNAS","XNYS","XPAR","XSAU"],"type":"string"},"market_acronym":{"description":"The acronym of the market.","example":"NYSE","type":"string"},"market_name":{"description":"The full name of the market.","example":"New York Stock Exchange","type":"string"},"market_timezone":{"description":"The timezone of the market.","example":"America/New_York","type":"string"},"mic":{"description":"Market identifier code (ISO 10383).","example":"XNYS","maxLength":4,"minLength":4,"pattern":"^[A-Z0-9]{4}$","type":"string"},"phase":{"enum":["closed","pre","core","lunch","post"],"type":"string"},"public_calendar_resp":{"description":"Calendar response.","properties":{"calendar":{"description":"The market calendar.","items":{"$ref":"#/components/schemas/calendar_day"},"type":"array"},"market":{"$ref":"#/components/schemas/public_market"}},"required":["market","calendar"],"type":"object","x-go-name":"CalendarResp"},"public_market":{"description":"A market.","properties":{"acronym":{"$ref":"#/components/schemas/market_acronym"},"bic":{"$ref":"#/components/schemas/bic"},"mic":{"$ref":"#/components/schemas/mic"},"name":{"$ref":"#/components/schemas/market_name"},"timezone":{"$ref":"#/components/schemas/market_timezone"}},"required":["acronym","name","timezone"],"type":"object"}},"securitySchemes":{"BasicAuth":{"scheme":"basic","type":"http"}}},"info":{"contact":{"email":"support@alpaca.markets","name":"Alpaca Support","url":"https://alpaca.markets/support"},"description":"Open brokerage accounts, enable stock, options and crypto trading. Manage the ongoing user experience and brokerage customer lifecycle with the Alpaca Broker API","termsOfService":"https://alpaca.markets/ca/disclosures","title":"Broker API","version":"1.1.1"},"openapi":"3.0.0","paths":{"/v1/accounts":{"get":{"description":"Retrieves the first 1000 accounts that match the query parameters.\nSorting is based on creation time.\nThe created_after/created_before query parameters can be used to paginate the results.\nTo further limit the size of the response, the entities query parameter can be used to specify which properties are included in the response.\n","operationId":"getAllAccounts","parameters":[{"description":"A space-delimited list of tokens. The response will contain accounts that match with all of the tokens (i.e. a logical AND). A match means the token is present in either the account's associated account number, phone number, name, or e-mail address (logical OR).","in":"query","name":"query","schema":{"type":"string"}},{"description":"Inclusive of timestamp. Example: 2019-10-12T07:20:50.52Z","in":"query","name":"created_after","schema":{"format":"date-time","type":"string"}},{"description":"Inclusive of timestamp. Example: 2019-10-12T07:20:50.52Z","in":"query","name":"created_before","schema":{"format":"date-time","type":"string"}},{"description":"See the AccountStatus model for values","in":"query","name":"status","schema":{"type":"string"}},{"$ref":"#/components/parameters/Sort"},{"description":"Comma-delimited entity names to include in the response. If not specified, all entities are included.","in":"query","name":"entities","schema":{"enum":["agreements","contact","disclosures","documents","identity","trading_configurations","trusted_contact"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AccountExtended"},"type":"array"}}},"description":"A list of accounts that match the query parameters.\n"}},"summary":"Get All Accounts","tags":["Accounts"]},"post":{"description":"Submit an account application with KYC information. This will create a trading account for the end user. The account status may or may not be ACTIVE immediately and you will receive account status updates on the event API.\n\n**Multi-Live Accounts (MLA)**: To open an additional account for an existing account holder, supply `primary_account_holder_id` at the top level instead of `contact`/`identity` data. In that case, supplying `contact` or `identity` returns HTTP 400. Only `account_type` of `trading` and `ira` are supported via this flow.\n","operationId":"createAccount","requestBody":{"content":{"application/json":{"examples":{"germany_eur":{"description":"Example account application for a German tax resident with a German tax ID.","summary":"German resident with an account in euros","value":{"agreements":[{"agreement":"account_agreement","ip_address":"127.0.0.1","signed_at":"2026-04-20T12:00:00Z"},{"agreement":"customer_agreement","ip_address":"127.0.0.1","signed_at":"2026-04-20T12:00:00Z"}],"contact":{"city":"Berlin","country":"DEU","email_address":"test@example.com","phone_number":"+4915112345678","postal_code":"10117","street_address":["Friedrichstrasse 43"]},"currency":"EUR","disclosures":{"immediate_family_exposed":false,"is_affiliated_exchange_or_finra":false,"is_control_person":false,"is_politically_exposed":false},"identity":{"country_of_tax_residence":"DEU","date_of_birth":"1990-01-01","family_name":"Einstein","funding_source":["employment_income"],"given_name":"Albert","tax_id":"12345678911","tax_id_type":"DEU_TAX_ID"}}}},"schema":{"$ref":"#/components/schemas/AccountCreationRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"type":"string"}}},"description":"The post body is not well formed. For Multi-Live Accounts (MLA), this also covers:\n- Supplying `primary_account_holder_id` together with `contact` or `identity`.\n- Supplying `primary_account_holder_id` with an `account_type` other than `trading` or `ira`.\n- The referenced primary account holder is not eligible to open an additional account.\n"},"409":{"description":"There is already an existing account registered with the same email address."},"422":{"content":{"application/json":{"schema":{"type":"string"}}},"description":"One of the input values is not a valid value."}},"summary":"Create an Account","tags":["Accounts"]}},"/v1/accounts/{account_id}":{"get":{"description":"You can query a specific account that you submitted to Alpaca by passing into the query the account_id associated with the account you're retrieving.\n","operationId":"getAccount","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountExtended"}}},"description":"Will return an AccountExtended if an account with account_id exists, otherwise will throw an error."}},"summary":"Get An Account by ID","tags":["Accounts"]},"parameters":[{"$ref":"#/components/parameters/AccountID"}],"patch":{"description":"This operation updates account information.\n\nIf all parameters are valid and updates have been made, it returns with status code 200. The response is the account model.\n\n**Multi-Live Accounts (MLA)**: The `primary_account_holder_id` field is read-only after the account is created. Omitting it or supplying the value already associated with the account is a no-op; supplying a different value returns HTTP 400.","operationId":"patchAccount","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountExtended"}}},"description":"If all parameters are valid and updates have been made, it returns with status code 200. The response is the account model."},"400":{"content":{"application/json":{"schema":{"type":"string"}}},"description":"The post body is not well formed. This also includes attempts to change the primary account holder via `primary_account_holder_id`:\nthe field is immutable after account creation, so supplying a value different from the account's current primary account holder returns HTTP 400.\n"},"422":{"content":{"application/json":{"schema":{"type":"string"}}},"description":"The request body contains an attribute that is not permitted to be updated or you are attempting to set an invalid value."}},"summary":"Update an Account","tags":["Accounts"]}},"/v1/accounts/{account_id}/actions/close":{"parameters":[{"description":"The id of the account to be closed","in":"path","name":"account_id","required":true,"schema":{"type":"string"}}],"post":{"description":"This operation closes an active account. The underlying records and information of the account are not deleted by this operation.\n\n**Before closing an account, you are responsible for closing all the positions and withdrawing all the money associated with that account. Learn more in the Positions Documentation.**","operationId":"post-v1-accounts-account_id-actions-close","responses":{"204":{"description":"Success"},"404":{"description":"Account Not Found"}},"summary":"Close an Account","tags":["Accounts"]}},"/v1/accounts/{account_id}/cip":{"get":{"description":"You can retrieve the CIP information you've submitted for a given account.","operationId":"get-v1-accounts-account_id-cip","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CIPInfo"}}},"description":"OK"}},"summary":"Retrieve CIP information","tags":["KYC"]},"parameters":[{"in":"path","name":"account_id","required":true,"schema":{"type":"string"}}],"post":{"description":"The customer identification program (CIP) API allows you to submit the CIP results received from your KYC provider.\n\nThe minimum requirements to open an individual financial account are delimited and you must verify the true identity of the account holder at account opening:\n\nName\nDate of birth\nAddress\nIdentification number (for a U.S. citizen, a taxpayer identification number)","operationId":"post-v1-accounts-account_id-cip","requestBody":{"content":{"application/json":{"examples":{"cip_onfido_germany":{"description":"Example CIP upload for results returned from Onfido for a German resident (DEU).","summary":"Customer Identification Program (CIP) for a German resident","value":{"document":{"created_at":"2026-04-21T15:37:03Z","id":"my-doc-check-id","image_integrity":"clear","result":"clear","status":"complete"},"identity":{"address":"clear","created_at":"2026-04-21T15:37:03Z","date_of_birth":"clear","id":"my-identity-check-id","result":"clear","sources":"clear","status":"complete"},"kyc":{"address":"Friedrichstrasse 43","applicant_name":"Albert Einstein","approval_status":"approved","approved_at":"2026-04-21T15:37:03Z","approved_by":"John Doe","check_completed_at":"2026-04-21T15:37:03Z","check_initiated_at":"2026-04-21T15:37:03Z","country_of_residency":"DEU","date_of_birth":"1990-01-01","email_address":"test@example.com","id":"my-kyc-check-id","id_number":"jd0000123456789","ip_address":"127.0.0.1","kyc_completed_at":"2026-04-21T15:37:03Z","nationality":"German","postal_code":"10117","risk_level":"LOW"},"photo":{"created_at":"2021-06-10T15:37:03Z","face_comparison":"clear","id":"my-photo-evidence-id","result":"clear","status":"complete"},"provider_name":["onfido"],"watchlist":{"adverse_media":"clear","created_at":"2026-04-21T15:37:03Z","id":"my-watchlist-monitor-id","monitored_lists":"clear","politically_exposed_person":"consider","result":"consider","sanction":"consider","status":"complete"}}}},"schema":{"$ref":"#/components/schemas/CIPInfo"}}}},"responses":{"200":{"description":"OK"}},"summary":"Upload CIP information","tags":["KYC"]}},"/v1/accounts/{account_id}/documents":{"get":{"description":"This endpoint allows you to query all the account document based on an account ID. You can filter by date, or type of document.\n\nThese account documents are tax statements, trade confirmations, etc, generated by the Alpaca system. They are distinct from the owner documents you upload and later access via the account object's documents property.","operationId":"getDocsForAccount","parameters":[{"description":"optional date value to filter the list (inclusive).","in":"query","name":"start","schema":{"format":"date","type":"string"}},{"description":"optional date value to filter the list (inclusive).","in":"query","name":"end","schema":{"format":"date","type":"string"}},{"$ref":"#/components/parameters/AccountDocumentType"}],"responses":{"200":{"content":{"application/json":{"examples":{},"schema":{"items":{"$ref":"#/components/schemas/AccountDocument"},"type":"array"}}},"description":"OK"},"404":{"content":{"application/json":{"schema":{"type":"string"}}},"description":"Not found"}},"summary":"Retrieve a List of Account Documents","tags":["Documents"]},"parameters":[{"$ref":"#/components/parameters/AccountID"}]},"/v1/accounts/{account_id}/documents/{document_id}/download":{"get":{"description":"This endpoint downloads an account document based on the document ID. The document will be in PDF format.\n\nThe operation returns a pre-signed downloadable link as a redirect with HTTP status code 301 if one is found.\n\nYou can retrieve a JSON version of a monthly statement by passing in the header accept: application/json header.\n\nThese account documents are tax statements, trade confirmations, etc, generated by the Alpaca system. They are distinct from the owner documents you upload and later access via the account object's documents property.\n","operationId":"downloadDocFromAccount","responses":{"301":{"description":"Redirect to the pre-signed download link for the account document PDF file.\n"},"404":{"description":"The document is not found."}},"security":[{"BasicAuth":[]}],"summary":"Download an Account Document","tags":["Documents"]},"parameters":[{"$ref":"#/components/parameters/AccountID"},{"$ref":"#/components/parameters/DocumentID"}]},"/v1/accounts/{account_id}/documents/upload":{"parameters":[{"$ref":"#/components/parameters/AccountID"}],"post":{"description":"Upload documents for the primary account owner of an account.\n\nDocuments are binary objects whose contents are encoded in base64. Each encoded content size is limited to 10MB if you use Alpaca for KYCaaS. If you perform your own KYC there are no document size limitations.\n\nAs a convenience, documents of type w8ben may be uploaded as a JSON object using the content_data request property. The Alpaca system will then generate a formatted W-8 BEN document for subsequent downloads.\n\nNote that these owner documents are distinct from the account documents generated by Alpaca, such as tax statements and trade confirmations.","operationId":"uploadDocToAccount","requestBody":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/OwnerDocumentUploadRequest"},"type":"array"}}},"required":true},"responses":{"204":{"description":"Success (No Content)"},"400":{"content":{"application/json":{"schema":{"type":"string"}}},"description":"Bad Request. The body in the request is not valid."},"404":{"content":{"application/json":{"schema":{"type":"string"}}},"description":"Not Found. No account was found for this account_id"}},"summary":"Upload Owner Documents for an Existing Account","tags":["Documents"]}},"/v1/accounts/{account_id}/documents/w8ben/{document_id}/download":{"get":{"description":"This endpoint allows you to download a W-8 BEN document for the primary owner of an account based on the document_id passed as a path parameter. The returned document is in PDF format.\n\nFor certain individuals, a W-8 BEN form should be submitted at onboarding. If the individual is not a registered U.S. taxpayer (not subject to a W-9), the W-8 BEN form may need to be submitted. The IRS explains which individuals this applies to and provides instructions on completing the form. Every three years, in addition to the calendar year it was signed, a new W-8 BEN form must be submitted.\n\nThe form can be submitted in JSON, JSONC, PNG, JPEG or PDF. If submitting it in JSON, please see the W-8 BEN completed with the corresponding field names for the API here.\n\nNote: The dates collected on the form are in a slightly different format than how they need to be submitted via Accounts API. It is requested by the user on the form in MM-DD-YYYY, but should be submitted as YYYY-MM-DD.","operationId":"get-v1-accounts-account_id-documents-w8ben-document_id-download","responses":{"301":{"description":"Redirects to a presigned download link for the document PDF."},"404":{"description":"Document Not Found"}},"summary":"Download the W8BEN document for the primary owner of an account","tags":["Documents"]},"parameters":[{"description":"The id of the related account","in":"path","name":"account_id","required":true,"schema":{"type":"string"}},{"description":"The id of the W8BEN to download","in":"path","name":"document_id","required":true,"schema":{"type":"string"}}]},"/v1/accounts/{account_id}/recipient_banks":{"get":{"description":"Retrieves Bank Relationships for an account","operationId":"getRecipientBanks","parameters":[{"in":"query","name":"status","schema":{"enum":["ACTIVE","INACTIVE"],"example":"ACTIVE","type":"string"}},{"in":"query","name":"bank_name","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Bank"},"type":"array"}}},"description":"An array of Bank relationships attached to this Account.\n\nAn empty array will be returned if no Bank relationships have been attached to this account"},"400":{"description":"Bad request. The body in the request is not valid."}},"summary":"Retrieve Bank Relationships for an Account","tags":["Funding","Accounts"]},"parameters":[{"$ref":"#/components/parameters/AccountID"}],"post":{"description":"If successful, retrieves Bank Relationships for an account","operationId":"createRecipientBank","parameters":[{"$ref":"#/components/parameters/AccountID"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBankRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Bank"}}},"description":"The created Bank relationship"},"400":{"description":"Bad Request"},"409":{"description":"A Bank relationship already exists for this account"}},"summary":"Create a Bank Relationship for an Account","tags":["Funding","Accounts"]}},"/v1/accounts/{account_id}/recipient_banks/{bank_id}":{"delete":{"description":"If successful, deletes Bank Relationship for an account","operationId":"deleteRecipientBank","responses":{"204":{"description":"Success (No Content)"},"400":{"description":"Bad Request"},"404":{"description":"No Bank Relationship with the id specified by bank_id was found for this Account"}},"summary":"Delete a Bank Relationship for an Account","tags":["Funding"]},"parameters":[{"$ref":"#/components/parameters/AccountID"},{"in":"path","name":"bank_id","required":true,"schema":{"format":"uuid","type":"string"}}]},"/v1/accounts/{account_id}/transfers":{"get":{"description":"You can query a list of transfers for an account.\n\n\nYou can filter requested transfers by values such as direction and status.\n\nReturns a list of transfer entities ordered by created_at\n","operationId":"getTransfersForAccount","parameters":[{"description":"INCOMING or OUTGOING","in":"query","name":"direction","schema":{"enum":["INCOMING","OUTGOING"],"type":"string"}},{"in":"query","name":"limit","schema":{"format":"int32","type":"integer"}},{"in":"query","name":"offset","schema":{"format":"int32","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"examples":{"example-1":{"value":[{"account_id":"449e7a5c-69d3-4b8a-aaaf-5c9b713ebc65","additional_information":"string","amount":"string","bank_id":"f1ae96de-94c1-468e-93a3-6b7213930ca8","created_at":"2019-08-24T14:15:22Z","direction":"INCOMING","expires_at":"2019-08-24T14:15:22Z","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","ira":{"distribution_reason":"normal","fed_withholding_amount":"102.5","fed_withholding_pct":"10.25","state_withholding_amount":"97.5","state_withholding_pct":"9.75","tax_year":"2024"},"reason":"string","relationship_id":"81412018-ffa2-43f9-a3eb-d39f1c5e0f87","status":"QUEUED","type":"wire","updated_at":"2019-08-24T14:15:22Z"}]},"example-2":{"value":[{"account_id":"449e7a5c-69d3-4b8a-aaaf-5c9b713ebc65","additional_information":"string","amount":"string","bank_id":"f1ae96de-94c1-468e-93a3-6b7213930ca8","created_at":"2019-08-24T14:15:22Z","direction":"INCOMING","expires_at":"2019-08-24T14:15:22Z","id":"497f6eca-6276-4993-bfeb-53cbbbba6f08","ira":{"distribution_reason":"normal","fed_withholding_amount":"102.5","fed_withholding_pct":"10.25","state_withholding_amount":"97.5","state_withholding_pct":"9.75","tax_year":"2024"},"reason":"string","relationship_id":"81412018-ffa2-43f9-a3eb-d39f1c5e0f87","status":"QUEUED","type":"wire","updated_at":"2019-08-24T14:15:22Z"}]}},"schema":{"items":{"$ref":"#/components/schemas/Transfer"},"type":"array"}}},"description":"Success."}},"summary":"Retrieve List of Transfers for an Account.","tags":["Funding"]},"parameters":[{"$ref":"#/components/parameters/AccountID"}],"post":{"description":"This endpoint is used only for requesting an outgoing (withdrawal) wire transfer at this moment. For the wire transfer, you need to create a bank resource first using the Bank API. For more on how to fund an account in sandbox see the Transfer simulation API.","operationId":"createTransferForAccount","parameters":[{"in":"path","name":"account_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTransferRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transfer"}}},"description":"Successfully requested a transfer."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The request body is malformed (e.g. invalid JSON)."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The account is not permitted to perform this transfer. Examples include:\n\n- `deposits are not permitted for this account` — the account's `depositable_status` is not `allowed` / `limited`.\n- `withdrawals are not permitted for this account` — the account's `withdrawable_status` is not `allowed` / `limited`.\n"},"422":{"content":{"application/json":{"examples":{"wireIncomingRejected":{"summary":"Wire transfer with direction = INCOMING","value":{"code":40010001,"message":"cannot submit incoming wire transfer using this API"}}},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The request was rejected by validation. Common reasons include:\n\n- `cannot submit incoming wire transfer using this API` — sent `transfer_type: wire` with `direction: INCOMING`. Incoming wires cannot be initiated through this endpoint.\n- `invalid relationship_id` / `bank_id required for wire transfer` — missing the required relationship/bank identifier for the chosen `transfer_type`.\n- `bank_id should be empty for ach transfer` / `relationship_id should be empty for wire transfer` — provided the wrong identifier for the chosen `transfer_type`.\n- `only wire transfer type can provide additional information for the transfer` — `additional_information` was supplied on a non-wire request.\n- `amount must be greater than 0.00` / `deposit amount must be greater than or equal to <min>` / `withdrawal amount must be greater than <min>` — amount fails the minimum-amount checks.\n- `transfer_type must be either ach or wire` / `direction must be either incoming or outgoing` — invalid enum values.\n"}},"summary":"Request a New Transfer","tags":["Funding","Accounts"]}},"/v1/accounts/{account_id}/transfers/{transfer_id}":{"delete":{"description":"Request to close a transfer","operationId":"deleteTransfer","parameters":[{"$ref":"#/components/parameters/AccountID"},{"description":"Transfer identifier","in":"path","name":"transfer_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Success"},"404":{"description":"Transfer Not Found"}},"summary":"Request to Close a Transfer","tags":["Funding"]}},"/v1/accounts/activities":{"get":{"description":"Returns a list of activities\n\nNotes:\n* Pagination is handled using the `page_token` and `page_size` parameters.\n* `page_token` represents the ID of the last item on your current page of results.\n   For example, if the ID of the last activity in your first response is `20220203000000000::045b3b8d-c566-4bef-b741-2bf598dd6ae7`, you would pass that value as `page_token` to retrieve the next page of results.\n\n* If specified with a `direction` of `desc`, for example, the results will end before the activity with the specified ID.\n* If specified with a `direction` of `asc`, results will begin with the activity immediately after the one specified.\n* `page_size` is the maximum number of entries to return in the response.\n* If `date` is not specified, the default and maximum value is 100.\n* If `date` is specified, the default behavior is to return all results, and there is no maximum page size.","operationId":"getAccountActivities","parameters":[{"description":"id of a single account to filter by","in":"query","name":"account_id","schema":{"format":"uuid","type":"string"}},{"description":"A comma-separated list of activity types used to filter the results.","explode":false,"in":"query","name":"activity_types","schema":{"items":{"$ref":"#/components/schemas/ActivityType"},"type":"array"},"style":"form"},{"description":"The activity category. Cannot be used with \"activity_types\" parameter.","in":"query","name":"category","schema":{"enum":["trade_activity","non_trade_activity"],"type":"string"}},{"description":"Filter activities by their creation date (created_at), not the activity's settlement date. For non-trade activities such as fees, the creation date is typically the day after the trade date (in UTC). Both formats YYYY-MM-DD and YYYY-MM-DDTHH:MM:SSZ are supported.","in":"query","name":"date","schema":{"format":"date-time","type":"string"}},{"description":"Get activities created before this date. Both formats YYYY-MM-DD and YYYY-MM-DDTHH:MM:SSZ are supported.","in":"query","name":"until","schema":{"format":"date-time","type":"string"}},{"description":"Get activities created after this date. Both formats YYYY-MM-DD and YYYY-MM-DDTHH:MM:SSZ are supported.","in":"query","name":"after","schema":{"format":"date-time","type":"string"}},{"$ref":"#/components/parameters/Direction"},{"description":"The maximum number of entries to return in the response.","in":"query","name":"page_size","schema":{"default":100,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Token used for pagination. Provide the ID of the last activity from the last page to retrieve the next set of results.","in":"query","name":"page_token","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Activity"},"type":"array"}}},"description":"Success"}},"summary":"Retrieve Account Activities","tags":["Accounts"]}},"/v1/accounts/activities/{activity_type}":{"get":{"description":"Retrieves an array of Activity by type.\n\nIf {activity_type} is provided as part of the URL, category cannot be provided as query parameter. They are mutually exclusive.\n\nNotes:\n* Pagination is handled using the `page_token` and `page_size` parameters.\n* `page_token` represents the ID of the end of your current page of results.\n  for example if in your first response the id of the last Activiy item returned in the array was `20220203000000000::045b3b8d-c566-4bef-b741-2bf598dd6ae7`, you'd pass that value as `page_token` to get the next page of results\n\n* If specified with a `direction` of `desc`, for example, the results will end before the activity with the specified ID.\n* If specified with a `direction` of `asc`, results will begin with the activity immediately after the one specified.\n* `page_size` is the maximum number of entries to return in the response.\n* If `date` is not specified, the default and maximum value is 100.\n* If `date` is specified, the default behavior is to return all results, and there is no maximum page size.","operationId":"getAccountActivitiesByType","parameters":[{"description":"id of a single account to filter by","in":"query","name":"account_id","schema":{"format":"uuid","type":"string"}},{"description":"Filter activities by their creation date (created_at), not the activity's settlement date. For non-trade activities such as fees, the creation date is typically the day after the trade date (in UTC). Both formats YYYY-MM-DD and YYYY-MM-DDTHH:MM:SSZ are supported.","in":"query","name":"date","schema":{"format":"date-time","type":"string"}},{"description":"Get activities created before this date. Both formats YYYY-MM-DD and YYYY-MM-DDTHH:MM:SSZ are supported.","in":"query","name":"until","schema":{"format":"date-time","type":"string"}},{"description":"Get activities created after this date. Both formats YYYY-MM-DD and YYYY-MM-DDTHH:MM:SSZ are supported.","in":"query","name":"after","schema":{"format":"date-time","type":"string"}},{"$ref":"#/components/parameters/Direction"},{"description":"The maximum number of entries to return in the response.","in":"query","name":"page_size","schema":{"default":100,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Token used for pagination. Provide the ID of the last activity from the last page to retrieve the next set of results.","in":"query","name":"page_token","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Activity"},"type":"array"}}},"description":"Success"}},"summary":"Retrieve Account Activities of Specific Type","tags":["Accounts"]},"parameters":[{"$ref":"#/components/parameters/ActivityType"}]},"/v1/assets":{"get":{"description":"Returns all assets","operationId":"getAssets","parameters":[{"description":"Asset status to filter by, will default to `all`","in":"query","name":"status","schema":{"default":"all","enum":["active","inactive","all"],"example":"all","type":"string"}},{"description":"Asset class to filter by, `us_equity` or `crypto`. Defaults to `us_equity`","in":"query","name":"asset_class","schema":{"default":"us_equity","enum":["us_equity","crypto"],"example":"us_equity","type":"string"}},{"description":"Comma separated values to query for more than one attribute. Assets which have any of the given attributes will be included.\n\nSupported values:\n- `ptp_no_exception`: Asset is a Publicly Traded Partnership (PTP) without a qualified notice; non-U.S. customers may incur 10% withholding on gross proceeds as per IRS guidance, and are blocked from being purchased by default.\n- `ptp_with_exception`: Users can open positions in these PTPs without general restrictions.\n- `ipo`: Accepting limit orders only before the stock begins trading on the secondary market.\n- `has_options`: The underlying equity has listed options available on the platform. Note: if the equity had inactive/expired contracts in the past, this will still show up.\n- `options_late_close`: Indicates the underlying asset's options contracts close at 4:15pm ET instead of the standard 4:00pm ET.\n- `fractional_eh_enabled`: Indicates the asset accepts fractional orders during extended hours sessions (pre-market, post-market, and overnight if enabled).\n- `overnight_tradable`: Asset is eligible for overnight (24x5) trading in supported venues on the platform.\n- `overnight_halted`: Asset is eligible for overnight trading but is currently halted/blocked for overnight sessions due to risk, corporate action, compliance, or venue constraints.","explode":false,"in":"query","name":"attributes","schema":{"default":[],"example":["ptp_no_exception","ipo"],"items":{"enum":["ptp_no_exception","ptp_with_exception","ipo","has_options","options_late_close","fractional_eh_enabled","overnight_tradable","overnight_halted"],"type":"string"},"type":"array"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Asset"},"type":"array"}}},"description":"An array of asset objects."}},"summary":"Retrieve All Assets","tags":["Assets"]}},"/v1/assets/{symbol_or_asset_id}":{"get":{"description":"Returns the requested asset, if found","operationId":"getAssetBySymbolOrId","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Asset"}}},"description":"Returns asset"},"404":{"description":"Asset not found"}},"summary":"Retrieve an Asset by ID","tags":["Assets"]},"parameters":[{"description":"you can use either the asset's Id or the symbol to search","in":"path","name":"symbol_or_asset_id","required":true,"schema":{"type":"string"}}]},"/v1/events/accounts/status":{"get":{"description":"The accounts events API provides streaming of account changes as they occur, via SSE (server sent events). Past events can also be queried.\n\nEvents are generated for changes to the following account properties:\n- account_blocked\n- admin_configurations\n- cash_interest\n- crypto_status\n- kyc_results\n- options\n- pattern_day_trader\n- status\n- trading_blocked\n\nOnly the changed properties are included in the event payload.\n\nQuery Parameter Rules:\n- `since` is required if `until` specified\n- `since_id` is required if `until_id` specified\n- `since_ulid` is required if `until_ulid` specified\n- `since`, `since_id` and `since_ulid` can't be used at the same time\n\nBehavior:\nThis API supports querying a range of events, starting now or in the past. If the end of the range is in the future or not specified, the connection is kept open and future events are pushed.\n\nTo be specific:\n- if `since`, `since_id` or `since_ulid` is not specified, this will not return any historic data\n- if `until`, `until_id` or `until_ulid` is reached, the stream will end with a status of 200\n\n---\n\nNote for people using the clients generated from this OAS spec. Currently OAS-3 doesn't have full support for representing SSE style responses from an API, so if you are using a generated client and don't specify a `since` and `until` there is a good chance the generated clients will hang waiting for the response to end.\n\nIf you require the streaming capabilities we recommend not using the generated clients for this specific usecase until the OAS-3 standards come to a consensus on how to represent this correctly in OAS-3.\n","operationId":"suscribeToAccountStatusSSE","parameters":[{"description":"Format: YYYY-MM-DD","in":"query","name":"since","schema":{"format":"date","type":"string"}},{"description":"Format: YYYY-MM-DD","in":"query","name":"until","schema":{"format":"date","type":"string"}},{"in":"query","name":"since_id","schema":{"type":"integer"}},{"in":"query","name":"until_id","schema":{"type":"integer"}},{"in":"query","name":"since_ulid","schema":{"format":"ulid","type":"string"}},{"in":"query","name":"until_ulid","schema":{"format":"ulid","type":"string"}},{"in":"query","name":"id","schema":{"type":"string"}}],"responses":{"200":{"content":{"text/event-stream":{"examples":{},"schema":{"items":{"$ref":"#/components/schemas/AccountStatusEvent"},"type":"array"}}},"description":"Connected. Events will now start streaming as long as you keep the connection open."}},"summary":"Subscribe to Account Status Events (SSE)","tags":["Events"]}},"/v1/events/nta":{"get":{"description":"The Events API provides event push as well as historical queries via SSE (server sent events).\n\nYou can listen to non-trading activities updates as they get processed by our backoffice, for both end-user and firm accounts.\n\nHistorical events are streamed immediately if queried, and updates are pushed as events occur.\n\nYou can listen to when NTAs are pushed such as CSDs, JNLC (journals) or FEEs.\n\nQuery Params Rules:\n- `since` required if `until` specified\n- `since_id` required if `until_id` specified\n- `since_ulid` required if `until_ulid` specified\n- `since`, `since_id` or `since_ulid`  can't be used at the same time\nBehavior:\n- if `since`, `since_id` or `since_ulid` not specified this will not return any historic data\n- if `until`, `until_id` or `until_ulid` reached stream will end (status 200)'","operationId":"get-v1-events-nta","parameters":[{"in":"query","name":"id","schema":{"type":"string"}},{"description":"Format: YYYY-MM-DD","in":"query","name":"since","schema":{"format":"date","type":"string"}},{"description":"Format: YYYY-MM-DD","in":"query","name":"until","schema":{"format":"date","type":"string"}},{"in":"query","name":"since_id","schema":{"type":"integer"}},{"in":"query","name":"until_id","schema":{"type":"integer"}},{"in":"query","name":"since_ulid","schema":{"format":"ulid","type":"string"}},{"in":"query","name":"until_ulid","schema":{"format":"ulid","type":"string"}},{"in":"query","name":"include_preprocessing","schema":{"type":"boolean"}},{"description":"ID used to link activities who share a sibling relationship","in":"query","name":"group_id","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NonTradeActivityEvent"}}},"description":"OK"}},"summary":"Subscribe to Non-Trading Activities Events (SSE)","tags":["Events"]}},"/v1/reporting/eod/aggregate_positions":{"get":{"description":"This API endpoint provides reporting data to partners for aggregate common stock and crypto positions across their account base. Partners can view historical snapshots of their holding across their entire account base. Please note that this API utilizes an 8:00 pm (EST) cutoff which aligns with the end of the Securities extended hours trading session as well as Alpaca's 24 hour Crypto trading window. Additionally, the endpoint supports indexing to help the partner efficiently filter by key information including date and symbol while being able to include or remove firm accounts.","operationId":"get-v1-reporting-eod-aggregate_positions","parameters":[{"description":"\"YYYY-MM-DD\" format","in":"query","name":"date","required":true,"schema":{"format":"date","type":"string"}},{"description":"Comma-separated symbols. If populated, then only the specified symbols will be returned. If null, then all symbols will be included in the response.","in":"query","name":"symbols","schema":{"type":"string"}},{"description":"Defaults to True which includes firm accounts. Passing False will exclude all firm accounts.","in":"query","name":"firm_accounts","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AggregatePositionResponse"},"type":"array"}}},"description":"Array of objects, each object pertains to the date specified in the request and a unique asset. See parameters below. Notes: Returns an empty array for non-trading days, assets with no positions are omitted."}},"summary":"Retrieve Aggregate Positions","tags":["Reporting"]}},"/v1/reporting/eod/positions":{"get":{"description":"This API retrieves a comprehensive list of end-of-day positions for all accounts. End-of-day (EOD) positions are typically accessible after 4:00 am Eastern Time (ET) on the following day, providing a comprehensive view of the day's closing positions across all accounts.\nThis API currently only supports retrieving EOD positions for the last trading date.","operationId":"get-v1-reporting-eod-positions","parameters":[{"description":"Filter the results by account_id (optional).","in":"query","name":"account_id","schema":{"format":"uuid","type":"string"}},{"description":"Filter the results by asset ID or symbol (optional).","in":"query","name":"asset","schema":{"type":"string"}},{"description":"The positions date in 'YYYY-MM-DD' format. It's recommended to provide this parameter when the 'page' parameter is specified, to ensure precise data retrieval based on the desired date.\nOnly previous trading date is supported.","in":"query","name":"asof","schema":{"format":"date","type":"string"}},{"$ref":"#/components/parameters/PageToken"},{"description":"The number of accounts to display per page (default=1000, max=10000).","in":"query","name":"limit","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"asof":{"description":"The date of the snapshot in the 'YYYY-MM-DD' format.","format":"date","type":"string"},"next_page_token":{"$ref":"#/components/schemas/NextPageToken"},"positions":{"additionalProperties":{"items":{"$ref":"#/components/schemas/Position"},"type":"array"},"description":"A detailed map of account IDs to their respective positions.","type":"object"}},"type":"object"}}},"description":"Successful response containing the end-of-day positions for the specified accounts."},"422":{"description":"This can be returned if the asof param does not match the latest snap available at Alpaca."}},"summary":"Retrieve EOD Positions","tags":["Reporting"]}},"/v1/testing/incoming_wires":{"post":{"description":"Simulate an inbound wire transfer arriving at a customer account.\n\nThis endpoint is **only available in the Sandbox environment** and exists so you can fund an account end-to-end without involving a real counterparty bank. In production, incoming wires originate at the sending bank and cannot be created via the API.\n\nThe `wire_instructions` field must follow the FFC (For Further Credit) format `FFC <correspondent>-<account_number>`, where `<correspondent>` is your 4-character correspondent code and `<account_number>` is the customer's brokerage account number.","operationId":"createIncomingWire","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateIncomingWireRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncomingWire"}}},"description":"Successfully simulated an incoming wire transfer."}},"summary":"Simulate an Incoming Wire Transfer","tags":["Funding"]}},"/v1/trading/accounts/{account_id}/account":{"get":{"description":"As a broker you can view more trading details about your users.\n\nThe response is a Trading Account model.","operationId":"getTradingAccount","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradeAccount"}}},"description":"OK"}},"summary":"Retrieve Trading Details for an Account","tags":["Accounts"]},"parameters":[{"$ref":"#/components/parameters/AccountID"}]},"/v1/trading/accounts/{account_id}/orders":{"delete":{"description":"Attempts to cancel all open orders. A response will be provided for each order that is attempted to be cancelled.","operationId":"deleteAllOrdersForAccount","responses":{"207":{"content":{"application/json":{"examples":{"example-1":{"value":[{"id":"872994c5-0620-40ad-8ae0-f224b9948df5","status":200}]}},"schema":{"items":{"$ref":"#/components/schemas/OrderClosedResponse"},"type":"array"}}},"description":"HTTP 207 Multi-Status with body, which is an array of objects that include the order id, http status code and an order object for each cancellation request."},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Cancel all Open Orders For an Account","tags":["Trading"]},"get":{"description":"Retrieves a list of orders for the account, filtered by the supplied query parameters.\n\nEndpoint defaults to open orders if no parameters are provided.","operationId":"getAllOrdersForAccount","parameters":[{"description":"Order status to be queried. open, closed or all. Defaults to open.","in":"query","name":"status","schema":{"enum":["open","closed","all"],"type":"string"}},{"description":"The maximum number of orders in response. Defaults to 50 and max is 500.","in":"query","name":"limit","schema":{"example":500,"type":"integer"}},{"$ref":"#/components/parameters/AssetClass"},{"$ref":"#/components/parameters/After"},{"$ref":"#/components/parameters/Until"},{"$ref":"#/components/parameters/Direction"},{"description":"If true, the result will roll up multi-leg orders under the legs field of primary order.","in":"query","name":"nested","schema":{"type":"boolean"}},{"$ref":"#/components/parameters/Symbols"},{"in":"query","name":"qty_above","schema":{"type":"string"}},{"in":"query","name":"qty_below","schema":{"type":"string"}},{"in":"query","name":"subtag","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Order"},"type":"array"}}},"description":"Retrieves a list of orders for the account, filtered by the supplied query parameters."},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Retrieve a List of Orders","tags":["Trading"]},"parameters":[{"$ref":"#/components/parameters/AccountID"}],"post":{"description":"Creating an order for your end customer. Each trading request must pass in the account_id in the URL.\n\n- Note that when submitting crypto orders, `market`, `limit` and `stop_limit` orders are supported while the supported `time_in_force` values are `gtc`, and `ioc`.\n- For equities and crypto we accept fractional orders as well with either `notional` or `qty` provided.\n- Note that submitting an options order is only available for partners who have been enabled for Options BETA.\n- In case of Fixed Income, only `market` and `limit` order types with `day` `time_in_force` are supported, and order replacement is not supported.\nNote that submitting Fixed Income orders is only available for partners who have been enabled for Fixed Income.\n- For IPO indications of interest (`asset_class: \"ipo\"`), the `symbol` is the offering reference returned by [`GET /v1/ipos`](#operation/listIPOOfferings) (e.g. `FI111225`). IPO orders are notional-only (`notional` required, `qty` must be omitted), buy-side, `market` type, and `gtc` time_in_force. Indications of interest can be replaced or canceled while the offering is open via [`PATCH /v1/trading/accounts/{account_id}/orders/{order_id}`](#operation/replaceOrderForAccount) and [`DELETE /v1/trading/accounts/{account_id}/orders/{order_id}`](#operation/deleteOrderForAccount).","operationId":"createOrderForAccount","requestBody":{"content":{"application/json":{"examples":{"Crypto":{"summary":"Buy a crypto coin","value":{"limit_price":"2100","qty":"0.02","side":"buy","symbol":"ETH/USD","time_in_force":"gtc","type":"limit"}},"Equity":{"summary":"Buy an equity stock","value":{"limit_price":"150","qty":"2","side":"buy","symbol":"AAPL","time_in_force":"gtc","type":"limit"}},"FixedIncome":{"summary":"Buy a US Treasury Bill","value":{"limit_price":"99.15","qty":"5000","side":"buy","symbol":"US912797QN08","time_in_force":"day","type":"limit"}},"IPO":{"summary":"Submit an IPO indication of interest","value":{"notional":"500","side":"buy","symbol":"FI111225","time_in_force":"gtc","type":"market"}},"Options":{"summary":"Buy an option contract (BETA)","value":{"limit_price":"10","qty":"2","side":"buy","symbol":"AAPL250620C00100000","time_in_force":"day","type":"limit"}}},"schema":{"$ref":"#/components/schemas/CreateOrderRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"Crypto":{"$ref":"#/components/examples/CryptoOrderResponse"},"Equity":{"$ref":"#/components/examples/EquityOrderResponse"},"IPO":{"$ref":"#/components/examples/IPOOrderResponse"},"MultilegOptions":{"$ref":"#/components/examples/MultilegOptionsOrderResponse"},"Options":{"$ref":"#/components/examples/OptionOrderResponse"}},"schema":{"$ref":"#/components/schemas/Order"}}},"description":"OK"},"400":{"$ref":"#/components/responses/BadRequest"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"description":"Some parameters are not valid"}},"summary":"Create an Order for an Account","tags":["Trading"]}},"/v1/trading/accounts/{account_id}/orders/{order_id}":{"delete":{"description":"Attempts to cancel an open order. If the order is no longer cancelable (for example if the status is \"filled\"), the server will respond with status 422, and reject the request.\n\nUpon acceptance of the cancel request, it returns status 204.","operationId":"deleteOrderForAccount","responses":{"204":{"description":"Success (No Content)"},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Cancel an Open Order","tags":["Trading"]},"get":{"description":"Retrieves a single order for the given order_id.","operationId":"getOrderForAccount","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}},"description":"The requested Order object"},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Retrieve an Order by its ID","tags":["Trading"]},"parameters":[{"$ref":"#/components/parameters/AccountID"},{"$ref":"#/components/parameters/OrderID"}],"patch":{"description":"Replaces a single order with updated parameters. Each parameter overrides the corresponding attribute of the existing order. The other attributes remain the same as the existing order.\n\nA success return code from a replaced order does NOT guarantee the existing open order has been replaced. If the existing open order is filled before the replacing (new) order reaches the execution venue, the replacing (new) order is rejected, and these events are sent in the trade_updates stream channel found [here](https://docs.alpaca.markets/reference/subscribetotradev2sse).\n\nWhile an order is being replaced, the account's buying power is reduced by the larger of the two orders that have been placed (the old order being replaced, and the newly placed order to replace it). If you are replacing a buy entry order with a higher limit price than the original order, the buying power is calculated based on the newly placed order. If you are replacing it with a lower limit price, the buying power is calculated based on the old order.\n\nNote: Order cannot be replaced when the status is `accepted`, `pending_new`, `pending_cancel` or `pending_replace`.\n\nNote: Notional orders for non-IPO asset classes cannot be replaced. Any attempt to modify a non-IPO notional order via this endpoint will be rejected; cancel it and submit a new one instead.\n\nNote: IPO indications of interest (`asset_class: \"ipo\"`) **are** notional and **can** be replaced via this endpoint by providing a new `notional` value. `qty` and `notional` are mutually exclusive on a single replace request.","operationId":"replaceOrderForAccount","requestBody":{"content":{"application/json":{"examples":{"Equity":{"summary":"Increase qty and limit price on an equity order","value":{"limit_price":"155","qty":"4","time_in_force":"gtc"}},"IPO":{"summary":"Update notional on an IPO indication of interest","value":{"notional":"750"}},"Options":{"summary":"Adjust an option order's limit price","value":{"limit_price":"11.25","time_in_force":"day"}}},"schema":{"$ref":"#/components/schemas/UpdateOrderRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"Equity":{"$ref":"#/components/examples/EquityOrderResponse"},"IPO":{"$ref":"#/components/examples/IPOOrderResponse"},"Options":{"$ref":"#/components/examples/OptionOrderResponse"}},"schema":{"$ref":"#/components/schemas/Order"}}},"description":"A new Order object with a new order_id"},"400":{"$ref":"#/components/responses/BadRequest"},"403":{"description":"Buying power or shares are not sufficient"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Replace an Order","tags":["Trading"]}},"/v1/trading/accounts/{account_id}/orders/estimation":{"parameters":[{"in":"path","name":"account_id","required":true,"schema":{"type":"string"}}],"post":{"description":"Order estimation endpoint will display, based on user's account balance, the estimated quantity and price they will receive for their notional order.\n\nFor LCT - customer's order will include the Alpaca swap_fee, while correspondent side swap_fee is configurable in the API call. Utilising this API does not result in a real order and after the calculation - the user's buying power reverts to the previous state.\n\nResponses and Errors are the same as with the Orders API\n\nPlease note that the estimation is based on the market condition at the time of submission and a live order will differ. The output should be considered indicative.\n\n**Note:** This does not support Crypto or non-market orders at this time.","operationId":"get-v1-trading-accounts-account_id-orders-estimation","requestBody":{"content":{"application/json":{"schema":{"properties":{"notional":{"type":"string"},"side":{"$ref":"#/components/schemas/OrderSide"},"swap_fee_bps":{"type":"integer"},"symbol":{"type":"string"},"time_in_force":{"$ref":"#/components/schemas/TimeInForce"},"type":{"$ref":"#/components/schemas/OrderType"}},"type":"object","x-examples":{"Example 1":{"notional":"40","side":"buy","swap_fee_bps":45,"symbol":"AAPL","time_in_force":"day","type":"market"}}}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}},"description":"OK"}},"summary":"Estimate an Order","tags":["Trading"]}},"/v1/trading/accounts/{account_id}/orders:by_client_order_id":{"get":{"description":"Retrieves a single order specified by the client order ID.","operationId":"getOrderByClientOrderIdForAccount","parameters":[{"description":"The client-assigned order ID.","in":"query","name":"client_order_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}},"description":"Successfully retrieved the order matching the client_order_id."},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Retrieves a single order specified by the client order ID.","tags":["Trading"]},"parameters":[{"$ref":"#/components/parameters/AccountID"}]},"/v1/trading/accounts/{account_id}/positions":{"delete":{"description":"Closes (liquidates) all of the account's open long and short positions. A response will be provided for each order that is attempted to be cancelled. If an order is no longer cancelable, the server will respond with status 500 and reject the request.","operationId":"closeAllPositionsForAccount","parameters":[{"description":"If true is specified, cancel all open orders before liquidating all positions.","in":"query","name":"cancel_orders","schema":{"type":"boolean"}}],"responses":{"207":{"content":{"application/json":{"examples":{"example-1":{"value":[{"body":{"asset_class":"us_equity","asset_id":"a4778bc8-fad1-47b7-87fe-d5cde10d43f4","canceled_at":null,"client_order_id":"17dbfab4-cb86-4e0a-8fa6-f0606b0a9a4e","created_at":"2022-05-13T16:25:29.336330998Z","expired_at":null,"extended_hours":false,"failed_at":null,"filled_at":null,"filled_avg_price":null,"filled_qty":"0","hwm":null,"id":"d1143025-89fc-4952-8936-db2409d899f3","legs":null,"limit_price":null,"notional":null,"order_class":"","order_type":"market","qty":"4","replaced_at":null,"replaced_by":null,"replaces":null,"side":"sell","source":null,"status":"accepted","stop_price":null,"submitted_at":"2022-05-13T16:25:29.335776073Z","symbol":"TSLA","time_in_force":"day","trail_percent":null,"trail_price":null,"type":"market","updated_at":"2022-05-13T16:25:29.336330998Z"},"status":200,"symbol":"TSLA"}]}},"schema":{"items":{"$ref":"#/components/schemas/PositionClosedResponse"},"type":"array"}}},"description":"HTTP 207 Multi-Status with body; an array of objects that include the order id and http status code for each status request."},"500":{"description":"Failed to liquidate some positions"}},"summary":"Close All Positions for an Account","tags":["Trading"]},"get":{"description":"List open positions for an account","operationId":"getPositionsForAccount","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Position"},"type":"array"}}},"description":"Success"}},"summary":"List Open Positions for an Account","tags":["Trading"]},"parameters":[{"$ref":"#/components/parameters/AccountID"}]},"/v1/trading/accounts/{account_id}/positions/{symbol_or_asset_id}":{"delete":{"description":"Closes (liquidates) the account's open position for the given symbol. Works for both long and short positions.","operationId":"closePositionForAccountBySymbol","parameters":[{"description":"Optional the number of shares to liquidate. Can accept up to 9 decimal points. Cannot work with percentage","in":"query","name":"qty","schema":{"type":"string"}},{"description":"percentage of position to liquidate. Must be between 0 and 100. Would only sell fractional if position is originally fractional. Can accept up to 9 decimal points. Cannot work with qty","in":"query","name":"percentage","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}},"description":"OK"}},"summary":"Close a Position for an Account","tags":["Trading"]},"get":{"description":"Retrieves the account's open position for the given symbol or asset_id.","operationId":"getPositionsForAccountBySymbol","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Position"}}},"description":"The requested Position object"},"404":{"description":"Account doesn't have a position for this symbol or asset_id "}},"summary":"Get an Open Position for account by Symbol or AssetId","tags":["Trading"]},"parameters":[{"$ref":"#/components/parameters/AccountID"},{"description":"The symbol or asset_id ","in":"path","name":"symbol_or_asset_id","required":true,"schema":{"type":"string"}}]},"/v2/calendar/{market}":{"get":{"description":"This endpoint returns the market calendar.","operationId":"Calendar","parameters":[{"$ref":"#/components/parameters/market"},{"$ref":"#/components/parameters/start"},{"$ref":"#/components/parameters/end"},{"$ref":"#/components/parameters/timezone"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/public_calendar_resp"}}},"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}}},"400":{"$ref":"#/components/responses/400"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"summary":"Get Market Calendar","tags":["Calendar"]}},"/v2/clock":{"get":{"description":"This API serves information about multiple markets: the current time, if it's a market day, the current phase of the market, etc.\n","operationId":"Clock","parameters":[{"$ref":"#/components/parameters/markets"},{"$ref":"#/components/parameters/time"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/clock_resp"}}},"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}}},"400":{"$ref":"#/components/responses/400"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"summary":"Get Market Clock","tags":["Calendar"]}},"/v2/events/admin-actions":{"get":{"description":"The Events API provides event push as well as historical queries via SSE (server sent events).\n\nThis endpoint streams events related to administrative actions performed by our systems.\n\nHistorical events are streamed immediately if queried, and updates are pushed as events occur.\n\nQuery Params Rules:\n- `since` required if `until` specified\n- `since_id` required if `until_id` specified\n- `since` and `since_id` can't be used at the same time\nBehavior:\n- if `since` or `since_id` not specified this will not return any historic data\n- if `until` or `until_id` reached stream will end (status 200)\n\n---\n\nWarning: Currently OAS-3 doesn't have full support for representing SSE style responses from an API.\n\nIn case the client code is generated from this OAS spec, don't specify a `since` and `until` there is a good chance the generated clients will hang forever waiting for the response to end.\n\nIf you require the streaming capabilities we recommend not using the generated clients for this specific endpoint until the OAS-3 standards come to a consensus on how to represent this behavior in OAS-3.\n\n---\n\n###  Comment messages\nAccording to the SSE specification, any line that starts with a colon is a comment which does not contain data.  It is typically a free text that does not follow any data schema. A few examples mentioned below for comment messages.\n\n#####  Slow client\n\nThe server sends a comment when the client is not consuming messages fast enough. Example: `: you are reading too slowly, dropped 10000 messages`\n\n##### Internal server error\n\nAn error message is sent as a comment when the server closes the connection on an internal server error (only sent by the v2 and v2beta1 endpoints). Example: `: internal server error`\n\n---\n\n**Event Types**\n\n- **LegacyNote:** Old free text based admin notes\n- **Liquidation:** Event for a position liquidation which initialized by an admin\n- **TransactionCancel:** Event for a manually cancelled transaction","operationId":"subscribeToAdminActionSSE","parameters":[{"description":"Format: RFC3339 or YYYY-MM-DD","in":"query","name":"since","schema":{"format":"date-time","type":"string"}},{"description":"Format: RFC3339 or YYYY-MM-DD","in":"query","name":"until","schema":{"format":"date-time","type":"string"}},{"in":"query","name":"since_id","schema":{"format":"ulid","type":"string"}},{"in":"query","name":"until_id","schema":{"format":"ulid","type":"string"}}],"responses":{"200":{"content":{"text/event-stream":{"schema":{"items":{"oneOf":[{"$ref":"#/components/schemas/AdminActionLegacyNote"},{"$ref":"#/components/schemas/AdminActionLiquidation"},{"$ref":"#/components/schemas/AdminActionTransactionCancel"}]},"type":"array"}}},"description":"Connected. Events will now start streaming as long as you keep the connection open."}},"summary":"Subscribe to Admin Action Events (SSE)","tags":["Events"]}},"/v2/events/funding/status":{"get":{"description":"The Events API provides event push as well as historical queries via SSE (server sent events).\n\nYou can listen to funding status updates as they get processed by our backoffice, for both end-user and firm accounts.\n\nHistorical events are streamed immediately if queried, and updates are pushed as events occur.\n\nQuery Params Rules:\n- `since` required if `until` specified\n- `since_id` required if `until_id` specified\n- `since` and `since_id` can't be used at the same time\n- `until` and `until_id` can't be used at the same time\nBehavior:\n- if `since` or `since_id` not specified this will not return any historic data\n- if `until` or `until_id` reached stream will end (status 200)\n\n---\n\nNote for people using the clients generated from this OAS spec. Currently OAS-3 doesn't have full support for representing SSE style responses from an API, so if you are using a generated client and don't specify a `since` and `until` there is a good chance the generated clients will hang waiting for the response to end.\n\nIf you require the streaming capabilities we recommend not using the generated clients for this specific usecase until the OAS-3 standards come to a consensus on how to represent this correctly in OAS-3.","operationId":"subscribeToFundingStatusSSE","parameters":[{"description":"Format: YYYY-MM-DD","in":"query","name":"since","schema":{"format":"date","type":"string"}},{"description":"Format: YYYY-MM-DD","in":"query","name":"until","schema":{"format":"date","type":"string"}},{"in":"query","name":"since_id","schema":{"format":"ulid","type":"string"}},{"in":"query","name":"until_id","schema":{"format":"ulid","type":"string"}}],"responses":{"200":{"content":{"text/event-stream":{"schema":{"items":{"oneOf":[{"$ref":"#/components/schemas/StatusFundingEvent"}]},"type":"array"}}},"description":"Connected. Events will now start streaming as long as you keep the connection open."}},"summary":"Subscribe to Funding Status Events (SSE)","tags":["Events"]}},"/v2/events/system":{"get":{"description":"The Events API provides event push as well as historical queries via SSE (server sent events).\n\nYou can listen to system event updates as they happen in our backend.\n\nHistorical events are streamed immediately if queried, and updates are pushed as events occur.\n\nQuery Params Rules:\n- `since` required if `until` specified\n- `since_id` required if `until_id` specified\n- `since` and `since_id` can't be used at the same time\n- `until` and `until_id` can't be used at the same time\nBehavior:\n- if `since` or `since_id` not specified this will not return any historic data\n- if `until` or `until_id` reached stream will end (status 200)\n\n---\n\nNote for people using the clients generated from this OAS spec. Currently OAS-3 doesn't have full support for representing SSE style responses from an API, so if you are using a generated client and don't specify a `since` and `until` there is a good chance the generated clients will hang waiting for the response to end.\n\nIf you require the streaming capabilities we recommend not using the generated clients for this specific usecase until the OAS-3 standards come to a consensus on how to represent this correctly in OAS-3.\n","operationId":"subscribeToSystemEventV2SSE","parameters":[{"description":"Format: YYYY-MM-DD","in":"query","name":"since","schema":{"format":"date-time","type":"string"}},{"description":"Format: YYYY-MM-DD","in":"query","name":"until","schema":{"format":"date-time","type":"string"}},{"in":"query","name":"since_id","schema":{"format":"ulid","type":"string"}},{"in":"query","name":"until_id","schema":{"format":"ulid","type":"string"}}],"responses":{"200":{"content":{"text/event-stream":{"schema":{"items":{"$ref":"#/components/schemas/SystemEventV2"},"type":"array"}}},"description":"Connected. Events will now start streaming as long as you keep the connection open."}},"summary":"Subscribe to System Events (SSE)","tags":["Events"]}},"/v2/events/trades":{"get":{"description":"The Events API provides event push as well as historical queries via SSE (server sent events).\n\nYou can listen to events related to trade updates. Most market trades sent during market hours are filled instantly; you can listen to limit order updates through this endpoint.\n\nHistorical events are streamed immediately if queried, and updates are pushed as events occur.\n\nQuery Params Rules:\n- `since` required if `until` specified\n- `since_id` required if `until_id` specified\n- `since` and `since_id` can't be used at the same time\nBehavior:\n- if `since` or `since_id` not specified this will not return any historic data\n- if `until` or `until_id` reached stream will end (status 200)\n\n---\n\nNote for people using the clients generated from this OAS spec. Currently OAS-3 doesn't have full support for representing SSE style responses from an API, so if you are using a generated client and don't specify a `since` and `until` there is a good chance the generated clients will hang waiting for the response to end.\n\nIf you require the streaming capabilities we recommend not using the generated clients for this specific usecase until the OAS-3 standards come to a consensus on how to represent this correctly in OAS-3.\n\n---\n\n**Legacy trade events API**\n\n**Deprecation notice**\n\nAs part of the deprecation process,\nthe legacy trade events API is now only available for existing broker-partners at: `GET /v1/events/trades` only for compatibility reasons.\n\nAll new broker partners will not have the option for the legacy trade event endpoint.\n\nAll new broker partners will have to integrate with the new `/v2/events/trades` endpoint.\n\nAlso, all existing broker partners are now recommended to upgrade to the `/v2/events/trades` endpoint, which provides faster event delivery times.\n\nThe legacy trade events api works the same way as the new one with the exception of the event_id which is an integer except of an ULID. This results in the request's since_id and until_id are also being integers. This integer is monotonically increasing over time for events.\n\nPlease note that the new `/v2` endpoint, is the same as, and was originally available under `/v2beta1`.\nWe encourage all customers to adjust their codebase from that interim beta endpoint to the `/v2` stable endpoint.\nIn the near future we will setup permanent redirect from `/v2beta1` to `/v2` before we completely remove the beta endpoint.\n\n---\n\n###  Comment messages\nAccording to the SSE specification, any line that starts with a colon is a comment which does not contain data.  It is typically a free text that does not follow any data schema. A few examples mentioned below for comment messages.\n\n#####  Slow client\n\nThe server sends a comment when the client is not consuming messages fast enough. Example: `: you are reading too slowly, dropped 10000 messages`\n\n##### Internal server error\n\nAn error message is sent as a comment when the server closes the connection on an internal server error (only sent by the v2 and v2beta1 endpoints). Example: `: internal server error`\n\n---\n\n**Common events**\n\nThese are the events that are the expected results of actions you may have taken by sending API requests.\n\nThe meaning of the timestamp field changes for each type; the meanings have been specified here for which types the timestamp field will be present.\n\n- `accepted` Sent when an order is received and accepted by Alpaca\n- `pending_new` Sent when the order has been received by Alpaca and routed to the exchanges, but has not yet been accepted for execution.\n- `new` Sent when an order has been routed to exchanges for execution.\n- `fill` Sent when your order has been completely filled.\n  - timestamp: The time at which the order was filled.\n- `partial_fill` Sent when a number of shares less than the total remaining quantity on your order has been filled.\n  - timestamp: The time at which the shares were filled.\n- `canceled` Sent when your requested cancellation of an order is processed.\n  - timestamp: The time at which the order was canceled.\n- `expired` Sent when an order has reached the end of its lifespan, as determined by the order's time in force value.\n  - timestamp: The time at which the order expired.\n- `done_for_day` Sent when the order is done executing for the day, and will not receive further updates until the next trading day.\n- `replaced` Sent when your requested replacement of an order is processed.\n  - timestamp: The time at which the order was replaced.\n\n**Rarer events**\n\nThese are events that may rarely be sent due to unexpected circumstances on the exchanges. It is unlikely you will need to design your code around them, but you may still wish to account for the possibility that they will occur.\n\n- `rejected` Sent when your order has been rejected.\n  - timestamp: The time at which the rejection occurred.\n- `held` For multi-leg orders, the secondary orders (stop loss, take profit) will enter this state while waiting to be triggered.\n- `stopped` Sent when your order has been stopped, and a trade is guaranteed for the order, usually at a stated price or better, but has not yet occurred.\n- `pending_cancel` Sent when the order is awaiting cancellation. Most cancellations will occur without the order entering this state.\n- `pending_replace` Sent when the order is awaiting replacement.\n- `calculated` Sent when the order has been completed for the day - it is either filled or done_for_day - but remaining settlement calculations are still pending.\n- `suspended` Sent when the order has been suspended and is not eligible for trading.\n- `order_replace_rejected` Sent when the order replace has been rejected.\n- `order_cancel_rejected` Sent when the order cancel has been rejected.\n- `trade_bust`: Sent when a previously reported execution has been canceled (\"busted\") by the upstream exchange.\n- `trade_correct`: Sent when a previously reported trade has been corrected. For example, the exchange may have updated the price, quantity, or another execution parameter after the trade was initially reported.\n- `restated`: Sent when the order is manually modified.","operationId":"subscribeToTradeV2SSE","parameters":[{"description":"Format: YYYY-MM-DD","in":"query","name":"since","schema":{"format":"date","type":"string"}},{"description":"Format: YYYY-MM-DD","in":"query","name":"until","schema":{"format":"date","type":"string"}},{"in":"query","name":"since_id","schema":{"format":"ulid","type":"string"}},{"in":"query","name":"until_id","schema":{"format":"ulid","type":"string"}}],"responses":{"200":{"content":{"text/event-stream":{"examples":{"MultilegOptions-fill":{"$ref":"#/components/examples/TradeUpdateEventV2MultilegOptionsFill"},"new":{"$ref":"#/components/examples/TradeUpdateEventV2New"}},"schema":{"items":{"$ref":"#/components/schemas/TradeUpdateEventV2"},"type":"array"}}},"description":"Connected. Events will now start streaming as long as you keep the connection open."}},"summary":"Subscribe to Trade Events (SSE)","tags":["Events","Trading"]}}},"security":[{"BasicAuth":[]}],"servers":[{"description":"Sandbox endpoint","url":"https://broker-api.sandbox.eu.alpaca.markets"},{"description":"Production endpoint","url":"https://broker-api.eu.alpaca.markets"}],"tags":[{"name":"Accounts"},{"name":"Documents"},{"name":"Trading"},{"name":"Assets"},{"name":"Calendar"},{"name":"Events"},{"name":"Funding"},{"name":"Clock"},{"name":"KYC"},{"name":"Reporting"}],"x-readme":{"explorer-enabled":true,"proxy-enabled":false}}