Skip to main content

SSE 事件

机器翻译译自英文(docs.alpaca.markets)本页 47 段已全部译完

Alpaca Broker API 通过服务器发送事件(SSE)提供可重放和实时的事件流。SSE 协议是一种简单而强大的协议,可满足你构建完美用户体验的许多需求。每个端点都可以通过事件时间戳或单调递增的整数 ID 进行查询,从而通过一个简单的 HTTP 请求从过去的时点事件无缝订阅到实时推送。虽然所有 SSE 端点都遵循与其他 REST 端点相同的 JSON 对象模型,但 SSE 协议是在基本 HTTP 协议之上的轻量级附加层,这与 REST 协议略有不同。请确保你的客户端程序正确处理 SSE 协议。

为什么使用 SSE?

  • 低延迟:实时接收更新,以及时做出关于你客户的决策
  • 资源效率:单个连接即可服务多个更新,并简化你接收客户更新通知的渠道
  • 简单性:与 WebSocket 相比,集成所需的代码行数更少。

最佳实践

  • 连接健康:实现心跳检查。
  • 错误恢复:为自动重连编写代码。
  • 选择性监听:订阅与你的用例相关的特定事件类型。

🛠️ 关于 /v1 和 /v2beta1

我们正在将事件流从整数 ID 切换为 ULID。ULID 由于其编码时间戳的结构,被设计为可按字典序排序。这使你能够更好地根据记录发生的时间对记录进行排序和过滤。虽然它们比整数 ID 更难阅读,但它们包含更多信息。

目前只有管理操作事件和交易事件使用 ULID,在未来几个月内我们将迁移其余部分。请回来此处查看哪些 SSE 位于新端点上。

你应该做什么?

仍使用整数 ID 的旧版事件现在增加了一个名为 since_ulid 和 until_ulid 的字段。我们强烈建议你现在就使用它们,以便在我们最终迁移其余事件(账户状态、日记账状态、转账状态、交易状态和非交易活动通知)并弃用旧事件时不会遇到任何问题。

弃用说明

