{
"version": "V1.6.0",
"event_name": "STOCKS_ORDER",
"event_type": "stocks.order.processing",
"event_id": "01a0c198-773f-7647-a938-6f46df294ff2",
"source_id": "53fe3d55-85ff-4804-b6f0-a25a32aa082f",
"data": {
"business_event_id": "46fedc3a-0858-5458-829e-6caa6b22a963",
"occurred_at": "2026-09-21T01:33:08.5888437Z",
"order": {
"asset_id": "7453f146-b267-11f1-b4f4-0abd773ba497",
"cash_amount": null,
"client_reference": "stocks-docs-20260921-buy-01",
"completed_at": null,
"created_at": "2026-09-21T01:33:08.629Z",
"executed_price": null,
"executed_quantity": null,
"failed_at": null,
"failure_code": null,
"failure_message": null,
"fees": null,
"funding_currency": "USDC",
"network": "Ethereum",
"order_id": "53fe3d55-85ff-4804-b6f0-a25a32aa082f",
"quote_id": "0576b03b-56dd-48b1-ba24-058ce90d0f53",
"quoted_quantity": "0.00297066689243735",
"side": "BUY",
"status": "PENDING",
"symbol": "AAPLx",
"total_amount": null,
"transaction_hash": null,
"updated_at": "2026-09-21T01:33:08.5888437Z"
}
}
}
Stocks
Stocks 订单
接收 Stocks 订单处理中、已完成和失败的状态通知。
WEBHOOK
stocksOrder
{
"version": "V1.6.0",
"event_name": "STOCKS_ORDER",
"event_type": "stocks.order.processing",
"event_id": "01a0c198-773f-7647-a938-6f46df294ff2",
"source_id": "53fe3d55-85ff-4804-b6f0-a25a32aa082f",
"data": {
"business_event_id": "46fedc3a-0858-5458-829e-6caa6b22a963",
"occurred_at": "2026-09-21T01:33:08.5888437Z",
"order": {
"asset_id": "7453f146-b267-11f1-b4f4-0abd773ba497",
"cash_amount": null,
"client_reference": "stocks-docs-20260921-buy-01",
"completed_at": null,
"created_at": "2026-09-21T01:33:08.629Z",
"executed_price": null,
"executed_quantity": null,
"failed_at": null,
"failure_code": null,
"failure_message": null,
"fees": null,
"funding_currency": "USDC",
"network": "Ethereum",
"order_id": "53fe3d55-85ff-4804-b6f0-a25a32aa082f",
"quote_id": "0576b03b-56dd-48b1-ba24-058ce90d0f53",
"quoted_quantity": "0.00297066689243735",
"side": "BUY",
"status": "PENDING",
"symbol": "AAPLx",
"total_amount": null,
"transaction_hash": null,
"updated_at": "2026-09-21T01:33:08.5888437Z"
}
}
}
事件类型
所有订单通知使用event_name: STOCKS_ORDER,通过 event_type 区分订单阶段。
| 事件类型 | 订单状态 | 含义 |
|---|---|---|
stocks.order.processing | PENDING | 订单已受理,尚未确定的成交数据为空。 |
stocks.order.completed | SUCCESS | 订单已完成结算,使用实际成交数值核对结果。 |
stocks.order.failed | FAILED | 订单已进入终态失败。未创建订单的报价拒绝不会触发此通知。 |
订单快照
三个事件共用下方的通知封装和订单字段定义。data.order 是事件发生时的订单快照。
- 处理中:
completed_at、failed_at、failure_code和failure_message为空。 - 已完成:
completed_at有值,失败相关字段为空。通知提供成交数量、本金、费用和总金额;没有可用结算价格时,成交价可以为空。 - 失败:
failed_at、failure_code和failure_message有值,completed_at为空。成交数量、金额和费用为空。失败码包括STOCKS_ORDER_FAILED,以及订单创建后报价在执行前过期时的STOCKS_QUOTE_EXPIRED。
处理通知
通知可能重复或乱序到达。处理中通知晚于终态通知到达时,不要回退订单状态。通知投递超时或缺少交易哈希本身不表示订单失败。 按照接收订单 Webhook完成验签、持久化以及投递与业务事件去重。使用查询订单核对当前结果。请求体
application/json
Version configured for the webhook subscription.
可用选项:
STOCKS_ORDER 可用选项:
stocks.order.processing, stocks.order.completed, stocks.order.failed Notification identifier. HTTP retries of the same delivery record retain this identifier.
Order identifier; equals data.order.order_id.
Show child attributes
Show child attributes
响应
Event durably received.

