Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add overview as first page to socket section. #266

Merged
merged 3 commits into from
May 20, 2024
Merged
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
90 changes: 53 additions & 37 deletions docs/quote/pull/quote.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,43 +47,59 @@ print(resp)

### Response Properties

| Name | Type | Description |
| ------------------- | -------- | ------------------------------------------------------------------- |
| secu_quote | object[] | 标的实时行情数据列表 |
| ∟ symbol | string | 标的代码 |
| ∟ last_done | string | 最新价 |
| ∟ prev_close | string | 昨收价 |
| ∟ open | string | 开盘价 |
| ∟ high | string | 最高价 |
| ∟ low | string | 最低价 |
| ∟ timestamp | int64 | 最新成交的时间戳 |
| ∟ volume | int64 | 成交量 |
| ∟ turnover | string | 成交额 |
| ∟ trade_status | int32 | 标的交易状态,详见 [TradeStatus](../objects#tradestatus---交易状态) |
| ∟ pre_market_quote | object | 美股盘前交易行情 |
| ∟∟ last_done | string | 最新价 |
| ∟∟ timestamp | int64 | 最新成交的时间戳 |
| ∟∟ volume | int64 | 成交量 |
| ∟∟ turnover | string | 成交额 |
| ∟∟ high | string | 最高价 |
| ∟∟ low | string | 最低价 |
| ∟∟ prev_close | string | 上一个交易阶段的收盘价 |
| ∟ post_market_quote | object | 美股盘后交易行情 |
| ∟∟ last_done | string | 最新价 |
| ∟∟ timestamp | int64 | 最新成交的时间戳 |
| ∟∟ volume | int64 | 成交量 |
| ∟∟ turnover | string | 成交额 |
| ∟∟ high | string | 最高价 |
| ∟∟ low | string | 最低价 |
| ∟∟ prev_close | string | 上一个交易阶段的收盘价 |
| ∟ overnight_quote | object | 美股夜盘交易行情 |
| ∟∟ last_done | string | 最新价 |
| ∟∟ timestamp | int64 | 最新成交的时间戳 |
| ∟∟ volume | int64 | 成交量 |
| ∟∟ turnover | string | 成交额 |
| ∟∟ high | string | 最高价 |
| ∟∟ low | string | 最低价 |
| ∟∟ prev_close | string | 上一个交易阶段的收盘价 |
| Name | Type | Description |
| ------------------- | -------- | ------------------------------------------------------------------------------- |
| secu_quote | object[] | 标的实时行情数据列表 |
| ∟ symbol | string | 标的代码 |
| ∟ last_done | string | 最新价 |
| ∟ prev_close | string | 昨收价 |
| ∟ open | string | 开盘价 |
| ∟ high | string | 最高价 |
| ∟ low | string | 最低价 |
| ∟ timestamp | int64 | 最新成交的时间戳 |
| ∟ volume | int64 | 成交量 |
| ∟ turnover | string | 成交额 |
| ∟ trade_status | int32 | 标的交易状态,详见 [TradeStatus](../objects#tradestatus---交易状态) |
| ∟ pre_market_quote | object | 美股盘前交易行情 |
| ∟∟ last_done | string | 最新价 |
| ∟∟ timestamp | int64 | 最新成交的时间戳 |
| ∟∟ volume | int64 | 成交量 |
| ∟∟ turnover | string | 成交额 |
| ∟∟ high | string | 最高价 |
| ∟∟ low | string | 最低价 |
| ∟∟ prev_close | string | 上一个交易阶段的收盘价 |
| ∟ post_market_quote | object | 美股盘后交易行情 |
| ∟∟ last_done | string | 最新价 |
| ∟∟ timestamp | int64 | 最新成交的时间戳 |
| ∟∟ volume | int64 | 成交量 |
| ∟∟ turnover | string | 成交额 |
| ∟∟ high | string | 最高价 |
| ∟∟ low | string | 最低价 |
| ∟∟ prev_close | string | 上一个交易阶段的收盘价 |
| ∟ overnight_quote | object | 美股夜盘交易行情<br/><br/>注意:需开启 `enable_overnight` 参数,否则会返回 null |
| ∟∟ last_done | string | 最新价 |
| ∟∟ timestamp | int64 | 最新成交的时间戳 |
| ∟∟ volume | int64 | 成交量 |
| ∟∟ turnover | string | 成交额 |
| ∟∟ high | string | 最高价 |
| ∟∟ low | string | 最低价 |
| ∟∟ prev_close | string | 上一个交易阶段的收盘价 |

### 注意

#### `overnight_quote` 参数细节

只有当我们在配置的时候开启了 `enable_overnight` 参数,才会返回 `overnight_quote` 字段。

```py
config = Config(
app_key="your_app_key",
app_secret="your_app_secret",
access_token="your_access_token",
enable_overnight=True)
```

或者设置环境变量 `LONGPORT_ENABLE_OVERNIGHT` 为 `true`。

### Protobuf

Expand Down
16 changes: 16 additions & 0 deletions docs/socket/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: Overview
id: overview
slug: /socket/overview
sidebar_position: -1
---

我们的 OpenAPI 提供 WebSocket 方式连接行情网关,客户端可以通过这两种方式订阅行情。本章节文档将会介绍详细的协议细节。

:::success NOTE
我们的 OpenAPI SDK 已经完整实现了订阅行情的功能,你可以直接使用 SDK。

https://open.longportapp.com/sdk

本章节文档提供给大家参考 API 细节。
:::
2 changes: 1 addition & 1 deletion i18n/en/docusaurus-plugin-content-docs/current/qa/quote.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ message ReconnectRequest {

- After turning on the night trading quotations, both the pull and push interfaces will be able to obtain the night trading quotations during the night trading period.

## Q7Enable Overnight quote in OpenApi SDK
## Q7: Enable Overnight quote in OpenApi SDK

A:

Expand Down
16 changes: 16 additions & 0 deletions i18n/en/docusaurus-plugin-content-docs/current/socket/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: Overview
id: overview
slug: /socket/overview
sidebar_position: -1
---

Our OpenAPI provides WebSocket connection to the market gateway, clients can subscribe to market data through these two methods. This chapter will introduce the detailed protocol details.

:::success NOTE
Our OpenAPI SDK has fully implemented the function of subscribing to market data, you can use the SDK directly.

https://open.longportapp.com/sdk

This chapter provides API details for your reference.
:::
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: Overview
id: overview
slug: /socket/overview
sidebar_position: -1
---

我們的 OpenAPI 提供 WebSocket 方式連接行情網關,客戶端可以透過這兩種方式訂閱行情。本章節文檔將會介紹詳細的協定細節。

:::success NOTE
我們的 OpenAPI SDK 已經完整實現了訂閱行情的功能,你可以直接使用 SDK。

https://open.longportapp.com/sdk

本章節文檔提供給大家參考 API 細節。
:::
Loading