Skip to content

Commit

Permalink
feat/remove order type (#254)
Browse files Browse the repository at this point in the history
* feat: Add `last_share`, `last_price` field to trade push

* feat/remove order type
  • Loading branch information
lorian7392 authored Apr 29, 2024
1 parent 5b01508 commit f5e3e01
Show file tree
Hide file tree
Showing 21 changed files with 46 additions and 46 deletions.
4 changes: 4 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ slug: changelog
sidebar_position: 7
---

## 2024-04-29

- 删除 `TSMPCT`, `TSMAMT` 订单类型

## 2024-04-15

- [交易推送](https://open.longportapp.com/docs/trade/trade-definition#websocket-%E6%8E%A8%E9%80%81%E9%80%9A%E7%9F%A5)添加 `last_share`, `last_price`
Expand Down
4 changes: 0 additions & 4 deletions docs/trade/definition.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ sidebar_position: 2
| MIT | 触价市价单 |
| TSLPAMT | 跟踪止损限价单 (跟踪金额) |
| TSLPPCT | 跟踪止损限价单 (跟踪涨跌幅) |
| TSMAMT | 跟踪止损市价单 (跟踪金额) |
| TSMPCT | 跟踪止损市价单 (跟踪涨跌幅) |
| SLO | 特殊限价单,不支持改单 |

- 说明:美股支持订单类型
Expand All @@ -35,8 +33,6 @@ sidebar_position: 2
| MIT | 触价市价单 |
| TSLPAMT | 跟踪止损限价单 (跟踪金额) |
| TSLPPCT | 跟踪止损限价单 (跟踪涨跌幅) |
| TSMAMT | 跟踪止损市价单 (跟踪金额) |
| TSMPCT | 跟踪止损市价单 (跟踪涨跌幅) |

## OrderStatus

Expand Down
4 changes: 4 additions & 0 deletions i18n/en/docusaurus-plugin-content-docs/current/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ slug: changelog
sidebar_position: 7
---

## 2024-04-29

- Remove `TSMPCT`, `TSMAMT` Order type

## 2024-04-15

- Add `last_share`, `last_price` field to [Trade push](https://open.longportapp.com/en/docs/trade/trade-definition#websocket-notification).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ sidebar_position: 2
| MIT | Market If Touched |
| TSLPAMT | Trailing Limit If Touched (Trailing Amount) |
| TSLPPCT | Trailing Limit If Touched (Trailing Percent) |
| TSMAMT | Trailing Market If Touched (Trailing Amount) |
| TSMPCT | Trailing Market If Touched (Trailing Percent) |
| SLO | Special Limit Order. Not Support Replace Order. |

- Description: US stock support order type
Expand All @@ -35,8 +33,6 @@ sidebar_position: 2
| MIT | Market If Touched |
| TSLPAMT | Trailing Limit If Touched (Trailing Amount) |
| TSLPPCT | Trailing Limit If Touched (Trailing Percent) |
| TSMAMT | Trailing Market If Touched (Trailing Amount) |
| TSMPCT | Trailing Market If Touched (Trailing Percent) |

## OrderStatus

Expand Down Expand Up @@ -95,8 +91,8 @@ sidebar_position: 2
| tag | string | order tag<br/><br/>**Enum Value**<br/>`Normal` - Normal Order<br />`GTC` - Long term Order<br />`Grey` - Grey Order |
| trigger_status | string | conditional order trigger status<br/><br/>**Enum Value**<br/>`NOT_USED`<br />`DEACTIVE`<br />`ACTIVE`<br />`RELEASED` |
| trigger_at | string | conditional order trigger time. formatted as a timestamp (second) |
| trailing_amount | string | "`TSMAMT` / `TSLPAMT` order trailing amount" |
| trailing_percent | string | "`TSMPCT` / `TSLPPCT` order trailing percent" |
| trailing_amount | string | "`TSLPAMT` order trailing amount" |
| trailing_percent | string | "`TSLPPCT` order trailing percent" |
| limit_offset | string | "`TSLPAMT` / `TSLPPCT` order limit offset amount" |
| account_no | string | account no |
| remark | string | remark message |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ slug: changelog
sidebar_position: 7
---

## 2024-04-29

- 刪除 `TSMPCT`, `TSMAMT` 訂單類型

## 2024-04-15

- [交易推送](https://open.longportapp.com/docs/trade/trade-definition#websocket-%E6%8E%A8%E9%80%81%E9%80%9A%E7%9F%A5) 新增`last_share`, `last_price`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ sidebar_position: 2
| MIT | 觸價市價單 |
| TSLPAMT | 跟蹤止損限價單 (跟蹤金额) |
| TSLPPCT | 跟蹤止損限價單 (跟蹤漲跌幅) |
| TSMAMT | 跟蹤止損市價單 (跟蹤金额) |
| TSMPCT | 跟蹤止損市價單 (跟蹤漲跌幅) |
| SLO | 特殊限價單,不支持改單 |

- 說明:美股支持訂單類型
Expand All @@ -35,8 +33,6 @@ sidebar_position: 2
| MIT | 觸價市價單 |
| TSLPAMT | 跟蹤止損限價單 (跟蹤金额) |
| TSLPPCT | 跟蹤止損限價單 (跟蹤漲跌幅) |
| TSMAMT | 跟蹤止損市價單 (跟蹤金额) |
| TSMPCT | 跟蹤止損市價單 (跟蹤漲跌幅) |

## OrderStatus

Expand Down
6 changes: 3 additions & 3 deletions swagger-docs/en/trade/order/history_orders.yml
Original file line number Diff line number Diff line change
Expand Up @@ -238,15 +238,15 @@ definitions:
trailing_amount:
type: "string"
required: true
description: "`TSMAMT` / `TSLPAMT` order trailing amount.<br/><br/>When the order is not `TSMAMT` / `TSLPAMT` order, value is empty string"
description: "`TSLPAMT` order trailing amount.<br/><br/>When the order is not `TSLPAMT` order, value is empty string"
trailing_percent:
type: "string"
required: true
description: "`TSMPCT` / `TSLPPCT` order trailing percent.<br/><br/>When the order is not `TSMPCT` / `TSLPPCT` order, value is empty string"
description: "`TSLPPCT` order trailing percent.<br/><br/>When the order is not `TSLPPCT` order, value is empty string"
limit_offset:
type: "string"
required: true
description: "`TSLPAMT` / `TSLPPCT` order limit offset amount.<br/><br/>When the order is not `TSLPAMT` / `TSLPPCT` order, value is empty string"
description: "`TSLPPCT` order limit offset amount.<br/><br/>When the order is not `TSLPPCT` order, value is empty string"
trigger_status:
type: "string"
required: true
Expand Down
6 changes: 3 additions & 3 deletions swagger-docs/en/trade/order/order_detail.yml
Original file line number Diff line number Diff line change
Expand Up @@ -245,15 +245,15 @@ definitions:
trailing_amount:
type: "string"
required: true
description: "`TSMAMT` / `TSLPAMT` order trailing amount.<br/><br/>When the order is not `TSMAMT` / `TSLPAMT` order, value is empty string"
description: "`TSLPAMT` order trailing amount.<br/><br/>When the order is not `TSLPAMT` order, value is empty string"
trailing_percent:
type: "string"
required: true
description: "`TSMPCT` / `TSLPPCT` order trailing percent.<br/><br/>When the order is not `TSMPCT` / `TSLPPCT` order, value is empty string"
description: "`TSLPPCT` order trailing percent.<br/><br/>When the order is not `TSLPPCT` order, value is empty string"
limit_offset:
type: "string"
required: true
description: "`TSLPAMT` / `TSLPPCT` order limit offset amount.<br/><br/>When the order is not `TSLPAMT` / `TSLPPCT` order, value is empty string"
description: "`TSLPPCT` order limit offset amount.<br/><br/>When the order is not `TSLPPCT` order, value is empty string"
trigger_status:
type: "string"
required: true
Expand Down
4 changes: 2 additions & 2 deletions swagger-docs/en/trade/order/replace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ paths:
- name: trailing_amount
required: false
description: Trailing amount<br/><br/>
`TSLPAMT` / `TSMAMT` Order Required
`TSLPAMT` Order Required
- name: trailing_percent
required: false
description: Trailing percent<br/><br/>
`TSLPPCT` / `TSMPCT` Order Required
`TSLPPCT` Order Required
- name: remark
required: false
description: "Remark (Maximum 64 characters)"
Expand Down
4 changes: 2 additions & 2 deletions swagger-docs/en/trade/order/submit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ paths:
- name: trailing_amount
required: false
description: Trailing amount<br/><br/>
`TSLPAMT` / `TSMAMT` Order Required
`TSLPAMT` Order Required
- name: trailing_percent
required: false
description: Trailing percent<br/><br/>
`TSLPPCT` / `TSMPCT` Order Required
`TSLPPCT` Order Required
- name: expire_date
required: false
description:
Expand Down
4 changes: 2 additions & 2 deletions swagger-docs/en/trade/order/today_orders.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,11 @@ definitions:
trailing_amount:
type: "string"
required: true
description: "`TSMAMT` / `TSLPAMT` order trailing amount.<br/><br/>When the order is not `TSMAMT` / `TSLPAMT` order, value is empty string"
description: "`TSLPAMT` order trailing amount.<br/><br/>When the order is not `TSLPAMT` order, value is empty string"
trailing_percent:
type: "string"
required: true
description: "`TSMPCT` / `TSLPPCT` order trailing percent.<br/><br/>When the order is not `TSMPCT` / `TSLPPCT` order, value is empty string"
description: "`TSLPPCT` order trailing percent.<br/><br/>When the order is not `TSLPPCT` order, value is empty string"
limit_offset:
type: "string"
required: true
Expand Down
4 changes: 2 additions & 2 deletions swagger-docs/zh-CN/trade/order/history_orders.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,11 +239,11 @@ definitions:
trailing_amount:
type: "string"
required: true
description: "`TSLPAMT` / `TSMAMT` 订单跟踪金额。<br/><br/>当订单不是 `TSLPAMT` / `TSMAMT` 订单时为空字符串。"
description: "`TSLPAMT` 订单跟踪金额。<br/><br/>当订单不是 `TSLPAMT` 订单时为空字符串。"
trailing_percent:
type: "string"
required: true
description: "`TSLPPCT` / `TSMPCT` 订单跟踪涨跌幅。<br/><br/>当订单不是 `TSLPPCT` / `TSMPCT` 订单时为空字符串。"
description: "`TSLPPCT` 订单跟踪涨跌幅。<br/><br/>当订单不是 `TSLPPCT` 订单时为空字符串。"
limit_offset:
type: "string"
required: true
Expand Down
4 changes: 2 additions & 2 deletions swagger-docs/zh-CN/trade/order/order_detail.yml
Original file line number Diff line number Diff line change
Expand Up @@ -242,11 +242,11 @@ definitions:
trailing_amount:
type: "string"
required: true
description: "`TSLPAMT` / `TSMAMT` 订单跟踪金额。<br/><br/>当订单不是 `TSLPAMT` / `TSMAMT` 订单时为空字符串。"
description: "`TSLPAMT` 订单跟踪金额。<br/><br/>当订单不是 `TSLPAMT` 订单时为空字符串。"
trailing_percent:
type: "string"
required: true
description: "`TSLPPCT` / `TSMPCT` 订单跟踪涨跌幅。<br/><br/>当订单不是 `TSLPPCT` / `TSMPCT` 订单时为空字符串。"
description: "`TSLPPCT` 订单跟踪涨跌幅。<br/><br/>当订单不是 `TSLPPCT` 订单时为空字符串。"
limit_offset:
type: "string"
required: true
Expand Down
4 changes: 2 additions & 2 deletions swagger-docs/zh-CN/trade/order/replace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ paths:
- name: trailing_amount
required: false
description: 跟踪金额<br/><br/>
`TSLPAMT` / `TSMAMT` 订单必填
`TSLPAMT` 订单必填
- name: trailing_percent
required: false
description: 跟踪涨跌幅<br/><br/>
`TSLPPCT` / `TSMPCT` 订单必填
`TSLPPCT` 订单必填
- name: remark
required: false
description: "备注 (最大 64 字符)"
Expand Down
4 changes: 2 additions & 2 deletions swagger-docs/zh-CN/trade/order/submit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ paths:
- name: trailing_amount
required: false
description: 跟踪金额<br/><br/>
`TSLPAMT` / `TSMAMT` 订单必填
`TSLPAMT` 订单必填
- name: trailing_percent
required: false
description: 跟踪涨跌幅<br/><br/>
`TSLPPCT` / `TSMPCT` 订单必填
`TSLPPCT` 订单必填
- name: expire_date
required: false
description:
Expand Down
4 changes: 2 additions & 2 deletions swagger-docs/zh-CN/trade/order/today_orders.yml
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,11 @@ definitions:
trailing_amount:
type: "string"
required: true
description: "`TSLPAMT` / `TSMAMT` 订单跟踪金额。<br/><br/>当订单不是 `TSLPAMT` / `TSMAMT` 订单时为空字符串。"
description: "`TSLPAMT` 订单跟踪金额。<br/><br/>当订单不是 `TSLPAMT` 订单时为空字符串。"
trailing_percent:
type: "string"
required: true
description: "`TSLPPCT` / `TSMPCT` 订单跟踪涨跌幅。<br/><br/>当订单不是 `TSLPPCT` / `TSMPCT` 订单时为空字符串。"
description: "`TSLPPCT` 订单跟踪涨跌幅。<br/><br/>当订单不是 `TSLPPCT` 订单时为空字符串。"
limit_offset:
type: "string"
required: true
Expand Down
4 changes: 2 additions & 2 deletions swagger-docs/zh-HK/trade/order/history_orders.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,11 +239,11 @@ definitions:
trailing_amount:
type: "string"
required: true
description: "`TSLPAMT` / `TSMAMT` 訂單跟蹤金額。<br/><br/>當訂單不是 `TSLPAMT` / `TSMAMT` 訂單時為空字符串。"
description: "`TSLPAMT` 訂單跟蹤金額。<br/><br/>當訂單不是 `TSLPAMT` 訂單時為空字符串。"
trailing_percent:
type: "string"
required: true
description: "`TSLPPCT` / `TSMPCT` 訂單跟蹤漲跌幅。<br/><br/>當訂單不是 `TSLPPCT` / `TSMPCT` 訂單時為空字符串。"
description: "`TSLPPCT` 訂單跟蹤漲跌幅。<br/><br/>當訂單不是 `TSLPPCT` 訂單時為空字符串。"
limit_offset:
type: "string"
required: true
Expand Down
4 changes: 2 additions & 2 deletions swagger-docs/zh-HK/trade/order/order_detail.yml
Original file line number Diff line number Diff line change
Expand Up @@ -242,11 +242,11 @@ definitions:
trailing_amount:
type: "string"
required: true
description: "`TSLPAMT` / `TSMAMT` 訂單跟蹤金額。<br/><br/>當訂單不是 `TSLPAMT` / `TSMAMT` 訂單時為空字符串。"
description: "`TSLPAMT` 訂單跟蹤金額。<br/><br/>當訂單不是 `TSLPAMT` 訂單時為空字符串。"
trailing_percent:
type: "string"
required: true
description: "`TSLPPCT` / `TSMPCT` 訂單跟蹤漲跌幅。<br/><br/>當訂單不是 `TSLPPCT` / `TSMPCT` 訂單時為空字符串。"
description: "`TSLPPCT` 訂單跟蹤漲跌幅。<br/><br/>當訂單不是 `TSLPPCT` 訂單時為空字符串。"
limit_offset:
type: "string"
required: true
Expand Down
4 changes: 2 additions & 2 deletions swagger-docs/zh-HK/trade/order/replace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ paths:
- name: trailing_amount
required: false
description: 跟蹤金額<br/><br/>
`TSLPAMT` / `TSMAMT` 訂單必填
`TSLPAMT` 訂單必填
- name: trailing_percent
required: false
description: 跟蹤漲跌幅<br/><br/>
`TSLPPCT` / `TSMPCT` 訂單必填
`TSLPPCT` 訂單必填
- name: remark
required: false
description: "備註 (最大 64 字符)"
Expand Down
4 changes: 2 additions & 2 deletions swagger-docs/zh-HK/trade/order/submit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ paths:
- name: trailing_amount
required: false
description: 跟蹤金額<br/><br/>
`TSLPAMT` / `TSMAMT` 訂單必填
`TSLPAMT` 訂單必填
- name: trailing_percent
required: false
description: 跟蹤漲跌幅<br/><br/>
`TSLPPCT` / `TSMPCT` 訂單必填
`TSLPPCT` 訂單必填
- name: expire_date
required: false
description:
Expand Down
4 changes: 2 additions & 2 deletions swagger-docs/zh-HK/trade/order/today_orders.yml
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,11 @@ definitions:
trailing_amount:
type: "string"
required: true
description: "`TSLPAMT` / `TSMAMT` 订单跟踪金额。<br/><br/>当订单不是 `TSLPAMT` / `TSMAMT` 订单时为空字符串。"
description: "`TSLPAMT` 订单跟踪金额。<br/><br/>当订单不是 `TSLPAMT` 订单时为空字符串。"
trailing_percent:
type: "string"
required: true
description: "`TSLPPCT` / `TSMPCT` 订单跟踪涨跌幅。<br/><br/>当订单不是 `TSLPPCT` / `TSMPCT` 订单时为空字符串。"
description: "`TSLPPCT` 订单跟踪涨跌幅。<br/><br/>当订单不是 `TSLPPCT` 订单时为空字符串。"
limit_offset:
type: "string"
required: true
Expand Down

0 comments on commit f5e3e01

Please sign in to comment.