对于所有 /v1/events/* 端点,基于整数的 since_id 和 until_id 查询参数是仅对部分经纪合作伙伴可用的旧版功能。请改用 since_ulid 和 until_ulid,基于 ULID 的参数对所有经纪合作伙伴都可用。

SSE 事件类型

账户状态事件

及时了解账户状态的变化。在此了解更多。

你可以在下面找到一些示例响应:

{
    "account_blocked": false,
    "account_id": "9ab15e44-569c-4c32-952c-b83ab7076549",
    "account_number": "",
    "admin_configurations": {
        "allow_instant_ach": true,
        "disable_shorting": true
    },
    "at": "2023-10-13T13:34:28.30629Z",
    "crypto_status_from": "",
    "crypto_status_to": "APPROVED",
    "event_id": 12627517,
    "event_ulid": "01HCMKXQYJ3ZBV66Q21KCT1CRR",
    "status_from": "",
    "status_to": "APPROVED",
    "trading_blocked": false
}

{
    "account_id": "50333df9-66f0-46b9-a083-4212b152f749",
    "account_number": "307137914",
    "at": "2023-10-13T13:34:29.668043Z",
    "event_id": 12627518,
    "event_ulid": "01HCMKXS94ST351NFGEZR57EHV",
    "status_from": "APPROVED",
    "status_to": "ACTIVE"
}

:heartbeat

{
    "account_id": "9ab15e44-569c-4c32-952c-b83ab7076549",
    "account_number": "307645030",
    "at": "2023-10-13T13:35:18.145917Z",
    "crypto_status_from": "APPROVED",
    "crypto_status_to": "ACTIVE",
    "event_id": 12627519,
    "event_ulid": "01HCMKZ8M2XPNC9Y8HE159P2WK",
    "status_from": "APPROVED",
    "status_to": "APPROVED"
}

:heartbeat

{
    "account_id": "9ab15e44-569c-4c32-952c-b83ab7076549",
    "account_number": "307645030",
    "at": "2023-10-13T13:40:17.417798Z",
    "event_id": 12627521,
    "event_ulid": "01HCMM8CWAQETWNM75VJKA0YX2",
    "status_from": "APPROVED",
    "status_to": "ACTIVE"
}
{
    "account_blocked": false,
    "account_id": "d16f0c84-2bcc-4caf-bd68-a97889986d74",
    "account_number": "",
    "admin_configurations": {
        "allow_instant_ach": true,
        "disable_shorting": true
    },
    "at": "2023-10-13T13:18:16.936397Z",
    "crypto_status_from": "",
    "crypto_status_to": "INACTIVE",
    "event_id": 12627496,
    "event_ulid": "01HCMK03B8JV4YDB8W2HZ0K6V2",
    "status_from": "",
    "status_to": "APPROVED",
    "trading_blocked": false
}

{
    "account_id": "d16f0c84-2bcc-4caf-bd68-a97889986d74",
    "account_number": "307781498",
    "at": "2023-10-13T13:18:18.472537Z",
    "event_id": 12627497,
    "event_ulid": "01HCMK04V979EMCGB96Z6T0H00",
    "status_from": "APPROVED",
    "status_to": "ACTIVE"
}

日记账事件

随时了解日记账交易的状态,以确保它们已执行且资金已从一个账户转移到另一个账户。更多详情见此处。

你可以在下面找到一个示例响应:

{
    "at": "2023-10-13T13:11:10.57913Z",
    "entry_type": "JNLC",
    "event_id": 11751531,
    "event_ulid": "01HCMJK2ZKCPTYXMJYS66T0QJJ",
    "journal_id": "ddd26344-86af-4ba7-ae6a-bcec63129808",
    "status_from": "",
    "status_to": "queued"
}

{
    "at": "2023-10-13T13:11:10.634443Z",
    "entry_type": "JNLC",
    "event_id": 11751532,
    "event_ulid": "01HCMJK31AVBME4WNSH3C8E4HJ",
    "journal_id": "ddd26344-86af-4ba7-ae6a-bcec63129808",
    "status_from": "queued",
    "status_to": "sent_to_clearing"
}

{
    "at": "2023-10-13T13:11:10.67241Z",
    "entry_type": "JNLC",
    "event_id": 11751533,
    "event_ulid": "01HCMJK32GSBH2QG92TKZKDRRV",
    "journal_id": "ddd26344-86af-4ba7-ae6a-bcec63129808",
    "status_from": "sent_to_clearing",
    "status_to": "executed"
}

转账事件

当存款和取款状态更新时即时收到通知。在此进一步阅读。

你可以在下面找到一个示例响应:

{
  "account_id":"8e00606a-c9ac-409a-ba45-f55e8f77984a",
  "at":"2021-06-10T19:49:12.579109Z",
  "event_id":15960,
  "status_from":"",
  "status_to":"queued",
  "transfer_id":"c4ed4206-697b-4859-ab71-b9de6649859d"
}


{
  "account_id":"8e00606a-c9ac-409a-ba45-f55e8f77984a",
  "at":"2021-06-10T19:52:24.066998Z",
  "event_id":15961,
  "status_from":"queued",
  "status_to":"sent_to_clearing",
 	"transfer_id":"c4ed4206-697b-4859-ab71-b9de6649859d"
}

{
  "account_id":"8e00606a-c9ac-409a-ba45-f55e8f77984a",
  "at":"2021-06-10T20:02:24.280178Z",
  "event_id":15962,
  "status_from":"sent_to_clearing",
  "status_to":"executed",
  "transfer_id":"c4ed4206-697b-4859-ab71-b9de6649859d"
}

交易事件

实时跟踪订单、交易和执行的状况。文档在此。

{
    "account_id": "aa4439c3-cf7d-4251-8689-a575a169d6d3",
    "at": "2023-10-13T13:28:58.387652Z",
    "event_id": "01HCMKKNRK7S5C1JYP50QGDECQ",
    "event": "new",
    "timestamp": "2023-10-13T13:28:58.37957033Z",
    "order": {
        "id": "bb2403bc-88ec-430b-b41c-f9ee80c8f0e1",
        "client_order_id": "508789e5-cea3-4235-b546-6c62ff92bd79",
        "created_at": "2023-10-13T13:28:58.361530031Z",
        "updated_at": "2023-10-13T13:28:58.386058029Z",
        "submitted_at": "2023-10-13T13:28:58.360070731Z",
        "filled_at": null,
        "expired_at": null,
        "cancel_requested_at": null,
        "canceled_at": null,
        "failed_at": null,
        "replaced_at": null,
        "replaced_by": null,
        "replaces": null,
        "asset_id": "b0b6dd9d-8b9b-48a9-ba46-b9d54906e415",
        "symbol": "AAPL",
        "asset_class": "us_equity",
        "notional": "10",
        "qty": null,
        "filled_qty": "0",
        "filled_avg_price": null,
        "order_class": "",
        "order_type": "market",
        "type": "market",
        "side": "buy",
        "time_in_force": "day",
        "limit_price": null,
        "stop_price": null,
        "status": "new",
        "extended_hours": false,
        "legs": null,
        "trail_percent": null,
        "trail_price": null,
        "hwm": null,
        "commission": "0"
    },
    "execution_id": "7922ab44-5b33-4049-ab9a-0cfd805ba989"
}

:heartbeat

{
    "account_id": "aa4439c3-cf7d-4251-8689-a575a169d6d3",
    "at": "2023-10-13T13:30:00.664778Z",
    "event_id": "01HCMKNJJRJ4E3RNFA1XR8CX7R",
    "event": "fill",
    "timestamp": "2023-10-13T13:30:00.658443088Z",
    "order": {
        "id": "db04069d-2e5a-48d4-a42f-6a0dea8ea0b8",
        "client_order_id": "be139e2d-8153-4ae8-83ee-7b98b4e17419",
        "created_at": "2023-10-13T13:22:21.887914Z",
        "updated_at": "2023-10-13T13:30:00.661902331Z",
        "submitted_at": "2023-10-13T13:23:05.411141Z",
        "filled_at": "2023-10-13T13:30:00.658443088Z",
        "expired_at": null,
        "cancel_requested_at": null,
        "canceled_at": null,
        "failed_at": null,
        "replaced_at": null,
        "replaced_by": null,
        "replaces": null,
        "asset_id": "b0b6dd9d-8b9b-48a9-ba46-b9d54906e415",
        "symbol": "AAPL",
        "asset_class": "us_equity",
        "notional": "10",
        "qty": null,
        "filled_qty": "0.05513895",
        "filled_avg_price": "181.36",
        "order_class": "",
        "order_type": "market",
        "type": "market",
        "side": "buy",
        "time_in_force": "day",
        "limit_price": null,
        "stop_price": null,
        "status": "filled",
        "extended_hours": false,
        "legs": null,
        "trail_percent": null,
        "trail_price": null,
        "hwm": null,
        "commission": "0"
    },
    "price": "181.36",
    "qty": "0.05513895",
    "position_qty": "0.05513895",
    "execution_id": "a958bb42-b034-4d17-bf07-805cf0820ffe"
}

{
    "account_id": "aa4439c3-cf7d-4251-8689-a575a169d6d3",
    "at": "2023-10-13T13:30:00.673857Z",
    "event_id": "01HCMKNJK1Y0R7VF6Q6CAC3SH7",
    "event": "fill",
    "timestamp": "2023-10-13T13:30:00.658388668Z",
    "order": {
        "id": "bb2403bc-88ec-430b-b41c-f9ee80c8f0e1",
        "client_order_id": "508789e5-cea3-4235-b546-6c62ff92bd79",
        "created_at": "2023-10-13T13:28:58.361530031Z",
        "updated_at": "2023-10-13T13:30:00.665807961Z",
        "submitted_at": "2023-10-13T13:28:58.360070731Z",
        "filled_at": "2023-10-13T13:30:00.658388668Z",
        "expired_at": null,
        "cancel_requested_at": null,
        "canceled_at": null,
        "failed_at": null,
        "replaced_at": null,
        "replaced_by": null,
        "replaces": null,
        "asset_id": "b0b6dd9d-8b9b-48a9-ba46-b9d54906e415",
        "symbol": "AAPL",
        "asset_class": "us_equity",
        "notional": "10",
        "qty": null,
        "filled_qty": "0.05513895",
        "filled_avg_price": "181.36",
        "order_class": "",
        "order_type": "market",
        "type": "market",
        "side": "buy",
        "time_in_force": "day",
        "limit_price": null,
        "stop_price": null,
        "status": "filled",
        "extended_hours": false,
        "legs": null,
        "trail_percent": null,
        "trail_price": null,
        "hwm": null,
        "commission": "0"
    },
    "price": "181.36",
    "qty": "0.05513895",
    "position_qty": "0.1102779",
    "execution_id": "33cbb614-bfc0-468b-b4d0-ccf08588ef77"
}

:heartbeat

{
    "account_id": "aa4439c3-cf7d-4251-8689-a575a169d6d3",
    "at": "2024-09-23T13:30:00.673857Z",
    "event_id": "01HCMQR4S73L9G6EHI0JKL2M3N",
    "event": "trade_bust",
    "timestamp": "2024-09-23T15:30:48.601741737Z",
    "order": {
        "id": "c86e4d6c-2cdf-4b81-b658-5728bdc8310b",
        "client_order_id": "10671b99-2cb3-43c3-92a0-96054edd59a8",
        "created_at": "2024-09-23T15:30:48.599363562Z",
        "updated_at": "2024-09-23T16:09:21.642880502Z",
        "submitted_at": "2024-09-23T15:30:48.601741737Z",
        "filled_at": "2024-09-23T20:09:21.635Z",
        "expired_at": null,
        "cancel_requested_at": null,
        "canceled_at": null,
        "failed_at": null,
        "replaced_at": null,
        "replaced_by": null,
        "replaces": null,
        "asset_id": "a153fd9c-fd4e-4416-9adc-f9040aa2e125",
        "symbol": "JTAI",
        "asset_class": "us_equity",
        "notional": null,
        "qty": "2",
        "filled_qty": "0",
        "filled_avg_price": "0.107703",
        "order_class": "",
        "order_type": "market",
        "type": "market",
        "side": "buy",
        "time_in_force": "day",
        "limit_price": null,
        "stop_price": null,
        "status": "filled",
        "extended_hours": false,
        "legs": null,
        "trail_percent": null,
        "trail_price": null,
        "hwm": null
    },
    "price": "0.107703",
    "qty": "-2",
    "position_qty": "0",
    "execution_id": "df61d6ec-511f-4cc1-ae61-20456b0cb7a5",
    "previous_execution_id": "aeb60660-412f-4537-8d1f-1101b3fc8f64"
}

{
    
    "account_id": "aa4439c3-cf7d-4251-8689-a575a169d6d3",
    "at": "2024-10-18T13:30:00.673857Z",
    "event_id": "01HCMQR4S73L9G6EHI0JKL2M3N",
    "event": "trade_correct",
    "timestamp": "2024-10-18T22:26:32.988Z",
    "order": {
        "id": "390cd7d0-07fa-4ab0-8b99-7ffb8d7408ff",
        "client_order_id": "21975666-5eae-4149-b86f-3682f4fd8c69",
        "created_at": "2024-10-18T09:10:13.311667892Z",
        "updated_at": "2024-10-18T18:26:32.996327532Z",
        "submitted_at": "2024-10-18T09:10:13.31490803Z",
        "filled_at": "2024-10-18T22:26:32.988Z",
        "expired_at": null,
        "cancel_requested_at": null,
        "canceled_at": null,
        "failed_at": null,
        "replaced_at": null,
        "replaced_by": null,
        "replaces": null,
        "asset_id": "6b0137a2-4efb-4fba-aa39-9f64f6afe5f4",
        "symbol": "BSRR",
        "asset_class": "us_equity",
        "notional": null,
        "qty": "1",
        "filled_qty": "1",
        "filled_avg_price": "25",
        "order_class": "",
        "order_type": "limit",
        "type": "limit",
        "side": "buy",
        "time_in_force": "day",
        "limit_price": "28.93",
        "stop_price": null,
        "status": "filled",
        "extended_hours": true,
        "legs": null,
        "trail_percent": null,
        "trail_price": null,
        "hwm": null
    },
    "price": "25",
    "qty": "1",
    "position_qty": "1",
    "execution_id": "2ff98545-9082-469a-8aa8-7f6c09ac258f",
    "previous_execution_id": "f116d6c7-fc4a-49b1-a649-317aace34783"
}
{
    "account_id": "aa4439c3-cf7d-4251-8689-a575a169d6d3",
    "at": "2023-10-13T13:22:21.927554Z",
    "event": "accepted",
    "event_id": 10676063,
    "event_ulid": "01HCMK7JJ3EJD9P4JSM1M0HTZ0",
    "order": {
        "asset_class": "us_equity",
        "asset_id": "b0b6dd9d-8b9b-48a9-ba46-b9d54906e415",
        "cancel_requested_at": null,
        "canceled_at": null,
        "client_order_id": "be139e2d-8153-4ae8-83ee-7b98b4e17419",
        "commission": "0",
        "created_at": "2023-10-13T09:22:21.887913787-04:00",
        "expired_at": null,
        "extended_hours": false,
        "failed_at": null,
        "filled_at": null,
        "filled_avg_price": null,
        "filled_qty": "0",
        "hwm": null,
        "id": "db04069d-2e5a-48d4-a42f-6a0dea8ea0b8",
        "legs": null,
        "limit_price": null,
        "notional": "10",
        "order_class": "",
        "order_type": "market",
        "qty": null,
        "replaced_at": null,
        "replaced_by": null,
        "replaces": null,
        "side": "buy",
        "status": "accepted",
        "stop_price": null,
        "submitted_at": "2023-10-13T09:22:21.886066537-04:00",
        "symbol": "AAPL",
        "time_in_force": "day",
        "trail_percent": null,
        "trail_price": null,
        "type": "market",
        "updated_at": "2023-10-13T09:22:21.887913787-04:00"
    },
    "timestamp": "2023-10-13T09:22:21.888053477-04:00"
}

:heartbeat

{
    "account_id": "aa4439c3-cf7d-4251-8689-a575a169d6d3",
    "at": "2023-10-13T13:30:01.118487Z",
    "event": "fill",
    "event_id": 10676567,
    "event_ulid": "01HCMKNJJRJ4E3RNFA1XR8CX7R",
    "execution_id": "a958bb42-b034-4d17-bf07-805cf0820ffe",
    "order": {
        "asset_class": "us_equity",
        "asset_id": "b0b6dd9d-8b9b-48a9-ba46-b9d54906e415",
        "cancel_requested_at": null,
        "canceled_at": null,
        "client_order_id": "be139e2d-8153-4ae8-83ee-7b98b4e17419",
        "commission": "0",
        "created_at": "2023-10-13T13:22:21.887914Z",
        "expired_at": null,
        "extended_hours": false,
        "failed_at": null,
        "filled_at": "2023-10-13T13:30:00.658443088Z",
        "filled_avg_price": "181.36",
        "filled_qty": "0.05513895",
        "hwm": null,
        "id": "db04069d-2e5a-48d4-a42f-6a0dea8ea0b8",
        "legs": null,
        "limit_price": null,
        "notional": "10",
        "order_class": "",
        "order_type": "market",
        "qty": null,
        "replaced_at": null,
        "replaced_by": null,
        "replaces": null,
        "side": "buy",
        "status": "filled",
        "stop_price": null,
        "submitted_at": "2023-10-13T13:23:05.411141Z",
        "symbol": "AAPL",
        "time_in_force": "day",
        "trail_percent": null,
        "trail_price": null,
        "type": "market",
        "updated_at": "2023-10-13T09:30:00.661902331-04:00"
    },
    "position_qty": "0.05513895",
    "price": "181.36",
    "qty": "0.05513895",
    "timestamp": "2023-10-13T13:30:00.658443088Z"
}

{
    "account_id": "aa4439c3-cf7d-4251-8689-a575a169d6d3",
    "at": "2023-10-13T13:30:02.667443Z",
    "event": "fill",
    "event_id": 10676601,
    "event_ulid": "01HCMKNJK1Y0R7VF6Q6CAC3SH7",
    "execution_id": "33cbb614-bfc0-468b-b4d0-ccf08588ef77",
    "order": {
        "asset_class": "us_equity",
        "asset_id": "b0b6dd9d-8b9b-48a9-ba46-b9d54906e415",
        "cancel_requested_at": null,
        "canceled_at": null,
        "client_order_id": "508789e5-cea3-4235-b546-6c62ff92bd79",
        "commission": "0",
        "created_at": "2023-10-13T09:28:58.361530031-04:00",
        "expired_at": null,
        "extended_hours": false,
        "failed_at": null,
        "filled_at": "2023-10-13T13:30:00.658388668Z",
        "filled_avg_price": "181.36",
        "filled_qty": "0.05513895",
        "hwm": null,
        "id": "bb2403bc-88ec-430b-b41c-f9ee80c8f0e1",
        "legs": null,
        "limit_price": null,
        "notional": "10",
        "order_class": "",
        "order_type": "market",
        "qty": null,
        "replaced_at": null,
        "replaced_by": null,
        "replaces": null,
        "side": "buy",
        "status": "filled",
        "stop_price": null,
        "submitted_at": "2023-10-13T09:28:58.360070731-04:00",
        "symbol": "AAPL",
        "time_in_force": "day",
        "trail_percent": null,
        "trail_price": null,
        "type": "market",
        "updated_at": "2023-10-13T09:30:00.665807961-04:00"
    },
    "position_qty": "0.1102779",
    "price": "181.36",
    "qty": "0.05513895",
    "timestamp": "2023-10-13T13:30:00.658388668Z"
}

消息排序

对于在 SSE 流上收到的消息,我们保证按账户而言,收到事件的顺序与它们发生的顺序相同。

示例:如果事件 E1 比同一账户的另一个事件 E2 更早被收到,那么根据我们的记账,E1 发生在 E2 之前。

我们并不保证跨账户的顺序:如果收到针对不同账户的两个事件,消费者有责任根据事件的时间戳/ulid 字段决定哪个事件先发生。

示例:E1 对账户 A1 发生的时间早于影响 A2 的 E2。流式端点可能以 E1、E2 或 E2、E1 的顺序返回事件。两种响应都应被视为有效。

注意:由于 ULID 包含随机部分,其他事件可能与最后收到的事件在同一毫秒内到达,且按字典序小于先前事件。

如果流用于对账目的,我们建议从收到最新事件时间之前几分钟的 since 重新启动流。

这种方法意味着消费者在重启流时会收到一些事件两次:消费者有责任以幂等方式处理收到的消息,以便在消费者端忽略重复的消息。

注意:since 和 until 参数按 RFC3339 解析,其中可以指定时区(例如 2006-01-02T15:04:05+07:00),然而加号字符(+)在 HTTP 中是特殊字符,因此请改用 URL 编码版本,例如 ...events/trades?since=2006-01-02T15:04:05%2B07:00

注释消息

根据 SSE 规范,任何以冒号开头的行都是注释,不包含数据。它通常是不遵循任何数据架构的自由文本。下面列举了几个注释消息的示例。

慢客户端

当客户端消费消息的速度不够快时,服务器会发送一条注释。示例:: you are reading too slowly, dropped 10000 messages

内部服务器错误

当服务器因内部服务器错误而关闭连接时,会作为注释发送一条错误消息(仅由 v2 和 v2beta1 端点发送)。示例:: internal server error

管理操作事件

这些事件涉及 Alpaca 管理员执行的管理操作,如账户暂停和清算。更多信息见此处。

[
  {
    "event_id": "01GTVS4FVS2KJDTPYH2WM6NAXF",
    "at": "2023-09-21T10:52:38.429059991Z",
    "note": "Status changed to REJECTED.", 
    "type": "legacy_note_admin_event", 
    "context": {}, 
    "category": "other", 
    "event_id": "03HBVNXKMWYGFTKTGNVR5R41F2", 
    "correspondent": "ABCD", 
    "belongs_to_kind": "account", 
    "created_by_kind": "admin", 
    "belongs_to_id_reference": "b4fe44b0-e51c-48f4-b674-990bea6cf8d7", 
    "created_by_id_reference": "f0e150df-94ad-48f9-8b0f-05433a3b53c3"
  }
]

非交易活动事件

涵盖股息、股票拆分和其他公司行动等非交易活动。在此阅读更多。

你可以在下面找到一些示例响应:

{
  "id": "{GUID}",
  "qty": 0,
  "cusip": "{CUSIP}",
  "price": null,
  "status": "executed",
  "symbol": "JEPQ",
  "group_id": "{GROUP_ID}",
  "entry_type": "DIV",
  "net_amount": 0.07,
  "description": "Cash DIV @ 0.465, Pos QTY: 0.15905, Rec Date: 2026-02-02",
  "settle_date": "2026-02-04",
  "system_date": "2026-02-04",
  "entry_sub_type": "CDIV",
  "per_share_amount": 0.46572,
  "corporate_action_id": "{CORP_ACTION_ID}",
  "account_id": "{ACCID}",
  "at": "2026-02-04T05:09:50.214Z",
  "event_ulid": "{ULID}"
}
{
  "id": "{GUID}",
  "qty": 0.05,
  "cusip": "{CUSIP}",
  "price": null,
  "status": "executed",
  "symbol": "LARK",
  "group_id": "{GROUP_ID}",
  "entry_type": "DIV",
  "net_amount": 0,
  "description": "Stock DIV @ 1.05, Pos QTY: -1, Rec Date: 2025-12-01",
  "settle_date": "2025-12-01",
  "system_date": "2025-12-15",
  "entry_sub_type": "SDIV",
  "per_share_amount": 1.05,
  "corporate_action_id": "{CORP_ACTION_ID}",
  "account_id": "{ACCID}",
  "at": "2025-12-15T05:09:50.214Z",
  "event_ulid": "{ULID}"
}
{
  "id": "{GUID}",
  "qty": 0,
  "cusip": "{CUSIP}",
  "price": null,
  "status": "executed",
  "symbol": "YMAG",
  "entry_type": "DIVNRA",
  "net_amount": -1.70,
  "description": "DIV tax withholding on $5.8 at 30% for tax country ARE; w8w9: w8",
  "settle_date": "2026-02-05",
  "system_date": "2026-02-05",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2026-02-05T05:09:50.214Z",
  "event_ulid": "{ULID}"
}
{
  "id": "{GUID}",
  "qty": 0,
  "cusip": "{CUSIP}",
  "price": null,
  "status": "executed",
  "symbol": "HSHP",
  "group_id": "{GROUP_ID}",
  "entry_type": "DIV",
  "net_amount": 0.9,
  "description": "Return of Capital @ 0.06, Pos QTY: 15, Rec Date: 2026-03-17",
  "settle_date": "2026-03-25",
  "system_date": "2026-03-25",
  "entry_sub_type": "ROC",
  "per_share_amount": null,
  "corporate_action_id": "{CORP_ACTION_ID}",
  "account_id": "{ACCID}",
  "at": "2026-03-25T05:09:50.289922Z",
  "event_ulid": "{ULID}"
}
# Reverse SPLIT
{
  "id": "{GUID}",
  "qty": -0.29194239,
  "price": 5.138,
  "status": "executed",
  "symbol": "FTCI",
  "cusip": "30320C103",
  "entry_type": "SPLIT",
  "net_amount": 0,
  "description": "REMOVE, From QTY:-0.29194239, To QTY:0.029194239, Position Value:1.5",
  "settle_date": "2024-12-02",
  "system_date": "2024-12-02",
  "entry_sub_type": "RSPLIT",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2024-12-01T22:30:42.997Z",
  "event_ulid": "{ULID}"
}
{
  "id": "{GUID}",
  "qty": 0.029194239,
  "price": 51.38,
  "status": "executed",
  "symbol": "FTCI",
  "cusip": "30320C301",
  "entry_type": "SPLIT",
  "net_amount": 0,
  "description": "ADD, From QTY:-0.29194239, To QTY:0.029194239, Position Value:1.5",
  "settle_date": "2024-12-02",
  "system_date": "2024-12-02",
  "entry_sub_type": "RSPLIT",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2024-12-01T22:33:41.647Z",
  "event_ulid": "{ULID}"
}

# Forward SPLIT
{
  "id": "{GUID}",
  "qty": -0.000807009,
  "price": 102.428,
  "status": "executed",
  "symbol": "ANET",
  "cusip": "040413106",
  "entry_type": "SPLIT",
  "net_amount": 0,
  "description": "REMOVE, From QTY:-0.000807009, To QTY:0.003228036, Position Value:0.08",
  "settle_date": "2024-12-04",
  "system_date": "2024-12-04",
  "entry_sub_type": "FSPLIT",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2024-12-03T23:27:03.971Z",
  "event_ulid": "{ULID}"
}
{
  "id": "{GUID}",
  "qty": 0.003228036,
  "price": 25.607,
  "status": "executed",
  "symbol": "ANET",
  "cusip": "040413205",
  "entry_type": "SPLIT",
  "net_amount": 0,
  "description": "ADD, From QTY:-0.000807009, To QTY:0.003228036, Position Value:0.08",
  "settle_date": "2024-12-04",
  "system_date": "2024-12-04",
  "entry_sub_type": "FSPLIT",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2024-12-03T23:36:20.775Z",
  "event_ulid": "{ULID}"  
}
{
  "id": "{GUID}",
  "qty": 0.054339042,
  "price": 12.8328,
  "status": "executed",
  "symbol": "CON",
  "cusip": "20603L102",
  "entry_type": "SPIN",
  "net_amount": 0,
  "description": "Target Symbol: CON, Initiating Symbol: SEM, 0.806971 CON for each 1 SEM",
  "settle_date": "2024-11-26",
  "system_date": "2024-11-26",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2024-11-26T00:31:04.184Z",
  "event_ulid": "{ULID}"
}
{
  "id": "{GUID}",
  "qty": 0.067337044,
  "price": 11.9203,
  "status": "executed",
  "symbol": "SEM",
  "cusip": "81619Q105",
  "entry_type": "SPIN",
  "net_amount": 0,
  "description": "ADD, Cost basis adjustment for source company",
  "settle_date": "2024-11-26",
  "system_date": "2024-11-26",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2024-11-26T08:01:06.529338Z",
  "event_ulid": "{ULID}"
}
{
  "id": "{GUID}",
  "qty": -0.067337044,
  "price": 22.276,
  "status": "executed",
  "symbol": "SEM",
  "cusip": "81619Q105",
  "entry_type": "SPIN",
  "net_amount": 0,
  "description": "REMOVE, Cost basis adjustment for source company",
  "settle_date": "2024-11-26",
  "system_date": "2024-11-26",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2024-11-26T08:01:06.529338Z",
  "event_ulid": "{ULID}"
}
{
  "id": "{GUID}",
  "qty": -2,
  "price": 5.88,
  "status": "executed",
  "symbol": "HIE",
  "cusip": "600379101",
  "entry_type": "MA",
  "net_amount": 0,
  "description": "Cash Merger $12.6341694 per share",
  "settle_date": "2024-11-25",
  "system_date": "2024-11-25",
  "entry_sub_type": "CMA",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2024-11-25T10:59:08.776Z",
  "event_ulid": "{ULID}"
}
{
  "id": "{GUID}",
  "qty": 0,
  "price": null,
  "status": "executed",
  "symbol": "HIE",
  "cusip": "600379101",
  "entry_type": "MA",
  "net_amount": 25.27,
  "description": "Cash Merger $12.6341694 per share",
  "settle_date": "2024-11-25",
  "system_date": "2024-11-25",
  "entry_sub_type": "CMA",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2024-11-25T10:59:08.776Z",
  "event_ulid": "{ULID}"
}
{
  "id": "{GUID}",
  "qty": -0.716836558,
  "price": 24.1617,
  "status": "executed",
  "symbol": "MRO",
  "cusip": "718507106",
  "entry_type": "MA",
  "net_amount": 0,
  "description": "Stock Merger 0.255 COP for 1 MRO",
  "settle_date": "2024-11-22",
  "system_date": "2024-11-22",
  "entry_sub_type": "SMA",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2024-11-21T23:16:27.145Z",
  "event_ulid": "{ULID}"
}
{
  "id": "{GUID}",
  "qty": 0.182793322,
  "price": 94.7518,
  "status": "executed",
  "symbol": "COP",
  "cusip": "912656105",
  "entry_type": "MA",
  "net_amount": 0,
  "description": "Stock Merger 0.255 COP for 1 MRO",
  "settle_date": "2024-11-22",
  "system_date": "2024-11-22",
  "entry_sub_type": "SMA",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2024-11-21T23:17:07.588Z",
  "event_ulid": "{ULID}"
}
# Removal of old shares
{
  "id": "{GUID}",
  "qty": -6.522449746,
  "price": 9.4663,
  "status": "executed",
  "symbol": "PSTX",
  "cusip": "73730P108",
  "entry_type": "MA",
  "net_amount": 0,
  "description": "Stock Cash Merger 1 737CVR019 and $9 for 1 PSTX",
  "settle_date": "2025-01-13",
  "system_date": "2025-01-13",
  "entry_sub_type": "SCMA",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2025-01-13T23:01:06.529338Z",
  "event_ulid": "{ULID}"
}


# Allocation of new shares
{
  "id": "{GUID}",
  "qty": 6.522449746,
  "price": 0.4663,
  "status": "executed",
  "symbol": "737CVR019",
  "cusip": "737CVR019",
  "entry_type": "MA",
  "net_amount": 0,
  "description": "Stock Cash Merger 1 737CVR019 and $9 for 1 PSTX",
  "settle_date": "2025-01-13",
  "system_date": "2025-01-13",
  "entry_sub_type": "SCMA",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2025-01-13T23:01:06.529338Z",
  "event_ulid": "{ULID}"
}

# Allocation of cash
{
  "id": "{GUID}",
  "qty": 0,
  "price": null,
  "status": "executed",
  "symbol": "PSTX",
  "cusip": "73730P108",
  "entry_type": "MA",
  "net_amount": 58.7,
  "description": "Stock Cash Merger 1 737CVR019 and $9 for 1 PSTX",
  "settle_date": "2025-01-13",
  "system_date": "2025-01-13",
  "entry_sub_type": "SCMA",
  "per_share_amount": null,
   "account_id": "{ACCID}",
  "at": "2025-01-13T23:01:06.529338Z",
  "event_ulid": "{ULID}"
}


{
  "id": "{GUID}",
  "qty": -8,
  "price": null,
  "status": "executed",
  "symbol": "SRV.RT",
  "cusip": "231631128",
  "entry_type": "REORG",
  "net_amount": 0,
  "description": "Worthless Removal - SRV.RT",
  "settle_date": "2024-11-27",
  "system_date": "2024-11-27",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2024-11-26T23:13:33.604Z",
  "event_ulid": "{ULID}"
}
{
  "id": "{GUID}",
  "qty": 0,
  "price": null,
  "status": "executed",
  "symbol": "",
  "entry_type": "FEE",
  "net_amount": -0.01,
  "description": "REG fee for proceed of $15.37 on 2024-12-10 by {ACCOUNT_NUMBER}",
  "settle_date": "2024-12-11",
  "system_date": "2024-12-10",
  "entry_sub_type": "REG",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2024-12-10T17:19:17.525338Z",
  "event_ulid": "{ULID}"
}
{
  "id": "{GUID}",
  "qty": 0,
  "price": null,
  "status": "executed",
  "symbol": "",
  "entry_type": "FEE",
  "net_amount": -0.01,
  "description": "TAF fee for proceed of 1.371115174 shares (2 trades) on 2024-12-10 by {ACCOUNT_NUMBER}",
  "settle_date": "2024-12-11",
  "system_date": "2024-12-10",
  "entry_sub_type": "TAF",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2024-12-10T17:19:17.525338Z",
  "event_ulid": "{ULID}"
}
{
  "id": "{GUID}",
  "qty": 0,
  "price": null,
  "status": "executed",
  "symbol": "",
  "entry_type": "FEE",
  "net_amount": -0.17,
  "description": "ORF fee for proceed of 6 contracts on 2024-06-18 by 399748018",
  "settle_date": "2024-06-18",
  "system_date": "2024-06-18",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2024-06-18T08:01:06.529338Z",
  "event_ulid": "{ULID}"
}
{
  "id": "{GUID}",
  "qty": 0,
  "price": null,
  "status": "executed",
  "symbol": "",
  "entry_type": "FEE",
  "net_amount": -0.02,
  "description": "OCC Clearing Fee",
  "settle_date": "2024-06-18",
  "system_date": "2024-06-18",
  "execution_id": "{EXID}",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2024-06-18T08:01:06.529338Z",
  "event_ulid": "{ULID}" 
}
{
  "id": "{GUID}",
  "qty": 0,
  "price": null,
  "status": "executed",
  "symbol": "",
  "entry_type": "FEE",
  "net_amount": 0.05,
  "description": "2024-11-27 Non-Retail - Exchange Fees/Rebates",
  "settle_date": "2024-11-29",
  "system_date": "2024-11-29",
  "entry_sub_type": "NRV",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2024-11-29T08:01:06.529338Z",
  "event_ulid": "{ULID}" 
}

{
  "id": "{GUID}",
  "qty": 1341,
  "price": 0.0025,
  "status": "executed",
  "symbol": "",
  "entry_type": "FEE",
  "net_amount": -3.35,
  "description": "2024-11-27 Non-Retail - Alpaca Trading Fee",
  "settle_date": "2024-11-29",
  "system_date": "2024-11-29",
  "entry_sub_type": "NRC",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2024-11-29T08:01:06.529338Z",
  "event_ulid": "{ULID}" 
}


{
  "id": "{GUID}",
  "qty": 0,
  "price": null,
  "status": "executed",
  "symbol": "",
  "swap_rate": 143.6265,
  "entry_type": "FEE",
  "net_amount": -1,
  "description": "Swap Fee Gross Income",
  "settle_date": "2024-10-02",
  "system_date": "2024-10-01",
  "execution_id": "{EXEC ID}",
  "entry_sub_type": "LCT",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2023-08-01T08:01:06.529338Z",
  "event_ulid": "{ULID}"
}
{
  "id": "{GUID}",
  "qty": 0,
  "price": null,
  "status": "executed",
  "symbol": "",
  "entry_type": "CSD",
  "net_amount": 100,
  "description": "",
  "settle_date": "2024-03-11",
  "system_date": "2024-03-11",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2024-03-11T08:01:06.529338Z",
  "event_ulid": "{ULID}"
}
{
  "id": "{GUID}",
  "qty": 0,
  "price": null,
  "status": "executed",
  "symbol": "",
  "entry_type": "CSW",
  "net_amount": -32.97,
  "description": "type: ach, subtype: none, statement_id: 4f0cfc49-0395-475c-b8ca-3586e394d256, direction: OUTGOING",
  "settle_date": "2024-09-20",
  "system_date": "2024-09-20",
  "account_id": "{ACCID}",
  "event_ulid": "{ULID}",
  "at": "2024-09-20T08:01:06.529338Z",
  "per_share_amount": null
}
# Symbol Name Change (SNC)
{
  "id": "{GUID}",
  "qty": -1.25,
  "price": 9.99,
  "status": "executed",
  "symbol": "YTEN",
  "cusip": "591018809",
  "entry_type": "NC",
  "net_amount": 0,
  "description": "Name Change from YTEN to YTENQ",
  "settle_date": "2024-12-10",
  "system_date": "2024-12-10",
  "entry_sub_type": "SNC",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2024-12-09T23:01:06.529338Z",
  "event_ulid": "{ULID}"
}

{
  "id": "{GUID}",
  "qty": 1.25,
  "price": 9.99,
  "status": "executed",
  "symbol": "YTENQ",
  "cusip": "591018809",
  "entry_type": "NC",
  "net_amount": 0,
  "description": "Name Change from YTEN to YTENQ",
  "settle_date": "2024-12-10",
  "system_date": "2024-12-10",
  "entry_sub_type": "SNC",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2024-12-09T23:01:06.529338Z",
  "event_ulid": "{ULID}"
}

# CUSIP Name Change (CNC)
{
  "id": "{GUID}",
  "qty": -150,
  "price": 0.045,
  "status": "executed",
  "symbol": "RMSGW",
  "cusip": "591018809",
  "entry_type": "NC",
  "net_amount": 0,
  "description": "Name Change from RMSGW to RMSGW",
  "settle_date": "2024-11-21",
  "system_date": "2024-11-21",
  "entry_sub_type": "CNC",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2024-11-21T00:22:06.529338Z",
  "event_ulid": "{ULID}"
}

{
  "id": "{GUID}",
  "qty": 150,
  "price": 0.045,
  "status": "executed",
  "symbol": "RMSGW",
  "cusip": "591018810",
  "entry_type": "NC",
  "net_amount": 0,
  "description": "Name Change from RMSGW to RMSGW",
  "settle_date": "2024-11-21",
  "system_date": "2024-11-21",
  "entry_sub_type": "CNC",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2024-11-21T00:22:06.529338Z",
  "event_ulid": "{ULID}"
}

# Symbol & CUSIP Name Change (SCNC)

{
  "id": "{GUID}",
  "qty": -29,
  "price": 0.3166,
  "status": "executed",
  "symbol": "DXFFY",
  "cusip": "591018809",
  "entry_type": "NC",
  "net_amount": 0,
  "description": "Name Change from DXFFY to DXFFD",
  "settle_date": "2024-12-04",
  "system_date": "2024-12-04",
  "entry_sub_type": "SCNC",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2024-12-03T23:11:06.529338Z",
  "event_ulid": "{ULID}"
}

{
  "id": "{GUID}",
  "qty": 29,
  "price": 0.3166,
  "status": "executed",
  "symbol": "DXFFD",
  "cusip": "591018810",
  "entry_type": "NC",
  "net_amount": 0,
  "description": "Name Change from DXFFY to DXFFD",
  "settle_date": "2024-12-04",
  "system_date": "2024-12-04",
  "entry_sub_type": "SCNC",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2024-12-03T23:12:06.529338Z",
  "event_ulid": "{ULID}"
}
{
  "id": "{GUID}",
  "qty": 2650,
  "price": null,
  "status": "executed",
  "symbol": "067RGT019",
  "cusip": "067RGT019",
  "entry_type": "VOF",
  "net_amount": 0,
  "description": "BNED rights distribution",
  "settle_date": "2024-05-17",
  "system_date": "2024-05-17",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2024-05-17T08:01:06.529338Z",
  "event_ulid": "{ULID}"
}
{
  "id": "{GUID}", 
  "qty": -2500, 
  "price": null, 
  "status": "executed", 
  "symbol": "067RGT019", 
  "cusip": "067RGT019",
  "entry_type": "VOF", 
  "net_amount": 0, 
  "description": "Rights Exercise (symbol BNED; expiration 06/05/24)", 
  "settle_date": "2024-06-05", 
  "system_date": "2024-06-05", 
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2024-06-05T08:01:06.529338Z",
  "event_ulid": "{ULID}"
}
{
  "id": "{GUID}",
  "qty": 0,
  "price": null,
  "status": "pending",
  "symbol": "",
  "entry_type": "JNLC",
  "net_amount": -0.29,
  "description": "Journal ID: {Journal ID}",
  "settle_date": "2024-05-17",
  "system_date": "2024-05-17",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2024-05-17T08:01:06.529338Z",
  "event_ulid": "{ULID}"
}
{
  "id": "{GUID}",
  "qty": -0.008611,
  "price": 993,
  "status": "executed",
  "symbol": "TSLA",
  "cusip": "88160R101",
  "entry_type": "JNLS",
  "net_amount": 0,
  "description": "ID: {ACCID} - {ACCID}",
  "settle_date": "2023-07-18",
  "system_date": "2023-07-18",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2023-07-18T08:01:06.529338Z",
  "event_ulid": "{ULID}"
}
{
"id": "{GUID}", 
 "qty": 100, 
 "cusip": "{CUSIP}",
 "price": 285, 
 "status": "executed",
 "symbol": "IBM", 
 "group_id": "{GROUP_ID}", 
 "entry_type": "OPTRD", 
 "net_amount": -28500, 
 "description": "Options Trade", 
 "settle_date": "2026-02-19", 
 "system_date": "2026-02-18", 
 "per_share_amount": null, 
 "account_id": "{ACCID}", 
 "at": "2026-02-19T05:09:50.529338Z", 
 "event_ulid": "{ULID}"
}
{
  "id": "{GUID}",
  "qty": -1,
  "cusip": "{CUSIP}",
  "price": null,
  "status": "executed",
  "symbol": "META260218C00667500",
  "group_id": "{GROUP_ID}",
  "entry_type": "OPEXP",
  "net_amount": 0,
  "description": "Options Expiry",
  "settle_date": "2026-02-18",
  "system_date": "2026-02-18",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2026-02-18T05:09:50.529338Z",
  "event_ulid": "{ULID}"
}
{
  "id": "{GUID}",
  "qty": 1,
  "cusip": "{CUSIP}",
  "price": null,
  "status": "executed",
  "symbol": "MSTX260220P00003500",
  "group_id": "{GROUP_ID}",
  "entry_type": "OPASN",
  "net_amount": 0,
  "description": "Options Assignment",
  "settle_date": "2026-02-18",
  "system_date": "2026-02-18",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2026-02-18T05:09:50.529338Z",
  "event_ulid": "{ULID}"
}
{
  "id": "{GUID}",
  "qty": -1,
  "cusip": "{CUSIP}",
  "price": null,
  "status": "executed",
  "symbol": "AUTL260220C00001500",
  "group_id": "{GROUP_ID}",
  "entry_type": "OPEXC",
  "net_amount": 0,
  "description": "Options Exercise",
  "settle_date": "2026-02-18",
  "system_date": "2026-02-18",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2026-02-18T05:09:50.529338Z",
  "event_ulid": "{ULID}"
}
{
  "id": "{GUID}",
  "qty": 0,
  "price": null,
  "status": "executed",
  "symbol": "",
  "group_id": "{GROUP_ID}",
  "entry_type": "OPCSH",
  "net_amount": -115.88,
  "description": "Options Cash",
  "settle_date": "2026-01-20",
  "system_date": "2026-01-16",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2026-01-20T05:09:50.289922Z",
  "event_ulid": "{ULID}"
}
{
  "id": "{GUID}",
  "qty": 0,
  "price": null,
  "status": "executed",
  "symbol": "",
  "entry_type": "INT",
  "net_amount": -0.02,
  "description": "Monthly Int - {Month} {Year}",
  "settle_date": "2023-07-31",
  "system_date": "2023-08-01",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2023-08-01T08:01:06.529338Z",
  "event_ulid": "{ULID}"
}
{
  "id": "{GUID}",
  "qty": 0,
  "price": null,
  "status": "executed",
  "symbol": "",
  "swap_rate": 1,
  "entry_type": "ACATC",
  "net_amount": 5,
  "description": "",
  "settle_date": "2024-05-17",
  "system_date": "2024-05-17",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2024-05-17T08:01:06.529338Z",
  "event_ulid": "{ULID}"
}
{
  "id": "{GUID}",
  "qty": 6,
  "price": 135.34,
  "status": "executed",
  "symbol": "NVDA",
  "cusip": "67066G104",
  "entry_type": "ACATS",
  "net_amount": 0,
  "description": "DTC TRANSFER",
  "settle_date": "2024-12-02",
  "system_date": "2024-12-02",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2024-12-02T08:01:06.529338Z",
  "event_ulid": "{ULID}"
}
{
  "id": "{GUID}",
 	"qty": 0,
  "price": null,
  "status": "executed",
  "symbol": "",
  "entry_type": "INT",
  "net_amount": -54.14,
  "description": "Monthly Int - SEPTEMBER 2024",
  "settle_date": "2024-09-30",
  "system_date": "2024-10-01",
  "entry_sub_type": "MGN",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2023-08-01T08:01:06.529338Z",
  "event_ulid": "{ULID}"
}
{
  "id": "{GUID}",
  "qty": 0,
  "price": null,
  "status": "executed",
  "symbol": "TLT",
  "cusip": "464287432",
  "entry_type": "INT",
  "net_amount": 0.2,
  "description": "Qualified interest income reallocation for 2024",
  "settle_date": "2024-12-06",
  "system_date": "2024-12-06",
  "entry_sub_type": "QII",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2023-08-01T08:01:06.529338Z",
  "event_ulid": "{ULID}"
}
{
  "id": "{GUID}",
 	"qty": 9.25,
  "price": null,
  "status": "executed",
  "symbol": "SWEEPFDIC",
  "cusip": "SWEEPFDIC",
  "entry_type": "INT",
  "net_amount": 0,
  "description": "September 2024 Sweep",
  "settle_date": "2024-09-30",
  "system_date": "2024-09-30",
  "entry_sub_type": "SWP",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2023-08-01T08:01:06.529338Z",
  "event_ulid": "{ULID}"
}
{
  "id": "{GUID}",
  "qty": -5,
  "price": 0.49,
  "status": "executed",
  "symbol": "F250228P00010000",
  "entry_type": "OPCA",
  "net_amount": 245,
  "description": "REMOVE old contract symbol",
  "settle_date": "2025-02-18",
  "system_date": "2025-02-18",
  "entry_sub_type": "DIV.CDIV",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2024-05-17T08:01:06.529338Z",
  "event_ulid": "{ULID}",
  "group_id": "617b39aa-475b-42cd-87c9-a5bde79b149b"
}

{
  "id": "{GUID}",
  "qty": 5,
  "price": 0.49,
  "status": "executed",
  "symbol": "F250228P00009850",
  "entry_type": "OPCA",
  "net_amount": -245,
  "description": "ADD new contract symbol",
  "settle_date": "2025-02-18",
  "system_date": "2025-02-18",
  "entry_sub_type": "DIV.CDIV",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2024-05-17T08:01:06.529338Z",
  "event_ulid": "{ULID}",
  "group_id": "617b39aa-475b-42cd-87c9-a5bde79b149b"
}
{
  "id": "{GUID}",
  "qty": -2,
  "price": 1.13,
  "status": "executed",
  "symbol": "NKLA270115C00000500",
  "entry_type": "OPCA",
  "net_amount": 226,
  "description": "REMOVE old contract symbol",
  "settle_date": "2025-02-26",
  "system_date": "2025-02-26",
  "entry_sub_type": "NC.SNC",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2024-05-17T08:01:06.529338Z",
  "event_ulid": "{ULID}",
  "group_id": "617b39aa-475b-42cd-87c9-a5bde79b149b"
}

{
  "id": "{GUID}",
  "qty": 2,
  "price": 1.13,
  "status": "executed",
  "symbol": "NKLAQ270115C00000500",
  "entry_type": "OPCA",
  "net_amount": -226,
  "description": "ADD new contract symbol",
  "settle_date": "2025-02-26",
  "system_date": "2025-02-26",
  "entry_sub_type": "NC.SNC",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2024-05-17T08:01:06.529338Z",
  "event_ulid": "{ULID}",
  "group_id": "617b39aa-475b-42cd-87c9-a5bde79b149b"
}
{
  "id": "{GUID}",
  "qty": -15,
  "price": 0.08,
  "status": "executed",
  "symbol": "WKHS250417C00002000",
  "entry_type": "OPCA",
  "net_amount": 120,
  "description": "REMOVE old contract symbol",
  "settle_date": "2025-03-17",
  "system_date": "2025-03-17",
  "entry_sub_type": "SPLIT.RSPLIT",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2024-05-17T08:01:06.529338Z",
  "event_ulid": "{ULID}",
  "group_id": "617b39aa-475b-42cd-87c9-a5bde79b149b"
}

{
  "id": "{GUID}",
  "qty": 15,
  "price": 0.08,
  "status": "executed",
  "symbol": "WKHS2250417C00002000",
  "entry_type": "OPCA",
  "net_amount": -120,
  "description": "ADD new contract symbol",
  "settle_date": "2025-03-17",
  "system_date": "2025-03-17",
  "entry_sub_type": "SPLIT.RSPLIT",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2024-05-17T08:01:06.529338Z",
  "event_ulid": "{ULID}",
  "group_id": "617b39aa-475b-42cd-87c9-a5bde79b149b"
}
{
  "id": "{GUID}",
  "qty": -1,
  "price": 10.5,
  "status": "executed",
  "symbol": "LRCX241115C00950000",
  "entry_type": "OPCA",
  "net_amount": 1050,
  "description": "REMOVE old contract symbol",
  "settle_date": "2024-10-03",
  "system_date": "2024-10-03",
  "entry_sub_type": "SPLIT.FSPLIT",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2024-05-17T08:01:06.529338Z",
  "event_ulid": "{ULID}",
  "group_id": "617b39aa-475b-42cd-87c9-a5bde79b149b"
}

{
  "id": "{GUID}",
  "qty": 10,
  "price": 1.05,
  "status": "executed",
  "symbol": "LRCX241115C00095000",
  "entry_type": "OPCA",
  "net_amount": -1050,
  "description": "ADD new contract symbol",
  "settle_date": "2024-10-03",
  "system_date": "2024-10-03",
  "entry_sub_type": "SPLIT.FSPLIT",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2024-05-17T08:01:06.529338Z",
  "event_ulid": "{ULID}",
  "group_id": "617b39aa-475b-42cd-87c9-a5bde79b149b"
}
{
  "id": "{GUID}",
  "qty": -2,
  "price": 0.65,
  "status": "executed",
  "symbol": "CEIX250117P00095000",
  "entry_type": "OPCA",
  "net_amount": 130,
  "description": "REMOVE old contract symbol",
  "settle_date": "2025-01-15",
  "system_date": "2025-01-15",
  "entry_sub_type": "MA.SMA",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2024-05-17T08:01:06.529338Z",
  "event_ulid": "{ULID}",
  "group_id": "617b39aa-475b-42cd-87c9-a5bde79b149b"
}

{
  "id": "{GUID}",
  "qty": 2,
  "price": 0.65,
  "status": "executed",
  "symbol": "CNR1250117P00095000",
  "entry_type": "OPCA",
  "net_amount": -130,
  "description": "ADD new contract symbol",
  "settle_date": "2025-01-15",
  "system_date": "2025-01-15",
  "entry_sub_type": "MA.SMA",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2024-05-17T08:01:06.529338Z",
  "event_ulid": "{ULID}",
  "group_id": "617b39aa-475b-42cd-87c9-a5bde79b149b"
}
{
  "id": "{GUID}",
  "qty": -1,
  "price": 0.24,
  "status": "executed",
  "symbol": "CMPO250417C00020000",
  "entry_type": "OPCA",
  "net_amount": 24,
  "description": "REMOVE old contract symbol",
  "settle_date": "2025-02-28",
  "system_date": "2025-02-28",
  "entry_sub_type": "SPIN",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2024-05-17T08:01:06.529338Z",
  "event_ulid": "{ULID}",
  "group_id": "617b39aa-475b-42cd-87c9-a5bde79b149b"
}

{
  "id": "{GUID}",
  "qty": 1,
  "price": 0.24,
  "status": "executed",
  "symbol": "CMPO1250417C00020000",
  "entry_type": "OPCA",
  "net_amount": -24,
  "description": "ADD new contract symbol",
  "settle_date": "2025-02-28",
  "system_date": "2025-02-28",
  "entry_sub_type": "SPIN",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2024-05-17T08:01:06.529338Z",
  "event_ulid": "{ULID}",
  "group_id": "617b39aa-475b-42cd-87c9-a5bde79b149b"
}
{
  "id": "{GUID}",
  "qty": 1,
  "price": 23.75,
  "status": "executed",
  "symbol": "PLTR261218C00120000",
  "entry_type": "ACATS",
  "net_amount": 0,
  "description": "ACAT Transfer 20250500034276",
  "settle_date": "2025-02-27",
  "system_date": "2025-02-27",
  "per_share_amount": null,
  "account_id": "{ACCID}",
  "at": "2025-02-27T08:01:06.529338Z",
  "event_ulid": "{ULID}"
}
// A CGD event could have 1 leg or 2 legs, because it can have either the LTCG/STCG subtype or both subtypes. 
// LTCG leg
{
  "id": "<NTA_UUID_LTCG>",
  "qty": "100",
  "cusip": "36261K509",
  "price": null,
  "status": "executed",
  "symbol": "GCAD",
  "group_id": "{GROUP_ID}",
  "entry_type": "CGD",
  "net_amount": "45.86",
  "description": "LTCG: Long-Term Capital Gain @ 0.45855, Pos QTY: 100, Rec Date: 2025-12-29",
  "settle_date": "2026-01-09",
  "system_date": "2026-01-09",
  "entry_sub_type": "LTCG",
  "per_share_amount": 0.45855,
  "corporate_action_id": "{CORP_ACTION_ID}",
  "account_id": "<ACCID>",
  "at": "2026-01-09T14:00:00.123456789Z",
  "event_ulid": "{ULID}",
  "event_id": 123456,
  "currency": "USD"
}

// STCG leg
{
  "id": "<NTA_UUID_STCG>",
  "qty": "100",
  "cusip": "36261K509",
  "price": null,
  "status": "executed",
  "symbol": "GCAD",
  "group_id": "{GROUP_ID}",
  "entry_type": "CGD",
  "net_amount": "11.02",
  "description": "STCG: Short-Term Capital Gain @ 0.11019, Pos QTY: 100, Rec Date: 2025-12-29",
  "settle_date": "2026-01-09",
  "system_date": "2026-01-09",
  "entry_sub_type": "STCG",
  "per_share_amount": 0.11019,
  "corporate_action_id": "{CORP_ACTION_ID}",
  "account_id": "<ACCID>",
  "at": "2026-01-09T14:00:00.456789012Z",
  "event_ulid": "{ULID}",
  "event_id": 123457,
  "currency": "USD"
}
// remove shares
{
  "id": "20260702000000000::<NTAID-1>",
  "account_id": "<ACCID>",
  "activity_type": "REO",
  "activity_sub_type": "REOS",
  "date": "2026-07-02",
  "net_amount": "0",
  "description": "Stock Reorganization 1 SECZ for 1 CEPT",
  "symbol": "CEPT",
  "cusip": "12345A678",
  "qty": "-50",
  "price": "12.69",
  "status": "executed",
  "group_id": "<GRPID>",
  "corporate_action_id": "<CAID>",
  "currency": "USD"
}

// add shares 
{
  "id": "20260702000000000::<NTAID-2>",
  "account_id": "<ACCID>",
  "activity_type": "REO",
  "activity_sub_type": "REOS",
  "date": "2026-07-02",
  "net_amount": "0",
  "description": "Stock Reorganization 1 SECZ for 1 CEPT",
  "symbol": "SECZ",
  "cusip": "98765Z432",
  "qty": "50",
  "price": "12.69",
  "status": "executed",
  "group_id": "<GRPID>",
  "corporate_action_id": "<CAID>",
  "currency": "USD"
}



// remove shares
{
  "id": "20260702000000000::<NTAID-1>",
  "account_id": "<ACCID>",
  "activity_type": "REO",
  "activity_sub_type": "REOC",
  "date": "2026-07-02",
  "net_amount": "0",
  "description": "Cash Reorganization $10.00 per share",
  "symbol": "CEPT",
  "cusip": "12345A678",
  "qty": "-50",
  "price": "10.00",
  "status": "executed",
  "group_id": "<GRPID>",
  "corporate_action_id": "<CAID>",
  "currency": "USD"
}
// add cash
{
  "id": "20260702000000000::<NTAID-2>",
  "account_id": "<ACCID>",
  "activity_type": "REO",
  "activity_sub_type": "REOC",
  "date": "2026-07-02",
  "net_amount": "500",
  "description": "Cash Reorganization $10.00 per share",
  "symbol": "CEPT",
  "cusip": "12345A678",
  "per_share_amount": "10",
  "status": "executed",
  "group_id": "<GRPID>",
  "corporate_action_id": "<CAID>",
  "currency": "USD"
}
// remove shares
{
  "id": "20260702000000000::<NTAID-1>",
  "account_id": "<ACCID>",
  "activity_type": "REO",
  "activity_sub_type": "REOSC",
  "date": "2026-07-02",
  "net_amount": "0",
  "description": "Stock and Cash Reorganization $3.00 per share, 0.5 SECZ for 1 CEPT",
  "symbol": "CEPT",
  "cusip": "12345A678",
  "qty": "-50",
  "price": "12.69",
  "status": "executed",
  "group_id": "<GRPID>",
  "corporate_action_id": "<CAID>",
  "currency": "USD"
}

// add shares
{
  "id": "20260702000000000::<NTAID-3>",
  "account_id": "<ACCID>",
  "activity_type": "REO",
  "activity_sub_type": "REOSC",
  "date": "2026-07-02",
  "net_amount": "0",
  "description": "Stock and Cash Reorganization $3.00 per share, 0.5 SECZ for 1 CEPT",
  "symbol": "SECZ",
  "cusip": "98765Z432",
  "qty": "25",
  "price": "12.69",
  "status": "executed",
  "group_id": "<GRPID>",
  "corporate_action_id": "<CAID>",
  "currency": "USD"
}

// add cash
{
  "id": "20260702000000000::<NTAID-2>",
  "account_id": "<ACCID>",
  "activity_type": "REO",
  "activity_sub_type": "REOSC",
  "date": "2026-07-02",
  "net_amount": "150",
  "description": "Stock and Cash Reorganization $3.00 per share, 0.5 SECZ for 1 CEPT",
  "symbol": "CEPT",
  "cusip": "12345A678",
  "per_share_amount": "3",
  "status": "executed",
  "group_id": "<GRPID>",
  "corporate_action_id": "<CAID>",
  "currency": "USD"
}
{
  "id": "20260702000000000::<NTAID>",
  "account_id": "<ACCID>",
  "activity_type": "INT",
  "activity_sub_type": "FI",
  "date": "2026-07-02",
  "net_amount": "98.75",
  "description": "Interest Payment @ 19.75, Pos QTY: 5000, Rec Date: 2026-07-01",
  "symbol": "US61761JZN26",
  "cusip": "61761JZN2",
  "status": "executed",
  "currency": "USD"
}

系统事件

这些事件涉及系统级操作,主要由我们后端的自动化流程创建。文档在此

{
  "event_id": "01KE90MX0DXW9NCG9HT4N2WDPW",
  "at": "2026-01-06T06:41:57.261948Z",
  "type": "eod_balances_ready", 
  "system_date": "2026-01-05",
  "description": "End-of-day balances are now available."
}
{
  "event_id": "01KE90P5Q4J1WPBEF6075A48RE",
  "at": "2026-01-06T06:42:38.948967Z",
  "type": "eod_positions_ready", 
  "system_date": "2026-01-05",
  "description": "End-of-day positions are now available."
}

活动事件

这些事件提供了对影响账户的交易更为全面的视图。此类交易事件既包括交易活动也包括非交易活动,包括但不限于:交易、公司行动、费用、日记账、转账(ACAT、存款、取款)。

  • 详细的 open api 规范可在此处找到。
  • 完整的集成指南可在此处找到。

注意:此端点旨在替代旧版账户活动 API,后者性能和表达力较差。