Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/en/docs/quote/watchlist/watchlist_update_group.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ from longbridge.openapi import QuoteContext, Config, SecuritiesUpdateMode, OAuth
oauth = OAuthBuilder("your-client-id").build(lambda url: print("Visit:", url))
config = Config.from_oauth(oauth)
ctx = QuoteContext(config)
ctx.update_watchlist_group(10086, name = "Watchlist2", securities = ["700.HK", "AAPL.US"], SecuritiesUpdateMode.Replace)
ctx.update_watchlist_group(10086, name = "Watchlist2", securities = ["700.HK", "AAPL.US"], mode = SecuritiesUpdateMode.Replace)
```

</TabItem>
Expand All @@ -70,7 +70,7 @@ async def main() -> None:
oauth = await OAuthBuilder("your-client-id").build_async(lambda url: print("Visit:", url))
config = Config.from_oauth(oauth)
ctx = AsyncQuoteContext.create(config)
ctx.update_watchlist_group(10086, name = "Watchlist2", securities = ["700.HK", "AAPL.US"], SecuritiesUpdateMode.Replace)
ctx.update_watchlist_group(10086, name = "Watchlist2", securities = ["700.HK", "AAPL.US"], mode = SecuritiesUpdateMode.Replace)

if __name__ == "__main__":
asyncio.run(main())
Expand Down
4 changes: 2 additions & 2 deletions docs/en/docs/socket/control-command.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Cases server will close the connection:
6. session expired when reconnect
7. duplicate connection have been created

The reason why server close the connection will send by close packet, protobuf defination:
The reason why server close the connection will send by close packet, protobuf definition:

```protobuf
message Close {
Expand Down Expand Up @@ -140,4 +140,4 @@ message ReconnectResponse {

## Protobuf

All control command protobuf definations are opensource in [GitHub](https://github.com/longbridge/openapi-protobufs/blob/main/control/control.proto)
All control command protobuf definitions are opensource in [GitHub](https://github.com/longbridge/openapi-protobufs/blob/main/control/control.proto)
6 changes: 3 additions & 3 deletions docs/en/docs/socket/how_to_subscribe_quote.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ end

Client can subscribe different quote type through subscribe commmand.

Subscribe command [protobuf defination](../quote/subscribe/subscribe)
Subscribe command [protobuf definition](../quote/subscribe/subscribe)

Example:

Expand All @@ -63,9 +63,9 @@ Example:

> Here is `JSON` for easy showing case, actually need using protobuf encoding.

Client can also check quote topics already subscribing, [protobuf defination](../quote/subscribe/subscription).
Client can also check quote topics already subscribing, [protobuf definition](../quote/subscribe/subscription).

After client success subscribing quote, server will push real-time quote data to client, data [protobuf defination](../quote/overview).
After client success subscribing quote, server will push real-time quote data to client, data [protobuf definition](../quote/overview).

## Other Quote APIs

Expand Down
2 changes: 1 addition & 1 deletion docs/en/docs/socket/how_to_subscribe_trade.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ end

## Subscribe

Subscribe [protobuf defination](../trade/trade-push)
Subscribe [protobuf definition](../trade/trade-push)

Example:

Expand Down
2 changes: 1 addition & 1 deletion docs/en/docs/socket/protocol/how-to-parse-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,5 @@ Fields Descriptions:
| signature | 128 | 16 | exists when `verify` is `1` |

:::info
Using specific protobuf defination to encode/decode body data
Using specific protobuf definition to encode/decode body data
:::
4 changes: 2 additions & 2 deletions docs/en/docs/trade/trade-push.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Current support topics:
Cmd: `17`
:::

Protobuf defination:
Protobuf definition:

```protobuf
// Unsub is Unsub command content, command is 17
Expand All @@ -103,7 +103,7 @@ After we `subscribe` to the trade gateway, we can get real-time trade updates fr
Cmd: `18`
:::

Protobuf defination:
Protobuf definition:

```protobuf
// Dispatch type
Expand Down
36 changes: 18 additions & 18 deletions docs/zh-CN/docs/quote/objects.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,24 +68,24 @@ enum TradeSession {

| ID | 描述 |
| ---- | --------------- |
| 1 | 一分钟 k 线 |
| 2 | 两分钟 k 线 |
| 3 | 三分钟 k 线 |
| 5 | 五分钟 k 线 |
| 10 | 十分钟 k 线 |
| 15 | 十五分钟 k 线 |
| 20 | 二十分钟 k 线 |
| 30 | 三十分钟 k 线 |
| 45 | 四十五分钟 k 线 |
| 60 | 六十分钟 k 线 |
| 120 | 两小时 k 线 |
| 180 | 三小时 k 线 |
| 240 | 四小时 k 线 |
| 1000 | 日 k 线 |
| 2000 | 周 k 线 |
| 3000 | 月 k 线 |
| 3500 | 季 k 线 |
| 4000 | 年 k 线 |
| 1 | 一分钟 K 线 |
| 2 | 两分钟 K 线 |
| 3 | 三分钟 K 线 |
| 5 | 五分钟 K 线 |
| 10 | 十分钟 K 线 |
| 15 | 十五分钟 K 线 |
| 20 | 二十分钟 K 线 |
| 30 | 三十分钟 K 线 |
| 45 | 四十五分钟 K 线 |
| 60 | 六十分钟 K 线 |
| 120 | 两小时 K 线 |
| 180 | 三小时 K 线 |
| 240 | 四小时 K 线 |
| 1000 | 日 K 线 |
| 2000 | 周 K 线 |
| 3000 | 月 K 线 |
| 3500 | 季 K 线 |
| 4000 | 年 K 线 |

### Protobuf

Expand Down
4 changes: 2 additions & 2 deletions docs/zh-CN/docs/quote/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ slug: overview
<td><a href="./pull/brokers">获取标的经纪队列</a></td>
</tr>
<tr>
<td><a href="./pull/broker-ids">获取券商席位 id</a></td>
<td><a href="./pull/broker-ids">获取券商席位 ID</a></td>
</tr>
<tr>
<td><a href="./pull/trade">获取标的成交明细</a></td>
Expand Down Expand Up @@ -72,7 +72,7 @@ slug: overview
<td><a href="./pull/calc-index">获取标的计算指标</a></td>
</tr>
<tr>
<td><a href="./pull/history-candlestick">获取标的历史 k 线</a></td>
<td><a href="./pull/history-candlestick">获取标的历史 K 线</a></td>
</tr>
<tr>
<td rowspan="3">订阅</td>
Expand Down
2 changes: 1 addition & 1 deletion docs/zh-CN/docs/quote/stocks/candlestick.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ longbridge kline NVDA.US --period day --count 20
| Name | Type | Required | Description |
| ------------- | ------ | -------- | ---------------------------------------------------------------------------- |
| symbol | string | 是 | 标的代码,使用 `ticker.region` 格式,例如:`700.HK` |
| period | int32 | 是 | k 线周期,例如:`1000`,详见 [Period](../objects#period---k-线周期) |
| period | int32 | 是 | K 线周期,例如:`1000`,详见 [Period](../objects#period---k-线周期) |
| count | int32 | 是 | 数据数量,例如:`100`<br /><br />**校验规则:** <br />请求数量最大为 `1000` |
| adjust_type | int32 | 是 | 复权类型,例如:`0`,详见 [AdjustType](../objects#adjusttype---k-线复权类型) |
| trade_session | int32 | 否 | 交易时段,0: 盘中,100: 所有(盘前,盘中,盘后,夜盘)<br/><br/>注意:夜盘数据需购买「LV1 实时行情 (OpenAPI)」行情卡,且仅支持美股 |
Expand Down
2 changes: 1 addition & 1 deletion docs/zh-CN/docs/quote/stocks/history-candlestick.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ longbridge kline history NVDA.US --start 2025-01-01 --end 2025-12-31
| Name | Type | Required | Description |
| -------------- | ------ | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| symbol | string | 是 | 标的代码,使用 `ticker.region` 格式,例如:`700.HK` |
| period | int32 | 是 | k 线周期,例如:`1000`,详见 [Period](../objects#period---k-线周期) |
| period | int32 | 是 | K 线周期,例如:`1000`,详见 [Period](../objects#period---k-线周期) |
| adjust_type | int32 | 是 | 复权类型,例如:`0`,详见 [AdjustType](../objects#adjusttype---k-线复权类型) |
| query_type | int32 | 是 | 查询方式 <br /><br />**可选值:**<br />`1` - 按偏移查询 <br />`2` - 按日期区间查询 |
| date_request | object | 否 | 按日期查询时必填 |
Expand Down
4 changes: 2 additions & 2 deletions docs/zh-CN/docs/quote/watchlist/watchlist_update_group.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ from longbridge.openapi import QuoteContext, Config, SecuritiesUpdateMode, OAuth
oauth = OAuthBuilder("your-client-id").build(lambda url: print("Visit:", url))
config = Config.from_oauth(oauth)
ctx = QuoteContext(config)
ctx.update_watchlist_group(10086, name = "WatchList2", securities = ["700.HK", "AAPL.US"], SecuritiesUpdateMode.Replace)
ctx.update_watchlist_group(10086, name = "WatchList2", securities = ["700.HK", "AAPL.US"], mode = SecuritiesUpdateMode.Replace)
```

</TabItem>
Expand All @@ -71,7 +71,7 @@ async def main() -> None:
oauth = await OAuthBuilder("your-client-id").build_async(lambda url: print("Visit:", url))
config = Config.from_oauth(oauth)
ctx = AsyncQuoteContext.create(config)
ctx.update_watchlist_group(10086, name = "WatchList2", securities = ["700.HK", "AAPL.US"], SecuritiesUpdateMode.Replace)
ctx.update_watchlist_group(10086, name = "WatchList2", securities = ["700.HK", "AAPL.US"], mode = SecuritiesUpdateMode.Replace)

if __name__ == "__main__":
asyncio.run(main())
Expand Down
2 changes: 1 addition & 1 deletion docs/zh-CN/docs/socket/biz_command.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ sidebar_position: 5
<td><a href="../quote/pull/brokers">获取标的经纪队列</a></td>
</tr>
<tr>
<td><a href="../quote/pull/broker-ids">获取券商席位 id</a></td>
<td><a href="../quote/pull/broker-ids">获取券商席位 ID</a></td>
</tr>
<tr>
<td><a href="../quote/pull/trade">获取标的成交明细</a></td>
Expand Down
2 changes: 1 addition & 1 deletion docs/zh-CN/sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ SDK 包名已从 `longport` 更名为 `longbridge`,旧包名 `longport` 已废

### 安装 SDK

你可以通过 Pip 安装 SDK,或者直接访问 [PyPI](https://pypi.org/project/longbridge/) 页面来下载。
你可以通过 pip 安装 SDK,或者直接访问 [PyPI](https://pypi.org/project/longbridge/) 页面来下载。

```bash
$ pip install longbridge
Expand Down
36 changes: 18 additions & 18 deletions docs/zh-HK/docs/quote/objects.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,24 +66,24 @@ enum TradeSession {

| ID | 描述 |
| ---- | --------------- |
| 1 | 一分鐘 k 線 |
| 2 | 兩分鐘 k 線 |
| 3 | 三分鐘 k 線 |
| 5 | 五分鐘 k 線 |
| 10 | 十分鐘 k 線 |
| 15 | 十五分鐘 k 線 |
| 20 | 二十分鐘 k 線 |
| 30 | 三十分鐘 k 線 |
| 45 | 四十五分鐘 k 線 |
| 60 | 六十分鐘 k 線 |
| 120 | 兩小時 k 線 |
| 180 | 三小時 k 線 |
| 240 | 四小時 k 線 |
| 1000 | 日 k 線 |
| 2000 | 週 k 線 |
| 3000 | 月 k 線 |
| 3500 | 季 k 線 |
| 4000 | 年 k 線 |
| 1 | 一分鐘 K 線 |
| 2 | 兩分鐘 K 線 |
| 3 | 三分鐘 K 線 |
| 5 | 五分鐘 K 線 |
| 10 | 十分鐘 K 線 |
| 15 | 十五分鐘 K 線 |
| 20 | 二十分鐘 K 線 |
| 30 | 三十分鐘 K 線 |
| 45 | 四十五分鐘 K 線 |
| 60 | 六十分鐘 K 線 |
| 120 | 兩小時 K 線 |
| 180 | 三小時 K 線 |
| 240 | 四小時 K 線 |
| 1000 | 日 K 線 |
| 2000 | 週 K 線 |
| 3000 | 月 K 線 |
| 3500 | 季 K 線 |
| 4000 | 年 K 線 |

### Protobuf

Expand Down
6 changes: 3 additions & 3 deletions docs/zh-HK/docs/quote/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ slug: overview
<td><a href="./pull/brokers">獲取標的經紀隊列</a></td>
</tr>
<tr>
<td><a href="./pull/broker-ids">獲取券商席位 id</a></td>
<td><a href="./pull/broker-ids">獲取券商席位 ID</a></td>
</tr>
<tr>
<td><a href="./pull/trade">獲取標的成交明細</a></td>
Expand All @@ -42,7 +42,7 @@ slug: overview
<td><a href="./pull/intraday">獲取標的分時</a></td>
</tr>
<tr>
<td><a href="./pull/candlestick">獲取標的 k 線</a></td>
<td><a href="./pull/candlestick">獲取標的 K 線</a></td>
</tr>
<tr>
<td><a href="./pull/optionchain-date">獲取標的的期權鏈到期日列表</a></td>
Expand All @@ -51,7 +51,7 @@ slug: overview
<td><a href="./pull/optionchain-date-strike">獲取標的的期權鏈到期日期權標的列表</a></td>
</tr>
<tr>
<td><a href="./pull/issuer">獲取輪證發行商 id</a></td>
<td><a href="./pull/issuer">獲取輪證發行商 ID</a></td>
</tr>
<tr>
<td><a href="./pull/warrant-filter">獲取輪證篩選列表</a></td>
Expand Down
2 changes: 1 addition & 1 deletion docs/zh-HK/docs/quote/stocks/candlestick.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ longbridge kline NVDA.US --period day --count 20
| Name | Type | Required | Description |
| ------------- | ------ | -------- | ---------------------------------------------------------------------------- |
| symbol | string | 是 | 標的代碼,使用 `ticker.region` 格式,例如:`700.HK` |
| period | int32 | 是 | k 線週期,例如:`1000`,详见 [Period](../objects#period---k-線週期) |
| period | int32 | 是 | K 線週期,例如:`1000`,详见 [Period](../objects#period---k-線週期) |
| count | int32 | 是 | 數據數量,例如:`100`<br /><br />**校验规则:** <br />請求數量最大為 `1000` |
| adjust_type | int32 | 是 | 復權類型,例如:`0`,详见 [AdjustType](../objects#adjusttype---k-線復權類型) |
| trade_session | int32 | 否 | 交易時段,0: 盤中,100: 所有延長時段(盤前,盤中,盤後,夜盤)<br/><br/>注意:夜盤數據需購買「LV1 實時行情 (OpenAPI)」行情卡,且僅支援美股 |
Expand Down
Loading
Loading