撤單
DELETE/api/v1.0/accounts/{acc_id}/orders/{order_id}?exchange={exchange}撤銷已有訂單。
路徑參數
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
acc_id | string | 是 | 業務賬戶 ID。 |
order_id | string | 是 | 訂單 ID。 |
請求參數
| 參數 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
exchange | string | 查詢 | 是 | 交易所。可選值:US、SEHK、SGX、SSE、SZSE、JP、CA 等 |
請求示例
bash
curl -X DELETE 'https://webapi.moomoo.com/api/v1.0/accounts/{acc_id}/orders/{order_id}?exchange=US' \
-H 'Authorization: Bearer <AccessToken>' | jq響應示例
json
{
"s": "ok"
}失敗響應:
json
{
"s": "error",
"errcode": -1200,
"errmsg": "Error message."
}