{"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"}},"IPOEventAllocation":{"summary":"Final allocation result for an account (account-scoped event)","value":{"account_id":"6221407b-32b2-3e6b-a7fe-cd79e1b68ba3","at":"2026-03-20T00:15:42.318901Z","correspondent":"COR1","event_id":"01J9RTPZGHKVB8M3X4F5J7LCQ9","offering_reference":"FI111225","payload":{"allocated_amount":"1764","allocated_shares":"42","cusip_id":"123456789","final_price":"42","subject":"IPO Allocation: Example Corp"},"received_at":"2026-03-20T00:15:42.103572Z","verb":"Allocation"}},"IPOEventOffering":{"summary":"New IPO offering published","value":{"at":"2026-03-20T12:24:58.807230Z","event_id":"01J9RPMV5TKB8WX3M4F1KZ7QH2","offering_reference":"FI111225","payload":{"available_to_order":"Available","max_price":"42","min_price":"42","name":"Example Corp","source":"example source","ticker_symbol":"EXMP"},"received_at":"2026-03-20T12:24:58.500000Z","verb":"Offering"}},"IPOEventOfferingCancellation":{"summary":"Offering was cancelled (no payload field)","value":{"at":"2026-03-20T12:24:52.325158Z","event_id":"01J9RVB6Y4ZK8M3N7QD2WX1RFP","offering_reference":"FI111225","received_at":"2026-03-20T12:24:52.110430Z","verb":"OfferingCancellation"}},"IPOEventOfferingUpdate":{"summary":"Existing offering updated (e.g. price range narrowed)","value":{"at":"2026-03-20T15:42:11.118274Z","event_id":"01J9RQ5HNZQK7M3RDVJ8XBPCT1","offering_reference":"FI111225","payload":{"available_to_order":"Available","max_price":"44","min_price":"40","name":"Example Corp","source":"example source","ticker_symbol":"EXMP"},"received_at":"2026-03-20T15:42:10.892140Z","verb":"OfferingUpdate"}},"IPOEventProspectus":{"summary":"Prospectus document is now available","value":{"at":"2026-03-19T23:26:46.853262Z","event_id":"01J9RSGD8JR2A4K7MZNTPVQ5XW","offering_reference":"FI111225","payload":{"prospectus_url":"https://example.com/prospectus/example-corp.pdf","subject":"IPO Prospectus: Example Corp"},"received_at":"2026-03-19T23:26:46.612880Z","verb":"Prospectus"}},"IPOEventSixtyMinMail":{"summary":"60-minute pricing window opened (no new orders accepted)","value":{"at":"2026-03-19T22:50:11.729329Z","event_id":"01J9RT9P3WYH8KCJM2LFQX5ZRD","offering_reference":"FI111225","payload":{"sixty_minute_expiration_time":"2026-03-19T23:50:11.729329Z","subject":"IPO 60 Minute Mail: Example Corp"},"received_at":"2026-03-19T22:50:11.512640Z","verb":"SixtyMinMail"}},"IPOOfferingGetExample":{"summary":"Single IPO offering","value":{"data":{"anticipated_shares":5000000,"availability":"available","cusip_id":"123456789","description":"Example Corp is a leading provider of example services.","ipo_reference":"FI111225","logo_small":"https://example.com/logos/exmp-small.png","max_price":"44","max_ticket_size":"100000","min_price":"40","min_ticket_size":"100","name":"Example Corp","no_new_orders":false,"offering_type":"IPO","prospectus_url":"https://example.com/prospectus/example-corp.pdf","settlement_date":"2026-04-04","ticker_symbol":"EXMP","trade_date":"2026-04-02","underwriters":["Goldman Sachs","Morgan Stanley"],"unit_step_size":"1"}}},"IPOOfferingListExample":{"summary":"Page of available IPO offerings","value":{"data":[{"anticipated_shares":5000000,"availability":"available","cusip_id":"123456789","description":"Example Corp is a leading provider of example services.","ipo_reference":"FI111225","logo_small":"https://example.com/logos/exmp-small.png","max_price":"44","max_ticket_size":"100000","min_price":"40","min_ticket_size":"100","name":"Example Corp","no_new_orders":false,"offering_type":"IPO","prospectus_url":"https://example.com/prospectus/example-corp.pdf","settlement_date":"2026-04-04","ticker_symbol":"EXMP","trade_date":"2026-04-02","underwriters":["Goldman Sachs","Morgan Stanley"],"unit_step_size":"1"}],"next_page_token":null}},"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"}},"legacy_date_type":{"description":"Indicates what start and end mean. Default: TRADING. If TRADING is specified, returns a calendar whose trading date matches start, end. If SETTLEMENT is specified, returns the calendar whose settlement date matches start and end.\n","in":"query","name":"date_type","schema":{"enum":["TRADING","SETTLEMENT"],"type":"string"}},"legacy_end":{"description":"The last date to retrieve data for (inclusive).","in":"query","name":"end","schema":{"format":"date-time","type":"string","x-go-type":"legacyTime"}},"legacy_start":{"description":"The first date to retrieve data for (inclusive).","in":"query","name":"start","schema":{"format":"date-time","type":"string","x-go-type":"legacyTime"}},"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"}}},"401":{"description":"Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key.\n"},"403":{"description":"The requested resource is forbidden.\n"},"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"},"NotAuthorized":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Client is not authorized for this operation."},"NotFound":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Resource does not exist."}},"schemas":{"ACHRelationship":{"properties":{"account_id":{"format":"uuid","type":"string"},"account_owner_name":{"description":"Name of the account owner","minLength":1,"type":"string"},"bank_account_number":{"minLength":1,"type":"string"},"bank_account_type":{"description":"Must be CHECKING or SAVINGS","enum":["CHECKING","SAVINGS"],"minLength":1,"type":"string"},"bank_routing_number":{"minLength":1,"type":"string"},"created_at":{"description":"Format: 2020-01-01T01:01:01Z","example":"2021-03-16T18:38:01.942282Z","format":"date-time","type":"string"},"id":{"example":"61e69015-8549-4bfd-b9c3-01e75843f47d","format":"uuid","type":"string"},"nickname":{"minLength":1,"type":"string"},"status":{"enum":["QUEUED","APPROVED","REJECTED","PENDING","CANCEL_REQUESTED"],"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","account_id","status","account_owner_name"],"title":"ACHRelationship","type":"object"},"APRTier":{"properties":{"account_rate_bps":{"description":"The annualized account interest rate, in basis points.","example":450,"type":"integer"},"correspondent_rate_bps":{"description":"The annualized correspondent fee rate, in basis points.","example":25,"type":"integer"},"created_at":{"description":"The timestamp the APR tier was created, in RFC 3339 format.","example":"2024-09-16T20:06:32.207729Z","format":"date-time","type":"string"},"currency":{"description":"The currency of the APR tier","example":"USD","type":"string"},"details":{"$ref":"#/components/schemas/APRTierDetails"},"id":{"description":"The unique identifier of the APR tier","example":"150df7eb-31e7-46b3-8848-a54ca21ff3bc","format":"uuid","type":"string"},"is_default":{"description":"True if this is the default APR tier. Only one APR tier can be default per currency.\n","example":true,"type":"boolean"},"name":{"description":"The unique name of the APR tier","example":"gold","type":"string"},"updated_at":{"description":"The timestamp of the last update to the APR tier, in RFC 3339 format.","example":"2024-09-16T20:06:32.207729Z","format":"date-time","type":"string"}},"type":"object"},"APRTierDetails":{"description":"Additional details of the APR tier\n","properties":{"as_of":{"description":"The date on which the total balance was recorded, at the end of the day. YYYY-MM-DD format.\n","example":"2024-09-27","format":"date","type":"string"},"total_accounts":{"description":"The total number of accounts assigned this APR tier.","example":42,"type":"integer"},"total_balance":{"description":"The total balance of funds in this APR tier.","example":"10485.76","format":"decimal","type":"string"}},"type":"object"},"AcatcActivityV2":{"allOf":[{"$ref":"#/components/schemas/CommonNTAActivityV2"},{"$ref":"#/components/schemas/CommonAcatActivityV2"}],"description":"Automated customer account transfer service (cash)","type":"object"},"AcatsActivityV2":{"allOf":[{"$ref":"#/components/schemas/CommonNTAActivityV2"},{"$ref":"#/components/schemas/CommonAcatActivityV2"},{"properties":{"symbol":{"description":"The symbol of the security involved with the activity","type":"string"}},"required":["symbol"],"type":"object"}],"description":"Automated customer account transfer service (stock)","type":"object"},"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"},"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"},"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"},"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?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJLDF4SCWSL6HUQKA%2F20220210%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220210T162205Z&X-Amz-Expires=900&X-Amz-SignedHeaders=host&X-Amz-Signature=bc6cc0f541d569623f3973fb83734d7960a69886e8b175a9d472f666b87419f1","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"},"AccountLimit":{"properties":{"account_no":{"type":"string"},"amount_available":{"format":"decimal","type":"string"},"amount_in_use":{"format":"decimal","type":"string"},"amount_limit":{"format":"decimal","type":"string"}},"required":["account_no","amount_in_use","amount_available","amount_limit"],"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/AdminConfigurationsEvent"},"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"},"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"},"AccountTradingLimit":{"properties":{"available":{"description":"The remaining net buying limit that can be used for trading.","format":"decimal","type":"string"},"daily_net_limit":{"description":"The net buying limit that can be reached before further trading activity is restricted. Please reach out to learn more about how this limit is determined.","format":"decimal","type":"string"},"held":{"description":"The limit that is currently being held for open orders","format":"decimal","type":"string"},"swap_rate":{"description":"The swap rate is applicable for Local Currency Trading (LCT) accounts","format":"decimal","type":"string"},"usd":{"$ref":"#/components/schemas/USDAccountTradingLimit"},"used":{"description":"The real time net value of cash inflows (buy trades, etc.) with cash outflows (sell trades, etc). This will be dynamic throughout the day based on user activity, with executed orders being reset at the start of the next trading day.","format":"decimal","type":"string"}},"title":"AccountTradingLimit","type":"object"},"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"},"ActivityEventV2":{"allOf":[{"$ref":"#/components/schemas/ActivityEventV2CommonFields"},{"properties":{"details":{"oneOf":[{"$ref":"#/components/schemas/ActivityV2DetailTRD"},{"$ref":"#/components/schemas/ActivityV2DetailNTA"}]}},"required":["details"],"type":"object"}],"description":"Represents an account activity, sent over the Event Streaming API.","title":"ActivityEventV2","type":"object"},"ActivityEventV2CommonFields":{"description":"Represents the common fields for all Activity V2 Events","properties":{"account_id":{"description":"Account UUID","format":"uuid","type":"string"},"activity_subtype":{"description":"Sub category for activity type, if any","type":"string"},"activity_type":{"description":"The type of the activity, which can be trade or any of the non trade activities","type":"string"},"at":{"description":"Timestamp of event","format":"date-time","minLength":1,"type":"string"},"currency":{"description":"Currency code in ISO format","type":"string"},"event_id":{"description":"Lexically sortable, monotonically increasing character string","format":"ulid","type":"string"},"executed_at":{"description":"Execution time for the activity event","format":"date-time","minLength":1,"type":"string"},"net_amount":{"description":"The net amount of money (positive or negative) associated with the activity","format":"decimal","type":"string"},"previous_id":{"description":"Previous ID is presented if this activity corrects or cancels a previous trade or non trade activity. It contains execution_id or trns_id respectively","format":"uuid","type":"string"},"price":{"description":"The price of the security involved with the activity","format":"decimal","type":"string"},"qty":{"description":"The quantity of the security involved with the activity","format":"decimal","type":"string"},"ref_id":{"description":"The unique identifier for the activity. For trades, the execution_id is used, for other activities the trns_id is used.","format":"uuid","type":"string"},"settle_date":{"description":"Date when the activity settled","format":"date","minLength":1,"type":"string"},"status":{"description":"Status of the activity","type":"string"},"swap_fee_bps":{"description":"Currency conversion fee rate base-point in case of local currency activity","format":"decimal","type":"string"},"swap_rate":{"description":"Conversion rate for local currency activities","format":"decimal","type":"string"}},"required":["account_id","at","event_id","activity_type","executed_at","status","settle_date","currency","ref_id"],"type":"object"},"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"},"ActivityV2DetailNTA":{"allOf":[{"oneOf":[{"$ref":"#/components/schemas/DIVSPDActivityV2"},{"$ref":"#/components/schemas/CDIVActivityV2"},{"$ref":"#/components/schemas/SDIVActivityV2"},{"$ref":"#/components/schemas/ForwardSplitActivityV2"},{"$ref":"#/components/schemas/ReverseSplitActivityV2"},{"$ref":"#/components/schemas/UnitSplitActivityV2"},{"$ref":"#/components/schemas/SpinoffActivityV2"},{"$ref":"#/components/schemas/MAActivityV2"},{"$ref":"#/components/schemas/NCActivityV2"},{"$ref":"#/components/schemas/FixedIncomeRedemptionActivityV2"},{"$ref":"#/components/schemas/RightsDistributionActivityV2"},{"$ref":"#/components/schemas/RightsSubscriptionElectionActivityV2"},{"$ref":"#/components/schemas/TenderOfferActivityV2"},{"$ref":"#/components/schemas/ExchangeOfferActivityV2"},{"$ref":"#/components/schemas/WarrantExerciseElectionActivityV2"},{"$ref":"#/components/schemas/WRMActivityV2"},{"$ref":"#/components/schemas/OpcaCDIVActivityV2"},{"$ref":"#/components/schemas/OpcaSDIVActivityV2"},{"$ref":"#/components/schemas/OpcaMAActivityV2"},{"$ref":"#/components/schemas/OpcaNCActivityV2"},{"$ref":"#/components/schemas/OpcaSPINActivityV2"},{"$ref":"#/components/schemas/OpcaFSPLITActivityV2"},{"$ref":"#/components/schemas/OpcaRSPLITActivityV2"},{"$ref":"#/components/schemas/OpcaUSPLITActivityV2"},{"$ref":"#/components/schemas/OPASNActivityV2"},{"$ref":"#/components/schemas/OPEXCActivityV2"},{"$ref":"#/components/schemas/OPEXPActivityV2"},{"$ref":"#/components/schemas/OPTRDActivityV2"},{"$ref":"#/components/schemas/AcatsActivityV2"},{"$ref":"#/components/schemas/AcatcActivityV2"},{"$ref":"#/components/schemas/FOPTActivityV2"},{"$ref":"#/components/schemas/DIVNRAActivityV2"},{"$ref":"#/components/schemas/JNLSActivityV2"},{"$ref":"#/components/schemas/JNLCActivityV2"},{"$ref":"#/components/schemas/CSWActivityV2"},{"$ref":"#/components/schemas/FEEActivityV2"}]}],"type":"object"},"ActivityV2DetailTRD":{"description":"Activity details for a fill or partial_fill event","properties":{"asset_id":{"description":"Asset ID (For options this represents the option contract ID)","format":"uuid","type":"string"},"client_order_id":{"description":"Order ID provided by the customer","type":"string"},"commission":{"description":"Commission to collect from the account holder","format":"decimal","type":"string"},"cum_qty":{"description":"Total filled quantity on the order","format":"decimal","type":"string"},"cusip":{"description":"CUSIP of the security involved with the activity","type":"string"},"execution_type":{"description":"The execution type","enum":["fill","trade_correct","trade_bust"],"type":"string"},"leaves_qty":{"description":"Unfilled quantity on the order, when order is filled value could be 0","format":"decimal","type":"string"},"order_id":{"description":"Order ID generated by Alpaca","format":"uuid","type":"string"},"order_status":{"description":"Identifies the current status of the order","type":"string"},"side":{"description":"Represents what side of the transaction an order was on","enum":["buy","sell"],"type":"string"},"symbol":{"description":"The symbol of the security involved with the activity","type":"string"}},"required":["order_id","side","symbol","asset_id","leaves_qty","cum_qty","order_status","execution_type"],"type":"object"},"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\nThis schema represents the current, effective value of each configuration (e.g. as returned by the get trading account endpoint). For the shape of the payloads broadcast by the **events** streaming API when these values change, see [AdminConfigurationsEvent](#/components/schemas/AdminConfigurationsEvent).","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":"The max margin multiplier set by admin for this account. Can be \"1\", \"2\", or \"4\".","type":"string"},"max_options_trading_level":{"description":"The max options trading level set by admin for this account.\n0=disabled, 1=Covered Call/Cash-Secured Put, 2=Long Call/Put, 3=Spreads/Straddles.\n","enum":[0,1,2,3],"type":"integer"},"outgoing_transfers_blocked":{"description":"If true, outgoing transfers from this account are rejected","type":"boolean"},"restrict_to_liquidation_reasons":{"$ref":"#/components/schemas/RestrictToLiquidationReasons"}},"title":"AdminConfigurations","type":"object"},"AdminConfigurationsEvent":{"description":"Represents a change to admin configurations, as broadcast over the **events** streaming API. Only fields whose value changed are included; unrelated update events will not include a flag that did not change.\n\nDepending on the type of the Admin Configuration, 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:\n\n```\n{\n  \"disable_shorting\": true\n}\n```\n\nFor other data types, we are embedding 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    \"from\": 4,\n    \"to\": 1\n  }\n}\n```\n\nIntroducing an override value from the default will yield a null value as `from`. For example restricting the max_margin_multiplier to 1 from default will yield the following payload:\n\n```\n{\n  \"max_margin_multiplier\": {\n    \"from\": null,\n    \"to\": 1\n  }\n}\n```","properties":{"acct_daily_transfer_limit":{"description":"The correspondent level daily transfer limit override was changed","properties":{"from":{"description":"Old value of the daily transfer limit","type":"string"},"to":{"description":"New value of the daily transfer limit","type":"string"}},"type":"object"},"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 multiplier was changed 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 was changed by admin to this value. It can be 0, 1, 2, or 3.","properties":{"from":{"description":"Old 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"},"restrict_to_liquidation_reasons":{"$ref":"#/components/schemas/RestrictToLiquidationReasons"}},"title":"AdminConfigurationsEvent","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"},"Announcement":{"description":"The announcements endpoint contains public information on previous and upcoming dividends, mergers, spinoffs, and stock splits.\n\nAnnouncement data is made available through the API as soon as it is ingested by Alpaca, which is typically the following trading day after the declaration date. This provides insight into future account stock position and cash balance changes that will take effect on an announcement's payable date. Additionally, viewing previous announcement details can improve bookkeeping and reconciling previous account cash and position changes.","properties":{"ca_sub_type":{"$ref":"#/components/schemas/AnnouncementCASubType"},"ca_type":{"$ref":"#/components/schemas/AnnouncementCAType"},"cash":{"description":"The amount of cash to be paid per share held by an account on the record date.","minLength":1,"nullable":true,"type":"string"},"corporate_action_id":{"description":"ID that remains consistent across all announcements for the same corporate action. Unlike 'id', this can be used to connect multiple announcements to see how the terms have changed throughout the lifecycle of the corporate action event.","minLength":1,"type":"string"},"declaration_date":{"description":"Date the corporate action or subsequent terms update was announced.","minLength":1,"type":"string"},"ex_date":{"description":"The first date that purchasing a security will not result in a corporate action entitlement.","minLength":1,"nullable":true,"type":"string"},"id":{"description":"ID that is specific to a single announcement.","minLength":1,"type":"string"},"initiating_original_cusip":{"description":"CUSIP of the company initiating the announcement.","minLength":1,"type":"string"},"initiating_symbol":{"description":"Symbol of the company initiating the announcement.","minLength":1,"type":"string"},"new_rate":{"description":"The numerator to determine any quantity change ratios in positions.","minLength":1,"nullable":true,"type":"string"},"old_rate":{"description":"The denominator to determine any quantity change ratios in positions.","minLength":1,"nullable":true,"type":"string"},"payable_date":{"description":"The date the announcement will take effect. On this date, account stock and cash balances are expected to be processed accordingly.","minLength":1,"type":"string"},"record_date":{"description":"The date an account must hold a settled position in the security in order to receive the corporate action entitlement.","minLength":1,"nullable":true,"type":"string"},"target_original_cusip":{"description":"CUSIP of the child company involved in the announcement.","minLength":1,"nullable":true,"type":"string"},"target_symbol":{"description":"Symbol of the child company involved in the announcement.","minLength":1,"nullable":true,"type":"string"}},"required":["id","corporate_action_id","ca_type","ca_sub_type","initiating_symbol","initiating_original_cusip","target_symbol","target_original_cusip","declaration_date","ex_date","record_date","payable_date","cash","old_rate","new_rate"],"title":"Announcement","type":"object","x-examples":{"example-1":{"ca_sub_type":"cash","ca_type":"dividend","cash":"0","corporate_action_id":"78467X109_AA22","declaration_date":"2021-12-19","ex_date":"2022-01-21","id":"bebc5ece-34be-47e9-b944-687e69a102be","initiating_original_cusip":"252787106","initiating_symbol":"DIA","new_rate":"1","old_rate":"1","payable_date":"2022-02-14","record_date":"2022-01-24","target_original_cusip":"252787106","target_symbol":"DIA"}}},"AnnouncementCASubType":{"description":"Announcements have both a type and a subtype to categorize them. This model represents the lowever level abstract \"sub types\" of Announcement. Please see the AnnouncementCAType model for higher level descriptions of the possible types\n\nPossible values are:\n\n- from the `dividend` type:\n  - **cash**\n\n    A cash payment based on the number of shares the account holds on the record date.\n  - **stock**\n\n    A stock payment based on the number of shares the account holds on the record date.\n\n- from the `merger` type:\n  - **merger_update**\n\n    An update to the terms of an upcoming merger. This can happen any number of times before the merger is completed and can be tracked by using the id parameter.\n\n  - **merger_completion**\n\n    A final update in the terms of the merger in which the intiating_symbol will acquire the target_symbol. Any previous terms updates for this announcement will have the same id value.\n\n- from the `split` type:\n  - **stock_split**\n\n    An increase in the number of shares outstanding with a decrease in the dollar value of each share. The new_rate and old_rate parameters will be returned in order to derive the ratio of the split\n  - **until_split**\n\n    An increase in the number of shares outstanding with a decrease in the dollar value of each share. The new_rate and old_rate parameters will be returned in order to derive the ratio of the split.\n  - **reverse_split**\n\n    A decrease in the number of shares outstanding with an increase in the dollar value of each share. The new_rate and old_rate parameters will be returned in order to derive the ratio of the spli\n  - **recapitalization**\n\n    A stock recapitalization, typically used by a company to adjust debt and equity ratios.\n\n- from the `spinoff` type:\n  - **spinoff**\n\n    A disbursement of a newly tradable security when the intiating_symbol creates the target_symbol.","enum":["cash","stock","merger_update","merger_completion","stock_split","until_split","reverse_split","recapitalization","spinoff"],"title":"","type":"string"},"AnnouncementCAType":{"description":"Announcements have both a type and a subtype to categorize them. This model represents the higher level abstract \"types\" of Announcement. Please see the AnnouncementCASubType model for finer grain descriptions of the subtypes\n\nPossible values are:\n- dividend\n  can have `cash` and `stock` subtypes\n- merger\n  has `merger_update` and `merger_completion` sub types\n- split\n  has `stock_split`, `until_split`, `reverse_split`, and `recapitalization` sub types\n- spinoff\n  currently has only the `spinoff` subtype and thus is just this higher level category for now. A disbursement of a newly tradable security when the intiating_symbol creates the target_symbol.","enum":["dividend","merger","split","spinoff"],"example":"dividend","title":"","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"},"AssetEntryRequirements":{"description":"Defines the necessary conditions that must be met to initiate a position for a specific asset","properties":{"regt_long":{"description":"The percentage of the asset's market value required as Reg T (2x) buying power to open a long position","example":"0.5","format":"decimal","type":"string"},"regt_short":{"description":"The percentage of the asset's market value required as Reg T (2x) buying power to open a short position","example":"0.5","format":"decimal","type":"string"},"symbol":{"description":"The symbol (or asset id) of the requested asset","example":"AAPL","type":"string"}},"required":["symbol"],"title":"AssetEntryRequirements","type":"object"},"AuthorizeOAuthTokenResponse":{"description":"","properties":{"client_id":{"description":"OAuth `client_id`","minLength":1,"type":"string"},"code":{"description":"OAuth code to exchange with token","minLength":1,"type":"string"},"redirect_uri":{"description":"Redirect URI of OAuth flow","minLength":1,"type":"string"},"scope":{"description":"Granted scopes","type":"string"}},"required":["code","client_id","redirect_uri","scope"],"type":"object","x-examples":{"example-1":{"client_id":"7a3c52a910e1dc2abbb14da2b6b8e711","code":"912b5502-c983-40f7-a01d-6a66f13a754d","redirect_uri":"http://localhost","scope":""}}},"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"},"BatchCreateFundingWalletRequest":{"properties":{"account_ids":{"description":"list of UUID account ids which will have funding wallets created","items":{"type":"string"},"type":"array"}},"type":"object"},"BatchCreateFundingWalletResponse":{"properties":{"funding_wallets":{"items":{"$ref":"#/components/schemas/FundingWallet"},"type":"array"}},"type":"object"},"BatchJournalRequest":{"description":"Journals API allows you to move cash or securities from one account to another.\n\nThis model represents the fields you can specify when creating a request of many Journals out of one account to many others at once.","properties":{"description":{"description":"Journal description, gets returned in the response","type":"string"},"entries":{"description":"An array of objects describing which accounts you want to move funds into and how much to move into each account","items":{"properties":{"amount":{"description":"Journal amount in USD","type":"string"},"currency":{"description":"Currency","type":"string"},"description":{"description":"Journal entry description, gets returned in the response","type":"string"},"to_account":{"description":"The ID of the account that you want to journal funds into","format":"uuid","type":"string"},"transmitter_account_number":{"description":"Only valid for JNLC journals. Null for JNLS.max 255 characters","type":"string"},"transmitter_address":{"description":"Only valid for JNLC journals. Null for JNLS.max 255 characters","type":"string"},"transmitter_financial_institution":{"description":"Only valid for JNLC journals. Null for JNLS.max 255 characters","type":"string"},"transmitter_name":{"description":"Only valid for JNLC journals. Null for JNLS. Max 255 characters.","type":"string"},"transmitter_timestamp":{"format":"date-time","type":"string"}},"required":["to_account","amount"],"type":"object"},"minItems":1,"type":"array"},"entry_type":{"description":"Only supports `JNLC` for now","enum":["JNLC"],"type":"string"},"from_account":{"description":"The account id that is the originator of the funds being moved. Most likely is your Sweep Firm Account","format":"uuid","type":"string"}},"required":["entry_type","from_account","entries"],"title":"BatchJournalRequest","type":"object"},"BatchJournalResponse":{"allOf":[{"$ref":"#/components/schemas/Journal"},{"properties":{"error_message":{"description":"Description of why this journal transaction failed","type":"string"}},"required":["error_message"],"type":"object"}],"description":"A Journal object with an extra attribute error_message in the case when a specific account fails to receive a journal.","title":"BatchJournalResponse","x-examples":{"example-1":{"description":"","entry_type":"JNLC","error_message":"","from_account":"8f8c8cee-2591-4f83-be12-82c659b5e748","id":"56f106e5-25a4-4eee-96fa-25bb05dc86bc","net_amount":"1000","price":null,"qty":null,"settle_date":null,"status":"pending","symbol":"","system_date":null,"to_account":"399f85f1-cbbd-4eaa-a934-70027fb5c1de"}}},"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"},"CDIVActivityV2":{"allOf":[{"$ref":"#/components/schemas/CommonCaActivityV2"},{"$ref":"#/components/schemas/CommonCDIVActivityV2"},{"properties":{"cash_payout":{"description":"Total cash amount paid","type":"string"},"entitled_qty":{"description":"Quantity of shares entitled to receive the dividend","type":"string"}},"required":["entitled_qty","cash_payout"],"type":"object"}],"description":"Cash dividend","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"}}},"CSWActivityV2":{"allOf":[{"$ref":"#/components/schemas/CommonNTAActivityV2"},{"properties":{"bank_transaction_id":{"description":"The bank transaction's ID","format":"uuid","type":"string"}},"type":"object"}],"description":"Cash withdrawal","type":"object"},"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"},"CommonAcatActivityV2":{"properties":{"external_id":{"description":"The ID that DTCC assigned to this transfer","type":"string"},"hold_date":{"description":"Hold date when the transfers settle","format":"date","minLength":1,"type":"string"},"request_id":{"description":"The ID for original ACATS request","format":"uuid","type":"string"}},"required":["external_id","request_id"],"type":"object"},"CommonCDIVActivityV2":{"properties":{"cusip":{"description":"The CUSIP of the security involved with the activity","type":"string"},"due_bill_off_date":{"description":"When due bills stop applying for this event","format":"date","minLength":1,"type":"string"},"due_bill_on_date":{"description":"When due bills begin to apply for this event","format":"date","minLength":1,"type":"string"},"ex_date":{"description":"The ex_date for this corporate action","format":"date","minLength":1,"type":"string"},"foreign":{"description":"Indicates if related to a non-US security","type":"boolean"},"payable_date":{"description":"The payable_date for this corporate action","format":"date","minLength":1,"type":"string"},"rate":{"description":"Dividend rate per share","type":"string"},"record_date":{"description":"The record_date for this corporate action","format":"date","minLength":1,"type":"string"},"special":{"description":"Indicates if this is a special dividend","type":"boolean"},"symbol":{"description":"The symbol of the security involved with the activity","type":"string"}},"required":["symbol","cusip","rate","foreign","special"],"type":"object"},"CommonCaActivityV2":{"allOf":[{"$ref":"#/components/schemas/CommonNTAActivityV2"},{"properties":{"ca_id":{"description":"The unique identifier for this corporate action","format":"uuid","type":"string"},"position_date":{"description":"The position_date for this corporate action","format":"date","minLength":1,"type":"string"},"reorg_id":{"description":"The reorg identifier, if present in the source corporate action definition","type":"string"}},"required":["position_date"],"type":"object"}],"type":"object"},"CommonJournalActivityV2":{"allOf":[{"$ref":"#/components/schemas/CommonNTAActivityV2"},{"properties":{"journal_id":{"description":"The journal's ID","format":"uuid","type":"string"}},"type":"object"}],"type":"object"},"CommonMAActivityV2":{"properties":{"acquiree_cusip":{"description":"CUSIP of the acquiree","type":"string"},"acquiree_rate":{"description":"Rate of the acquiree","type":"string"},"acquiree_symbol":{"description":"Symbol of the acquiree","type":"string"},"acquirer_cusip":{"description":"CUSIP of the acquirer","type":"string"},"acquirer_rate":{"description":"Rate of the acquirer","type":"string"},"acquirer_symbol":{"description":"Symbol of the acquirer","type":"string"},"effective_date":{"description":"When the merger/acquisition becomes effective","format":"date","minLength":1,"type":"string"},"payable_date":{"description":"The payable date","format":"date","minLength":1,"type":"string"}},"required":["acquiree_cusip","acquiree_symbol","effective_date","payable_date"],"type":"object"},"CommonNCActivityV2":{"properties":{"new_cusip":{"description":"New CUSIP for the name change","type":"string"},"new_symbol":{"description":"New symbol for the name change","type":"string"},"old_cusip":{"description":"Old CUSIP for the name change","type":"string"},"old_symbol":{"description":"Old symbol for the name change","type":"string"}},"required":["old_cusip","old_symbol","new_cusip","new_symbol"],"type":"object"},"CommonNTAActivityV2":{"properties":{"group_id":{"description":"Optional group ID which can help grouping together related activities","format":"uuid","type":"string"},"system_date":{"description":"The date when the activity was booked","format":"date","minLength":1,"type":"string"}},"required":["system_date"],"type":"object"},"CommonOPCAActivityV2":{"allOf":[{"$ref":"#/components/schemas/CommonCaActivityV2"},{"properties":{"new_contract_symbol":{"description":"The new contract symbol","type":"string"},"new_qty":{"description":"used when the old contract's quantity is not equal to the new contract's quantity. Mutually exclusive with 'qty'.","type":"string"},"old_contract_symbol":{"description":"The old contract symbol","type":"string"},"old_qty":{"description":"used when the old contract's quantity is not equal to the new contract's quantity. Mutually exclusive with 'qty'.","type":"string"},"qty":{"description":"used when the old contract's quantity is equal to the new contract's quantity. Mutually exclusive with 'old_qty' and 'new_qty'","type":"string"}},"required":["old_contract_symbol","new_contract_symbol"],"type":"object"}],"type":"object"},"CommonOptionsActivityV2":{"allOf":[{"$ref":"#/components/schemas/CommonNTAActivityV2"}],"required":["group_id"],"type":"object"},"CommonSDIVActivityV2":{"properties":{"cusip":{"description":"The CUSIP of the security involved with the activity","type":"string"},"ex_date":{"description":"The ex_date for this corporate action","format":"date","minLength":1,"type":"string"},"payable_date":{"description":"The payable_date for this corporate action","format":"date","minLength":1,"type":"string"},"rate":{"description":"Dividend rate per share","type":"string"},"record_date":{"description":"The record_date for this corporate action","format":"date","minLength":1,"type":"string"},"symbol":{"description":"The symbol of the security involved with the activity","type":"string"}},"required":["symbol","cusip","rate"],"type":"object"},"CommonSpinoffActivityV2":{"properties":{"due_bill_redemption_date":{"description":"When due bills related to the spinoff are redeemed","format":"date","minLength":1,"type":"string"},"ex_date":{"description":"The ex_date for this corporate action","format":"date","minLength":1,"type":"string"},"new_cusip":{"description":"CUSIP of the new security","type":"string"},"new_price":{"description":"Market price of new shares after the spinoff","type":"string"},"new_rate":{"description":"Ratio of new shares received","type":"string"},"new_symbol":{"description":"Symbol of the new security","type":"string"},"payable_date":{"description":"The payable_date for this corporate action","format":"date","minLength":1,"type":"string"},"record_date":{"description":"The record_date for this corporate action","format":"date","minLength":1,"type":"string"},"source_cusip":{"description":"CUSIP of the parent security","type":"string"},"source_price":{"description":"Market price of parent shares before the spinoff","type":"string"},"source_rate":{"description":"Ratio of parent shares","type":"string"},"source_symbol":{"description":"Symbol of the parent security","type":"string"}},"required":["source_cusip","source_symbol","source_rate","source_price","new_cusip","new_symbol","new_rate","new_price"],"type":"object"},"CommonSplitActivityV2":{"properties":{"new_cusip":{"description":"CUSIP of the new security after the split","type":"string"},"new_rate":{"description":"Ratio of new shares received","type":"string"},"old_cusip":{"description":"CUSIP of the old security before the split","type":"string"},"old_rate":{"description":"Ratio of old shares exchanged","type":"string"},"payable_date":{"description":"The payable_date for this corporate action","format":"date","minLength":1,"type":"string"}},"required":["old_cusip","new_cusip","old_rate","new_rate"],"type":"object"},"CommonSplitStockActivityV2":{"allOf":[{"$ref":"#/components/schemas/CommonCaActivityV2"},{"$ref":"#/components/schemas/CommonSplitActivityV2"},{"properties":{"new_qty":{"description":"The new quantity after the split","type":"string"},"old_qty":{"description":"The old quantity before the split","type":"string"}},"required":["old_qty","new_qty"],"type":"object"}],"type":"object"},"CommonVOFSubtypeActivityV2":{"properties":{"new_cusip":{"description":"CUSIP of the new security","type":"string"},"new_symbol":{"description":"Symbol of the new security","type":"string"},"source_cusip":{"description":"CUSIP of the parent security","type":"string"},"source_symbol":{"description":"Symbol of the parent security","type":"string"}},"required":["source_cusip","source_symbol"],"type":"object"},"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"},"CorrespondentLimit":{"properties":{"amount_available":{"format":"decimal","type":"string"},"amount_in_use":{"format":"decimal","type":"string"},"amount_limit":{"format":"decimal","type":"string"}},"type":"object"},"CountryInfo":{"description":"Represents the info for a country.","properties":{"crypto_risk_rating":{"description":"crypto risk rating of the country","enum":["low","medium","high","prohibited"],"type":"string"},"crypto_supported_states":{"description":"states where Alpaca supports crypto trading","items":{"description":"the state code defined by ISO 3166-2","type":"string"},"type":"array"},"full_name":{"description":"The full name of the country definded by ISO 3166-1","example":"Åland Islands","minLength":1,"type":"string"},"securities_risk_rating":{"description":"the securities risk rating of the country","enum":["low","medium","high","prohibited"],"type":"string"}},"required":["full_name","securities_risk_rating","crypto_risk_rating"],"title":"CountryInfo","type":"object","x-examples":{"example":"\"ZAF\": {\n    \"full_name\": \"South Africa\",\n    \"crypto_risk_rating\": \"high\",\n    \"securities_risk_rating\": \"high\"\n}\n","example-1":"\"USA\": {\n  \"full_name\": \"United States of America\",\n  \"crypto_risk_rating\": \"medium\",\n  \"securities_risk_rating\": \"medium\",\n  \"crypto_supported_states\": [\n      \"CA\",\n      \"CT\",\n      \"GA\",\n      \"IA\",\n      \"ID\",\n      \"IL\",\n      \"IN\",\n      \"KS\",\n      \"KY\",\n      \"MA\",\n      \"MD\",\n      \"ME\",\n      \"MI\",\n      \"MS\",\n      \"MO\",\n      \"MT\",\n      \"NC\",\n      \"ND\",\n      \"NE\",\n      \"OH\",\n      \"RI\",\n      \"SD\",\n      \"UT\",\n      \"VT\",\n      \"WA\"\n  ]\n}\n"}},"CountryInfos":{"additionalProperties":{"$ref":"#/components/schemas/CountryInfo"},"description":"Represents the info for countries as a map where the keys are the ISO 3166 country codes.","title":"CountryInfos","type":"object"},"CreateACHRelationshipRequest":{"description":"Represents the fields used in creation of a new ACHRelationship.\n\nYou can create an ACHRelationship by passing the required fields here or if you have an account with Plaid you can use our integration with Plaid to create a relationship.\n\nPlease see the documentation [here](https://alpaca.markets/docs/api-references/broker-api/funding/ach/#plaid-integration-for-bank-transfers) for more info on using Plaid with Alpaca","properties":{"account_owner_name":{"minLength":1,"type":"string"},"bank_account_number":{"description":"In sandbox, this still must be a valid format","minLength":1,"type":"string"},"bank_account_type":{"description":"Must be `CHECKING` or `SAVINGS`","enum":["CHECKING","SAVINGS"],"minLength":1,"type":"string"},"bank_routing_number":{"description":"In sandbox, this still must be a valid format","minLength":1,"type":"string"},"instant":{"type":"boolean"},"nickname":{"minLength":1,"type":"string"},"processor_token":{"description":"If using Plaid, you can specify a Plaid processor token here ","type":"string"}},"required":["account_owner_name","bank_account_type","bank_account_number","bank_routing_number"],"title":"CreateACHRelationshipRequest","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"},"CreateCryptoTransferRequest":{"properties":{"address":{"description":"The destination wallet address","type":"string"},"amount":{"description":"The amount, denoted in the specified asset, to be withdrawn from the user's wallet","type":"string"},"asset":{"type":"string"},"chain":{"description":"Optional chain identifier. The blockchain network used for the withdrawal.","enum":["SOL","ETH","BTC","XRP","ARB"],"type":"string"}},"required":["amount","address","asset"],"title":"CreateCryptoTransferRequest","type":"object"},"CreateFundingWalletWithdrawalRequest":{"properties":{"desired_currency":{"type":"string"},"payment_type":{"$ref":"#/components/schemas/FundingDetailPaymentType"},"usd_amount":{"format":"decimal","type":"string"}},"type":"object"},"CreateIFTransferRequest":{"description":"Request to create a new instant funding transfer\n","properties":{"account_no":{"type":"string"},"amount":{"format":"decimal","type":"string"},"source_account_no":{"type":"string"}},"required":["account_no","source_account_no","amount"],"type":"object"},"CreateJITSettlementRequest":{"description":"Request to create a new settlement. All transfers included must use the same source account, and the total amount received must be in the same currency as the base currency of the source account.\n","properties":{"accounts":{"items":{"$ref":"#/components/schemas/SettlementAccount"},"type":"array"},"additional_info":{"description":"Additional remittance information. Include if the funding source may require additional information to associate to the source account or settlement.\n","type":"string"},"asset_class":{"$ref":"#/components/schemas/JITAssetClass"},"currency":{"description":"The currency of the settlement. All accounts identified should have this base currency.\n","type":"string"}},"required":["currency","asset_class","accounts"],"type":"object"},"CreateJournalRequest":{"description":"Journals API allows you to move cash or securities from one account to another.\n\nThis model represents the fields you can specify when creating a Journal\n\nFixture Rules\n\n- No Fixtures\n  - anything below limit is executed immediately\n  - anything above limit is pending until executed at EOD,\n- With Fixtures\n  - any status = rejected will be rejected EOD\n  - any status = pending will be pending forever","properties":{"amount":{"description":"Required if `entry_type` = `JNLC`","type":"string"},"currency":{"type":"string"},"description":{"description":"Max 1024 characters. Can include fixtures for amounts that are above the transaction limit","maxLength":1024,"type":"string"},"entry_type":{"$ref":"#/components/schemas/JournalEntryType"},"from_account":{"description":"The account_id you wish to journal from","format":"uuid","minLength":1,"type":"string"},"qty":{"description":"Required if `entry_type` = `JNLS`","type":"string"},"symbol":{"description":"Required if `entry_type` = `JNLS`","type":"string"},"to_account":{"description":"The account_id you wish to journal to","format":"uuid","minLength":1,"type":"string"},"transmitter_account_number":{"description":"Max 255 characters. See more details about [Travel Rule](https://alpaca.markets/docs/broker/integration/funding/#travel-rule) in our main documentation.","maxLength":255,"type":"string"},"transmitter_address":{"description":"Max 255 characters. See more details about [Travel Rule](https://alpaca.markets/docs/broker/integration/funding/#travel-rule) in our main documentation.","maxLength":255,"type":"string"},"transmitter_financial_institution":{"description":"Max 255 characters. See more details about [Travel Rule](https://alpaca.markets/docs/broker/integration/funding/#travel-rule) in our main documentation.","maxLength":255,"type":"string"},"transmitter_name":{"description":"Max 255 characters. See more details about [Travel Rule](https://alpaca.markets/docs/broker/integration/funding/#travel-rule) in our main documentation.","maxLength":255,"type":"string"},"transmitter_timestamp":{"description":"RFC 3339 format. See more details about [Travel Rule](https://alpaca.markets/docs/broker/integration/funding/#travel-rule) in our main documentation.","format":"date-time","type":"string"}},"required":["to_account","from_account","entry_type"],"type":"object","x-examples":{"example-1":{"amount":"51","description":"test text /fixtures/status=rejected/fixtures/","entry_type":"JNLC","from_account":"c94bu7rn-4483-4199-840f-6c5fe0b7ca24","to_account":"fn68sbrk-6f2a-433c-8c33-17b66b8941fa"}}},"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"},"CreateSettlementRequest":{"description":"Request to create a new settlement. All transfers included must use the same source account, and the total amount received must be in the same currency as the base currency of the source account as well as the transmitter information.\n","properties":{"additional_info":{"description":"Additional remittance information. Include if the funding source may require additional information to associate to the source account or settlement.\n","type":"string"},"transfers":{"items":{"$ref":"#/components/schemas/SettlementTransfer"},"type":"array"}},"required":["transfers"],"type":"object"},"CreateTransferRequest":{"description":"[See main docs here](https://alpaca.markets/docs/api-references/broker-api/funding/transfers/#creating-a-transfer-entity)","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 [here](https://alpaca.markets/docs/api-references/broker-api/funding/bank/#creating-a-new-bank-relationship)","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 [here](https://alpaca.markets/docs/api-references/broker-api/funding/ach/#creating-an-ach-relationship)","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"},"CreateWatchlistRequest":{"description":"This model represents the fields you can specify when Creating or Updating/Replacing a Watchlist","properties":{"name":{"description":"The watchlist name","type":"string"},"symbols":{"description":"The new list of symbol names to watch","items":{"example":"[\"AAPL\", \"TSLA\"]","type":"string"},"type":"array"}},"required":["name","symbols"],"title":"CreateWatchlistRequest","type":"object"},"CryptoTransfer":{"description":"Transfers allow you to transfer assets into your end customer's account (deposits) or out (withdrawal).","properties":{"amount":{"description":"Amount of transfer denominated in the underlying crypto asset","type":"string"},"asset":{"description":"Symbol of crypto asset for given transfer (e.g. BTC)","type":"string"},"chain":{"description":"Underlying network for given transfer","type":"string"},"created_at":{"description":"Timestamp when transfer was created","format":"date-time","type":"string"},"direction":{"$ref":"#/components/schemas/TransferDirection"},"fees":{"type":"string"},"from_address":{"description":"Originating address of the transfer","type":"string"},"id":{"description":"The crypto transfer ID","format":"uuid","type":"string"},"network_fee":{"type":"string"},"status":{"$ref":"#/components/schemas/CryptoTransferStatus"},"to_address":{"description":"Destination address of the transfer","type":"string"},"tx_hash":{"description":"On-chain transaction hash (e.g. 0xabc...xyz)","type":"string"},"usd_value":{"description":"Equivalent USD value at time of transfer","type":"string"}},"type":"object"},"CryptoTransferStatus":{"enum":["PROCESSING","FAILED","COMPLETE"],"example":"PROCESSING","type":"string"},"CryptoWallet":{"properties":{"address":{"type":"string"},"chain":{"type":"string"},"created_at":{"description":"Timestamp (RFC3339) of account creation.","format":"date-time","type":"string"}},"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"},"DIVNRAActivityV2":{"allOf":[{"$ref":"#/components/schemas/CommonNTAActivityV2"},{"properties":{"cusip":{"description":"The CUSIP of the security involved with the activity","type":"string"},"parent_id":{"description":"The ref_id of the parent dividend","type":"string"},"symbol":{"description":"The symbol of the security involved with the activity","type":"string"}},"required":["cusip","symbol","parent_id"],"type":"object"}],"description":"Dividend withholding for non resident aliens","type":"object"},"DIVSPDActivityV2":{"allOf":[{"$ref":"#/components/schemas/CommonCaActivityV2"},{"properties":{"cash_payout":{"description":"Total cash amount paid","type":"string"},"cusip":{"description":"The CUSIP of the security involved with the activity","type":"string"},"due_bill_off_date":{"description":"When due bills stop applying for this event","format":"date","minLength":1,"type":"string"},"due_bill_on_date":{"description":"When due bills begin to apply for this event","format":"date","minLength":1,"type":"string"},"entitled_qty":{"description":"Quantity of shares entitled to receive cash in lieu","type":"string"},"ex_date":{"description":"The ex_date for this corporate action","format":"date","minLength":1,"type":"string"},"foreign":{"description":"Indicates if related to a non-US security","type":"boolean"},"payable_date":{"description":"The payable_date for this corporate action","format":"date","minLength":1,"type":"string"},"rate":{"description":"Cash payout per share","type":"string"},"record_date":{"description":"The record_date for this corporate action","format":"date","minLength":1,"type":"string"},"special":{"description":"Indicates if this is a special dividend","type":"boolean"},"symbol":{"description":"The symbol of the security involved with the activity","type":"string"}},"required":["entitled_qty","cash_payout","symbol","cusip","rate","foreign","special"],"type":"object"}],"description":"Substitute payment in lieu of dividend","type":"object"},"DailyCashInterest":{"properties":{"account_accrued_interest":{"example":"1.2152","format":"decimal","type":"string"},"account_id":{"example":"02e5c5ba-36d2-467a-8699-81dc24271291","format":"uuid","type":"string"},"account_rate_bps":{"example":423,"type":"integer"},"apr_tier_id":{"example":"13d149c8-d620-43e0-978b-88af8abb2ef1","format":"uuid","type":"string"},"apr_tier_name":{"example":"gold","type":"string"},"cash_balance":{"example":"10485.76","format":"decimal","type":"string"},"correspondent_fee":{"example":"0.0718","format":"decimal","type":"string"},"correspondent_rate_bps":{"example":25,"type":"integer"},"currency":{"example":"USD","type":"string"},"date":{"example":"2024-09-27","format":"date","type":"string"}},"type":"object"},"DailyTradingLimit":{"properties":{"daily_net_limit":{"description":"The net buying limit that can be reached before further cash outflow trading activity is restricted. Please reach out to learn more about how this limit is determined.","format":"decimal","type":"string"},"daily_net_limit_in_use":{"description":"The real time net value of cash inflows (buy trades, etc.) with cash outflows (sell trades, dividends, etc). This will be dynamic throughout the day based on user activity, with executed orders being reset at the start of the next trading day.","format":"decimal","type":"string"}},"title":"DailyTradingLimit","type":"object"},"DemoFundingTransfer":{"properties":{"amount":{"format":"decimal","type":"string"},"currency":{"type":"string"},"receiver_account_number":{"type":"string"},"receiver_routing_code":{"type":"string"}},"type":"object"},"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"},"DoNotExerciseRequest":{"description":"Request to submit a do-not-exercise (DNE) instruction for an option contract for an account.\nThe request body is empty. A successful request will mark the entire position as do not exercise.","title":"DoNotExerciseRequest","type":"object"},"DoNotExerciseResponse":{"description":"Response to a do-not-exercise request.\nA 200 response indicates that the entire position is set as do not exercise.\nThe response body is empty.","title":"DoNotExerciseResponse","type":"object"},"EoDCashInterestReportResponse":{"properties":{"interest":{"items":{"$ref":"#/components/schemas/DailyCashInterest"},"type":"array"},"next_page_token":{"example":"293639be-8807-423f-b00d-68c781e8bb56","nullable":true,"type":"string"}},"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"},"ExchangeOfferActivityV2":{"allOf":[{"$ref":"#/components/schemas/CommonNTAActivityV2"},{"$ref":"#/components/schemas/CommonVOFSubtypeActivityV2"}],"type":"object"},"ExerciseRequest":{"description":"Request to exercise an option contract for an account.\nThis can be omitted or left empty, but it also allows for optionally charging a commission for exercising or\nspecifying a specific quantity of contracts to exercise (rather than the full quantity of contracts held).","properties":{"commission":{"description":"The commission you want to collect from the user. (notional amount)","example":"0.25","format":"decimal","type":"string"},"qty":{"description":"The number of contracts to exercise. If not provided, all contracts will be exercised.","example":"1","format":"decimal","type":"string"}},"title":"ExerciseRequest","type":"object"},"ExerciseResponse":{"description":"Response to an exercise request.\nThis will return the total quantity of contracts exercised as well as the quantity of remaining contracts.","properties":{"qty_exercised":{"description":"The total quantity of contracts exercised.","format":"decimal","type":"string"},"qty_remaining":{"description":"The total quantity of contracts remaining after the exercise.","format":"decimal","type":"string"}},"title":"ExerciseResponse","type":"object"},"FEEActivityV2":{"allOf":[{"$ref":"#/components/schemas/CommonNTAActivityV2"},{"properties":{"parent_id":{"description":"The parent transaction's ID","format":"uuid","type":"string"}},"required":["parent_id"],"type":"object"}],"description":"Fee","type":"object"},"FOPTActivityV2":{"allOf":[{"$ref":"#/components/schemas/CommonNTAActivityV2"},{"properties":{"contra":{"description":"Contra for the transfer","type":"string"},"external_id":{"description":"External ID of the transfer","type":"string"},"symbol":{"description":"The symbol of the security involved with the activity","type":"string"}},"required":["external_id","contra","symbol"],"type":"object"}],"description":"Free-of-payment (FOP) transfers","type":"object"},"FPSLAnalyticsLoansResponse":{"description":"Aggregated FPSL interest and loan-activity counts for one account over a date range.\n","properties":{"account_number":{"description":"Account's number at Alpaca","example":"286873545","type":"string"},"in_progress_lending_activities":{"description":"The number of FPSL lending activities currently in progress for the account.","example":2,"format":"int64","type":"integer"},"interest":{"$ref":"#/components/schemas/FPSLInterest"},"total_lending_activities":{"description":"The total number of FPSL lending activities for the account within the specified date range.","example":7,"format":"int64","type":"integer"}},"required":["account_number","total_lending_activities","in_progress_lending_activities"],"type":"object"},"FPSLError":{"description":"FPSL API error response","properties":{"message":{"example":"Internal Server Error","type":"string"}},"type":"object"},"FPSLInterest":{"description":"The interest's details.\nPlease note that the object might not be set if interest has not yet been calculated for the loan.\nAdditionally, interest details may be adjusted retroactively at any time until interests are finalized for the month.\nThe loan's changed `updated_at` field can indicate such an adjustment.\n","properties":{"customer":{"description":"The interest accrued by the customer for this loan.","example":1.23,"format":"double","type":"number"},"partner":{"description":"The interest accrued by the partner for this loan.","example":1.65,"format":"double","type":"number"}},"required":["customer","partner"],"type":"object"},"FPSLLoan":{"description":"A loan of a security by an account on a date.","properties":{"account_id":{"description":"Account's ID at Alpaca","example":"06d83e79-5bea-4ce9-a362-a25251a700ec","type":"string"},"account_number":{"description":"Account's number at Alpaca","example":"286873545","type":"string"},"collateral":{"description":"The collateral posted for the loan.","example":1161.015,"format":"double","type":"number"},"correspondent":{"description":"Account's correspondent","example":"LPCA","type":"string"},"date":{"example":"2006-01-02","format":"date","type":"string"},"interest":{"$ref":"#/components/schemas/FPSLInterest"},"market_value":{"description":"The total market value of the shares on loan.","example":1138.25,"format":"double","type":"number"},"quantity":{"description":"The number of shares in the loan. This may be less than the total number of eligible shares held by the account.","example":5,"format":"int64","type":"integer"},"symbol":{"description":"Stock/Ticker symbol of a stock or security","example":"AAPL","type":"string"},"updated_at":{"description":"Timestamp of the last update to this loan in RFC-3339 format with microsecond precision with timezone.\nAn updated value may indicate adjusted interest values.\n","example":"2025-03-21T15:54:19.857034+01:00","format":"date-time","type":"string"}},"required":["date","account_id","account_number","correspondent","symbol","quantity","market_value","collateral"],"type":"object"},"FPSLTier":{"properties":{"created_at":{"description":"The timestamp the FPSL tier was created, in RFC 3339 format.","example":"2024-09-16T20:06:32.207729Z","format":"date-time","type":"string"},"customer_split":{"description":"Percentage of the customer split represented as a value between 0 and 1.00. Max 2 decimal places are allowed.","example":0.25,"type":"number"},"id":{"description":"The unique identifier of the FPSL tier","example":"150df7eb-31e7-46b3-8848-a54ca21ff3bc","format":"uuid","type":"string"},"market":{"description":"The market of the FPSL tier","example":"US","type":"string"},"partner_split":{"description":"Percentage of the partner split represented as a value between 0 and 1.00. Max 2 decimal places are allowed.","example":0.3,"type":"number"},"tier_name":{"description":"The name of the FPSL tier","example":"gold","type":"string"},"updated_at":{"description":"The timestamp of the last update to the FPSL tier, in RFC 3339 format.","example":"2024-09-16T20:06:32.207729Z","format":"date-time","type":"string"}},"type":"object"},"FeePaymentMethod":{"description":"Only outgoing wire fees are currently supported for automated processing.\n\n\n**user**\tThe end user will pay any applicable fees\n**invoice**\tAny applicable fees will be billed to the client in the following monthly invoice","title":"FeePaymentMethod","type":"string"},"FeePaymentType":{"description":"Status:\n * `invoice`\n","enum":["invoice"],"type":"string"},"FeeType":{"description":"Status:\n  * `withdrawal_fee`: Withdrawal fee\n  * `fx_fee`: FX Fee\n  * `network_fee`\n  * `deposit_fee`\n  * `ach_return_fee`\n  * `parnter_fee`\n  * `alpaca_fee`\n","enum":["withdrawal_fee","fx_fee","network_fee","deposit_fee","ach_return_fee","parnter_fee","alpaca_fee"],"type":"string"},"FixedIncomeRedemptionActivityV2":{"allOf":[{"$ref":"#/components/schemas/CommonNTAActivityV2"},{"properties":{"ca_id":{"description":"The unique identifier for this corporate action","type":"string"},"cash_payout":{"description":"The cash payout","type":"string"},"cusip":{"description":"The CUSIP of the security involved with the activity","type":"string"},"payment_date":{"description":"The payment date","format":"date","minLength":1,"type":"string"},"qty":{"description":"Quantity for the redemption","type":"string"}},"required":["ca_id","payment_date","cusip","qty","cash_payout"],"type":"object"}],"description":"Redemption","type":"object"},"ForwardSplitActivityV2":{"allOf":[{"$ref":"#/components/schemas/CommonSplitStockActivityV2"},{"properties":{"due_bill_redemption_date":{"description":"When due bills related to the split are redeemed","format":"date","minLength":1,"type":"string"},"ex_date":{"description":"The ex_date for this corporate action","format":"date","minLength":1,"type":"string"},"record_date":{"description":"The record_date for this corporate action","format":"date","minLength":1,"type":"string"},"symbol":{"description":"The symbol of the security being split","type":"string"}},"required":["symbol"],"type":"object"}],"description":"Forward stock split","type":"object"},"FundingDetail":{"description":"Gets funding details that can be used to settle and collect funds in each available currency.\n","properties":{"account_holder_name":{"type":"string"},"account_number":{"type":"string"},"account_number_type":{"type":"string"},"bank_address":{"type":"string"},"bank_country":{"type":"string"},"bank_name":{"type":"string"},"currency":{"type":"string"},"payment_type":{"$ref":"#/components/schemas/FundingDetailPaymentType"},"routing_code":{"type":"string"},"routing_code_type":{"$ref":"#/components/schemas/FundingDetailRoutingCodeType"}},"type":"object"},"FundingDetailPaymentType":{"description":"Status:\n * `swift_wire`: SWIFT wire\n * `local_rails`: Local scheme\n","enum":["swift_wire","local_rails"],"type":"string"},"FundingDetailRoutingCodeType":{"description":"Status:\n * `BIC`: bic_swift\n * `ACH`: ach_routing_code\n * `ABA`: aba\n * `ROUTING`: routing_code\n * `SORT_CODE`: sort_code\n","enum":["BIC","ACH_ROUTING","ABA","ROUTING","SORT_CODE"],"type":"string"},"FundingWallet":{"properties":{"account_id":{"format":"uuid","type":"string"},"created_at":{"format":"date-time","type":"string"},"status":{"$ref":"#/components/schemas/FundingWalletStatus"}},"required":["account_id","status","created_at"],"type":"object"},"FundingWalletRecipientBank":{"properties":{"account_number":{"description":"Bank account number.","type":"string"},"bic_swift":{"description":"BIC/SWIFT code","type":"string"},"city":{"description":"City","type":"string"},"company_name":{"type":"string"},"country":{"description":"Two-letter ISO country code.","type":"string"},"created_at":{"description":"Date the beneficiary record was created.","format":"date-time","type":"string"},"currency":{"description":"Currency in which money is held in the beneficiary's bank account. Three-digit currency code.","type":"string"},"first_name":{"type":"string"},"iban":{"description":"IBAN code","type":"string"},"id":{"format":"uuid","type":"string"},"last_name":{"type":"string"},"payment_types":{"items":{"$ref":"#/components/schemas/FundingDetailPaymentType"},"type":"array"},"postal_code":{"description":"Postal code","type":"string"},"routing_code":{"description":"Value for \"routing_code_type\".","type":"string"},"routing_code_type":{"description":"Local payment routing system.","type":"string"},"state_or_province":{"description":"State or province.","type":"string"},"street_address":{"type":"string"},"updated_at":{"description":"Date the beneficiary record was last updated.","format":"date-time","type":"string"}},"type":"object"},"FundingWalletStatus":{"description":"Status:\n * `active`: The funding wallet is ready\n * `pending`: The funding wallet is being processed\n * `disabled`: The funding wallet is disabled\n","enum":["active","pending","disabled"],"type":"string"},"FundingWalletTransfer":{"properties":{"account_id":{"format":"uuid","type":"string"},"created_at":{"format":"date-time","type":"string"},"direction":{"$ref":"#/components/schemas/FundingWalletTransferDirection"},"fees":{"items":{"$ref":"#/components/schemas/TransferFee"},"type":"array"},"id":{"format":"uuid","type":"string"},"original_amount":{"description":"The amount you should expect to receive, calculated as requested amount - fees","format":"decimal","type":"string"},"original_currency":{"description":"The currency of the withdrawn amount, 3-letter ISO code","type":"string"},"payment_type":{"$ref":"#/components/schemas/FundingDetailPaymentType"},"requested_amount":{"description":"The amount sent as part of the withdrawal creation","format":"decimal","type":"string"},"status":{"$ref":"#/components/schemas/FundingWalletTransferStatus"},"updated_at":{"format":"date-time","type":"string"},"usd":{"$ref":"#/components/schemas/Usd"}},"type":"object"},"FundingWalletTransferDirection":{"description":"Status:\n * `incoming`: incoming amount\n * `outgoing`: outgoing amount\n","enum":["incoming","outgoing"],"type":"string"},"FundingWalletTransferStatus":{"description":"Status:\n * `PENDING`: Created and waiting to be processed\n * `CANCELED`: Canceled\n * `FAILED`: Failed mostly due to technical reasons\n * `COMPLETE`: Transfer has settled\n","enum":["PENDING","CANCELED","EXECUTED","FAILED","COMPLETE"],"type":"string"},"IFFee":{"properties":{"amount":{"format":"decimal","type":"string"},"id":{"format":"uuid","type":"string"},"type":{"$ref":"#/components/schemas/IFFeeType"}},"required":["id","amount","type"],"type":"object"},"IFFeeType":{"description":"Status:\n * `partner`: The fee on a transfer that was allocated to the partner\n * `alpaca`: The fee on a transfer that was allocated to Alpaca\n","enum":["partner","alpaca"],"type":"string"},"IPOEvent":{"description":"Represents an IPO offering lifecycle event delivered over the IPO events streaming API (`/v2/events/ipos`).\n\nIPO events come in six `verb` types:\n- **`Offering`** - initial publication of an offering. The `payload` carries `name`, `available_to_order`, `ticker_symbol`, `min_price`, `max_price` (and optional `source`).\n- **`OfferingUpdate`** - update to a previously published offering. The `payload` shape is identical to `Offering`.\n- **`Prospectus`** - prospectus document is now available. The `payload` carries `prospectus_url` and `subject`.\n- **`SixtyMinMail`** - 60-minute pricing window has opened, no new orders accepted. The `payload` carries `sixty_minute_expiration_time` and `subject`.\n- **`Allocation`** - final allocation result for a specific account. The `payload` carries `cusip_id`, `final_price`, `allocated_shares`, `allocated_amount`, `subject`. **This is the only verb that is account-scoped**: `account_id` and `correspondent` are populated.\n- **`OfferingCancellation`** - offering was cancelled. **No `payload` is present.**\n\nSee the example payloads below for a concrete example per verb.\n","properties":{"account_id":{"description":"The account this event applies to. Only populated for `Allocation` events; omitted for system-wide verbs (`Offering`, `OfferingUpdate`, `Prospectus`, `SixtyMinMail`, `OfferingCancellation`).\n","format":"uuid","type":"string"},"at":{"description":"Timestamp the event was emitted by the streaming service.","format":"date-time","type":"string"},"correspondent":{"description":"The correspondent that owns the account. Only populated for `Allocation` events.\n","example":"COR1","type":"string"},"event_id":{"description":"Lexically sortable, monotonically increasing identifier for this event. Use this value with `since_id`/`until_id` to resume the stream from a known point.","format":"ulid","type":"string"},"offering_reference":{"description":"The IPO offering this event refers to. Use this value with `GET /v1/ipos/{offering_reference}` to fetch the full offering metadata.\n","example":"FI111225","type":"string"},"payload":{"description":"Verb-specific payload. The shape varies by `verb` - see schema description and `components/examples` for the structure of each. **Omitted entirely for `OfferingCancellation`.**\n","type":"object"},"received_at":{"description":"Timestamp the upstream event was first received by Alpaca's IPO ingestion pipeline (before fanout).","format":"date-time","type":"string"},"verb":{"description":"The IPO event type. Determines the shape of `payload`.","enum":["Allocation","Offering","OfferingUpdate","Prospectus","SixtyMinMail","OfferingCancellation"],"type":"string"}},"required":["event_id","at","verb","offering_reference","received_at"],"title":"IPOEvent","type":"object","x-examples":{"Allocation":{"account_id":"6221407b-32b2-3e6b-a7fe-cd79e1b68ba3","at":"2026-03-20T00:15:42.318901Z","correspondent":"COR1","event_id":"01J9RTPZGHKVB8M3X4F5J7LCQ9","offering_reference":"FI111225","payload":{"allocated_amount":"1764","allocated_shares":"42","cusip_id":"123456789","final_price":"42","subject":"IPO Allocation: Example Corp"},"received_at":"2026-03-20T00:15:42.103572Z","verb":"Allocation"},"Offering":{"at":"2026-03-20T12:24:58.807230Z","event_id":"01J9RPMV5TKB8WX3M4F1KZ7QH2","offering_reference":"FI111225","payload":{"available_to_order":"Available","max_price":"42","min_price":"42","name":"Example Corp","source":"example source","ticker_symbol":"EXMP"},"received_at":"2026-03-20T12:24:58.500000Z","verb":"Offering"},"OfferingCancellation":{"at":"2026-03-20T12:24:52.325158Z","event_id":"01J9RVB6Y4ZK8M3N7QD2WX1RFP","offering_reference":"FI111225","received_at":"2026-03-20T12:24:52.110430Z","verb":"OfferingCancellation"},"OfferingUpdate":{"at":"2026-03-20T15:42:11.118274Z","event_id":"01J9RQ5HNZQK7M3RDVJ8XBPCT1","offering_reference":"FI111225","payload":{"available_to_order":"Available","max_price":"44","min_price":"40","name":"Example Corp","source":"example source","ticker_symbol":"EXMP"},"received_at":"2026-03-20T15:42:10.892140Z","verb":"OfferingUpdate"},"Prospectus":{"at":"2026-03-19T23:26:46.853262Z","event_id":"01J9RSGD8JR2A4K7MZNTPVQ5XW","offering_reference":"FI111225","payload":{"prospectus_url":"https://example.com/prospectus/example-corp.pdf","subject":"IPO Prospectus: Example Corp"},"received_at":"2026-03-19T23:26:46.612880Z","verb":"Prospectus"},"SixtyMinMail":{"at":"2026-03-19T22:50:11.729329Z","event_id":"01J9RT9P3WYH8KCJM2LFQX5ZRD","offering_reference":"FI111225","payload":{"sixty_minute_expiration_time":"2026-03-19T23:50:11.729329Z","subject":"IPO 60 Minute Mail: Example Corp"},"received_at":"2026-03-19T22:50:11.512640Z","verb":"SixtyMinMail"}}},"IPOOffering":{"description":"An IPO (Initial Public Offering) offering exposed via the IPO discovery REST API. Returned by `GET /v1/ipos` and `GET /v1/ipos/{offering_reference}`.\n\nMost IPO lifecycle changes (new offerings, prospectus availability, 60-minute mail, allocations, cancellations) are pushed in real time over the [IPO Events Stream](#operation/subscribeToIPOEventsSSE).\n","properties":{"anticipated_shares":{"description":"Anticipated total share count for the offering, when known.","format":"int64","type":"integer"},"availability":{"description":"Whether the offering is currently accepting orders.\n- `available` - accepting new orders.\n- `not_available` - not yet open for orders.\n- `closed` - no longer accepting orders.\n\nNote: the IPO Events Stream uses a different casing for the analogous `payload.available_to_order` field on `Offering`/`OfferingUpdate` events (`Available`, `NotAvailable`, `Closed`).\n","enum":["available","not_available","closed"],"example":"available","type":"string"},"cusip_id":{"description":"CUSIP identifier of the offering.","example":"123456789","type":"string"},"description":{"description":"A longer human-readable description of the offering, when available.","type":"string"},"ipo_reference":{"description":"The unique offering identifier used across the IPO Events Stream and `/v1/ipos/{offering_reference}`. Note that this value is also used as the path parameter, where it is named `offering_reference`.\n","example":"FI111225","type":"string"},"logo_small":{"description":"URL to a small logo asset for the issuer.","type":"string"},"max_price":{"description":"Upper bound of the indicated price range.","example":"42","format":"decimal","type":"string"},"max_ticket_size":{"description":"Maximum allowed order amount.","type":"string"},"min_price":{"description":"Lower bound of the indicated price range.","example":"42","format":"decimal","type":"string"},"min_ticket_size":{"description":"Minimum allowed order amount.","type":"string"},"name":{"description":"The official name of the offering.","example":"Example Corp","type":"string"},"no_new_orders":{"description":"When `true`, the offering is in its 60-minute pricing window and is not accepting new orders. This mirrors the `SixtyMinMail` event on the IPO Events Stream.\n","example":false,"type":"boolean"},"offering_type":{"description":"The type of offering. Currently always `IPO`.","example":"IPO","type":"string"},"prospectus_url":{"description":"URL to the prospectus document. Mirrors the `prospectus_url` payload of the corresponding `Prospectus` event on the IPO Events Stream.\n","type":"string"},"settlement_date":{"description":"Anticipated settlement date.","format":"date","type":"string"},"ticker_symbol":{"description":"The ticker symbol that will be used once the security begins trading on the secondary market.","example":"EXMP","type":"string"},"trade_date":{"description":"Anticipated first trading date on the secondary market.","format":"date","type":"string"},"underwriters":{"description":"List of underwriter names participating in the offering.","items":{"type":"string"},"type":"array"},"unit_step_size":{"description":"The minimum increment in which order quantities can be specified.","type":"string"}},"required":["name","ipo_reference","offering_type","availability","max_price","min_price","no_new_orders"],"title":"IPOOffering","type":"object"},"IPOOfferingListResponse":{"description":"Wrapper response returned by `GET /v1/ipos`.","properties":{"data":{"description":"The page of IPO offerings matching the query.","items":{"$ref":"#/components/schemas/IPOOffering"},"type":"array"},"next_page_token":{"description":"Opaque cursor for the next page of results. When `null`, there are no further pages. Pass this value back as the `page_token` query parameter to fetch the next page.\n","nullable":true,"type":"string"}},"required":["data","next_page_token"],"title":"IPOOfferingListResponse","type":"object"},"IPOOfferingResponse":{"description":"Wrapper response returned by `GET /v1/ipos/{offering_reference}`.","properties":{"data":{"$ref":"#/components/schemas/IPOOffering"}},"required":["data"],"title":"IPOOfferingResponse","type":"object"},"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"},"InstantFunding":{"properties":{"account_no":{"type":"string"},"amount":{"format":"decimal","type":"string"},"created_at":{"format":"date-time","type":"string"},"deadline":{"format":"date","type":"string"},"fees":{"items":{"$ref":"#/components/schemas/IFFee"},"type":"array"},"id":{"format":"uuid","type":"string"},"interests":{"items":{"$ref":"#/components/schemas/Interest"},"type":"array"},"remaining_payable":{"format":"decimal","type":"string"},"source_account_no":{"type":"string"},"status":{"$ref":"#/components/schemas/InstantFundingStatus"},"system_date":{"format":"date","type":"string"},"total_interest":{"format":"decimal","type":"string"}},"required":["id","amount","account_no","source_account_no","status","system_date","deadline","created_at","total_interest","remaining_payable","interests","fees"],"type":"object"},"InstantFundingStatus":{"description":"Status:\n * `PENDING`: Created and waiting to be processed\n * `CANCELED`: Canceled\n * `EXECUTED`: All fees (including Partner fee) are transacted\n * `FAILED`: Failed mostly due to technical reasons\n * `COMPLETED`: All transactions are settled\n","enum":["PENDING","CANCELED","EXECUTED","FAILED","COMPLETED"],"type":"string"},"Interest":{"properties":{"amount":{"format":"decimal","type":"string"},"created_at":{"format":"date-time","type":"string"},"date":{"format":"date","type":"string"},"id":{"format":"uuid","type":"string"},"reconciled_at":{"format":"date-time","type":"string"},"status":{"$ref":"#/components/schemas/InstantFundingStatus"}},"required":["id","date","amount","status","created_at","reconciled_at"],"type":"object"},"IssueOAuthTokenResponse":{"description":"","properties":{"access_token":{"description":"OAuth token","type":"string"},"scope":{"description":"Token's scope","type":"string"},"token_type":{"description":"Always `Bearer`","enum":["Bearer"],"example":"Bearer","type":"string"}},"required":["access_token","token_type","scope"],"type":"object","x-examples":{"example-1":{"access_token":"87586f14-c3f4-4912-b107-f75bc17ff87a","scope":"general","token_type":"Bearer"}}},"JITAssetClass":{"description":"Values:\n * `crypto`: Used to identify a crypto only account\n * `us_equity`: Used to identify an account that trades US equities, or both crypto and\n  US equities.\n","enum":["crypto","us_equity"],"type":"string"},"JITLedgerAccount":{"properties":{"created_at":{"description":"Creation time in UNIX format","type":"string"},"id":{"description":"The ledger ID","type":"string"},"ledger_name":{"description":"The ledger name","type":"string"},"status":{"type":"string"}},"title":"JITLedgerAccount","type":"object","x-examples":{"Example 1":{"created_at":"1653532627","id":"2896b9e2-3198-44cd-a08e-4cc4079aee33","ledger_name":"Securities JIT IN","status":"active"}}},"JITReport":{"description":"JIT Securities reports are made available through the API and can be accessed within the hour after 11:30 PM EST on the trade date (T+0). The reports communicate transaction-level details as well as overall settlement amounts, transfer direction, and payment timing.","properties":{"detail":{"description":"Contains all activities that impact cash throughout the trading session including executed trades, trading fees, and corporate actions that involve cash allocations.\n\ncontent-type = application/csv","type":"string"},"net_payment":{"description":"Highlights the net amount due to Alpaca by settlement or to the partner on the date of settlement in a formalized invoice format.\n\ncontent-type = application/pdf","type":"string"},"net_payment_final":{"description":"Includes additional information to account for T+0 and T+1 settling activity to clarify settlement journaling reconciliation. This report is generated after trading session close on T+1.\n\ncontent-type = application/pdf","type":"string"},"net_summary":{"description":"Consists of three columns and a single row, which lists the net money movement to or from Alpaca for T0, T1, and T2.\n\ncontent-type = application/csv","type":"string"},"obligation":{"description":"Lists of all open obligations towards the partner that are to be settled.\n\ncontent-type = application/csv","type":"string"}},"title":"JITReport","type":"object"},"JITReportDownloadURL":{"properties":{"expires_at":{"description":"Timestamp when the signed URL expires.","format":"date-time","type":"string"},"filename":{"description":"Name of the generated report file.","type":"string"},"url":{"description":"Temporary signed URL used to download the report.","format":"uri","type":"string"}},"required":["url","filename","expires_at"],"type":"object"},"JNLC":{"description":"Journal information specific to cash transfers. This field is required for `Journal`s with an `entry_type` of `jnlc` (cash transfers), but will be null for those with `jnls` (securities transfers).","example":{"entry_type":"JNLC","from_account":"8fjkjn-4483-4199-840f-6c5fe0b7ca24","id":"f45g67h8-d1fc-4136-aa4f-cf4460aecdfc","net_amount":"115.5","status":"pending","to_account":"3gtt65jd-6f2a-433c-8c33-17b66b8941fa"},"properties":{"currency":{"description":"Currency denomination of the journal. USD by default.","type":"string"},"description":{"description":"ID the amount goes to. Only valid for JNLC journals. Null for JNLS.","type":"string"},"entry_type":{"description":"JNLC","type":"string"},"net_amount":{"description":"Only valid for JNLC journals. Null for JNLS.","format":"decimal","type":"string"},"transmitter_account_number":{"description":"Only valid for JNLC journals. Null for JNLS.max 255 characters","type":"string"},"transmitter_address":{"description":"Only valid for JNLC journals. Null for JNLS.max 255 characters","type":"string"},"transmitter_financial_institution":{"description":"Only valid for JNLC journals. Null for JNLS.max 255 characters","type":"string"},"transmitter_name":{"description":"Only valid for JNLC journals. Null for JNLS. Max 255 characters.","type":"string"},"transmitter_timestamp":{"description":"Only valid for JNLC journals. Null for JNLS.","format":"date-time","type":"string"}},"required":["entry_type","net_amount"],"title":"JNLC","type":"object","x-examples":{}},"JNLCActivityV2":{"allOf":[{"$ref":"#/components/schemas/CommonJournalActivityV2"}],"description":"Journal entry (cash)","type":"object"},"JNLS":{"properties":{"currency":{"description":"Currency denomination of the journal. USD by default.","type":"string"},"description":{"type":"string"},"entry_type":{"description":"JNLS","type":"string"},"from_account":{"description":"The account ID that initiates the journal - account_status must equal to ACTIVE or CLOSE","type":"string"},"id":{"description":"The journal ID","type":"string"},"price":{"description":"The price of the security journaled","type":"string"},"qty":{"description":"The quantity of the securities journaled","type":"string"},"settle_date":{"description":"Date string in \"%Y-%m-%d\" format","type":"string"},"status":{"$ref":"#/components/schemas/JournalStatus"},"symbol":{"description":"The symbol of the security journaled","type":"string"},"system_date":{"description":"Date string in \"%Y-%m-%d\" format","type":"string"},"to_account":{"description":"The account ID that received the journal - account_status must equal to ACTIVE","type":"string"}},"required":["entry_type"],"type":"object","x-examples":{"Example 1":{"description":"this is a test journal","entry_type":"JNLS","from_account":"8k4f3d-4483-4199-840f-6c5fe0b7ca24","id":"f45g67h8-d1fc-4136-aa4f-cf4460aecdfc","price":"128.23","qty":"0.5","settle_date":"2020-12-24","status":"executed","symbol":"AAPL","system_date":"2020-12-24","to_account":"g7h7rg66-6f2a-433c-8c33-17b66b8941fa"}}},"JNLSActivityV2":{"allOf":[{"$ref":"#/components/schemas/CommonJournalActivityV2"},{"properties":{"symbol":{"description":"The symbol of the security involved with the activity","type":"string"}},"required":["symbol"],"type":"object"}],"description":"Journal entry (stock)","type":"object"},"Journal":{"allOf":[{"properties":{"created_at":{"format":"date-time","type":"string"},"entry_type":{"$ref":"#/components/schemas/JournalEntryType"},"from_account":{"description":"account ID the shares go from","format":"uuid","type":"string"},"id":{"description":"journal ID","format":"uuid","type":"string"},"settle_date":{"format":"date","type":"string"},"status":{"$ref":"#/components/schemas/JournalStatus"},"to_account":{"description":"account ID the shares go to","format":"uuid","type":"string"},"transmitter_info":{"$ref":"#/components/schemas/TransmitterInfo"}},"required":["id","entry_type","from_account","to_account","settle_date"],"type":"object"},{"oneOf":[{"$ref":"#/components/schemas/JNLS"},{"$ref":"#/components/schemas/JNLC"}]}],"description":"Represents a cash or security transfer between accounts, as specified by the `entry_type` parameter.","discriminator":{"mapping":{"JNLC":"#/components/schemas/JNLC","JNLS":"#/components/schemas/JNLS"},"propertyName":"entry_type"},"example":{"entry_type":"JNLS","from_account":"8fjkjn-4483-4199-840f-6c5fe0b7ca24","id":"h7h5g33f-ef01-4458-9a4b-9598727a406f","price":"128.23","qty":"2","settle_date":"2020-12-24","status":"executed","symbol":"AAPL","to_account":"3gtt65jd-6f2a-433c-8c33-17b66b8941fa"},"title":"Journal","x-examples":{"example":{"entry_type":"JNLS","from_account":"8fjkjn-4483-4199-840f-6c5fe0b7ca24","id":"h7h5g33f-ef01-4458-9a4b-9598727a406f","price":"128.23","qty":"2","settle_date":"2020-12-24","status":"executed","symbol":"AAPL","to_account":"3gtt65jd-6f2a-433c-8c33-17b66b8941fa"},"example-pending":{"description":"","entry_type":"JNLC","from_account":"3dcb795c-3ccc-402a-abb9-07e26a1b1326","id":"6d2cba43-cb57-4534-9603-a6e159167c0a","net_amount":"645","price":"0","qty":null,"settle_date":"2022-02-17","status":"pending","symbol":null,"system_date":"2022-02-17","to_account":"2a87c088-ffb6-472b-a4a3-cd9305c8605c"},"example-queued":{"description":"","entry_type":"JNLC","from_account":"3dcb795c-3ccc-402a-abb9-07e26a1b1326","id":"6d2cba43-cb57-4534-9603-a6e159167c0a","net_amount":"645","price":"0","qty":null,"settle_date":null,"status":"queued","symbol":"","system_date":null,"to_account":"2a87c088-ffb6-472b-a4a3-cd9305c8605c"}}},"JournalEntryType":{"description":"This enum represents the various kinds of Journal alpaca supports.\n\nCurrent values are:\n\n- **JNLC**\n\n  Journal Cash between accounts\n\n- **JNLS**\n\n  Journal Securities between accounts","enum":["JNLC","JNLS"],"title":"","type":"string"},"JournalStatus":{"description":"Represents the status that a Journal instance can be in.\n\n**Current Values**\n\nqueued\tJournal in queue to be processed. Journal is not processed yet.\n\nsent_to_clearing\tJournal sent to be processed by Alpaca's booking system. The journal is not processed yet.\n\npending\t    Journal pending to be processed as it requires manual approval from Alpaca operations (for example due to hitting JNLC daily limits).\n\nexecuted\tJournal executed and balances updated for both sides of \nthe journal transaction. This is not a final status, journals can be reversed if there is an error.\n\nactivity_created\tNon-trade activity has been created for journal (JNLC v2-only).\n\nrejected\tJournal rejected. Please try again.\n\ncanceled\tJournal canceled. This is a **FINAL** status.\n\nrefused\tJournal refused. Please try again.\n\ndeleted\tJournal deleted. This is a **FINAL** status.\n\ncorrect\tJournal is corrected. Previously executed journal is cancelled and a new journal is corrected amount is created. This is a **FINAL** status.","enum":["pending","canceled","executed","activity_created","queued","rejected","deleted","refused","sent_to_clearing","correct"],"type":"string"},"JournalStatusEvent":{"description":"Represents a change in a Journal's status, sent over the events streaming api.\n","properties":{"at":{"description":"Timestamp of event","format":"date-time","minLength":1,"type":"string"},"entry_type":{"$ref":"#/components/schemas/JournalEntryType"},"event_id":{"description":"Monotonically increasing 64bit integer","type":"integer"},"event_ulid":{"description":"lexically sortable, monotonically increasing character array","format":"ulid","type":"string"},"journal_id":{"description":"The UUID of the related Journal","format":"uuid","type":"string"},"status_from":{"$ref":"#/components/schemas/JournalStatus"},"status_to":{"$ref":"#/components/schemas/JournalStatus"}},"required":["at","entry_type","event_id","event_ulid","journal_id","status_from","status_to"],"title":"JournalStatusEvent","type":"object","x-examples":{"example-1":{"at":"2021-05-07T10:28:23.163857Z","entry_type":"JNLC","event_id":1406,"event_ulid":"01F535Y1FVY8WZHE763HCNS8SZ","journal_id":"2f144d2a-91e6-46ff-8e37-959a701cc58d","status_from":"","status_to":"queued"}}},"JournalStatusEventV2":{"description":"Represents a change in a Journal's status, sent over the events streaming api.\n","properties":{"at":{"description":"Timestamp of event","format":"date-time","minLength":1,"type":"string"},"batch_error_message":{"description":"If journal submitted in batch (that is, idempotency_key_type is batch), this is the error message of the batch journal execution.","type":"string"},"description":{"description":"The description of the journal event when submitted","example":"Journal of cash between accounts","type":"string"},"entry_type":{"$ref":"#/components/schemas/JournalEntryType"},"event_id":{"description":"lexically sortable, monotonically increasing character array","format":"ulid","type":"string"},"idempotency_key":{"description":"The idempotency key of the journal event","format":"uuid","type":"string"},"idempotency_key_type":{"description":"The type of idempotency key","enum":["single","batch"],"type":"string"},"journal_id":{"description":"The UUID of the related Journal","format":"uuid","type":"string"},"status_from":{"$ref":"#/components/schemas/JournalStatus"},"status_to":{"$ref":"#/components/schemas/JournalStatus"}},"required":["at","entry_type","event_id","journal_id","status_from","status_to"],"title":"JournalStatusEvent","type":"object","x-examples":{"example-1":{"at":"2021-05-07T10:28:23.163857Z","description":"Journal of cash between accounts","entry_type":"JNLC","event_id":"01F535Y1FVY8WZHE763HCNS8SZ","journal_id":"2f144d2a-91e6-46ff-8e37-959a701cc58d","status_from":"","status_to":"queued"},"example-idempotency-key":{"at":"2021-05-07T10:28:23.163857Z","description":"Journal of cash between accounts","entry_type":"JNLC","event_id":"01F535Y1FVY8WZHE763HCNS8SZ","idempotency_key":"72bdf18f-7410-43ec-b4e8-b6e41c5c0160","idempotency_key_type":"single","journal_id":"2f144d2a-91e6-46ff-8e37-959a701cc58d","status_from":"queued","status_to":"executed"}}},"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"},"ListAPRTiersResponse":{"description":"Response to a successful request for a list of APR tiers.\n","properties":{"apr_tiers":{"description":"All configured APR tiers available for assignment to accounts","items":{"$ref":"#/components/schemas/APRTier"},"type":"array"}},"type":"object"},"ListFPSLLoansResponse":{"description":"Response to a successful request for a list of FPSL loans.\n","properties":{"loans":{"description":"All FPSL loans matching the filter criteria","items":{"$ref":"#/components/schemas/FPSLLoan"},"type":"array"},"next_page_token":{"description":"The token to use to retrieve the next page of results. If `null`, there are no more pages.\n","nullable":true,"type":"string"}},"required":["loans","next_page_token"],"type":"object"},"ListFundingDetails":{"properties":{"funding_details":{"items":{"$ref":"#/components/schemas/FundingDetail"},"type":"array"}},"type":"object"},"ListSortBy":{"enum":["created_at","amount","deadline"],"type":"string"},"ListTransfersResponse":{"properties":{"transfers":{"items":{"$ref":"#/components/schemas/FundingWalletTransfer"},"type":"array"}},"type":"object"},"MAActivityV2":{"allOf":[{"$ref":"#/components/schemas/CommonCaActivityV2"},{"$ref":"#/components/schemas/CommonMAActivityV2"},{"properties":{"acquiree_qty":{"description":"Quantity of the acquiree","type":"string"},"acquirer_qty":{"description":"Quantity of the acquirer","type":"string"},"cash_payout":{"description":"The cash payout","type":"string"},"cash_rate":{"description":"The cash rate","type":"string"}},"required":["acquiree_qty"],"type":"object"}],"description":"Merger and acquisition","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"},"NCActivityV2":{"allOf":[{"$ref":"#/components/schemas/CommonCaActivityV2"},{"$ref":"#/components/schemas/CommonNCActivityV2"},{"properties":{"position_qty":{"description":"The position quantity","type":"string"}},"required":["position_qty"],"type":"object"}],"description":"Name change","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. USD by default.","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"}}},"OAuthTokenRequest":{"description":"This model is used for both the Issue and Authorize OAuth token routes","example":{"account_id":"0d18ae51-3c94-4511-b209-101e1666416b","client_id":"7a3c52a910e1dc2abbb14da2b6b8e711","client_secret":"bbb14da2b6b8e7117a3c52a910e1dc2a","redirect_uri":"http://localhost","scope":"general"},"properties":{"account_id":{"description":"end-user account ID","format":"uuid","type":"string"},"client_id":{"description":"OAuth client ID","type":"string"},"client_secret":{"description":"OAuth client secret","type":"string"},"redirect_uri":{"description":"redirect URI for the OAuth flow","type":"string"},"scope":{"description":"scopes requested by the OAuth flow","type":"string"}},"required":["client_id","client_secret","redirect_uri","scope","account_id"],"title":"OAuthTokenRequest","type":"object"},"OPASNActivityV2":{"allOf":[{"$ref":"#/components/schemas/CommonOptionsActivityV2"}],"description":"Option assignment","type":"object"},"OPEXCActivityV2":{"allOf":[{"$ref":"#/components/schemas/CommonOptionsActivityV2"}],"description":"Option exercise","type":"object"},"OPEXPActivityV2":{"allOf":[{"$ref":"#/components/schemas/CommonOptionsActivityV2"}],"description":"Option expiry","type":"object"},"OPTRDActivityV2":{"allOf":[{"$ref":"#/components/schemas/CommonOptionsActivityV2"}],"description":"Trading activity that is paired with the assignment/exercise","type":"object"},"OathClientResponse":{"example":{"client_id":"7a3c52a910e1dc2abbb14da2b6b8e711","description":"Sample description","live_trading_approved":true,"name":"TradingApp","privacy_policy":"","redirect_uri":["http://localhost"],"status":"ACTIVE","terms_of_use":"","url":"http://test.com"},"properties":{"client_id":{"description":"OAuth client id","type":"string"},"description":{"type":"string"},"live_trading_approved":{"example":true,"type":"boolean"},"name":{"description":"Broker name (your name)","type":"string"},"privacy_policy":{"description":"URL of Privacy Policy","type":"string"},"redirect_uri":{"items":{"type":"string"},"type":"array"},"status":{"description":"ACTIVE or DISABLED","enum":["ACTIVE","DISABLED"],"example":"ACTIVE","type":"string"},"terms_of_use":{"description":"URL of Terms of Use","type":"string"},"url":{"type":"string"}},"title":"OathClientResponse","type":"object","x-examples":{"example-1":{"client_id":"7a3c52a910e1dc2abbb14da2b6b8e711","description":"Sample description","live_trading_approved":true,"name":"TradingApp","privacy_policy":"","redirect_uri":["http://localhost"],"status":"ACTIVE","terms_of_use":"","url":"http://test.com"}}},"OnfidoSDKOutcome":{"description":"\"NOT_STARTED\"\tThe user has not started the SDK flow yet. outcome is set to this default value upon token generation\n\"USER_EXITED\"\tThe user exited the SDK flow\n\"SDK_ERROR\"\tAn error occurred in the SDK flow\n\"USER_COMPLETED\"\tThe user completed the SDK flow","title":"OnfidoSDKOutcome","type":"string"},"OpcaCDIVActivityV2":{"allOf":[{"$ref":"#/components/schemas/CommonOPCAActivityV2"},{"$ref":"#/components/schemas/CommonCDIVActivityV2"}],"description":"Options corporate action of Cash dividend","type":"object"},"OpcaFSPLITActivityV2":{"allOf":[{"$ref":"#/components/schemas/CommonOPCAActivityV2"},{"$ref":"#/components/schemas/CommonSplitActivityV2"},{"properties":{"due_bill_redemption_date":{"description":"When due bills related to the split are redeemed","format":"date","minLength":1,"type":"string"},"ex_date":{"description":"The ex_date for this corporate action","format":"date","minLength":1,"type":"string"},"record_date":{"description":"The record_date for this corporate action","format":"date","minLength":1,"type":"string"},"symbol":{"description":"The symbol of the security involved with the activity","type":"string"}},"required":["symbol"],"type":"object"}],"description":"Options corporate action of forward-splits","type":"object"},"OpcaMAActivityV2":{"allOf":[{"$ref":"#/components/schemas/CommonOPCAActivityV2"},{"$ref":"#/components/schemas/CommonMAActivityV2"}],"description":"Options corporate action of Mergers & Acquisitions","type":"object"},"OpcaNCActivityV2":{"allOf":[{"$ref":"#/components/schemas/CommonOPCAActivityV2"},{"$ref":"#/components/schemas/CommonNCActivityV2"}],"description":"Options corporate action of name changes","type":"object"},"OpcaRSPLITActivityV2":{"allOf":[{"$ref":"#/components/schemas/CommonOPCAActivityV2"},{"$ref":"#/components/schemas/CommonSplitActivityV2"},{"properties":{"ex_date":{"description":"The ex_date for this corporate action","format":"date","minLength":1,"type":"string"},"new_symbol":{"description":"Symbol of the new security after the split","type":"string"},"record_date":{"description":"The record_date for this corporate action","format":"date","minLength":1,"type":"string"},"symbol":{"description":"The symbol of the security involved with the activity","type":"string"}},"required":["symbol"],"type":"object"}],"description":"Options corporate action of reverse-splits","type":"object"},"OpcaSDIVActivityV2":{"allOf":[{"$ref":"#/components/schemas/CommonOPCAActivityV2"},{"$ref":"#/components/schemas/CommonSDIVActivityV2"}],"description":"Options corporate action of stock dividend","type":"object"},"OpcaSPINActivityV2":{"allOf":[{"$ref":"#/components/schemas/CommonOPCAActivityV2"},{"$ref":"#/components/schemas/CommonSpinoffActivityV2"}],"description":"Options corporate action of spin-offs","type":"object"},"OpcaUSPLITActivityV2":{"allOf":[{"$ref":"#/components/schemas/CommonOPCAActivityV2"},{"$ref":"#/components/schemas/CommonSplitActivityV2"},{"properties":{"alternate_cusip":{"description":"CUSIP for the alternate security after the split","type":"string"},"alternate_rate":{"description":"Ratio of alternate shares received","type":"string"},"alternate_symbol":{"description":"Symbol for the alternate security after the split","type":"string"},"effective_date":{"description":"When the unit split becomes effective","format":"date","minLength":1,"type":"string"},"new_symbol":{"description":"Symbol of the new security after the unit split","type":"string"},"old_symbol":{"description":"The old symbol of the security involved with the activity","type":"string"}},"required":["old_symbol","new_symbol","alternate_cusip","alternate_symbol","alternate_rate","effective_date"],"type":"object"}],"description":"Options corporate action of unit-splits","type":"object"},"OptionContract":{"properties":{"close_price":{"description":"The close price of the option contract.","example":"148.38","type":"string"},"close_price_date":{"description":"The date of the close price data.","example":"2023-12-11","format":"date","type":"string"},"deliverables":{"description":"Represents the deliverables tied to the option contract. While standard contracts entail a single deliverable, non-standard ones can encompass multiple deliverables, each potentially customized with distinct parameters.\nThis array is included in the list contracts response only if the query parameter show_deliverables=true is provided.\n","items":{"$ref":"#/components/schemas/OptionDeliverable"},"type":"array"},"expiration_date":{"description":"The expiration date of the option contract.","example":"2025-06-20","format":"date","type":"string"},"id":{"description":"The unique identifier of the option contract.","example":"98359ef7-5124-49f3-85ea-5cf02df6defa","type":"string"},"multiplier":{"description":"The multiplier of the option contract is crucial for calculating both the trade premium and the extended strike price. In standard contracts, the multiplier is always set to 100.\nFor instance, if a contract is traded at $1.50 and the multiplier is 100, the total amount debited when buying the contract would be $150.00.\nSimilarly, when exercising a call contract, the total cost will be equal to the strike price times the multiplier.","example":"100","type":"string"},"name":{"description":"The name of the option contract.","example":"AAPL Jun 20 2025 100 Call","type":"string"},"open_interest":{"description":"The open interest of the option contract.","example":"237","type":"string"},"open_interest_date":{"description":"The date of the open interest data.","example":"2023-12-11","format":"date","type":"string"},"root_symbol":{"description":"The root symbol of the option contract.","example":"AAPL","type":"string"},"size":{"description":"Represents the number of underlying shares to be delivered in case the contract is exercised/assigned. For standard contracts, this is always 100.\nThis field should **not** be used as a multiplier, specially for non-standard contracts.","example":"100","type":"string"},"status":{"description":"The status of the option contract.","enum":["active","inactive"],"example":"active","type":"string"},"strike_price":{"description":"The strike price of the option contract.","example":"100","type":"string"},"style":{"description":"The style of the option contract.","enum":["american","european"],"example":"american","type":"string"},"symbol":{"description":"The symbol representing the option contract.","example":"AAPL250620C00100000","type":"string"},"tradable":{"description":"Indicates whether the option contract is tradable.","example":true,"type":"boolean"},"type":{"description":"The type of the option contract.","enum":["call","put"],"example":"call","type":"string"},"underlying_asset_id":{"description":"The unique identifier of the underlying asset.","example":"b0b6dd9d-8b9b-48a9-ba46-b9d54906e415","type":"string"},"underlying_symbol":{"description":"The underlying symbol of the option contract.","example":"AAPL","type":"string"}},"required":["id","symbol","name","status","tradable","expiration_date","underlying_symbol","underlying_asset_id","type","style","strike_price","multiplier","size"],"type":"object"},"OptionDeliverable":{"properties":{"allocation_percentage":{"description":"Cost allocation percentage of the deliverable.\nThis is used to determine the cost basis of the equity shares received from the exercise, specially for non-standard contracts with multiple deliverables.\n","example":"100","type":"string"},"amount":{"description":"The deliverable amount. For cash deliverables, this is the cash amount.\nFor standard contract, this is always 100.\nThis field can be null in case the deliverable settlement is delayed and the amount is yet to be determined.\n","example":"100","type":"string"},"asset_id":{"description":"Unique identifier of the deliverable asset. For standard contracts, this is equivalent to underlying_asset_id of the contracts.\nThis field is not returned for cash deliverables.\n","example":"b0b6dd9d-8b9b-48a9-ba46-b9d54906e415","type":"string"},"delayed_settlement":{"description":"If true, the settlement of the deliverable will be delayed.\nFor instance, in the event of a contract with a delayed deliverable being exercised, both the availability of the deliverable and its settlement may be postponed beyond the typical timeframe.\n","example":false,"type":"boolean"},"settlement_method":{"description":"Indicates the settlement method that will be used:\n- **BTOB**: Broker to Broker\n- **CADF**: Cash Difference\n- **CAFX**: Cash Fixed\n- **CCC**: Correspondent Clearing Corp\n","enum":["BTOB","CADF","CAFX","CCC"],"example":"CCC","type":"string"},"settlement_type":{"description":"Indicates when the deliverable will be settled if the contract is exercised/assigned.\n","enum":["T+0","T+1","T+2","T+3","T+4","T+5"],"example":"T+2","type":"string"},"symbol":{"description":"Symbol of the deliverable. For standard contracts, this is equivalent to the underlying symbol of the contract.\n","example":"AAPL","type":"string"},"type":{"description":"Type of deliverable, indicating whether it's cash or equity. For standard contracts, it is always \"equity\".\n","enum":["cash","equity"],"example":"equity","type":"string"}},"required":["type","symbol","amount","allocation_percentage","settlement_type","settlement_method","delayed_settlement"],"type":"object"},"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"},"OptionsApprovalRequest":{"properties":{"level":{"description":"The desired option trading level. 1=Covered Call/Cash-Secured Put, 2=Long Call/Put, 3=Spreads/Straddles.","enum":[1,2,3],"example":3,"type":"integer"}},"type":"object"},"OptionsApprovalResponse":{"properties":{"account_id":{"description":"The account ID.","example":"c8f1ef5d-edc0-4f23-9ee4-378f19cb92a4","format":"uuid","type":"string"},"approved_level":{"description":"The option trading level approved for this request. Only present once the request has completed processiing.\nNote that a subsequent request may be approved for a different 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"},"created_at":{"description":"The time when the request was submitted.","example":"2021-03-16T18:38:01.942282Z","format":"date-time","type":"string"},"id":{"description":"The request ID.","example":"88b5f678-fef5-447b-af15-f21e367e6d8c","format":"uuid","type":"string"},"requested_level":{"description":"The request option trading level. 0=Disabled, 1=Covered Call/Cash-Secured Put, 2=Long Call/Put, 3=Spreads/Straddles.","enum":[0,1,2,3],"example":3,"type":"integer"},"requester":{"description":"The requester of the options approval request.","enum":["CORRESPONDENT","ALPACA_ADMIN"],"example":"CORRESPONDENT","type":"string"},"status":{"$ref":"#/components/schemas/OptionsApprovalStatus"},"updated_at":{"description":"The time when the request was last updated.","example":"2021-03-16T18:38:01.942282Z","format":"date-time","type":"string"}},"type":"object"},"OptionsApprovalStatus":{"description":"The request status.\n- PENDING: The request is under review.\n- APPROVED: The request has been successfully approved, the account is now able to trade options.\n- LOWER_LEVEL_APPROVED: The request has been approved for a level lower than the requested one.\n- REJECTED: The request has been rejected.\n","enum":["PENDING","APPROVED","LOWER_LEVEL_APPROVED","REJECTED"],"example":"PENDING","type":"string"},"OptionsApprovalsList":{"description":"A list of options approval requests.","properties":{"next_page_token":{"$ref":"#/components/schemas/NextPageToken"},"options_approvals":{"description":"An array of options approval requests.","items":{"$ref":"#/components/schemas/OptionsApprovalResponse"},"type":"array"}},"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":"","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"},"OvercontributedIRAAccount":{"properties":{"account_id":{"description":"The account id","type":"string"},"tax_year":{"description":"The tax year","type":"number"},"total_contribution_amount":{"description":"The total conntribution amount","type":"number"}},"type":"object"},"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"}}},"Portfolio":{"properties":{"cooldown_days":{"description":"Count of calendar days following a rebalance before a subscription is eligible to trigger another rebalance","type":"integer"},"created_at":{"description":"Portfolio creation timestamp","type":"string"},"description":{"description":"Text to describe portfolio","type":"string"},"id":{"description":"Portfolio ID","type":"string"},"name":{"description":"Name of portfolio","type":"string"},"rebalancing_conditions":{"description":"Rebalancing conditions for portfolio","type":"string"},"status":{"description":"Current status of portfolio","enum":["active","inactive","needs_adjustment"],"type":"string"},"updated_at":{"description":"Portfolio updated timestamp","type":"string"},"weights":{"description":"Weight configuration to portfolio. Sum of \"percent\" values in the weights array must be 100.00","items":{"$ref":"#/components/schemas/PortfolioWeights"},"type":"array"}},"required":["cooldown_days"],"title":"Portfolio","type":"object"},"PortfolioHistory":{"description":"Timeseries data for equity and profit loss information of the account.","properties":{"base_value":{"description":"basis in dollar of the profit loss calculation","type":"number"},"base_value_asof":{"description":"If included, then it indicates that the base_value is the account's closing\nequity value at this trading date.\n\nIf not specified, then the baseline calculation is done against the earliest returned data item. This could happen for\naccounts without prior closing balances (e.g. new account) or for queries with 1D timeframes, where the first data point\nis used as a reference point.\n","example":"2023-10-20","format":"date","type":"string"},"cashflow":{"description":"accumulated value in dollar amount as of the end of each time window","type":"object"},"equity":{"description":"equity value of the account in dollar amount as of the end of each time window","items":{"type":"number"},"type":"array"},"profit_loss":{"description":"profit/loss in dollar from the base value","items":{"type":"number"},"type":"array"},"profit_loss_pct":{"description":"profit/loss in percentage from the base value","example":[0.001,0.002],"items":{"type":"number"},"type":"array"},"timeframe":{"description":"time window size of each data element","example":"15Min","type":"string"},"timestamp":{"description":"Time of each data element, left-labeled (the beginning of time window).\n\nThe values returned are in [UNIX epoch format](https://en.wikipedia.org/wiki/Unix_time).\n","items":{"type":"integer"},"type":"array"}},"required":["timestamp","equity","profit_loss","profit_loss_pct","base_value","timeframe"],"title":"PortfolioHistory","type":"object","x-examples":{"example-cashflows":{"base_value":8413.04,"base_value_asof":"2026-04-06","cashflow":{"CSD":[9.93,10.13,10.16,0],"DIV":[0,0,0.63,0]},"equity":[8425.21,8639.77,8766.1,8835.31],"profit_loss":[12.17,214.56,126.33,69.21],"profit_loss_pct":[0.0014,0.0255,0.0146,0.0079],"timeframe":"1D","timestamp":[1775606400,1775692800,1775779200,1775865600]},"example-intraday-query-15min-1d":{"base_value":2774.16,"base_value_asof":"2023-10-18","equity":[2773.79,2769.04,2768.65,2765.11,2763.03,2763.17,2763.17,2763.47,2763.91,2768.13,2774.98,2757.94,2757.65,2774.54,2775.58,2775.28,2767.9,2762.26,2762.56,2756.99,2756.84,2752.43,2752.13,2748.44,2751.23,2747.54,2748.74],"profit_loss":[-0.37,-5.12,-5.51,-9.05,-11.13,-10.99,-10.99,-10.69,-10.25,-6.03,0.82,-16.22,-16.51,0.38,1.42,1.12,-6.26,-11.9,-11.6,-17.17,-17.32,-21.73,-22.03,-25.72,-22.93,-26.62,-25.42],"profit_loss_pct":[-0.0001,-0.0018,-0.002,-0.0033,-0.004,-0.004,-0.004,-0.0039,-0.0037,-0.0022,0.0003,-0.0058,-0.006,0.0001,0.0005,0.0004,-0.0023,-0.0043,-0.0042,-0.0062,-0.0062,-0.0078,-0.0079,-0.0093,-0.0083,-0.0096,-0.0092],"timeframe":"15Min","timestamp":[1697722200,1697723100,1697724000,1697724900,1697725800,1697726700,1697727600,1697728500,1697729400,1697730300,1697731200,1697732100,1697733000,1697733900,1697734800,1697735700,1697736600,1697737500,1697738400,1697739300,1697740200,1697741100,1697742000,1697742900,1697743800,1697744700,1697745600]},"example-query-1d-7d":{"base_value":2784.79,"equity":[2784.79,2794.79,2805.46,2774.16,2748.73],"profit_loss":[0,10.0022,10.6692,-31.2996,-25.4232],"profit_loss_pct":[0,0.0035,0.0074,-0.0038,-0.0129],"timeframe":"1D","timestamp":[1697241600,1697500800,1697587200,1697673600,1697760000]}}},"PortfolioRun":{"properties":{"account_id":{"description":"Account ID for given run","type":"string"},"canceled_at":{"description":"RFC3339 format","type":"string"},"completed_at":{"description":"RFC3339 format","type":"string"},"failed_orders":{"description":"Array of failed orders for this run","items":{"$ref":"#/components/schemas/Order"},"type":"array"},"id":{"description":"Run ID","type":"string"},"initiated_from":{"description":"system or api","enum":["system","api"],"type":"string"},"orders":{"description":"Array of executed orders for this run","items":{"$ref":"#/components/schemas/Order"},"type":"array"},"portfolio_id":{"description":"Portfolio ID for given run","type":"string"},"reason":{"description":"Explainer text in case of failed runs","type":"string"},"skipped_orders":{"description":"Array of skipped order for this run","items":{"$ref":"#/components/schemas/SkippedOrder"},"type":"array"},"status":{"$ref":"#/components/schemas/PortfolioRunStatus"},"type":{"description":"full_rebalance or invest_cash","enum":["full_rebalance","invest_cash"],"type":"string"},"updated_at":{"description":"RFC3339 format","type":"string"},"weights":{"description":"Considered weighting for this run","items":{"$ref":"#/components/schemas/PortfolioWeights"},"type":"array"}},"title":"PortfolioRun","type":"object"},"PortfolioRunStatus":{"description":"|       Status       | Final |                                 Represented State                                |                                                         Notes                                                        |\n|:------------------:|:-----:|:--------------------------------------------------------------------------------:|:--------------------------------------------------------------------------------------------------------------------:|\n| QUEUED             | No    | The run has been queued, waiting for our system to process it.                   | Runs only executed when the US market is open and there's at least 15 minutes before the market closes.              |\n| IN_PROGRESS        | No    | Portfolio adjustment is in progress.                                             |                                                                                                                      |\n| CANCELED           | Yes   | Portfolio run canceled, before being picked up by Alpaca's background processing |                                                                                                                      |\n| CANCELED_MID_RUN   | Yes   | Portfolio run canceled while executing.                                          | The portfolio's state is in between the pre-run and post-run state, manual remediation or job re-run is recommended. |\n| ERROR              | Yes   | There was an error while rebalancing the portfolio.                              | The portfolio's state is in between the pre-run and post-run state, manual remediation or job re-run is recommended. |\n| TIMEOUT            | Yes   | A timeout occurred while rebalancing the portfolio.                               | The portfolio's state is in between the pre-run and post-run state, manual remediation or job re-run is recommended. |\n| COMPLETED_ADJUSTED | Yes   | The portfolio has been adjusted                                                  | The adjustments have been prepared, but the run details haven't yet updated with the list of resulting orders        |\n| COMPLETED_SUCCESS  | Yes   | The portfolio has been adjusted, run status updated                              |                                                                                                                      |","enum":["QUEUED","IN_PROGRESS","CANCELED","CANCELED_MID_RUN","ERROR","TIMEOUT","COMPLETED_ADJUSTED","COMPLETED_SUCCESS"],"title":"PortfolioRunStatus","type":"string"},"PortfolioSubscription":{"properties":{"account_id":{"description":"Account ID subscribing to portfolio","type":"string"},"created_at":{"description":"Subscription creation timestamp","format":"date-time","type":"string"},"id":{"description":"Subscription ID","type":"string"},"last_rebalanced_at":{"description":"Last rebalancing event for this subscription. Can be null.","type":"string"},"portfolio_id":{"description":"Portfolio ID for subscription","type":"string"}},"title":"PortfolioSubscription","type":"object"},"PortfolioWeights":{"properties":{"percent":{"description":"Must be a positive value, up to two decimal places","type":"string"},"symbol":{"description":"Must be fractionable asset. Only provided if type = \"asset\"","type":"string"},"type":{"description":"Possible values of cash or asset","type":"string"}},"title":"PortfolioWeights","type":"object"},"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"},"RebalancingConditions":{"properties":{"day":{"description":"Used to specify the rebalancing day for conditions of type = calendar. Only permitted and required for type = calendar. In scenarios when the specified day aligns to a non-trading day, the rebalance will be triggered on the preceding trading day. For type= annually, the value must be passed in MM-DD format. If 02-29 is specified and the current year is not a leap year, the rebalance will occur on the trading day preceding 2/29. For type= quarterly and monthly the value must be an integer between 1 and 31 inclusive. This represents the day of month. For quarterly, rebalancing will trigger on this day in January, March, June, and December. If the specified day is non-existent for the month then the rebalancing will trigger on the preceding trading day. For type = weekly, permitted values are Monday, Tuesday, Wednesday, Thursday, Friday.","type":"string"},"percent":{"description":"Must be a positive value, up to two decimal places. Only permitted and required for type = drift_band. This is the max allowable drift percent from any target weight (+/-)","type":"string"},"sub_type":{"description":"For type = drift_band: absolute or relative. For type = calendar: weekly,monthly, quarterly or annually. For type = on_portfolio_update: there is no subtype","type":"string"},"type":{"description":"Possible values of drift_band, calendar or on_portfolio_update","type":"string"}},"title":"RebalancingConditions","type":"object"},"ReportsResponse":{"properties":{"account_no":{"type":"string"},"deadline":{"format":"date","type":"string"},"instant_funding_transfers":{"items":{"$ref":"#/components/schemas/InstantFunding"},"type":"array"},"system_date":{"format":"date","type":"string"},"total_amount_owed":{"format":"decimal","type":"string"},"total_interest_penalty":{"format":"decimal","type":"string"}},"required":["system_date","account_no","total_amount_owed","total_interest_penalty","deadline"],"type":"object"},"RestrictToLiquidationReasons":{"description":"Reasons why the liquidation only flag was set","properties":{"ach_return":{"description":"Set when an incoming ACH transfer gets rejected","type":"boolean"},"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"},"ReverseBatchJournalRequest":{"properties":{"entries":{"items":{"properties":{"amount":{"description":"Journal amount in USD","type":"string"},"description":{"description":"Journal description, gets returned in the response","type":"string"},"from_account":{"description":"The ID of the from_account that you want to journal from","type":"string"}},"type":"object"},"type":"array"},"entry_type":{"description":"Only supports `JNLC` for now","enum":["JNLC"],"type":"string"},"to_account":{"description":"The destination of funds. Most likely is your Sweep Firm Account","type":"string"}},"type":"object","x-examples":{"Example 1":{"entries":[{"amount":"10","from_account":"8e00606a-c9ac-409a-ba45-f55e8f77984a"},{"amount":"100","from_account":"b9b19618-22dd-4e80-8432-fc9e1ba0b27d"},{"amount":"100","from_account":"c96a5e16-7fca-425a-b67b-0814d064bfc0"}],"entry_type":"JNLC","to_account":"8f8c8cee-2591-4f83-be12-82c659b5e748"}}},"ReverseSplitActivityV2":{"allOf":[{"$ref":"#/components/schemas/CommonSplitStockActivityV2"},{"properties":{"ex_date":{"description":"The ex_date for this corporate action","format":"date","minLength":1,"type":"string"},"new_symbol":{"description":"Symbol of the new security after the split","type":"string"},"record_date":{"description":"The record_date for this corporate action","format":"date","minLength":1,"type":"string"},"symbol":{"description":"The symbol of the security involved with the activity","type":"string"}},"required":["symbol"],"type":"object"}],"description":"Reverse stock split","type":"object"},"RightsDistributionActivityV2":{"allOf":[{"$ref":"#/components/schemas/CommonCaActivityV2"},{"properties":{"ex_date":{"description":"The ex_date for this corporate action","format":"date","minLength":1,"type":"string"},"expiration_date":{"description":"The expiration date for the rights distribution","format":"date","type":"string"},"new_cusip":{"description":"The new CUSIP","type":"string"},"new_qty":{"description":"The new quantity","type":"string"},"new_symbol":{"description":"The new symbol","type":"string"},"payable_date":{"description":"The payable_date for this corporate action","format":"date","minLength":1,"type":"string"},"rate":{"description":"The rate for the rights distribution","type":"string"},"record_date":{"description":"The record_date for this corporate action","format":"date","minLength":1,"type":"string"},"source_cusip":{"description":"The source CUSIP","type":"string"},"source_qty":{"description":"The source quantity","type":"string"},"source_symbol":{"description":"The source symbol","type":"string"}},"required":["source_cusip","source_symbol","source_qty","new_cusip","new_symbol","new_qty","rate"],"type":"object"}],"description":"Rights distribution","type":"object"},"RightsSubscriptionElectionActivityV2":{"allOf":[{"$ref":"#/components/schemas/CommonNTAActivityV2"},{"$ref":"#/components/schemas/CommonVOFSubtypeActivityV2"}],"type":"object"},"SDIVActivityV2":{"allOf":[{"$ref":"#/components/schemas/CommonCaActivityV2"},{"$ref":"#/components/schemas/CommonSDIVActivityV2"},{"properties":{"entitled_qty":{"description":"Quantity of shares entitled to receive the dividend","type":"string"},"new_qty":{"description":"The total number of shares after the dividend","type":"string"},"paid_qty":{"description":"The paid quantity","type":"string"}},"required":["entitled_qty","paid_qty","new_qty"],"type":"object"}],"description":"Stock dividend","type":"object"},"SettlementAccount":{"properties":{"account_number":{"description":"The account number of the client account to settle\n","type":"string"},"amount":{"format":"decimal","type":"string"},"transmitter_info":{"$ref":"#/components/schemas/TransmitterInfo"}},"required":["account_number","amount","transmitter_info"],"type":"object"},"SettlementResponse":{"description":"A settlement response, either from creation or retrieval\n","properties":{"additional_info":{"type":"string"},"asset_class":{"$ref":"#/components/schemas/JITAssetClass"},"completed_at":{"format":"date-time","type":"string"},"created_at":{"format":"date-time","type":"string"},"currency":{"description":"The currency of the settlement. Only applicable to JIT settlements.\n","type":"string"},"id":{"format":"uuid","type":"string"},"interest_amount":{"description":"The total interest amount accrued on the transfers included in this settlement. Only applicable for instant funding settlements.\n","format":"decimal","type":"string"},"reason":{"description":"The reason for failure, if applicable\n","type":"string"},"source_account_number":{"type":"string"},"status":{"$ref":"#/components/schemas/SettlementStatus"},"total_amount":{"format":"decimal","type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","total_amount","status","created_at","updated_at"],"type":"object"},"SettlementStatus":{"description":"Values:\n * `PENDING`: Created and waiting to be processed\n * `AWAITING_ADDITIONAL_FUNDS`: Waiting for additional funds to be deposited\n * `COMPLETED`: All transactions are reconciled\n * `FAILED`: Attempt to process this settlement has failed. If this is observed\n  additional remittance information may be required, or one of the transfers being settled\n  accrued additional interest since the settlement was created.\n","enum":["PENDING","AWAITING_ADDITIONAL_FUNDS","COMPLETED","FAILED"],"type":"string"},"SettlementTransfer":{"properties":{"instant_transfer_id":{"format":"uuid","type":"string"},"transmitter_info":{"$ref":"#/components/schemas/TransmitterInfo"}},"required":["instant_transfer_id","transmitter_info"],"type":"object"},"SettlementsResponse":{"description":"Response to a successful settlements request\n","properties":{"settlements":{"items":{"$ref":"#/components/schemas/SettlementResponse"},"type":"array"}},"required":["settlements"],"type":"object"},"SkippedOrder":{"description":"Skipped orders model contains information for such orders that the rebalancing engine didn't send to our order system due to some validation issues.","properties":{"currency":{"description":"Currency of the order","type":"string"},"notional":{"description":"Notional value of the order","type":"string"},"reason":{"description":"Reason for the order being skipped","type":"string"},"reason_details":{"description":"Formatted error message with the cause of the skip","type":"string"},"side":{"description":"Side of the order (buy, sell, sell_short)","type":"string"},"symbol":{"description":"Symbol for which the adjustment was skipped","type":"string"}},"required":["symbol","reason","reason_details"],"title":"SkippedOrder","type":"object"},"SortOrder":{"enum":["ASC","DESC"],"type":"string"},"SpinoffActivityV2":{"allOf":[{"$ref":"#/components/schemas/CommonCaActivityV2"},{"$ref":"#/components/schemas/CommonSpinoffActivityV2"},{"properties":{"new_qty":{"description":"The new quantity","type":"string"},"source_qty":{"description":"The source quantity","type":"string"}},"required":["source_qty","new_qty"],"type":"object"}],"description":"Spinoff","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- **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","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"},"TenderOfferActivityV2":{"allOf":[{"$ref":"#/components/schemas/CommonNTAActivityV2"},{"$ref":"#/components/schemas/CommonVOFSubtypeActivityV2"}],"type":"object"},"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"},"TokenizationIssuer":{"description":"The tokenized asset's issuer","enum":["xstocks","st0x"],"example":"xstocks","title":"TokenizationIssuer","type":"string"},"TokenizationMintCallback":{"properties":{"account_id":{"description":"Alpaca account ID (UUID) of the Authorized Participant. Exactly one of `client_id` or `account_id` must be provided, matching the identifier used on the original mint request.","format":"uuid","type":"string"},"client_id":{"description":"Customer's client identifier on the issuer's platform. Exactly one of `client_id` or `account_id` must be provided, matching the identifier used on the original mint request.","type":"string"},"network":{"$ref":"#/components/schemas/TokenizationNetwork"},"tokenization_request_id":{"description":"Unique identifier of the tokenization request","format":"uuid","type":"string"},"tx_hash":{"description":"Transaction hash of the completed request on the blockchain","type":"string"},"wallet_address":{"description":"The wallet address to receive the tokenized asset","type":"string"}},"required":["tokenization_request_id","tx_hash"],"title":"TokenizationMintCallback","type":"object"},"TokenizationMintRequest":{"properties":{"issuer":{"$ref":"#/components/schemas/TokenizationIssuer"},"network":{"$ref":"#/components/schemas/TokenizationNetwork"},"qty":{"description":"The underlying quantity to convert into the tokenized asset. It can be fractional.","type":"string"},"underlying_symbol":{"description":"The underlying asset symbol","type":"string"},"wallet_address":{"description":"The wallet address to receive the tokenized asset","type":"string"}},"required":["underlying_symbol","qty","issuer","network","wallet_address"],"title":"TokenizationMintRequest","type":"object"},"TokenizationMintResponse":{"properties":{"created_at":{"format":"date-time","type":"string"},"issuer":{"$ref":"#/components/schemas/TokenizationIssuer"},"network":{"$ref":"#/components/schemas/TokenizationNetwork"},"qty":{"description":"The quantity to convert for this tokenization request. It can be fractional.","type":"string"},"status":{"$ref":"#/components/schemas/TokenizationRequestStatus"},"token_symbol":{"description":"The tokenized asset symbol","type":"string"},"tokenization_request_id":{"description":"Unique identifier of the tokenization request set by Alpaca","type":"string"},"underlying_symbol":{"description":"The underlying asset symbol","type":"string"}},"required":["tokenization_request_id","status","underlying_symbol","token_symbol","qty","created_at","issuer","network"],"title":"TokenizationMintResponse","type":"object"},"TokenizationNetwork":{"description":"The token's blockchain network","enum":["solana","arbitrum","ethereum","binance","base","ton","tron","mantle"],"example":"solana","title":"TokenizationNetwork","type":"string"},"TokenizationRedeemRequest":{"properties":{"account_id":{"description":"Alpaca account ID (UUID) of the Authorized Participant. Exactly one of `client_id` or `account_id` must be provided to identify the Authorized Participant whose account will receive the underlying asset.","format":"uuid","type":"string"},"client_id":{"description":"Customer's client identifier on the issuer's platform. Exactly one of `client_id` or `account_id` must be provided to identify the Authorized Participant whose account will receive the underlying asset.","type":"string"},"issuer_request_id":{"description":"Unique identifier of the redemption request set by the issuer","type":"string"},"network":{"$ref":"#/components/schemas/TokenizationNetwork"},"qty":{"description":"The quantity to convert into the underlying asset. It can be fractional.","type":"string"},"token_symbol":{"description":"The tokenized asset symbol","type":"string"},"tx_hash":{"description":"Transaction hash of the completed request on the blockchain","type":"string"},"underlying_symbol":{"description":"The underlying asset symbol","type":"string"},"wallet_address":{"description":"The address where the redeemed tokens were originally held","type":"string"}},"required":["issuer_request_id","underlying_symbol","token_symbol","qty","network","wallet_address","tx_hash"],"title":"TokenizationRedeemRequest","type":"object"},"TokenizationRedeemResponse":{"properties":{"created_at":{"format":"date-time","type":"string"},"issuer":{"$ref":"#/components/schemas/TokenizationIssuer"},"issuer_request_id":{"description":"Unique identifier of the redemption request set by the issuer","type":"string"},"network":{"$ref":"#/components/schemas/TokenizationNetwork"},"qty":{"description":"The quantity to convert into the underlying asset. It can be fractional.","type":"string"},"status":{"$ref":"#/components/schemas/TokenizationRequestStatus"},"token_symbol":{"description":"The tokenized asset symbol","type":"string"},"tokenization_request_id":{"description":"Unique identifier of the tokenization request set by Alpaca","type":"string"},"tx_hash":{"description":"Transaction hash of the completed request on the blockchain","type":"string"},"type":{"$ref":"#/components/schemas/TokenizationRequestType"},"underlying_symbol":{"description":"The underlying asset symbol","type":"string"},"wallet_address":{"description":"The address where the redeemed tokens were originally held","type":"string"}},"required":["tokenization_request_id","issuer_request_id","created_at","type","status","underlying_symbol","token_symbol","qty","issuer","network","wallet_address","tx_hash"],"title":"TokenizationRedeemResponse","type":"object"},"TokenizationRequest":{"properties":{"account":{"description":"Alpaca account ID associated with this tokenization request","type":"string"},"created_at":{"format":"date-time","type":"string"},"fees":{"description":"Fees charged for this tokenization request","nullable":true,"type":"string"},"issuer":{"$ref":"#/components/schemas/TokenizationIssuer"},"issuer_account":{"description":"Issuer's account ID associated with this tokenization request","type":"string"},"issuer_request_id":{"description":"Unique identifier of the tokenization request set by the issuer","nullable":true,"type":"string"},"network":{"$ref":"#/components/schemas/TokenizationNetwork"},"qty":{"description":"The quantity to convert for this tokenization request. It can be fractional.","type":"string"},"status":{"$ref":"#/components/schemas/TokenizationRequestStatus"},"token_symbol":{"description":"The tokenized asset symbol","type":"string"},"tokenization_request_id":{"description":"Unique identifier of the tokenization request set by Alpaca","type":"string"},"tx_hash":{"description":"Transaction hash of the completed request on the blockchain","nullable":true,"type":"string"},"type":{"$ref":"#/components/schemas/TokenizationRequestType"},"underlying_symbol":{"description":"The underlying asset symbol","type":"string"},"updated_at":{"format":"date-time","nullable":true,"type":"string"},"wallet_address":{"description":"The wallet address associated with this tokenization request","type":"string"}},"required":["tokenization_request_id","created_at","type","status","underlying_symbol","token_symbol","qty","issuer","network","wallet_address"],"title":"TokenizationRequest","type":"object"},"TokenizationRequestStatus":{"description":"Status of the tokenization request","enum":["pending","rejected","completed"],"example":"completed","title":"TokenizationRequestStatus","type":"string"},"TokenizationRequestType":{"description":"Tokenization request type","enum":["mint","redeem"],"example":"mint","title":"TokenizationRequestType","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"},"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":"Always USD","example":"USD","type":"string"},"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_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"},"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":{"allOf":[{"$ref":"#/components/schemas/AccountConfigurations"}],"description":"Custom user-level configuration overrides for this account.\n\nThis field is always present in the response, but its value will be `null` until user-level configurations have been explicitly set for the account.","nullable":true,"type":"object"}},"required":["id","admin_configurations","user_configurations","account_number","status","crypto_status","currency","buying_power","regt_buying_power","effective_buying_power","non_marginable_buying_power","accrued_fees","portfolio_value","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","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","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_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,"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","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_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,"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"},"TradeUpdateEvent":{"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":"Monotonically increasing 64bit integer","format":"int64","type":"integer"},"event_ulid":{"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.","format":"uuid","type":"string"},"order":{"$ref":"#/components/schemas/Order"},"position_qty":{"description":"Only present when event is either `fill` or `partial_fill`. The size of your total position, after this fill event, in shares. Positive for long positions, negative for short positions.","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` or `partial_fill`. The amount of shares this Trade order was for","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"}},"required":["account_id","at","event","event_id","event_ulid","execution_id","order","timestamp"],"title":"TradeUpdateEvent","type":"object","x-examples":{"example-1":{"account_id":"529248ad-c4cc-4a50-bea4-6bfd2953f83a","at":"2022-04-19T14:12:30.656741Z","event":"new","event_id":37782,"event_ulid":"01G112NTT0XAXKDZK3AABK68TH","execution_id":"7e544af3-3104-4e1a-8cbc-dab2624949ff","order":{"asset_class":"us_equity","asset_id":"a4778bc8-fad1-47b7-87fe-d5cde10d43f4","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,"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","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"},"timestamp":"2022-04-19T14:12:30.602193534Z"}}},"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"},"Transaction":{"properties":{"account_id":{"description":"The ledger ID","type":"string"},"account_name":{"description":"The ledger name","type":"string"},"account_no":{"description":"The ledger account number","type":"string"},"amount":{"description":"Total amount of the transaction","type":"string"},"balance":{"description":"Ending balance after thetransaction has been applied","type":"string"},"contra_account_name":{"description":"Contra account of transaction","type":"string"},"description":{"description":"Plain text overview of the transaction","type":"string"},"entry_type":{"description":"Type of transaction","type":"string"},"system_date":{"description":"Date of transaction","type":"string"}},"type":"object","x-examples":{"Example 1":{"account_id":"06b9d76e-1733-460c-844e-48d1ae0f10c3","account_name":"Just In Time Receivable - JITS","account_no":"JTRJITS00","amount":"1","balance":"4186.36","contra_account_name":"Just In Time Interest Income","description":"debit balance = 4185.36, base_rate = 0.0375, spread = 0.05","entry_type":"JNLC","system_date":"2022-06-10"}}},"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, only present if type = \"wire\"","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":"ach","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"},"TransferFee":{"properties":{"amount":{"format":"decimal","type":"string"},"currency":{"$ref":"#/components/schemas/Currency"},"payment_type":{"$ref":"#/components/schemas/FeePaymentType"},"type":{"$ref":"#/components/schemas/FeeType"}},"required":["type","amount","currency","payment_type"],"type":"object"},"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"},"TransferStatusEvent":{"description":"Represents a change in a Transfer's status, sent over the events streaming api.","properties":{"account_id":{"description":"Account UUID","format":"uuid","minLength":1,"type":"string"},"at":{"description":"Timestamp of when the transfer status changed","format":"date-time","minLength":1,"type":"string"},"event_id":{"description":"Monotonically increasing 64bit integer","type":"integer"},"event_ulid":{"description":"lexically sortable, monotonically increasing character array","format":"ulid","type":"string"},"status_from":{"$ref":"#/components/schemas/TransferStatus"},"status_to":{"$ref":"#/components/schemas/TransferStatus"},"transfer_id":{"description":"Transfer UUID","format":"uuid","minLength":1,"type":"string"}},"required":["account_id","at","event_id","event_ulid","status_from","status_to","transfer_id"],"title":"TransferStatusEvent","type":"object","x-examples":{"example-1":{"account_id":"8e00606a-c9ac-409a-ba45-f55e8f77984a","at":"2021-06-10T19:52:24.066998Z","event_id":15961,"event_ulid":"01F7VQQ782DM57SJNWAYMD14J9","status_from":"QUEUED","status_to":"SENT_TO_CLEARING","transfer_id":"c4ed4206-697b-4859-ab71-b9de6649859d"},"example-2":{"account_id":"8e00606a-c9ac-409a-ba45-f55e8f77984a","at":"2021-06-10T20:02:24.280178Z","event_id":15962,"status_from":"SENT_TO_CLEARING","status_to":"COMPLETE","transfer_id":"c4ed4206-697b-4859-ab71-b9de6649859d"}}},"TransferType":{"description":"- **ach**\nTransfer via ACH (US Only). Supports both `INCOMING` (deposit) and `OUTGOING` (withdrawal) directions.\n- **wire**\nTransfer via wire. `OUTGOING` (withdrawal) only.\n","enum":["ach","wire"],"example":"ach","title":"TransferType","type":"string"},"TransmitterInfo":{"description":"Information about the transmitter to satisfy travel rule requirements. Required if the requesting correspondent qualifies as a financial institution\n","properties":{"originator_bank_account_number":{"description":"Required if the requesting correspondent qualifies as a financial institution\n","type":"string"},"originator_bank_name":{"description":"Required if the requesting correspondent qualifies as a financial institution\n","type":"string"},"originator_city":{"type":"string"},"originator_country":{"description":"Required if the requesting correspondent qualifies as a financial institution\n","type":"string"},"originator_full_name":{"description":"Required if the requesting correspondent qualifies as a financial institution\n","type":"string"},"originator_postal_code":{"type":"string"},"originator_state":{"type":"string"},"originator_street_address":{"type":"string"},"other_identifying_information":{"description":"Used to facilitate transfer lookup in the event it is required. Recommended to be the originating bank's reference number for the transfer\n","type":"string"}},"type":"object"},"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"},"USDAccountTradingLimit":{"properties":{"available":{"description":"The remaining net buying limit that can be used for trading.","format":"decimal","type":"string"},"daily_net_limit":{"description":"The net buying limit that can be reached before further trading activity is restricted. Please reach out to learn more about how this limit is determined.","format":"decimal","type":"string"},"held":{"description":"The limit that is currently being held for open orders","format":"decimal","type":"string"},"used":{"description":"The real time net value of cash inflows (buy trades, etc.) with cash outflows (sell trades, etc). This will be dynamic throughout the day based on user activity, with executed orders being reset at the start of the next trading day.","format":"decimal","type":"string"}},"title":"USDAccountTradingLimit","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"},"UnitSplitActivityV2":{"allOf":[{"$ref":"#/components/schemas/CommonSplitStockActivityV2"},{"properties":{"alternate_cusip":{"description":"CUSIP for the alternate security after the split","type":"string"},"alternate_qty":{"description":"Quantity of alternate shares received","type":"string"},"alternate_rate":{"description":"Ratio of alternate shares received","type":"string"},"alternate_symbol":{"description":"Symbol for the alternate security after the split","type":"string"},"effective_date":{"description":"When the unit split becomes effective","format":"date","minLength":1,"type":"string"},"new_symbol":{"description":"Symbol of the new security after the split","type":"string"},"old_symbol":{"description":"Symbol of the old security before the split","type":"string"}},"required":["old_symbol","new_symbol","alternate_cusip","alternate_symbol","alternate_rate","alternate_qty","effective_date"],"type":"object"}],"description":"Unit split","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"},"Usd":{"properties":{"amount":{"format":"decimal","type":"string"}},"required":["amount"],"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"}}},"WRMActivityV2":{"allOf":[{"$ref":"#/components/schemas/CommonCaActivityV2"},{"properties":{"cusip":{"description":"The CUSIP of the security involved with the activity","type":"string"},"removed_qty":{"description":"The removed quantity","type":"string"},"symbol":{"description":"The symbol of the security involved with the activity","type":"string"}},"required":["cusip","symbol","removed_qty"],"type":"object"}],"description":"Worthless Removal","type":"object"},"WarrantExerciseElectionActivityV2":{"allOf":[{"$ref":"#/components/schemas/CommonNTAActivityV2"},{"$ref":"#/components/schemas/CommonVOFSubtypeActivityV2"}],"type":"object"},"Watchlist":{"description":"Represents a set of securities observed by a user.","properties":{"account_id":{"description":"Unique identifier of the account that owns this watchlist.\n","format":"uuid","type":"string"},"assets":{"description":"The contents of the watchlist, in the order as registered","items":{"$ref":"#/components/schemas/Asset"},"type":"array"},"created_at":{"description":"When watchlist was created","format":"date-time","type":"string"},"id":{"description":"Unique identifier of the watchlist itself.\n","format":"uuid","type":"string"},"name":{"description":"User friendly Name of watchlist","pattern":"^[a-zA-Z0-9]+$","type":"string"},"updated_at":{"description":"When watchlist was last updated","format":"date-time","type":"string"}},"required":["id","account_id","created_at","updated_at","name"],"title":"Watchlist","type":"object"},"WatchlistWithoutAsset":{"description":"Represents a set of securities observed by a user.","properties":{"account_id":{"description":"Unique identifier of the account that owns this watchlist.\n","format":"uuid","type":"string"},"created_at":{"description":"When watchlist was created","format":"date-time","type":"string"},"id":{"description":"Unique identifier of the watchlist itself.\n","format":"uuid","type":"string"},"name":{"description":"User friendly Name of watchlist","pattern":"^[a-zA-Z0-9]+$","type":"string"},"updated_at":{"description":"When watchlist was last updated","format":"date-time","type":"string"}},"required":["id","account_id","created_at","updated_at","name"],"title":"Watchlist","type":"object"},"WhitelistedAddress":{"properties":{"address":{"description":"The whitelisted address","type":"string"},"asset":{"description":"Symbol of underlying asset for the whitelisted address","type":"string"},"chain":{"description":"Underlying network this address represents","type":"string"},"created_at":{"description":"Timestamp (RFC3339) of account creation.","format":"date-time","type":"string"},"id":{"description":"Unique ID for whitelisted address","type":"string"},"status":{"description":"Status of whitelisted address which is either APPROVED or PENDING. Whitelisted addresses will be subjected to a 24 waiting period. After the waiting period is over the status will become APPROVED.","enum":["APPROVED","PENDING"],"type":"string"}},"type":"object"},"bic":{"description":"Business Identifier Code (BIC/SWIFT).","example":"IRVTUS3NXXX","maxLength":11,"minLength":11,"pattern":"^[A-Z0-9]{11}$","type":"string"},"bond_status":{"description":"Status of the bond.","enum":["outstanding","matured","pre_issuance"],"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"},"call_type":{"description":"The type of call on the bond refers to one of a variety of circumstances under which a callable bond may be called.","enum":["ordinary","make_whole","regulatory","special"],"type":"string"},"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"},"coupon_frequency":{"description":"How often the coupon is paid","enum":["annual","semi_annual","quarterly","monthly","zero"],"type":"string"},"coupon_type":{"description":"The type of the coupon rate","enum":["fixed","floating","zero"],"type":"string"},"day_count":{"description":"The day count convention used to calculate accrued interest.\n\n- `A/360`: calculates the daily interest using a 360-day year and then multiplies that by the actual number of days in each time period.\n- `A/365`: calculates the daily interest using a 365-day year and then multiplies that by the actual number of days in each time period.\n- `30/360`: calculates the daily interest using a 360-day year and then multiplies that by 30 (standardized month).\n- `30/365`: calculates the daily interest using a 365-day year and then multiplies that by 30 (standardized month).\n- `A/A`: calculates the daily interest using the actual number of days in the year and then multiplies that by the actual number of days in each time period.\n- `30E/360`: number of days equals to the actual number of days (for February). If the start date or the end date of the period is the 31st of a month, that date is set to the 30th. The number of days in a year is 360.\n- `B/252`: calculates the daily interest using a 252-business-day year and then multiplies that by the actual number of days in each time period.\n- `A/364`: calculates the daily interest using a 364-day year and then multiplies that by the actual number of days in each time period.\n","enum":["A/360","A/365","30/360","30/365","A/A","30E/360","B/252","A/364"],"type":"string"},"legacy_calendar_day":{"description":"A calendar day.","properties":{"close":{"description":"The time the market closes at on this date in HH:MM format.","example":"16:00","type":"string"},"date":{"description":"Date string in YYYY-MM-DD format.","example":"2025-01-02","format":"date","type":"string"},"open":{"description":"The time the market opens at on this date in HH:MM format.","example":"09:30","type":"string"},"session_close":{"description":"The time the session closes at on this date in HHMM format.","example":"2000","type":"string"},"session_open":{"description":"The time the session opens at on this date in HHMM format.","example":"0400","type":"string"},"settlement_date":{"description":"Date string in YYYY-MM-DD format. Representing the settlement date for the trade date.","example":"2025-01-03","format":"date","type":"string"}},"required":["date","open","close","session_open","session_close","settlement_date"],"type":"object"},"legacy_clock":{"example":{"is_open":true,"next_close":"2025-06-24T16:00:00-04:00","next_open":"2025-06-25T09:30:00-04:00","timestamp":"2025-06-24T14:15:22-04:00"},"properties":{"is_open":{"description":"Whether or not the market is open.","type":"boolean"},"next_close":{"description":"Next market close timestamp.","format":"date-time","type":"string"},"next_open":{"description":"Next market open timestamp.","format":"date-time","type":"string"},"timestamp":{"description":"Current timestamp.","format":"date-time","type":"string"}},"required":["timestamp","is_open","next_open","next_close"],"title":"Clock","type":"object"},"legacy_public_calendar_resp":{"items":{"$ref":"#/components/schemas/legacy_calendar_day"},"type":"array"},"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"},"sp_outlook":{"description":"A Standard & Poor's rating outlook indicates S&P's view regarding the potential direction of a long-term credit rating over the intermediate term (2 years for investment grade, 1 year for speculative grade)","enum":["positive","negative","developing","stable","not_rated","not_meaningful"],"type":"string"},"treasury_subtype":{"description":"The subtype of the treasury.","enum":["bond","bill","note","strips","tips","floating"],"type":"string"},"us_corporate":{"description":"A US corporate","properties":{"accrued_interest":{"description":"The interest that has accumulated on a bond in dollars per bond between the last interest payment and the present date that has not yet been paid to the bondholder","format":"double","type":"number","x-go-type":"decimal.Decimal","x-go-type-import":{"name":"decimal","path":"github.com/alpacahq/alpacadecimal"}},"bond_status":{"$ref":"#/components/schemas/bond_status"},"call_type":{"$ref":"#/components/schemas/call_type"},"callable":{"description":"Whether the bond is callable, meaning the issuer has the right, but not the obligation to redeem the bond - in other words, pay out the bondholder - before its maturity date at a set price (the call price)","type":"boolean"},"close_price":{"description":"The price of the last transaction of a security before the market closes for normal trading, shown as a percentage of par value","format":"double","type":"number","x-go-type":"decimal.Decimal","x-go-type-import":{"name":"decimal","path":"github.com/alpacahq/alpacadecimal"}},"close_price_date":{"description":"The date of the close price","format":"date","type":"string"},"close_yield_to_maturity":{"description":"Yield to maturity of the treasury after the last close","format":"double","type":"number","x-go-type":"decimal.Decimal","x-go-type-import":{"name":"decimal","path":"github.com/alpacahq/alpacadecimal"}},"close_yield_to_worst":{"description":"Yield to worst of the treasury after the last close","format":"double","type":"number","x-go-type":"decimal.Decimal","x-go-type-import":{"name":"decimal","path":"github.com/alpacahq/alpacadecimal"}},"convertible":{"description":"A flag indicating whether the bond is convertible","type":"boolean"},"country_domicile":{"description":"The country where the corporate is domiciled in the 2-alpha country code format (e.g., US, CA)","type":"string"},"coupon":{"description":"The annual interest rate paid on the bond as a percentage of par value","format":"double","type":"number","x-go-type":"decimal.Decimal","x-go-type-import":{"name":"decimal","path":"github.com/alpacahq/alpacadecimal"}},"coupon_frequency":{"$ref":"#/components/schemas/coupon_frequency"},"coupon_type":{"$ref":"#/components/schemas/coupon_type"},"cusip":{"description":"CUSIP is a nine-character alphanumeric code that uniquely identifies the security","maxLength":12,"minLength":12,"pattern":"^[A-Z0-9]{9}$","type":"string"},"dated_date":{"description":"The dated date marks the beginning of the period for which interest starts accruing on the bond","format":"date","type":"string"},"day_count":{"$ref":"#/components/schemas/day_count"},"description":{"description":"Description of the corporate bond","type":"string"},"description_short":{"description":"Short description of the corporate bond","type":"string"},"first_coupon_date":{"description":"The date of the first coupon payment","format":"date","type":"string"},"isin":{"description":"International Securities Identification Number","maxLength":12,"minLength":12,"pattern":"^[A-Z]{2}[A-Z0-9]{9}[0-9]$","type":"string"},"issue_date":{"description":"The date on which the bond was issued","format":"date","type":"string"},"issue_minimum_denomination":{"description":"The smallest unit of the bond that can be purchased at its initial offering","type":"number"},"issue_price":{"description":"The price at which the bond was originally issued as a percentage of par value","format":"double","type":"number","x-go-type":"decimal.Decimal","x-go-type-import":{"name":"decimal","path":"github.com/alpacahq/alpacadecimal"}},"issue_size":{"description":"The total size amount of the bond issue in the issuing currency","type":"number"},"issuer":{"description":"The name of the issuer of the corporate bond","type":"string"},"last_coupon_date":{"description":"The date of the last coupon payment","format":"date","type":"string"},"liquidity_institutional_aggregate":{"description":"Score (from 1-5 or null if the bond is not priced/tradable) reflecting the historical depth of executable liquidity to buy or sell (no minimum trading sizes)","type":"number"},"liquidity_institutional_buy":{"description":"Score (from 1-5 or null if the bond is not priced/tradable) reflecting the historical depth of executable liquidity to buy (no minimum trading sizes)","type":"number"},"liquidity_institutional_sell":{"description":"Score (from 1-5 or null if the bond is not priced/tradable) reflecting the historical depth of executable liquidity to sell (no minimum trading sizes)","type":"number"},"liquidity_micro_aggregate":{"description":"Score (from 1-5 or null if the bond is not priced/tradable) reflecting the historical depth of executable liquidity to buy or sell with minimum trading sizes less than or equal to $1,000.00","type":"number"},"liquidity_micro_buy":{"description":"Score (from 1-5 if the bond is priced, or null if the bond is not tradable) reflecting the historical depth of executable liquidity to buy with minimum trading sizes less than or equal to $1,000.00","type":"number"},"liquidity_micro_sell":{"description":"Score (from 1-5 or null if the bond is not priced/tradable) reflecting the historical depth of executable liquidity to sell with minimum trading sizes less than or equal to $1,000.00","type":"number"},"liquidity_retail_aggregate":{"description":"Score (from 1-5 or null if the bond is not priced/tradable) reflecting the historical depth of executable liquidity to buy or sell with minimum trading sizes less than or equal to 10,000","type":"number"},"liquidity_retail_buy":{"description":"Score (from 1-5 or null if the bond is not priced/tradable) reflecting the historical depth of executable liquidity to buy with minimum trading sizes less than or equal to $10,000.00","type":"number"},"liquidity_retail_sell":{"description":"Score (from 1-5 or null if the bond is not priced/tradable) reflecting the historical depth of executable liquidity to sell with minimum trading sizes less than or equal to 10,000","type":"number"},"marginable":{"description":"Whether the corporate is marginable","type":"boolean"},"maturity_date":{"description":"The date on which the bond matures","format":"date","type":"string"},"next_call_date":{"description":"The date of the next possible call on the bond.","format":"date","type":"string"},"next_call_price":{"description":"The price at which a callable bond can be redeemed by the issuer on the next call date, as a percentage of par.","format":"double","type":"number","x-go-type":"decimal.Decimal","x-go-type-import":{"name":"decimal","path":"github.com/alpacahq/alpacadecimal"}},"next_coupon_date":{"description":"The date of the next coupon payment","format":"date","type":"string"},"par_value":{"description":"The amount that the issuer of the bond will pay back to the bondholder upon maturity","type":"number"},"perpetual":{"description":"A flag representing whether a bond is perpetual","type":"boolean"},"puttable":{"description":"Whether the bond is puttable, meaning the bondholder has the right, but not the obligation to sell the bond back to the issuer at a set price (the put price) on specified dates before maturity","type":"boolean"},"reg_s":{"description":"Indicates whether the security falls under Regulation S, a rule that provides an exemption from the registration requirements for securities offerings made outside the United States","type":"boolean"},"reissue_date":{"description":"The date on which the corporate was reissued","format":"date","type":"string"},"reissue_price":{"description":"The price at which the corporate was reissued as a percentage of par value","format":"double","type":"number","x-go-type":"decimal.Decimal","x-go-type-import":{"name":"decimal","path":"github.com/alpacahq/alpacadecimal"}},"reissue_size":{"description":"The total size amount of the corporate reissue in the issuing currency","type":"number"},"sector":{"description":"The sector of the corporate bond","type":"string"},"seniority":{"description":"The seniority of the corporate bond","type":"string"},"sp_creditwatch":{"description":"S&P's CreditWatch highlights S&P's opinion regarding the potential direction of a short-term or long-term rating","type":"string"},"sp_creditwatch_date":{"description":"The date of the most recent Standard & Poor's CreditWatch for the bond in YYYY-MM-DD format","format":"date","type":"string"},"sp_outlook":{"$ref":"#/components/schemas/sp_outlook"},"sp_outlook_date":{"description":"The date of the most recent Standard & Poor's outlook for the bond in YYYY-MM-DD format","format":"date","type":"string"},"sp_rating":{"description":"Standard & Poor's rating for the bond in the standard AAA - D format","type":"string"},"sp_rating_date":{"description":"The date in the timezone of the issuing country of the most recent Standard & Poor's rating for the bond in YYYY-MM-DD format","format":"date","type":"string"},"ticker":{"description":"The ticker symbol of the corporate","type":"string"},"tradable":{"description":"Whether the treasury is tradable","type":"boolean"}},"required":["isin","cusip","bond_status","tradable","marginable","issue_date","country_domicile","ticker","seniority","issuer","sector","description","description_short","coupon","coupon_type","coupon_frequency","perpetual","day_count","dated_date","issue_size","issue_price","issue_minimum_denomination","par_value","callable","puttable","convertible","reg_s"],"type":"object"},"us_corporates_resp":{"properties":{"us_corporates":{"items":{"$ref":"#/components/schemas/us_corporate"},"type":"array"}},"required":["us_corporates"],"type":"object"},"us_treasuries_resp":{"properties":{"us_treasuries":{"items":{"$ref":"#/components/schemas/us_treasury"},"type":"array"}},"required":["us_treasuries"],"type":"object"},"us_treasury":{"description":"A US treasury","properties":{"bond_status":{"$ref":"#/components/schemas/bond_status"},"close_price":{"description":"The price of the last transaction of a security before the market closes for normal trading, shown as a percentage of par value","format":"double","type":"number"},"close_price_date":{"description":"The date of the close price","format":"date","type":"string"},"close_yield_to_maturity":{"description":"Yield to maturity of the treasury after the last close","format":"double","type":"number"},"close_yield_to_worst":{"description":"Yield to worst of the treasury after the last close","format":"double","type":"number"},"coupon":{"description":"The annual interest rate paid on the bond as a percentage of par value","format":"double","type":"number"},"coupon_frequency":{"$ref":"#/components/schemas/coupon_frequency"},"coupon_type":{"$ref":"#/components/schemas/coupon_type"},"cusip":{"description":"CUSIP is a nine-character alphanumeric code that uniquely identifies the security","maxLength":12,"minLength":12,"pattern":"^[A-Z0-9]{9}$","type":"string"},"description":{"description":"Description of the treasury","type":"string"},"description_short":{"description":"Short description of the treasury","type":"string"},"first_coupon_date":{"description":"The date of the first coupon payment","format":"date","type":"string"},"isin":{"description":"International Securities Identification Number","maxLength":12,"minLength":12,"pattern":"^[A-Z]{2}[A-Z0-9]{9}[0-9]$","type":"string"},"issue_date":{"description":"The date on which the bond was issued","format":"date","type":"string"},"last_coupon_date":{"description":"The date of the last coupon payment","format":"date","type":"string"},"maturity_date":{"description":"The date on which the bond matures","format":"date","type":"string"},"next_coupon_date":{"description":"The date of the next coupon payment","format":"date","type":"string"},"subtype":{"$ref":"#/components/schemas/treasury_subtype"},"tradable":{"description":"Whether the treasury is tradable","type":"boolean"}},"required":["isin","cusip","bond_status","tradable","subtype","issue_date","maturity_date","description","description_short","coupon","coupon_type","coupon_frequency"],"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://s3.amazonaws.com/files.alpaca.markets/disclosures/library/TermsAndConditions.pdf","title":"Broker API","version":"1.1.1"},"openapi":"3.0.0","paths":{"/v1beta/accounts/{account_id}/funding_wallet":{"get":{"description":"Returns the funding wallet for the specified account. Responds with 404 if the account has not been onboarded to funding wallets or a wallet has not been created.","operationId":"getFundingWallet","parameters":[{"description":"UUID alpaca account ID","in":"path","name":"account_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FundingWallet"}}},"description":"funding wallet"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"error"}},"summary":"Retrieve funding wallet","tags":["Funding Wallets"]},"post":{"description":"Creates a funding wallet for the specified account. The request is rejected if the account already has a funding wallet.","operationId":"createFundingWallet","parameters":[{"description":"UUID alpaca account ID","in":"path","name":"account_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FundingWallet"}}},"description":"funding wallet"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"error"}},"summary":"Creates a funding wallet","tags":["Funding Wallets"]}},"/v1beta/accounts/{account_id}/funding_wallet/funding_details":{"get":{"description":"Returns a list of funding details if it exists. Query parameters must be passed to create a new funding details object if none exist.","operationId":"listFundingDetails","parameters":[{"description":"UUID alpaca account ID","in":"path","name":"account_id","required":true,"schema":{"type":"string"}},{"description":"The type of SSI to be returned, priority (SWIFT) or regular (local). A null value returns all payment types.","in":"query","name":"payment_type","required":false,"schema":{"$ref":"#/components/schemas/FundingDetailPaymentType"}},{"description":"Should be provided in ISO 4217 standard","in":"query","name":"currency","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ListFundingDetails"}}}},"description":"list of wallets"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"error"}},"summary":"Retrieve funding details","tags":["Funding Wallets"]}},"/v1beta/accounts/{account_id}/funding_wallet/recipient_bank":{"delete":{"description":"deletes a recipient bank.","operationId":"deleteFundingWalletRecipientBank","parameters":[{"description":"UUID alpaca account ID","in":"path","name":"account_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"recipient bank"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response."}},"summary":"Delete a recipient bank","tags":["Funding Wallets"]},"get":{"description":"Returns the recipient bank registered against the specified account's funding wallet. Responds with 404 if no recipient bank has been registered for the account.","operationId":"getFundingWalletRecipientBank","parameters":[{"description":"UUID alpaca account ID","in":"path","name":"account_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"recipient bank"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response."}},"summary":"Retrieve recipient bank","tags":["Funding Wallets"]},"post":{"description":"Creates a new recipient bank. Returns the new recipient bank entity on success. entity.","operationId":"createFundingWalletRecipientBank","parameters":[{"description":"UUID alpaca account ID","in":"path","name":"account_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"account_number":{"description":"Bank account number.","type":"string"},"account_type":{"description":"Bank account type.","enum":["checking","savings"],"type":"string"},"bank_account_holder_name":{"description":"Bank account holder's name.","type":"string"},"bank_country":{"description":"Two-letter code for the country in which the beneficiary's bank account is held.","type":"string"},"bank_name":{"type":"string"},"bic_swift":{"description":"BIC/SWIFT code","type":"string"},"city":{"description":"City","type":"string"},"currency":{"description":"Currency in which money is held in the beneficiary's bank account. ISO-3 currency code.","type":"string"},"iban":{"description":"IBAN code","type":"string"},"postal_code":{"description":"Postal code","type":"string"},"routing_code":{"description":"Routing code for routing_code_type. If supplied, routing_code_type should also be supplied.","type":"string"},"routing_code_type":{"description":"Local payment routing system. If supplied, routing_code should also be supplied.","enum":["sort_code","aba","bsb_code","institution_no","bank_code","branch_code","clabe","cnaps","ifsc"],"type":"string"},"state_or_province":{"description":"State or province.","type":"string"},"street_address":{"description":"First line of address.","type":"string"}},"required":["bank_country","currency","bank_name","street_address","city","account_number"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FundingWalletRecipientBank"}}},"description":"Success."},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"error"}},"summary":"Create a recipient bank","tags":["Funding Wallets"]}},"/v1beta/accounts/{account_id}/funding_wallet/transfers":{"get":{"description":"Returns all funding wallet transfers (deposits and withdrawals) associated with the specified account.","operationId":"getFundingWalletTransfers","parameters":[{"description":"UUID alpaca account ID","in":"path","name":"account_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListTransfersResponse"}}},"description":"transfers"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"error"}},"summary":"Retrieve funding wallet transfers","tags":["Funding Wallets"]}},"/v1beta/accounts/{account_id}/funding_wallet/transfers/{transfer_id}":{"get":{"description":"Returns a single funding wallet transfer for the specified account by `transfer_id`. Responds with 404 if no matching transfer exists for the account.","operationId":"getFundingWalletTransferByID","parameters":[{"description":"Alpaca account UUID","in":"path","name":"account_id","required":true,"schema":{"type":"string"}},{"description":"transfer UUID","in":"path","name":"transfer_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FundingWalletTransfer"}}},"description":"transfer response if found"},"404":{"description":"error response if transfer is not found"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"error"}},"summary":"Retrieve funding wallet transfer by ID","tags":["Funding Wallets"]}},"/v1beta/accounts/{account_id}/funding_wallet/withdrawal":{"post":{"description":"Creates a withdrawal","operationId":"createFundingWalletWithdrawal","parameters":[{"description":"UUID alpaca account ID","in":"path","name":"account_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFundingWalletWithdrawalRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FundingWalletTransfer"}}},"description":"Transfer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response."}},"summary":"Create a withdrawal","tags":["Funding Wallets"]}},"/v1beta/accounts/funding_wallet":{"post":{"description":"Creates funding wallets for a list of accounts in a single request. Every `account_id` in the request must belong to your firm, and the request is rejected if a funding wallet already exists for any of the supplied accounts.","operationId":"batchCreateFundingWallets","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchCreateFundingWalletRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchCreateFundingWalletResponse"}}},"description":"Funding wallets"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response."}},"summary":"Batch create funding wallets","tags":["Funding Wallets"]}},"/v1beta/demo/banking/funding":{"post":{"description":"Simulates an inbound deposit into an account's funding wallet for end-to-end testing of the deposit flow.\n\nThe transfer can only credit accounts that belong to your firm. Available in non-production (sandbox) environments only.","operationId":"demoDepositFunding","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DemoFundingTransfer"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DemoFundingTransfer"}}},"description":"Demo deposit funding transfer"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response."}},"summary":"Create sandbox deposit transfer","tags":["Funding Wallets"]}},"/v1beta1/logos/{symbol}":{"get":{"description":"Alpaca's Logo API serves uniform logo images for select stock and crypto symbols.\n\nNote: For Logo API pricing details, reach out to sales@alpaca.markets\n\nThe API response will return the raw image as a binary","operationId":"get-v1beta1-logos-symbol","parameters":[{"description":"True by default, will return sample placeholder images with the first letter of the asset symbol. If false, 404 will be returned for symbols which do not contain an image.","in":"query","name":"placeholder","schema":{"type":"string"}}],"responses":{"200":{"description":"The API response will return the raw image as a binary"}},"summary":"Get Logo","tags":["Logos"]},"parameters":[{"description":"Stock or crypto symbol (e.g. AAPL, BTCUSD, etc.)","in":"path","name":"symbol","required":true,"schema":{"type":"string"}}]},"/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":{"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}/ach_relationships":{"get":{"description":"Returns a list of ACH Relationships for an account","operationId":"getAccountACHRelationships","parameters":[{"description":"Comma-separated status values","in":"query","name":"statuses","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ACHRelationship"},"type":"array"}}},"description":"Success"}},"summary":"Retrieve ACH Relationships for an account","tags":["Funding"]},"parameters":[{"$ref":"#/components/parameters/AccountID"}],"post":{"description":"Create a new ACHRelationship for an account\n\nIf successful, will return 200 code with a newly created ACH Relationship entity.","operationId":"createACHRelationshipForAccount","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateACHRelationshipRequest"}}},"description":"Create ACH Relationship ","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ACHRelationship"}}},"description":"returns the newly created ACH Relationship entity."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/NotAuthorized"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The account already has an active relationship."}},"summary":"Create an ACH Relationship","tags":["Funding"]}},"/v1/accounts/{account_id}/ach_relationships/{ach_relationship_id}":{"delete":{"description":"Delete an existing ACH relationship for an account","operationId":"deleteACHRelationshipFromAccount","responses":{"204":{"description":"Success (No Content)"},"400":{"description":"the passed in account_id or relationship_id were invalid"},"404":{"description":"Relationship Not Found"}},"summary":"Delete an existing ACH relationship","tags":["Funding"]},"parameters":[{"$ref":"#/components/parameters/AccountID"},{"description":"ACH relationship identifier","in":"path","name":"ach_relationship_id","required":true,"schema":{"format":"uuid","type":"string"}}]},"/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":{"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}/onfido/sdk":{"parameters":[{"in":"path","name":"account_id","required":true,"schema":{"type":"string"}}],"patch":{"description":"This request allows you to send Alpaca the result of the Onfido SDK flow in your app. A notification of a successful outcome is required for Alpaca to continue the KYC process.","operationId":"patch-v1-accounts-account_id-onfido-sdk","requestBody":{"content":{"application/json":{"schema":{"properties":{"outcome":{"$ref":"#/components/schemas/OnfidoSDKOutcome"},"reason":{"description":"Any additional information related to the outcome","type":"string"},"token":{"description":"The SDK token associated with the SDK flow you are updating the outcome for","type":"string"}},"required":["outcome","token"],"type":"object","x-examples":{"Example 1":{"outcome":"USER_EXITED","reason":"User denied consent","token":"header.payload.signature"}}}}}},"responses":{"200":{"description":"OK"},"404":{"description":"Account Not Found"},"422":{"description":"Invalid input value for outcome."}},"summary":"Update the Onfido SDK Outcome","tags":["KYC"]}},"/v1/accounts/{account_id}/onfido/sdk/tokens":{"get":{"description":"Get an SDK token to activate the Onfido SDK flow within your app. You will have to keep track of the SDK token so you can pass it back when you upload the SDK outcome. We recommend storing the token in memory rather than persistent storage to reduce any unnecessary overhead in your app.","operationId":"get-v1-accounts-account_id-onfido-sdk-tokens","parameters":[{"description":"The account ID","in":"path","name":"account_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The referrer URL of your web app or the application ID of your mobile app. If not passed in, will default to the * wildcard","in":"query","name":"referrer","schema":{"type":"string"}},{"description":"Required if referrer provided. Enum values are either mobile or web","in":"query","name":"platform","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"token":{"type":"string"}},"type":"object","x-examples":{"Example 1":{"token":"header.payload.signature"}}}}},"description":"OK"},"422":{"description":"Onfido applicant not yet created for account. If you haven't already contacted Alapca to enable Onfido, please do so."}},"summary":"Retrieve an Onfido SDK Token","tags":["KYC"]}},"/v1/accounts/{account_id}/options/approval":{"post":{"description":"This endpoint requests options trading for an account.\nFollowing submission, an assigned administrator will review the request.\nUpon approval, the account's options_approved_level parameter will be modified, granting the account the ability to participate in options trading.\nNote: This endpoint is only available for partners who have been enabled for Options BETA.","operationId":"requestOptionsForAccount","parameters":[{"$ref":"#/components/parameters/AccountID"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptionsApprovalRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptionsApprovalResponse"}}},"description":"The request was submitted successfully."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The request body is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Client does not exist, you do not have access to the client, or \"client_secret\" is incorrect.\n"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The request body did not pass all validations."}},"summary":"Request options trading for an account (BETA)","tags":["Accounts"]}},"/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}/tokenization/callback/mint":{"post":{"description":"This endpoint is used by the issuer to confirm the minting of tokenized assets previously requested by the Authorized Participant.","operationId":"postTokenizationCallbackMint","parameters":[{"$ref":"#/components/parameters/AccountID"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenizationMintCallback"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenizationRequest"}}},"description":"Successfully confirmed minting of a tokenized asset."},"400":{"content":{"application/json":{"example":{"code":40010000,"message":"failed to decode request body"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad request (e.g. failed to decode request body)."},"401":{"content":{"application/json":{"example":{"code":40110000,"message":"unauthorized"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication credentials are missing or invalid."},"403":{"content":{"application/json":{"example":{"code":40310000,"message":"forbidden"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Caller is not authorized to perform this operation."},"422":{"content":{"application/json":{"example":{"code":40010001,"message":"tokenization_request_id is required, tx_hash is required"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"One or more request parameters are missing or invalid."}},"summary":"Confirm Tokenized Asset Minted","tags":["Tokenization"]}},"/v1/accounts/{account_id}/tokenization/callback/redeem":{"post":{"description":"This endpoint is used by the tokenized asset issuer to confirm the redemption of tokens previously held in the Authorized Participant's wallet. When the issuer invokes this endpoint, Alpaca will  initiate a journal of the underlying asset into the Authorized Participant's account.","operationId":"postTokenizationRedeem","parameters":[{"$ref":"#/components/parameters/AccountID"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenizationRedeemRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenizationRedeemResponse"}}},"description":"Successfully requested redemption of a tokenized asset."},"400":{"content":{"application/json":{"example":{"code":40010000,"message":"failed to decode request body"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad request (e.g. malformed input, insufficient quantity, or account not authorized to redeem)."},"401":{"content":{"application/json":{"example":{"code":40110000,"message":"unauthorized"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication credentials are missing or invalid."},"403":{"content":{"application/json":{"example":{"code":40310000,"message":"forbidden"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Caller is not authorized to perform this operation."},"422":{"content":{"application/json":{"example":{"code":40010001,"message":"issuer_request_id is required, tx_hash is required"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"One or more request parameters are missing or invalid."}},"summary":"Redeem a Tokenized Asset","tags":["Tokenization"]}},"/v1/accounts/{account_id}/tokenization/mint":{"post":{"description":"This endpoint is used by an Authorized Participant to request the minting of a tokenized asset. Alpaca will initiate a journal of the underlying asset from the Authorized Participant's account to the issuer's account.","operationId":"postTokenizationMintBroker","parameters":[{"$ref":"#/components/parameters/AccountID"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenizationMintRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenizationMintResponse"}}},"description":"Successfully requested minting of a tokenized asset."},"400":{"content":{"application/json":{"example":{"code":40010000,"message":"failed to decode request body"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad request (e.g. malformed input, insufficient position, or account not authorized to mint)."},"401":{"content":{"application/json":{"example":{"code":40110000,"message":"unauthorized"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication credentials are missing or invalid."},"403":{"content":{"application/json":{"example":{"code":40310000,"message":"forbidden"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Caller is not authorized to perform this operation."},"422":{"content":{"application/json":{"example":{"code":40010001,"message":"issuer is required, network is required"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"One or more request parameters are missing or invalid."}},"summary":"Mint a Tokenized Asset","tags":["Tokenization"]}},"/v1/accounts/{account_id}/tokenization/requests":{"get":{"description":"Retrieve tokenization requests for the account. This endpoint may be used by the tokenized asset issuer or by an Authorized Participant (AP). The list can contain both mint and redeem requests.","operationId":"getTokenizationRequestsBroker","parameters":[{"$ref":"#/components/parameters/AccountID"},{"description":"Tokenization request type to be queried","in":"query","name":"type","schema":{"enum":["mint","redeem"],"type":"string"}},{"description":"Tokenization request status to be queried","in":"query","name":"status","schema":{"enum":["pending","rejected","completed"],"type":"string"}},{"description":"Underlying symbol of the tokenization requests to be queried","in":"query","name":"underlying_symbol","schema":{"type":"string"}},{"description":"Issuer of the tokenization requests to be queried","in":"query","name":"issuer","schema":{"$ref":"#/components/schemas/TokenizationIssuer"}},{"description":"Network of the tokenization requests to be queried","in":"query","name":"network","schema":{"$ref":"#/components/schemas/TokenizationNetwork"}},{"description":"The response will include only requests created after this timestamp (exclusive)","in":"query","name":"after","schema":{"example":"2025-09-30T18:38:01.942282Z","format":"date-time","type":"string"}},{"description":"The response will include only requests created before this timestamp (exclusive)","in":"query","name":"before","schema":{"example":"2025-09-30T18:38:01.942282Z","format":"date-time","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TokenizationRequest"},"type":"array"}}},"description":"Successful response\n\nA list of tokenization requests"},"401":{"content":{"application/json":{"example":{"code":40110000,"message":"unauthorized"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authentication credentials are missing or invalid."},"403":{"content":{"application/json":{"example":{"code":40310000,"message":"forbidden"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Caller is not authorized to perform this operation."},"422":{"content":{"application/json":{"example":{"code":40010001,"message":"failed to parse after"},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"One or more request parameters are missing or invalid."}},"summary":"List Tokenization Requests","tags":["Tokenization"]}},"/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":"ach","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":"ach","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":"Create a new transfer to deposit money into or withdraw money from an account.\n\nTwo `transfer_type` values are accepted, and both are available in sandbox and production:\n\n- **`ach`** — supports both `INCOMING` (deposit) and `OUTGOING` (withdrawal) directions. A `relationship_id` from a previously created [ACH Relationship](https://docs.alpaca.markets/reference/createachrelationshipforaccount) is required.\n- **`wire`** — supports the `OUTGOING` (withdrawal) direction only. Incoming wires cannot be initiated through this endpoint; they are pushed in by the sending bank and recorded automatically. A `bank_id` from a previously created [Bank Relationship](https://docs.alpaca.markets/reference/createrecipientbank) is required, and the bank must be in `APPROVED` status before the transfer will progress past `QUEUED`.\n\nIn the sandbox environment, ACH deposits and withdrawals settle instantly against virtual funds. Outgoing wire withdrawals are accepted and simulated end-to-end — no funds are transmitted to a bank, but the transfer progresses to `COMPLETE` and the account is debited against virtual funds. Sandbox wire withdrawals are asynchronous (not instant) and auto-complete on weekdays only; transfers submitted on a weekend will not progress until Monday. For more on funding accounts in sandbox, see [this tutorial](https://alpaca.markets/learn/fund-broker-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/{account_id}/wallets":{"get":{"description":"Lists wallets for the account given in the path parameter. If an asset is specified and no wallet for the account and asset pair exists one will be created. If no asset is specified only existing wallets will be listed for the account. An account may have at most one wallet per asset.","operationId":"listCryptoFundingWallets","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CryptoWallet"}}},"description":"A single wallet object if an asset is specified or an array of wallet objects if no asset is specified"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"error"}},"summary":"Retrieve Crypto Funding Wallets","tags":["Crypto Funding"]},"parameters":[{"$ref":"#/components/parameters/AccountID"},{"in":"query","name":"asset","schema":{"type":"string"}},{"description":"Optional chain identifier. Use to request wallets for a specific chain when asset is a multi-chain crypto asset. If not specified, network is considered.","in":"query","name":"chain","schema":{"enum":["SOL","ETH","BTC","XRP","ARB"],"type":"string"}},{"description":"Deprecated. Use chain instead. Optional network identifier which is used to request wallets for a specific network when asset is a multi-chain crypto asset. When both 'chain' and 'network' are specified, 'chain' will take precedence and 'network' will be ignored. If 'chain' and 'network' are not specified, the default 'network' (ethereum) will be used.","in":"query","name":"network","schema":{"deprecated":true,"enum":["ethereum","solana"],"type":"string"}}]},"/v1/accounts/{account_id}/wallets/transfers":{"get":{"description":"Returns an array of all transfers associated with the given account across all wallets.","operationId":"listCryptoFundingTransfers","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CryptoTransfer"}}},"description":"An array of transfer objects"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"error"}},"summary":"Retrieve Crypto Funding Transfers","tags":["Crypto Funding"]},"parameters":[{"$ref":"#/components/parameters/AccountID"}],"post":{"description":"Creates a withdrawal request. Note that outgoing withdrawals must be sent to a whitelisted address and you must whitelist addresses at least 24 hours in advance. If you attempt to withdraw funds to a non-whitelisted address then the transfer will be rejected.","operationId":"createCryptoTransferForAccount","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCryptoTransferRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CryptoTransfer"}}},"description":"Successfully requested a transfer."}},"summary":"Request a New Withdrawal","tags":["Crypto Funding"]}},"/v1/accounts/{account_id}/wallets/transfers/{transfer_id}":{"get":{"description":"Returns a specific wallet transfer by passing into the query the transfer_id.","operationId":"getCryptoFundingTransfer","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CryptoTransfer"}}},"description":"A single crypto transfer object"}},"summary":"Retrieve a Crypto Funding Transfer","tags":["Crypto Funding"]},"parameters":[{"$ref":"#/components/parameters/AccountID"},{"description":"The crypto transfer to retrieve","in":"path","name":"transfer_id","required":true,"schema":{"type":"string"}}]},"/v1/accounts/{account_id}/wallets/whitelists":{"get":{"description":"Returns the list of whitelisted withdrawal addresses for the specified account.","operationId":"listWhitelistedAddress","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelistedAddress"}}},"description":"An array of whitelisted objects"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"error"}},"summary":"An array of whitelisted addresses","tags":["Crypto Funding"]},"parameters":[{"$ref":"#/components/parameters/AccountID"}],"post":{"description":"Submits a new whitelisted withdrawal address for the specified account. The chain is derived from the supplied asset symbol and address, and the same address cannot be whitelisted twice on the same chain.\n\nWhere travel rule reporting applies to the account, address details are validated against the travel rule provider before being persisted.\n\nNote that whitelisted addresses must wait at least 24 hours before they can be used as a withdrawal destination.","operationId":"createWhitelistedAddress","requestBody":{"content":{"application/json":{"schema":{"properties":{"address":{"description":"The address to be whitelisted","type":"string"},"asset":{"description":"Symbol of underlying asset for the whitelisted address","type":"string"},"chain":{"description":"Optional chain identifier. Use when the underlying asset for the whitelisted address is a multi-chain crypto asset.","enum":["SOL","ETH","BTC","XRP","ARB"],"type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelistedAddress"}}},"description":"Successfully requested a whitelisted address"}},"summary":"Request a new whitelisted address","tags":["Crypto Funding"]}},"/v1/accounts/{account_id}/wallets/whitelists/{whitelisted_address_id}":{"delete":{"description":"Deletes a whitelisted withdrawal address from the specified account by ID. Subsequent withdrawals targeting the deleted address will be rejected.","operationId":"deleteWhitelistedAddress","responses":{"200":{"description":"Successfully deleted a whitelisted address"}},"summary":"Delete a whitelisted address","tags":["Crypto Funding"]},"parameters":[{"$ref":"#/components/parameters/AccountID"},{"description":"The whitelisted address to delete","in":"path","name":"whitelisted_address_id","required":true,"schema":{"type":"string"}}]},"/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/accounts/ira_excess_contributions":{"get":{"description":"Returns all overcontributed IRA accounts","operationId":"listIRAExcessContritbutions","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/OvercontributedIRAAccount"},"type":"array"}}},"description":"list of overcontributed IRA accounts"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"error"}},"summary":"Retrieve Excess Contributions","tags":["IRA"]}},"/v1/accounts/options/approvals":{"get":{"description":"This endpoint retrieves options trading level approval requests. Query parameters can be specified to filter the results. If multiple query parameters are specified, the results will be filtered to include only those that match all of the specified parameters. Each query parameter can only be specified once.","operationId":"requestListOptionsApprovals","parameters":[{"description":"Only return results for the specified account.","in":"query","name":"account_id","schema":{"example":"c8f1ef5d-edc0-4f23-9ee4-378f19cb92a4","format":"uuid","type":"string"}},{"in":"query","name":"requested_level","schema":{"description":"Only return requests with the specified requested 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"}},{"in":"query","name":"approved_level","schema":{"description":"Only return requests with the specified approved 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"}},{"description":"Only return requests with the specified approval request status.","in":"query","name":"status","schema":{"$ref":"#/components/schemas/OptionsApprovalStatus"}},{"description":"The maximum number of results to return. The default (and maximum value) is 1000.","in":"query","name":"page_size","schema":{"default":1000,"maximum":1000,"minimum":1,"type":"integer"}},{"$ref":"#/components/parameters/PageToken"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptionsApprovalsList"}}},"description":"The request was submitted successfully."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The request body is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Client does not exist, you do not have access to the client, or \"client_secret\" is incorrect.\n"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The correspondent entity does not have access to options approvals or the account does not exist.\n"}},"summary":"Retrieve options level approval requests (BETA)","tags":["Accounts"]}},"/v1/accounts/positions":{"get":{"deprecated":true,"description":"Retrieves a list of the account's open positions.\nThis endpoint is deprecated and will be removed in the future. Please use the [GET /v1/reporting/eod/positions endpoint](https://docs.alpaca.markets/reference/get-v1-reporting-eod-positions) instead.\n","operationId":"get-v1-accounts-positions","parameters":[{"description":"The number of the page of the results to be fetched.","in":"query","name":"page","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"examples":{"Example 1":{"value":{"as_of":"2022-08-04T16:00:00-04:00","positions":{"000c8a47-7487-430b-94e1-e628a71cd123":[{"asset_class":"us_equity","asset_id":"b0b6dd9d-8b9b-48a9-ba46-b9d54906e415","asset_marginable":true,"avg_entry_price":"172.34","change_today":"0","cost_basis":"13.63999992516","current_price":"166.13","exchange":"NASDAQ","lastday_price":"166.13","market_value":"13.14850404762","qty":"0.079145874","qty_available":"0.079145874","side":"long","symbol":"AAPL","unrealized_intraday_pl":"0","unrealized_intraday_plpc":"0","unrealized_pl":"-0.49149587754","unrealized_plpc":"-0.0360334223047464"}]}}}},"schema":{"properties":{"as_of":{"format":"date-time","type":"string"},"positions":{"type":"object"}},"type":"object"}}},"description":"The response contains two fields:\n\nasof: the timestamp for which the positions are returned. It is always the last market close\n\npositions: an account-id to position list map, contains the requested page's accounts\nThe positions map is empty for the last page.\n\nNote: when fetching bulk positions, which can take multiple minutes depending on the number of accounts managed have, a market close can happen, and after that a new set of results might be returned. To make sure results are consistent, please always check that the as_of field didn't change during the whole fetching process."}},"summary":"Bulk Fetch All Accounts Positions","tags":["Trading"]}},"/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/assets/entry-requirements":{"get":{"description":"Returns all entry-requirements","operationId":"get-asset-entry-requirements","parameters":[{"description":"Comma-separated symbols or asset ids. The symbols (or asset ids) for which asset entry requirements are to be requested. Maximum number of symbols allowed is 500.","example":"AAPL,SPY","in":"query","name":"symbols","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AssetEntryRequirements"},"type":"array"}}},"description":"An array of asset entry requirement objects."}},"summary":"Retrieve Entry Requirements for requested assets","tags":["Assets"]}},"/v1/assets/fixed_income/us_corporates":{"get":{"description":"Serves the list of US corporates available at Alpaca. The response is sorted by ISIN.","operationId":"UsCorporates","parameters":[{"in":"query","name":"bond_status","schema":{"$ref":"#/components/schemas/bond_status"}},{"description":"A comma-separated list of ISINs with a limit of 1000.","example":"US912810UG12,US912797PM34","in":"query","name":"isins","schema":{"type":"string"}},{"description":"A comma-separated list of CUSIPs with a limit of 1000.","example":"912810UG1,912797PM3","in":"query","name":"cusips","schema":{"type":"string"}},{"description":"A comma-separated list of tickers with a limit of 1000.","example":"BAC,MSFT","in":"query","name":"tickers","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/us_corporates_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"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"summary":"Get US corporates","tags":["Assets"]}},"/v1/assets/fixed_income/us_treasuries":{"get":{"description":"Serves the list of US treasuries available at Alpaca. The response is sorted by ISIN.","operationId":"UsTreasuries","parameters":[{"in":"query","name":"subtype","schema":{"$ref":"#/components/schemas/treasury_subtype"}},{"in":"query","name":"bond_status","schema":{"$ref":"#/components/schemas/bond_status"}},{"description":"A comma-separated list of CUSIPs with a limit of 1000.","example":"912810UG1,912797PM3","in":"query","name":"cusips","schema":{"type":"string"}},{"description":"A comma-separated list of ISINs with a limit of 1000.","example":"US912810UG12,US912797PM34","in":"query","name":"isins","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/us_treasuries_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"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"summary":"Get US treasuries","tags":["Assets"]}},"/v1/calendar":{"get":{"description":"The calendar API serves the full list of market days from 1970 to 2029. It can also be queried by specifying a start and/or end time to narrow down the results. In addition to the dates, the response also contains the specific open and close times for the market days, taking into account early closures.\n","operationId":"LegacyCalendar","parameters":[{"$ref":"#/components/parameters/legacy_start"},{"$ref":"#/components/parameters/legacy_end"},{"$ref":"#/components/parameters/legacy_date_type"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/legacy_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 US Market Calendar","tags":["Calendar"]}},"/v1/cash_interest/apr_tiers":{"get":{"description":"List all available APR tiers. These tiers may be assigned to an account, and will be used to determine the interest rate paid on uninvested cash balances.","operationId":"get-v1-list-apr-tiers","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAPRTiersResponse"}}},"description":"Successful response, returns a list of APR tiers or none if no tiers are available."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized. Please check your API key and try again."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Please wait a moment and try again."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A server error occurred. Please contact Alpaca."}},"summary":"List APR Tiers","tags":["Cash Interest"]}},"/v1/clock":{"get":{"description":"The clock API serves the current market timestamp, whether or not the market is currently open, as well as the times of the next market open and close.\n","operationId":"LegacyClock","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/legacy_clock"}}},"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"}}},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"summary":"Get US Market Clock","tags":["Calendar"]}},"/v1/corporate_actions/announcements":{"get":{"deprecated":true,"description":"This endpoint is deprecated, please use [the new corporate actions endpoint](https://docs.alpaca.markets/reference/corporateactions-1) instead.","operationId":"getCorporateAnnouncements","parameters":[{"description":"A comma-delimited list of CorporateActionType values","in":"query","name":"ca_types","required":true,"schema":{"type":"string"}},{"description":"The start (inclusive) of the date range when searching corporate action announcements. This should follow the YYYY-MM-DD format. The date range is limited to 90 days.","in":"query","name":"since","required":true,"schema":{"format":"date","type":"string"}},{"description":"The end (inclusive) of the date range when searching corporate action announcements. This should follow the YYYY-MM-DD format. The date range is limited to 90 days.","in":"query","name":"until","required":true,"schema":{"format":"date","type":"string"}},{"description":"The symbol of the company initiating the announcement.","in":"query","name":"symbol","schema":{"type":"string"}},{"description":"The CUSIP of the company initiating the announcement.","in":"query","name":"cusip","schema":{"type":"string"}},{"description":"An emum of possible ways to use the `since` and `until` parameters to search by.\n\nthe types are:\n\n- **declaration_date**: The date of the preliminary announcement details or the date that any subsequent term updates took place.\n- **ex_date**: The date on which any security purchasing activity will not result in a corporate action entitlement. Any selling activity that takes place on or after this date will result in a corporate action entitlement.\n- **record_date**: The date the company checks its records to determine who is shareholder in order to allocate entitlements.\n- **payable_date**: The date that the stock and cash positions will update according to the account positions as of the record date.","in":"query","name":"date_type","schema":{"enum":["declaration_date","ex_date","record_date","payable_date"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Announcement"},"type":"array"}}},"description":"OK"},"400":{"$ref":"#/components/responses/BadRequest"}},"summary":"Retrieve Announcements","tags":["Corporate Actions"]}},"/v1/corporate_actions/announcements/{id}":{"get":{"deprecated":true,"description":"This endpoint is deprecated, please use [the new corporate actions endpoint](https://docs.alpaca.markets/reference/corporateactions-1) instead.","operationId":"get-GET-v1-corporate_actions-announcements-id","responses":{"200":{"description":"An Announcement object."},"400":{"description":"The body in the request is not valid"},"422":{"description":"Invalid input value."},"500":{"description":"A server error occurred. Please contact Alpaca."}},"summary":"Retrieve a Specific Announcement","tags":["Corporate Actions"]},"parameters":[{"description":"The id of the corporate action announcement to be returned.","in":"path","name":"id","required":true,"schema":{"type":"string"}}]},"/v1/country-info":{"get":{"description":"The Country Info API serves country information for every supported countries including risk ratings and supported crypto states where applicable.","operationId":"queryCountryInfos","responses":{"200":{"content":{"application/json":{"examples":{},"schema":{"$ref":"#/components/schemas/CountryInfos"}}},"description":"Returns the countries information as a map"}},"summary":"Retrieve countries information","tags":["Country Info"]}},"/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- 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/journals/status":{"get":{"description":"The Events API provides event push as well as historical queries via SSE (server sent events).\n\nYou can listen to journal status updates as they get processed by our backoffice.\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_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)\n\n---\n\nThere is no compatibility between /v1/events/journals/status and /v2/events/journals/status, the ids (ulid) are always different, and the number of events might also different\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\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":"subscribeToJournalStatusSSE","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":{"schema":{"items":{"$ref":"#/components/schemas/JournalStatusEvent"},"type":"array"}}},"description":"Connected. Events will now start streaming as long as you keep the connection open."}},"summary":"Subscribe to Journal Events (SSE) (Legacy)","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/events/trades":{"get":{"deprecated":true,"description":"**Deprecation notice**\n\nAs part of the deprecation process, the 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\nFor trade events of MLeg (multi-leg) order, please use the `/v2/events/trades` endpoint.\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\nThe 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_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)\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**Deprecation note**\n\nLegacy event id (integer based) is unavailable for new broker partners, and it will be deprecated for existing brokers as well.\nThis deprecation is includes the `since_id` and `until_id` query parameter and the `event_id` field in the response.\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- `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.","operationId":"subscribeToTradeSSE","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"}}],"responses":{"200":{"content":{"text/event-stream":{"schema":{"items":{"$ref":"#/components/schemas/TradeUpdateEvent"},"type":"array"}}},"description":"Connected. Events will now start streaming as long as you keep the connection open."},"410":{"description":"Deprecated. The endpoint is not available for this partner."}},"summary":"Subscribe to Trade Events (SSE) (Legacy)","tags":["Events"]}},"/v1/events/transfers/status":{"get":{"deprecated":true,"description":"**Deprecation notice**\n\nAs part of the deprecation process, the legacy transfer events API is now only available for existing broker-partners at `GET /v1/events/transfers/status` and for compatibility reasons.\n\nAll new broker partners will not have the option to use the legacy transfer events endpoint.\n\nThey should integrate with the new `/v2/events/funding/status` endpoint instead.\n\nAlso, all existing broker partners are now recommended to upgrade to the `/v2/events/funding/status` endpoint, which provides faster event delivery times.\n\n---\n\nThe Events API provides event push as well as historical queries via SSE (server sent events).\n\nYou can listen to transfer 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_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)\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":"subscribeToTransferStatusSSE","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"}}],"responses":{"200":{"content":{"text/event-stream":{"schema":{"items":{"$ref":"#/components/schemas/TransferStatusEvent"},"type":"array"}}},"description":"Connected. Events will now start streaming as long as you keep the connection open."},"410":{"description":"Deprecated. The endpoint is not available for this partner."}},"summary":"Subscribe to Transfer Events (SSE) (Legacy)","tags":["Events"]}},"/v1/fpsl/analytics/{account_id}/loans":{"get":{"description":"Returns aggregated FPSL interest and loan-activity counts for one account over a date range. Use this for \"earned so far this month\" customer UIs and for supervisory spot-checks against your internal accrual model.\n\nThe `{account_id}` path parameter accepts a account UUID (aggregation for that account).","operationId":"get-v1-fpsl-analytics-account-loans","parameters":[{"description":"The account identifier (account UUID).","in":"path","name":"account_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Filter loans after or on this start date (inclusive). Defaults to the first day of the current month, New York timezone.","in":"query","name":"start","required":false,"schema":{"format":"date","type":"string"}},{"description":"Filter loans before this end date (exclusive). Defaults to the day after the current date, New York timezone.","in":"query","name":"end","required":false,"schema":{"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FPSLAnalyticsLoansResponse"}}},"description":"Returns the aggregated FPSL loan analytics for the account."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FPSLError"}}},"description":"One of the request parameters is invalid. See the returned message for details."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FPSLError"}}},"description":"Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FPSLError"}}},"description":"User has no access to a resource."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FPSLError"}}},"description":"Internal server error. We recommend retrying these later. If the issue persists, please contact us on Slack or on the Community Forum."}},"summary":"Read FPSL Loans Analytics for an Account","tags":["FPSL Program"]}},"/v1/fpsl/loans":{"get":{"description":"Returns a list of all FPSL loans that match the specified filter criteria, ordered in ascending order by `date`, `account_number`, and `symbol`. Each entry represents a loan of a `symbol` on a given `date`, made on behalf of the specified `account_number`.","operationId":"get-v1-list-fpsl-loans","parameters":[{"description":"The account identifier","in":"query","name":"account_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"Filter loans after or on this start date.","in":"query","name":"start","required":false,"schema":{"format":"date","type":"string"}},{"description":"Filter loans before this end date.","in":"query","name":"end","required":false,"schema":{"format":"date","type":"string"}},{"description":"The pagination token used to continue retrieving results. This value is returned in certain responses when additional data is available, typically due to a response size limit.","in":"query","name":"page_token","required":false,"schema":{"type":"string"}},{"description":"The maximum number of data points to return in the response page.","in":"query","name":"limit","required":false,"schema":{"default":1000,"maximum":10000,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListFPSLLoansResponse"}}},"description":"Returns a list of FPSL loans for the account, or an empty list if no loans are found."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FPSLError"}}},"description":"One of the request parameters is invalid. See the returned message for details."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FPSLError"}}},"description":"Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FPSLError"}}},"description":"User has no access to a resource."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FPSLError"}}},"description":"Internal server error. We recommend retrying these later. If the issue persists, please contact us on Slack or on the Community Forum."}},"summary":"List FPSL Loans","tags":["FPSL Program"]}},"/v1/fpsl/tiers":{"get":{"description":"List all available FPSL tiers. These tiers may be assigned to an account.","operationId":"get-v1-list-fpsl-tiers","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/FPSLTier"},"type":"array"}}},"description":"Successful response, returns a list of FPSL tiers or none if no tiers are available."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized. Please check your API key and try again."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Please wait a moment and try again."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A server error occurred. Please contact Alpaca."}},"summary":"List FPSL Tiers","tags":["FPSL Program"]}},"/v1/instant_funding":{"get":{"description":"Returns a list of instant funding records based on the query parameters. The results are\npaginated, sorted, and filtered based on the parameters provided.","operationId":"get-v1-instant-funding-list","parameters":[{"description":"sort results based on created_at, amount, and deadline","in":"query","name":"sort_by","required":false,"schema":{"$ref":"#/components/schemas/ListSortBy"}},{"description":"Defines the ordering of sort_by query. Defaults to ASC when not specified.","in":"query","name":"sort_order","required":false,"schema":{"$ref":"#/components/schemas/SortOrder"}},{"description":"defines the number of results that will be returned from the request","in":"query","name":"limit","required":false,"schema":{"maximum":100,"minimum":1,"type":"integer"}},{"description":"defines the number of results that will be skipped before picking the results that will be returned","in":"query","name":"offset","required":false,"schema":{"minimum":1,"type":"integer"}},{"description":"filter transfers based on system date","in":"query","name":"system_date","required":false,"schema":{"format":"date","type":"string"}},{"description":"filter transfers based on settlement deadline","in":"query","name":"deadline","required":false,"schema":{"format":"date","type":"string"}},{"description":"filter transfers based on status","in":"query","name":"status","required":false,"schema":{"$ref":"#/components/schemas/InstantFundingStatus"}},{"description":"filter transfers based on the date of creation","in":"query","name":"before","required":false,"schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/InstantFunding"},"type":"array"}}},"description":"list of transfers"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"error"}},"summary":"Get Instant Funding List","tags":["Instant Funding"]},"post":{"description":"Creates an instant funding request. The request will be processed and the funds will be\nmade available to the account in the form of a Memopost non trade activity. Upon settlement\nthe Memoposted will be corrected to a CSD activity.\n\n**Idempotency**: When the `Idempotency-Key` header is supplied, this endpoint is\nidempotent. Multiple requests with the same key and identical request body will\ncreate only one transfer. A subsequent request returns the previously created\ntransfer with the same response (no duplicate is created). If the same key is used\nwith a different request body, the API returns `422 Unprocessable Entity`.\n\n**Recommended for production**: Always supply `Idempotency-Key` when creating\ntransfers. This allows safe retries on timeouts, network errors, or 5xx responses\nwithout risking duplicate transfers. Use a client-generated unique value (e.g. UUID).\n","operationId":"post-v1-instant-funding","parameters":[{"description":"Unique key for idempotent create. When supplied, duplicate requests (same key\nand body) return the original transfer instead of creating a new one. Use a\nclient-generated value (e.g. UUID) per logical transfer. Strongly recommended\nfor production to prevent duplicate transfers on retries.\n","in":"header","name":"Idempotency-Key","schema":{"maxLength":128,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateIFTransferRequest"}}},"description":"details of the instant funding request","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstantFunding"}}},"description":"Instant transfer request created."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unprocessable Entity. Returned when an idempotency key is reused with a different request body."},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response."}},"summary":"Create an instant funding request","tags":["Instant Funding"]}},"/v1/instant_funding/{instant_funding_id}":{"delete":{"description":"Cancels a single instant funding request based on the ID supplied if possible.","operationId":"delete-v1-instant-funding-single","parameters":[{"description":"UUID ID of the instant funding transfer to cancel","in":"path","name":"instant_funding_id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Successful response."},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response."}},"summary":"Cancel an instant funding request","tags":["Instant Funding"]},"get":{"description":"Returns an instant funding transfer based on the ID supplied.","operationId":"get-v1-instant-funding-single","parameters":[{"description":"ID of the instant funding transfer","in":"path","name":"instant_funding_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstantFunding"}}},"description":"Successful response."},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response."}},"summary":"Get an instant funding request","tags":["Instant Funding"]}},"/v1/instant_funding/limits":{"get":{"description":"Returns globally configured limits for the correspondent. These limits are used to determine\nthe maximum amount that can be extended to all accounts, and reaching this limit will result\nin further requests to create instant funding requests being rejected.","operationId":"get-v1-instant-funding-correspondent-limits","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CorrespondentLimit"}}},"description":"correspondent instant funding limits"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"error"}},"summary":"Get instant funding limits","tags":["Instant Funding"]}},"/v1/instant_funding/limits/accounts":{"get":{"description":"Returns the limits for individual partner accounts.","operationId":"get-v1-instant-funding-account-limits","parameters":[{"description":"Filter limits based on comma-separated account numbers","explode":false,"in":"query","name":"account_numbers","required":true,"schema":{"items":{"type":"string"},"type":"array"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AccountLimit"},"type":"array"}}},"description":"invidual broker account limits"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"error"}},"summary":"Get instant funding account limits","tags":["Instant Funding"]}},"/v1/instant_funding/reports":{"get":{"description":"Returns instant funding reports which are to be used for daily reconciliation reporting.","operationId":"get-v1-instant-funding-reports","parameters":[{"description":"The report type to be returned; 'summary' or 'detail', defaults to 'summary'","in":"query","name":"report_type","required":false,"schema":{"type":"string"}},{"description":"The system date to be used for the report. If not provided then the last system date will be used.\n","in":"query","name":"system_date","required":false,"schema":{"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ReportsResponse"},"type":"array"}}},"description":"Successful response."},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response."}},"summary":"Get instant funding report","tags":["Instant Funding"]}},"/v1/instant_funding/settlements":{"get":{"description":"Returns all settlements filtered by status if provided.","operationId":"get-v1-instant-funding-settlements","parameters":[{"description":"comma delimited list of statuses to use as a filter","in":"query","name":"statuses","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettlementsResponse"}}},"description":"Successful response."},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response."}},"summary":"List settlements","tags":["Instant Funding"]},"post":{"description":"Creates a new settlement, which will trigger the reconciliation process for all included\ntransfers and their interests. There is a limit of 50,000 transfers per settlement. If more\nthan 50,000 transfers need to be settled, they should be batched in multiple settlements.","operationId":"post-v1-instant-funding-settlements","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSettlementRequest"}}},"description":"details of the settlement request","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettlementResponse"}}},"description":"Settlement created."},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response."}},"summary":"Create a new settlement","tags":["Instant Funding"]}},"/v1/instant_funding/settlements/{settlement_id}":{"get":{"description":"Returns the settlement specified by the path parameter.","operationId":"get-v1-instant-funding-settlements-single","parameters":[{"description":"ID of the settlement","in":"path","name":"settlement_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettlementResponse"}}},"description":"Successful response."},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response."}},"summary":"Get a single settlement","tags":["Instant Funding"]}},"/v1/ipos":{"get":{"description":"Returns a paginated list of IPO offerings currently known to Alpaca.\n\nUse this endpoint to power IPO discovery surfaces (e.g. an \"Upcoming IPOs\" list). Real-time lifecycle changes (availability, prospectus, 60-minute mail, allocations, cancellations) are pushed over the [IPO Events Stream](#operation/subscribeToIPOEventsSSE).\n","operationId":"listIPOOfferings","parameters":[{"description":"Filter by offering availability.\n- `available` - accepting new orders.\n- `not_available` - not yet open for orders.\n- `closed` - no longer accepting orders.\n","in":"query","name":"availability","schema":{"enum":["available","not_available","closed"],"type":"string"}},{"description":"Filter by ticker symbol (case-insensitive exact match).","example":"EXMP","in":"query","name":"ticker","schema":{"type":"string"}},{"description":"Maximum number of offerings to return per page. Capped at `200`.","in":"query","name":"limit","schema":{"default":50,"maximum":200,"minimum":1,"type":"integer"}},{"description":"Opaque cursor returned in the previous response's `next_page_token` field. Pass it back to fetch the next page.","in":"query","name":"page_token","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/IPOOfferingListExample"}},"schema":{"$ref":"#/components/schemas/IPOOfferingListResponse"}}},"description":"A page of IPO offerings."}},"summary":"List IPO Offerings","tags":["IPO"]}},"/v1/ipos/{offering_reference}":{"get":{"description":"Returns a single IPO offering by `offering_reference`.\n\nThe `offering_reference` value matches the one delivered on the [IPO Events Stream](#operation/subscribeToIPOEventsSSE).\n","operationId":"getIPOOffering","responses":{"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/IPOOfferingGetExample"}},"schema":{"$ref":"#/components/schemas/IPOOfferingResponse"}}},"description":"The requested IPO offering."},"404":{"description":"No IPO offering exists for the given `offering_reference`."}},"summary":"Retrieve an IPO Offering","tags":["IPO"]},"parameters":[{"description":"The unique offering identifier (also referred to as `ipo_reference` in the response body).","example":"FI111225","in":"path","name":"offering_reference","required":true,"schema":{"type":"string"}}]},"/v1/jit/settlements":{"get":{"description":"Returns all JIT settlements filtered by status if provided.","operationId":"get-v1-jit-settlements","parameters":[{"description":"comma delimited list of statuses to use as a filter","in":"query","name":"statuses","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettlementsResponse"}}},"description":"Successful response."},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response."}},"summary":"List all JIT Settlements","tags":["Funding"]},"post":{"description":"Creates a new JIT settlement, which will trigger the reconciliation process for all included accounts.\n","operationId":"post-v1-jit-settlements","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateJITSettlementRequest"}}},"description":"details of the JIT settlement request","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettlementResponse"}}},"description":"Settlement created."},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response."}},"summary":"Create a new JIT settlement","tags":["Funding"]}},"/v1/jit/settlements/{settlement_id}":{"get":{"description":"Returns the JIT settlement specified by the path parameter.","operationId":"get-v1-jit-settlements-single","parameters":[{"description":"ID of the JIT settlement","in":"path","name":"settlement_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettlementResponse"}}},"description":"Successful response."},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response."}},"summary":"Get a single JIT settlement","tags":["Funding"]}},"/v1/journals":{"get":{"description":"Returns an array of journal objects.","operationId":"getAllJournals","parameters":[{"description":"By journal creation date. Format: 2020-01-01","in":"query","name":"after","schema":{"format":"date","type":"string"}},{"description":"By journal creation date. Format: 2020-01-01","in":"query","name":"before","schema":{"format":"date","type":"string"}},{"description":"See the JournalStatus model for more info","in":"query","name":"status","schema":{"$ref":"#/components/schemas/JournalStatus"}},{"description":"JNLC or JNLS","in":"query","name":"entry_type","schema":{"enum":["JNLC","JNLS"],"type":"string"}},{"description":"The account id that received the journal","in":"query","name":"to_account","schema":{"format":"uuid","type":"string"}},{"description":"The account id that initiated the journal","in":"query","name":"from_account","schema":{"format":"uuid","type":"string"}},{"description":"The maximum number of results to return","in":"query","name":"limit","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Journal"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"type":"string"}}},"description":"One of the parameters is invalid."},"422":{"content":{"application/json":{"schema":{"type":"string"}}},"description":"Result set exceeds 100,000 records."}},"summary":"Retrieve a List Journals","tags":["Journals"]},"post":{"description":"A journal can be JNLC (move cash) or JNLS (move shares), dictated by `entry_type`. Generally, journal requests are subject to approval and starts from the `pending` status. The status changes are propagated through the Event API. Under certain conditions agreed for the partner, such journal transactions that meet the criteria are executed right away.\n\n**Idempotency**: When the `Idempotency-Key` header is supplied, this endpoint is\nidempotent. Multiple requests with the same key and identical request body will\ncreate only one journal. A subsequent request returns the previously created\njournal with the same response (no duplicate is created). If the same key is used\nwith a different request body, the API returns `422 Unprocessable Entity`.\n\n**Recommended for production**: Always supply `Idempotency-Key` when creating\njournals. This allows safe retries on timeouts, network errors, or 5xx responses\nwithout risking duplicate journals. Use a client-generated unique value (e.g. UUID).\n","operationId":"createJournal","parameters":[{"description":"Unique key for idempotent create. When supplied, duplicate requests (same key\nand body) return the original journal instead of creating a new one. Use a\nclient-generated value (e.g. UUID) per logical journal. Strongly recommended\nfor production to prevent duplicate journals on retries.\n","in":"header","name":"Idempotency-Key","schema":{"maxLength":128,"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"amount":"115.5","entry_type":"JNLC","from_account":"7c891489-574f-4f9a-82f0-4082a07f4736","to_account":"2d47a229-0c25-40a2-8cc7-b2c8821ff93a"},"schema":{"$ref":"#/components/schemas/CreateJournalRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Journal"}}},"description":"The New Journal object"},"400":{"content":{"application/json":{"schema":{"type":"string"}}},"description":"One of the parameters is invalid."},"403":{"content":{"application/json":{"schema":{"type":"string"}}},"description":"The amount requested to move is not available."},"404":{"content":{"application/json":{"schema":{"type":"string"}}},"description":"One of the account is not found."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unprocessable Entity. Returned when an idempotency key is reused with a different request body."}},"summary":"Create a Journal","tags":["Journals"]}},"/v1/journals/{journal_id}":{"delete":{"description":"You can only delete a journal if the journal is still in a pending state, if a journal is executed you will not be able to delete. The alternative is to create a mirror journal entry to reverse the flow of funds.","operationId":"deleteJournalById","responses":{"204":{"description":"The cancel request succeeded. (No-content)\n"},"404":{"description":"The journal is not found.\n"},"422":{"description":"The journal is not in the pending status.\n"}},"summary":"Cancel a Pending Journal","tags":["Journals"]},"get":{"description":"You can query a specific journal entry that you submitted to Alpaca by passing into the query the journal_id.\n\nWill return a journal entry if a journal entry with journal_id exists, otherwise will throw an error.","operationId":"get-v1-journals-journal_id","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Journal"}}},"description":"OK"}},"summary":"Retrieve a Single Journal Entry","tags":["Journals"]},"parameters":[{"in":"path","name":"journal_id","required":true,"schema":{"format":"uuid","type":"string"}}]},"/v1/journals/batch":{"post":{"description":"You can create a batch of journal requests by using this endpoint. This is enabled on JNLC type Journals for now only.\n\nEvery single request must be valid for the entire batch operation to succeed.\n\nIn the case of a successful request, the response will contain an array of journal objects with an extra attribute error_message in the case when a specific account fails to receive a journal.\n\n**Idempotency**: When the `Idempotency-Key` header is supplied, this endpoint is\nidempotent. Multiple requests with the same key and identical request body will\ncreate only one batch. A subsequent request returns the previously created\nbatch with the same response (no duplicate is created). If the same key is used\nwith a different request body, the API returns `422 Unprocessable Entity`.\n\n**Recommended for production**: Always supply `Idempotency-Key` when creating\njournal batches. This allows safe retries on timeouts, network errors, or 5xx responses\nwithout risking duplicate batches. Use a client-generated unique value (e.g. UUID).","operationId":"createBatchJournal","parameters":[{"description":"The unique key for idempotent create. When supplied, duplicate requests (same key\nand body) return the original journal batch instead of creating a new one. Use a\nclient-generated value (e.g. UUID) per logical batch. Strongly recommended\nfor production to prevent duplicate journal batches on retries.\n","in":"header","name":"Idempotency-Key","schema":{"maxLength":128,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchJournalRequest"}}},"description":"","required":true},"responses":{"200":{"content":{"application/json":{"examples":{},"schema":{"items":{"$ref":"#/components/schemas/BatchJournalResponse"},"type":"array"}}},"description":"an array of journal objects with an extra attribute error_message in the case when a specific account fails to receive a journal."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unprocessable Entity. Returned when an idempotency key is reused with a different request body."}},"summary":"Create a Batch Journal Transaction (One-to-Many)","tags":["Journals"]}},"/v1/journals/reverse_batch":{"post":{"description":"You can also create a batch journal request by using the following endpoint. This is enabled on JNLC for now only.\n\nNote that if there is an invalid account_id the whole batch operation will be canceled.\nEvery single request must be valid for the entire batch operation to succeed.\n\nIn the case of a successful request, the response will contain an array of journal objects with an extra attribute error_message in the case when a specific account fails to submit a journal.","operationId":"post-v1-journals-reverse_batch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReverseBatchJournalRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/BatchJournalResponse"},"type":"array"}}},"description":"OK"},"400":{"description":"Invalid Request Body"},"403":{"description":"Insufficient Balance (JNLC) or Insufficient Assets (JNLS)"},"404":{"description":"Account not found"}},"summary":"Create a Reverse Batch Journal Transaction (Many-to-One)","tags":["Journals"]}},"/v1/oauth/authorize":{"post":{"description":"The operation issues an OAuth code which can be used in the OAuth code flow.\n","operationId":"authorizeOAuthToken","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthTokenRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthorizeOAuthTokenResponse"}}},"description":"Successfully issued a code."},"401":{"content":{"application/json":{"schema":{"type":"string"}}},"description":"Client does not exist, you do not have access to the client, or \"client_secret\" is incorrect.\n"},"422":{"content":{"application/json":{"schema":{"type":"string"}}},"description":"Redirect URI or scope is invalid.\n"}},"summary":"Authorize an OAuth Token","tags":["OAuth"]}},"/v1/oauth/clients/{client_id}":{"get":{"description":"The endpoint returns the details of OAuth client to display in the authorization page.\n","operationId":"getOAuthClient","parameters":[{"description":"code or token","in":"query","name":"response_type","schema":{"enum":["code","token"],"example":"token","type":"string"}},{"description":"Redirect URI of the OAuth flow","in":"query","name":"redirect_uri","schema":{"example":"https://example.com/authorize","type":"string"}},{"description":"Requested scopes by the OAuth flow","in":"query","name":"scope","schema":{"example":"general","type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"example-1":{"value":{"client_id":"7a3c52a910e1dc2abbb14da2b6b8e711","description":"Sample description","live_trading_approved":false,"name":"TradingApp","privacy_policy":"","redirect_uri":["http://localhost"],"status":"ACTIVE","terms_of_use":"","url":"http://test.com"}}},"schema":{"$ref":"#/components/schemas/OathClientResponse"}}},"description":"Success."},"401":{"content":{"application/json":{"schema":{"type":"string"}}},"description":"Client does not exist or you do not have access to the client.\n"}},"summary":"Get an OAuth client","tags":["OAuth"]},"parameters":[{"in":"path","name":"client_id","required":true,"schema":{"format":"uuid","type":"string"}}]},"/v1/oauth/token":{"post":{"description":"The operation issues an OAuth code which can be used in the OAuth code flow.\n","operationId":"issueOAuthToken","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthTokenRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"example-1":{"value":{"access_token":"87586f14-c3f4-4912-b107-f75bc17ff87a","scope":"general","token_type":"Bearer"}}},"schema":{"$ref":"#/components/schemas/IssueOAuthTokenResponse"}}},"description":"Success."},"401":{"content":{"application/json":{"schema":{"type":"string"}}},"description":"Client does not exist, you do not have access to the client, or \"client_secret\" is incorrect.\n"},"422":{"content":{"application/json":{"schema":{"type":"string"}}},"description":"Redirect URI or scope is invalid.\n"}},"summary":"Issue an OAuth token","tags":["OAuth"]}},"/v1/options/contracts":{"get":{"description":"This endpoint allows you to retrieve a list of option contracts based on various filtering criteria.\nBy default only active contracts that expire before the upcoming weekend are returned.\n","operationId":"get-options-contracts","parameters":[{"description":"Filter contracts by one or more underlying symbols.","example":"AAPL,SPY","in":"query","name":"underlying_symbols","schema":{"type":"string"}},{"description":"Include deliverables array in the response.","example":true,"in":"query","name":"show_deliverables","schema":{"type":"boolean"}},{"description":"Filter contracts by status (active/inactive). By default only active contracts are returned.","example":"active","in":"query","name":"status","schema":{"enum":["active","inactive"],"type":"string"}},{"description":"Filter contracts by the exact expiration date (format: YYYY-MM-DD). If no expiration date filters (`expiration_date`, `expiration_date_gte`, or `expiration_date_lte`) are provided, the endpoint defaults to returning contracts with expiration dates on or before the upcoming weekend.","example":"2025-06-20","in":"query","name":"expiration_date","schema":{"format":"date","type":"string"}},{"description":"Filter contracts with expiration date greater than or equal to the specified date.","example":"2025-06-20","in":"query","name":"expiration_date_gte","schema":{"format":"date","type":"string"}},{"description":"Filter contracts with expiration date less than or equal to the specified date. By default this is set to the next weekend.","example":"2025-06-20","in":"query","name":"expiration_date_lte","schema":{"format":"date","type":"string"}},{"description":"Filter contracts by the root symbol.","example":"AAPL","in":"query","name":"root_symbol","schema":{"type":"string"}},{"description":"Filter contracts by the type (call/put).","example":"call","in":"query","name":"type","schema":{"enum":["call","put"],"type":"string"}},{"description":"Filter contracts by the style (american/european).","example":"american","in":"query","name":"style","schema":{"enum":["american","european"],"type":"string"}},{"description":"Filter contracts with strike price greater than or equal to the specified value.","example":50,"in":"query","name":"strike_price_gte","schema":{"type":"number"}},{"description":"Filter contracts with strike price less than or equal to the specified value.","example":100,"in":"query","name":"strike_price_lte","schema":{"type":"number"}},{"$ref":"#/components/parameters/PageToken"},{"description":"The number of contracts to limit per page (default=100, max=10000).","example":100,"in":"query","name":"limit","schema":{"type":"integer"}},{"description":"The ppind(Penny Program Indicator) field indicates whether an option contract is eligible for penny price increments,\nwith `true` meaning it is part of the Penny Program and `false` meaning it is not.","example":true,"in":"query","name":"ppind","schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"next_page_token":{"$ref":"#/components/schemas/NextPageToken"},"option_contracts":{"items":{"$ref":"#/components/schemas/OptionContract"},"type":"array"}},"required":["option_contracts"],"type":"object"}}},"description":"Successful Response."}},"summary":"Get Option Contracts (BETA)","tags":["Assets"]}},"/v1/options/contracts/{symbol_or_id}":{"get":{"description":"Get an option contract by symbol or contract ID. The symbol or id should be passed in as a path parameter.","operationId":"get-option-contract-symbol_or_id","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptionContract"}}},"description":"An option contract"},"404":{"content":{"application/json":{"examples":{"Contract Not Found":{"value":{"code":40410000,"message":"option contract TSLA231110C00021000 not found"}}},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not Found"}},"summary":"Get an option contract by ID or Symbol (BETA)","tags":["Assets"]},"parameters":[{"description":"The contract symbol or ID.","in":"path","name":"symbol_or_id","required":true,"schema":{"type":"string"}}]},"/v1/rebalancing/portfolios":{"get":{"description":"Lists portfolios.\n\nWhen more than one query parameter is passed, only portfolios meeting all provided values will be returned (logical AND between parameter values).","operationId":"get-v1-rebalancing-portfolios","parameters":[{"description":"Name of portfolio","in":"query","name":"name","schema":{"type":"string"}},{"description":"Description of portfolio","in":"query","name":"description","schema":{"type":"string"}},{"description":"Symbol included in portfolio","in":"query","name":"symbol","schema":{"type":"string"}},{"description":"Portfolio ID","in":"query","name":"portfolio_id","schema":{"type":"string"}},{"description":"Portfolio Status","in":"query","name":"status","schema":{"enum":["active","inactive","needs_adjustment"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Portfolio"},"type":"array"}}},"description":"Array of Portfolios"}},"summary":"List Portfolios","tags":["Rebalancing"]},"post":{"description":"Creates a portfolio allocation containing securities and/or cash. Having no rebalancing conditions is allowed but the rebalance event would need to be triggered manually. Portfolios created with API may have multiple rebalance_conditions, but only one of type calendar.","operationId":"post-v1-rebalancing-portfolios","requestBody":{"content":{"application/json":{"schema":{"properties":{"cooldown_days":{"description":"Count of calendar days following a rebalance before a subscription is eligible to trigger another rebalance","type":"integer"},"description":{"description":"Text to describe portfolio","type":"string"},"name":{"description":"Name of portfolio","type":"string"},"rebalance_conditions":{"description":"Rebalancing conditions for portfolio","items":{"$ref":"#/components/schemas/RebalancingConditions"},"type":"array"},"weights":{"description":"Weight configuration to portfolio. Sum of \"percent\" values in the weights array must be 100.00","items":{"$ref":"#/components/schemas/PortfolioWeights"},"type":"array"}},"type":"object"}}},"description":""},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Portfolio"}}},"description":"OK"}},"summary":"Create Portfolio","tags":["Rebalancing"]}},"/v1/rebalancing/portfolios/{portfolio_id}":{"delete":{"description":"Sets a portfolio to \"inactive\", so it can be filtered out of the list request. Only permitted if there are no active subscriptions to this portfolio and this portfolio is not a listed in the weights of any active portfolios.\n\nInactive portfolios cannot be linked in new subscriptions or added as weights to new portfolios.","operationId":"delete-v1-rebalancing-portfolios-portfolio_id","responses":{"204":{"description":"No Content"},"400":{"description":"Bad Request"},"422":{"description":"Unprocessable Entity "}},"summary":"Inactivate Portfolio By ID","tags":["Rebalancing"]},"get":{"description":"Get a portfolio by its ID.","operationId":"get-v1-rebalancing-portfolios-portfolio_id","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Portfolio"}}},"description":"OK"}},"summary":"Get Portfolio by ID","tags":["Rebalancing"]},"parameters":[{"description":"The Portfolio ID","in":"path","name":"portfolio_id","required":true,"schema":{"type":"string"}}],"patch":{"description":"Updates a portfolio. If weights or conditions are changed, all subscribed accounts will be evaluated for rebalancing at the next opportunity (normal market hours). If a cooldown is active on the portfolio, the rebalancing will occur after the cooldown expired.","operationId":"patch-v1-rebalancing-portfolios-portfolio_id","requestBody":{"content":{"application/json":{"schema":{"properties":{"cooldown_days":{"description":"Used to update portfolio cooldown days.","type":"integer"},"description":{"description":"Used to update portfolio description.","type":"string"},"name":{"description":"Used to update portfolio name.","type":"string"},"rebalancing_conditions":{"description":"Used to update portfolio conditions.","items":{"$ref":"#/components/schemas/RebalancingConditions"},"type":"array"},"weights":{"description":"Used to update portfolio weights.","items":{"$ref":"#/components/schemas/PortfolioWeights"},"type":"array"}},"required":["cooldown_days"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Portfolio"}}},"description":"The updated portfolio"}},"summary":"Update Portfolio by ID","tags":["Rebalancing"]}},"/v1/rebalancing/runs":{"get":{"description":"Lists runs.","operationId":"get-v1-rebalancing-runs","parameters":[{"description":"Any runs for this account_id will be returned","in":"query","name":"account_id","schema":{"type":"string"}},{"description":"Status of portfolio run to filter by","in":"query","name":"status","schema":{"type":"string"}},{"description":"Type of portfolio run (full_rebalance, invest_cash)","in":"query","name":"type","schema":{"type":"string"}},{"description":"Pagination token","in":"query","name":"page_token","schema":{"type":"string"}},{"description":"Max number of runs to return per page","in":"query","name":"limit","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"next_page_token":{"$ref":"#/components/schemas/NextPageToken"},"runs":{"example":[{"account_id":"4db36989-6565-4011-9126-39fe6b3d9bf6","id":"0f9e8a7b-1c2d-4e3f-9a0b-1c2d3e4f5a6b","initiated_from":"api","portfolio_id":"9b2c1d4e-8f7a-4c3b-9d2e-1f0a8b7c6d5e","status":"COMPLETED_SUCCESS","type":"full_rebalance","updated_at":"2025-01-15T16:30:00Z"}],"items":{"$ref":"#/components/schemas/PortfolioRun"},"type":"array"}},"required":["runs","next_page_token"],"type":"object"}}},"description":"The runs which match the query"}},"summary":"List All Runs.","tags":["Rebalancing"]},"post":{"description":"Manually creates a run.\n\nThe determination of a run's orders and the execution of a run take place during normal market hours\n\nRuns can be initiated either by the system (when the system evaluates the rebalance conditions specified at the portfolio level) or by API call (manual run creation using POST /v1/rebalancing/runs). Runs can be initiated manually outside of the normal market hours but will remain in the QUEUED status until normal market hours\n\nOnly 1 run in a non-terminal status is allowed at any time.\n\nManually executing a run is currently only allowed for accounts who do not have an active subscription.","operationId":"post-v1-rebalancing-runs","requestBody":{"content":{"application/json":{"schema":{"properties":{"account_id":{"description":"The account to create the run for.","type":"string"},"type":{"description":"`full_rebalance` or `invest_cash`","type":"string"},"weights":{"$ref":"#/components/schemas/PortfolioWeights"}},"type":"object","x-examples":{"Example 1":{"account_id":"bf2b0f93-f296-4276-a9cf-288586cf4fb7","type":"full_rebalance","weights":[{"percent":"35","symbol":"AAPL","type":"asset"},{"percent":"20","symbol":"TSLA","type":"asset"},{"percent":"45","symbol":"SPY","type":"asset"}]}}}}}},"responses":{"200":{"description":"OK"}},"summary":"Create Run (Manual rebalancing event)","tags":["Rebalancing"]}},"/v1/rebalancing/runs/{run_id}":{"delete":{"description":"Cancels a run. Only runs within certain statuses (QUEUED, CANCELED, SELLS_IN_PROGRESS, BUYS_IN_PROGRESS) are cancelable. If this endpoint is called after orders have been submitted, we'll attempt to cancel the orders.","operationId":"delete-v1-rebalancing-runs-run_id","responses":{"204":{"description":"No Content"}},"summary":"Cancel Run by ID","tags":["Rebalancing"]},"get":{"description":"Get a run by its ID.","operationId":"get-v1-rebalancing-runs-run_id","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortfolioRun"}}},"description":"The run object"}},"summary":"Get Run by ID","tags":["Rebalancing"]},"parameters":[{"description":"the id of the portfolio run","in":"path","name":"run_id","required":true,"schema":{"type":"string"}}]},"/v1/rebalancing/subscriptions":{"get":{"description":"Lists subscriptions","operationId":"get-v1-rebalancing-subscriptions","parameters":[{"description":"Any subscriptions for this account_id will be returned","in":"query","name":"account_id","schema":{"type":"string"}},{"description":"Portfolio ID","in":"query","name":"portfolio_id","schema":{"type":"string"}},{"description":"Pagination token","in":"query","name":"page_token","schema":{"type":"string"}},{"description":"Max number of subscriptions to return per page","in":"query","name":"limit","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"next_page_token":{"$ref":"#/components/schemas/NextPageToken"},"subscriptions":{"items":{"$ref":"#/components/schemas/PortfolioSubscription"},"type":"array"}},"required":["subscriptions","next_page_token"],"type":"object"}}},"description":"OK"}},"summary":"List All Subscriptions","tags":["Rebalancing"]},"post":{"description":"Creates a subscription between an account and a portfolio.","operationId":"post-v1-rebalancing-subscriptions","requestBody":{"content":{"application/json":{"schema":{"properties":{"account_id":{"description":"Account ID. Account must be active and the account must not have any active subscriptions already (only 1 is permitted at a time)","type":"string"},"portfolio_id":{"description":"Portfolio ID. Portfolio must be active","type":"string"}},"type":"object"}}},"description":""},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortfolioSubscription"}}},"description":"OK"}},"summary":"Create Subscription","tags":["Rebalancing"]}},"/v1/rebalancing/subscriptions/{subscription_id}":{"delete":{"description":"Deletes the subscription which stops the rebalancing of an account.","operationId":"delete-v1-rebalancing-subscriptions-subscription_id","responses":{"204":{"description":"No Content"}},"summary":"Unsubscribe Account (Delete Subscription)","tags":["Rebalancing"]},"get":{"description":"Get a subscription by its ID.","operationId":"get-v1-rebalancing-subscriptions-subscription_id","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortfolioSubscription"}}},"description":"The portfolio subscription"}},"summary":"Get Subscription by ID","tags":["Rebalancing"]},"parameters":[{"in":"path","name":"subscription_id","required":true,"schema":{"type":"string"}}]},"/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/cash_interest":{"get":{"description":"This API retrieves a list of cash interest details for the given date(s) for a single account or all accounts. End-of-day (EOD) details are typically accessible after 8:00pm Eastern Time (ET) and reflect that day's ending state across cash balances, accrued interest, accrued fees, as well as additional ancillary details.","operationId":"get-v1-get-eod-cash-interest-report","parameters":[{"description":"Account globally unique identifier. If not provided, the report will be generated for all accounts.","in":"query","name":"account_id","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"A date in the format YYYY-MM-DD. If not provided, the report will be generated for the most recent date this report is available.","in":"query","name":"date","required":false,"schema":{"format":"date","type":"string"}},{"description":"A date in the format YYYY-MM-DD, valid only if account_id is provided and date is not provided. If not provided, this will use `before` value. If neither is provided the most recent available date is used for both `before` and `after`.","in":"query","name":"after","required":false,"schema":{"format":"date","type":"string"}},{"description":"A date in the format YYYY-MM-DD, valid only if account_id is provided and date is not provided. If not provided, this will use the most recent available date.","in":"query","name":"before","required":false,"schema":{"format":"date","type":"string"}},{"description":"The direction to use for sorting responses, either `asc` or `desc`. Only valid for account_id queries, for which only sorting by date is supported. Defaults to `desc`.","in":"query","name":"direction","required":false,"schema":{"type":"string"}},{"description":"The page size, used for paginating responses. Defaults to 1000, with a maximum of 10,000.","in":"query","name":"page_size","required":false,"schema":{"default":1000,"maximum":10000,"minimum":1,"type":"integer"}},{"description":"A token used to retrieve the next page for paginated queries. If provided the response will begin at the next page of the results for the response from which the `next_page_token` is used.","in":"query","name":"page_token","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EoDCashInterestReportResponse"}}},"description":"Successful response, returns a list of daily interest accruals and an optional next page token."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A client error occurred. Please check the provided request parameters and try again."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized. Please check your API key and try again."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Please wait a moment and try again."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A server error occurred. Please contact Alpaca."}},"summary":"Retrieve EOD Cash Interest Details","tags":["Reporting","Cash Interest"]}},"/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/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}/account/configurations":{"parameters":[{"in":"path","name":"account_id","required":true,"schema":{"type":"string"}}],"patch":{"description":"You can also set the margin settings for your users' account by passing a PATCH request. By default any account with funds under $2,000 is set a margin multiplier of 1.0, and accounts with over $2,000 are set to 2.0.","operationId":"patch-PATCH-v1-trading-accounts-account_id-account-configurations","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountConfigurations"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountConfigurations"}}},"description":"Response will contain the account configuration settings for the account."}},"summary":"Update Trading Configurations for an Account","tags":["Trading"]}},"/v1/trading/accounts/{account_id}/account/portfolio/history":{"get":{"description":"Returns timeseries data about equity and profit/loss (P/L) of the account in requested timespan.","operationId":"get-v1-trading-accounts-account_id-account-portfolio-history","parameters":[{"in":"path","name":"account_id","required":true,"schema":{"type":"string"}},{"description":"The duration of the data in `number` + `unit` format, such as 1D, where `unit` can be D for day, W for week, M for month and A for year. Defaults to 1M.\n\nOnly two of `start`, `end` and `period` can be specified at the same time.\n\nFor intraday timeframes (\\<1D) only 30 days or less can be queried, for 1D resolutions there is no such limit, data is available since the\ncreation of the account.\n","in":"query","name":"period","schema":{"type":"string"}},{"description":"The resolution of time window. 1Min, 5Min, 15Min, 1H, or 1D. If omitted, 1Min for less than 7 days period,\n15Min for less than 30 days, or otherwise 1D.\n\nFor queries with longer than 30 days of `period`, the system only accepts 1D as `timeframe`.\n","in":"query","name":"timeframe","schema":{"type":"string"}},{"description":"For intraday resolutions (<1D) this specifies which timestamps to return data points for:\n\nAllowed values are:\n- **market_hours**\n\n  Only timestamps for the core equity trading hours are returned (usually 9:30am to 4:00pm, trading days only)\n\n- **extended_hours**\n\n  Returns timestamps for the whole session including extended hours (usually 4:00am to 8:00pm, trading days only)\n\n- **continuous**\n\n  Returns price data points 24/7 (for off-session times too). To calculate the equity values we are using the following prices:\n\n  Between 4:00am and 10:00pm on trading days the valuation will be calculated based on the last trade (extended hours and normal hours respectively).\n\n  After 10:00pm, until the next session open the equities will be valued at their official closing price on the primary exchange.\n","in":"query","name":"intraday_reporting","schema":{"default":"market_hours","enum":["market_hours","extended_hours","continuous"],"type":"string"}},{"description":"The timestamp the data is returned starting from in RFC3339 format (including timezone specification). Defaults to `end` minus `period`\n\nIf provided, the `start` value is always normalized to the `America/New_York` timezone and adjusted to the nearest `timeframe` interval, e.g. seconds are always truncated and the time is rounded backwards to the nearest interval of `1Min`, `5Min`, `15Min`, or `1H`.\n\nIf `timeframe=1D` and `start` is not a valid trading date, find the next available trading date. For example, if `start` occurs on Saturday or Sunday after converting to the America/New_York timezone, `start` is adjusted to the first weekday that is not a market holiday (e.g. Monday).\n\nIf `timeframe` is less than `1D` and `intraday_reporting` is not `continuous`, `start` always reflects the beginning of a market session. If `start` is between midnight and the end (inclusive) of an active trading day, `start` is set to the beginning of the session on the specified day. Otherwise, if `start` occurs outside of the market session, the next available market date is used.\n\nFor example, when `intraday_reporting=market_hours` and `start=2023-10-19T23:59:59-04:00`, the provided `start` date occurs outside of the regular market session. The effective `start` timestamp is adjusted to the beginning of the next session: `2023-10-20T09:30:00-04:00`\n\n`start` may be be combined with one of `end` or `period`.\n\nProviding all of `start`, `end`, and `period` is invalid.\n","in":"query","name":"start","schema":{"example":"2021-03-16T18:38:01Z","format":"date-time","type":"string"}},{"description":"`pnl_reset` defines how we are calculating the baseline values for Profit And Loss (pnl) for queries with `timeframe` less than 1D (intraday queries).\n\nThe default behavior for intraday queries is that we reset the pnl value to the previous day's closing equity for each **trading** day.\n\nIn case of crypto (given its continuous nature), this might not be desired: specifying \"no_reset\" disables this behavior and all pnl values\nreturned will be relative to the closing equity of the previous trading day.\n\nFor 1D resolution all PnL values are calculated relative to the `base_value`, we are not resetting the base value.\n","in":"query","name":"pnl_reset","schema":{"default":"per_day","enum":["no_reset","per_day"],"type":"string"}},{"description":"The timestamp the data is returned up to in RFC3339 format (including timezone specification). Defaults to the current time.\n\nIf provided, the `end` value is always normalized to the `America/New_York` timezone and adjusted to the nearest `timeframe` interval, e.g. seconds are always truncated and the time is rounded backwards to the nearest interval of `1Min`, `5Min`, `15Min`, or `1H`.\n\nWhen `intraday_reporting` is either `market_hours` or `extended_hours`, the `end` value is adjusted to not occur after session close on the specified day. For example if the `intraday_reporting` is `extended_hours`, and the timestamp specified is `2023-10-19T21:33:00-04:00`, `end` is adjusted to `2023-10-19T20:00:00-04:00`.\n\n`end` may be combined with `start` or `period`.\n\nProviding all of `start`, `end`, and `period` is invalid.\n","in":"query","name":"end","schema":{"example":"2021-03-16T18:38:01Z","format":"date-time","type":"string"}},{"description":"**deprecated**: Users are strongly advised to **rely on the `intraday_reporting` query parameter** for better control\nof the reporting range.\n\nIf true, include extended hours in the result. This is effective only for timeframe less than 1D.\n","in":"query","name":"extended_hours","schema":{"type":"string"}},{"description":"The cashflow activities to include in the report. One of 'ALL', 'NONE', or a comma-separated list of activity types.","examples":{"all":{"value":"ALL"},"cash_transfers":{"summary":"Include cash deposits, withdraws, and transaction fees","value":"CSD,CSW,FEE"},"none":{"value":"NONE"}},"in":"query","name":"cashflow_types","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortfolioHistory"}}},"description":"Successful response"}},"summary":"Get Account Portfolio History","tags":["Portfolio History"]}},"/v1/trading/accounts/{account_id}/limits":{"get":{"description":"This endpoint is only available to accounts with the trading limits feature enabled, and not on JIT.\nThe daily trading limit is set at the correspondent level (or the account level) and is used as the limit for the total amount due to Alpaca on the date of settlement.\nThe limit in use returns the real time usage of this limit, based on the setup it uses the usage is calculated differently.\nIf the limit in use reaches the `daily_net_limit` or `available` is zero, further purchasing activity will be halted, however, the limit can be adjusted by reaching out to Alpaca with the proposed new limit and the reason for the change.","operationId":"get-v1-account-trading-limits","parameters":[{"in":"path","name":"account_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountTradingLimit"}}},"description":"Returns the trading limit set for the account and the real-time usage of the limit"},"404":{"description":"Returned when the account is not configured for trading limits"}},"summary":"Retrieve real-time Trading Limits for an Account","tags":["Trading"]}},"/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"}}]},"/v1/trading/accounts/{account_id}/positions/{symbol_or_contract_id}/do-not-exercise":{"post":{"description":"This endpoint enables users to submit a do-not-exercise (DNE) instruction for a held option contract, preventing automatic exercise at expiry.\nBy default, Alpaca will automatically exercise in-the-money (ITM) contracts at expiry. This endpoint allows users to override that behavior.\nDNE requests will be processed immediately once received. DNE requests submitted between market close and midnight will be rejected to avoid any confusion about when the instruction will take effect.\nTo cancel a DNE request or to submit an exercise instruction, please contact our support team.","operationId":"optionDoNotExercise","parameters":[{"$ref":"#/components/parameters/AccountID"},{"description":"Option contract symbol or ID.","in":"path","name":"symbol_or_contract_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DoNotExerciseRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DoNotExerciseResponse"}}},"description":"Successful Response"},"403":{"content":{"application/json":{"examples":{"No Available Position":{"value":{"code":40310000,"message":"no available position for the specified contract"}},"Short Position":{"value":{"code":40310001,"message":"cannot submit DNE for short position"}}},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden"},"422":{"content":{"application/json":{"examples":{"Invalid Symbol":{"value":{"code":42210000,"message":"invalid symbol_or_contract_id"}}},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid Symbol\n\nThe specified symbol_or_contract_id is invalid."}},"summary":"Do Not Exercise an Options Position (BETA)","tags":["Trading"]}},"/v1/trading/accounts/{account_id}/positions/{symbol_or_contract_id}/exercise":{"post":{"description":"This endpoint enables users to exercise a held option contract, converting it into the underlying asset based on the specified terms.\nAll available held shares of this option contract will be exercised.\nBy default, Alpaca will automatically exercise in-the-money (ITM) contracts at expiry.\nExercise requests will be processed immediately once received. Exercise requests submitted between market close and midnight will be rejected to avoid any confusion about when the exercise will settle.\nTo cancel an exercise request or to submit a Do-not-exercise (DNE) instruction, you can use the do-not-exercise endpoint or contact our support team.","operationId":"optionExercise","parameters":[{"$ref":"#/components/parameters/AccountID"},{"description":"Option contract symbol or ID.","in":"path","name":"symbol_or_contract_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExerciseRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExerciseResponse"}}},"description":"Successful Response"},"403":{"content":{"application/json":{"examples":{"No Available Position":{"value":{"code":40310000,"message":"no available position for the specified contract"}},"Short Position":{"value":{"code":40310001,"message":"cannot exercise short position"}}},"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden\n\nAvailable position quantity is not sufficient."}},"summary":"Exercise an Options Position (BETA)","tags":["Trading"]}},"/v1/trading/accounts/{account_id}/watchlists":{"get":{"description":"Fetch a list of all watchlists currently in an account.","operationId":"getAllWatchlistsForAccount","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WatchlistWithoutAsset"},"type":"array"}}},"description":"OK"}},"summary":"Retrieve all Watchlists for an Account","tags":["Watchlist"]},"parameters":[{"description":"Unique identifier of an account.","in":"path","name":"account_id","required":true,"schema":{"format":"uuid","type":"string"}}],"post":{"description":"Returns the watchlist object","operationId":"createWatchlistForAccount","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWatchlistRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Watchlist"}}},"description":"Newly created watchlist"}},"summary":"Create a New Watchlist for an Account","tags":["Watchlist"]}},"/v1/trading/accounts/{account_id}/watchlists/{watchlist_id}":{"delete":{"description":"Irrevocably delete a watchlist.","operationId":"deleteWatchlistFromAccountById","responses":{"200":{"description":"Watchlist deleted."}},"summary":"Remove a Watchlist","tags":["Watchlist"]},"get":{"description":"Retrieve Watchlist by ID","operationId":"getWatchlistForAccountById","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Watchlist"}}},"description":"OK"}},"summary":"Manage watchlists","tags":["Watchlist"]},"parameters":[{"description":"Unique identifier of an account","in":"path","name":"account_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Unique identifier of a watchlist","in":"path","name":"watchlist_id","required":true,"schema":{"format":"uuid","type":"string"}}],"post":{"description":"Adds an asset to an existing watchlist.","operationId":"post-v1-trading-accounts-account_id-watchlists-watchlist_id","requestBody":{"content":{"application/json":{"schema":{"properties":{"symbol":{"description":"The symbol name to add to the watchlist","type":"string"}},"type":"object"}}},"description":""},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Watchlist"}}},"description":"OK"},"404":{"description":"The requested watchlist is not found, or one of the symbols is not found in the assets"},"422":{"description":"Some parameters are not valid"}},"summary":"Add an Asset to a Watchlist","tags":["Watchlist"]},"put":{"description":"Replace entirely the set of securities contained in the watchlist while optionally renaming it. Destructive operation.","operationId":"replaceWatchlistForAccountById","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWatchlistRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Watchlist"}}},"description":"Updated watchlist."}},"summary":"Update a Watchlist","tags":["Watchlist"]}},"/v1/trading/accounts/{account_id}/watchlists/{watchlist_id}/{symbol}":{"delete":{"description":"Delete one entry for an asset by symbol name","operationId":"delete-DELETE-v1-trading-accounts-account_id-watchlists-watchlist_id-symbol","responses":{"200":{"description":"OK"},"404":{"description":"The requested watchlist is not found"}},"summary":"Remove a Symbol from a Watchlist","tags":["Watchlist"]},"parameters":[{"description":"Account identifier.","in":"path","name":"account_id","required":true,"schema":{"type":"string"}},{"description":"The Watchlist ID","in":"path","name":"watchlist_id","required":true,"schema":{"type":"string"}},{"description":"The symbol ","in":"path","name":"symbol","required":true,"schema":{"type":"string"}}]},"/v1/transfers/jit/{ledger_id}/balances":{"get":{"description":"Returns an array of objects that correspond to each ledger account.","operationId":"get-v1-transfers-jit-ledger_id-balances","parameters":[{"in":"path","name":"ledger_id","required":true,"schema":{"type":"string"}},{"description":"The start date (inclusive) of the ledgerbalances and activities.","in":"query","name":"start_date","schema":{"format":"date","type":"string"}},{"description":"The end date (inclusive) of the ledgerbalances and activities.","in":"query","name":"end_date","schema":{"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"activity_amount":{"description":"The number of transactions related to the ledger during the specified date range ","format":"decimal","type":"string"},"ending_balance":{"description":"Ledger balance at the end of the date range","format":"decimal","type":"string"},"id":{"description":"The ledger ID","type":"string"},"ledger_name":{"description":"The ledger name","type":"string"},"ledger_no":{"description":"The ledger account number","type":"string"},"starting_balance":{"description":"Ledger balance at the beginning of the date range","format":"decimal","type":"string"},"transactions":{"items":{"$ref":"#/components/schemas/Transaction"},"type":"array"}},"type":"object"}}},"description":"OK"}},"summary":"Retrieve JIT Ledger Balances","tags":["Funding"]}},"/v1/transfers/jit/ledgers":{"get":{"description":"Returns an array of objects that correspond to each ledger account, each of whichcontain the following attributes.","operationId":"get-v1-transfers-jit-ledgers","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/JITLedgerAccount"},"type":"array"}}},"description":"OK"}},"summary":"Retrieve JIT Ledgers","tags":["Funding"]}},"/v1/transfers/jit/limits":{"get":{"description":"The JIT Securities daily trading limit is set at the correspondent level and is used as the limit for the total amount due to Alpaca on the date of settlement. The limit in use returns the real time usage of this limit and is calculated by taking the net of trade and non-trade activity inflows and outflows. If the limit in use reaches the daily net limit, further purchasing activity will be halted, however, the limit can be adjusted by reaching out to Alpaca with the proposed new limit and the reason for the change.","operationId":"get-v1-transfers-jit-limits","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DailyTradingLimit"}}},"description":"Returns the JIT Securities Daily Trading Limit Object based off of real time calculations."}},"summary":"Retrieve Daily Trading Limits","tags":["Funding"]}},"/v1/transfers/jit/reports":{"get":{"description":"Retrieves a JIT report for the requested report type and system date. By default, the report is returned inline. For large reports, use response_type=download_url to receive a temporary signed download URL.\n","operationId":"get-v1-transfers-jit-reports","parameters":[{"description":"The type of report you want to get.","in":"query","name":"report_type","required":true,"schema":{"enum":["detail","net_summary","net_payment","net_payment_final","gross_summary","gross_payment","gross_payment_final"],"type":"string"}},{"description":"Date of file generation.","in":"query","name":"system_date","required":true,"schema":{"format":"date","type":"string"}},{"description":"The asset class to retrieve for.","in":"query","name":"asset_class","schema":{"enum":["us_equity","crypto"],"type":"string"}},{"description":"Controls how the report is returned. Use inline to return the report content directly in the response. Use download_url to return a temporary signed URL that can be used to download the generated report. If omitted, the default value is inline.\n","in":"query","name":"response_type","required":false,"schema":{"default":"inline","enum":["inline","download_url"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"download_url":{"description":"Returned when response_type is download_url.","summary":"Download URL response","value":{"expires_at":"2026-04-14T23:55:00Z","filename":"jit_detail_2026-04-14.csv","url":"<signed_s3_url>"}},"inline":{"description":"Returned when response_type is inline or omitted.","summary":"Inline report response","value":{"detail":"<report_content>"}}},"schema":{"oneOf":[{"$ref":"#/components/schemas/JITReport"},{"$ref":"#/components/schemas/JITReportDownloadURL"}]}}},"description":"OK"}},"summary":"Retrieve JIT Reports","tags":["Funding"]}},"/v1/wallets/fees/estimate":{"get":{"description":"Returns the estimated on-chain network (gas) fee for a proposed crypto withdrawal at current chain conditions. Pass the `asset`, `from_address`, `to_address`, and `amount` you intend to send; the response reports the network fee that would be charged for the corresponding transaction.","operationId":"getCryptoTransferEstimate","parameters":[{"description":"The asset for the proposed transaction","in":"query","name":"asset","schema":{"type":"string"}},{"description":"The originating address of the proposed transaction","in":"query","name":"from_address","schema":{"type":"string"}},{"description":"The destination address of the proposed transaction","in":"query","name":"to_address","schema":{"type":"string"}},{"description":"The amount, denoted in the specified asset, of the proposed transaction","in":"query","name":"amount","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"fee":{"type":"string"}},"type":"object"}}},"description":"OK"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"error"}},"summary":"Returns the estimated gas fee for a proposed transaction.","tags":["Crypto Funding"]}},"/v2beta1/accounts/{account_id}/events/activities/{event_id}":{"get":{"description":"Returns a single account activity (V2) event for the specified account by ULID `event_id`, delivered as a server-sent event message.\n\nThis is the single-event counterpart to the `subscribeToActivitiesSSE` streaming endpoint, intended for re-fetching an individual activity that was previously observed on the activities stream.","operationId":"getAccountActivityEvent","responses":{"200":{"content":{"text/event-stream":{"schema":{"$ref":"#/components/schemas/ActivityEventV2"}}},"description":"Returns a single activity v2 event, identified by the provided event_id  ULID."}},"summary":"Get a single activity (V2) event by event_id ULID.","tags":["Accounts"]},"parameters":[{"$ref":"#/components/parameters/AccountID"},{"description":"The ULID that uniquely identifies the activity event.","in":"path","name":"event_id","required":true,"schema":{"format":"ulid","type":"string"}}]},"/v2beta1/events/activities":{"get":{"description":"The Events API sends the real-time events and provides historical queries with SSE (Server Sent Events).\n\nThis endpoint streams events on account activities.\n\nHistorical events are streamed immediately if queried, and updates are pushed as events occur.\n\nQuery parameter rules:\n- If `until` is specified, `since` is required.\n- If `until_id` is specified, `since_id` is required.\n- You cannot use `since` and `since_id` together.\nBehavior:\n- If `since` or `since_id` is not specified, this will not return any historic data.\n- If `until` or `until_id` is specified, stream will end at the specified point with status 200.\n\n---\n\nWarning: Currently, OAS-3 does not fully support responses from an SSE API.\n\nIn case the client code is generated from this OAS spec, please do not specify `since` and `until`, as the generated client may 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 define how to represent this behavior.\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---","operationId":"subscribeToActivitiesSSE","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":{"$ref":"#/components/schemas/ActivityEventV2"},"type":"array"}}},"description":"Connected. Events will now start streaming as long as you keep the connection open."}},"summary":"Subscribe to Activity Events (SSE)","tags":["Events"]}},"/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/ipos":{"get":{"description":"The Events API provides event push as well as historical queries via SSE (server sent events).\n\nYou can listen to IPO offering lifecycle updates as they happen - including new offerings, offering updates, prospectus availability, the 60-minute pricing window, account-scoped allocation results, and offering cancellations.\n\nHistorical events are streamed immediately if queried, and updates are pushed as events occur.\n\n---\n\n**Event types**\n\nEach event has a `verb` field that determines the shape of `payload`. See the `IPOEvent` schema for the full payload structure for each verb.\n\n- `Offering` - initial publication of an offering (system-wide).\n- `OfferingUpdate` - update to a previously published offering (system-wide).\n- `Prospectus` - prospectus document is now available (system-wide).\n- `SixtyMinMail` - 60-minute pricing window has opened, no new orders accepted (system-wide).\n- `Allocation` - final allocation result for a specific account. **Account-scoped** - `account_id` and `correspondent` are populated.\n- `OfferingCancellation` - offering was cancelled. **No `payload` field is present.**\n\nUse the `offering_reference` field on each event to fetch the full offering metadata via [`GET /v1/ipos/{offering_reference}`](#operation/getIPOOffering).\n\n---\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\n\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":"subscribeToIPOEventsSSE","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"}},{"description":"ULID `event_id` to resume the stream from. The first event returned will be the one immediately after `since_id`.","in":"query","name":"since_id","schema":{"format":"ulid","type":"string"}},{"description":"ULID `event_id` at which the stream will end (inclusive). Useful for backfills.","in":"query","name":"until_id","schema":{"format":"ulid","type":"string"}}],"responses":{"200":{"content":{"text/event-stream":{"examples":{"Allocation":{"$ref":"#/components/examples/IPOEventAllocation"},"Offering":{"$ref":"#/components/examples/IPOEventOffering"},"OfferingCancellation":{"$ref":"#/components/examples/IPOEventOfferingCancellation"},"OfferingUpdate":{"$ref":"#/components/examples/IPOEventOfferingUpdate"},"Prospectus":{"$ref":"#/components/examples/IPOEventProspectus"},"SixtyMinMail":{"$ref":"#/components/examples/IPOEventSixtyMinMail"}},"schema":{"items":{"$ref":"#/components/schemas/IPOEvent"},"type":"array"}}},"description":"Connected. Events will now start streaming as long as you keep the connection open."}},"summary":"Subscribe to IPO Events (SSE)","tags":["Events"]}},"/v2/events/journals/status":{"get":{"description":"The Events API provides event push as well as historical queries via SSE (server sent events).\n\nYou can listen to journal status updates as they get processed by our backoffice.\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\nThere is no compatibility between /v1/events/journals/status and /v2/events/journals/status, the ids (ulid) are always different, and the number of events might also different\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\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":"subscribeToJournalStatusV2SSE","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"}},{"in":"query","name":"id","schema":{"type":"string"}}],"responses":{"200":{"content":{"text/event-stream":{"schema":{"items":{"$ref":"#/components/schemas/JournalStatusEventV2"},"type":"array"}}},"description":"Connected. Events will now start streaming as long as you keep the connection open."}},"summary":"Subscribe to Journal 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.alpaca.markets"},{"description":"Production endpoint","url":"https://broker-api.alpaca.markets"}],"tags":[{"name":"Accounts"},{"name":"Documents"},{"name":"Trading"},{"name":"Portfolio History"},{"name":"Assets"},{"name":"Calendar"},{"name":"Events"},{"name":"Funding"},{"name":"Funding Wallets"},{"name":"Instant Funding"},{"name":"OAuth"},{"name":"Clock"},{"name":"Journals"},{"name":"Corporate Actions"},{"name":"Watchlist"},{"name":"KYC"},{"name":"Rebalancing"},{"name":"Logos"},{"name":"Reporting"},{"name":"Country Info"},{"name":"Crypto Funding"},{"name":"IRA"},{"name":"Cash Interest"},{"name":"FPSL Program"},{"name":"Tokenization"},{"description":"Endpoints for discovering and tracking IPO (Initial Public Offering) lifecycle data. Use [`GET /v1/ipos`](#operation/listIPOOfferings) and [`GET /v1/ipos/{offering_reference}`](#operation/getIPOOffering) to query offerings on demand, and the [IPO Events Stream](#operation/subscribeToIPOEventsSSE) under the **Events** group to receive real-time and historical lifecycle updates (new offerings, prospectus, 60-minute mail, allocations, cancellations).\n","name":"IPO"}],"x-readme":{"explorer-enabled":true,"proxy-enabled":false}}