跳转到内容

获取标的当日分时

该接口用于获取标的的当日分时数据。

CLI安装 CLI

bash
# Tesla 今日分时数据
longbridge intraday TSLA.US
# Apple 今日分时数据
longbridge intraday AAPL.US
# 腾讯今日分时数据
longbridge intraday 700.HK
Info

Request

Parameters

NameTypeRequiredDescription
symbolstring标的代码,使用 ticker.region 格式,例如:700.HK

Protobuf

protobuf
message SecurityIntradayRequest {
  string symbol = 1;
}

Request Example

Response

Response Properties

NameTypeDescription
symbolstring标的代码,例如:AAPL.US
linesobject[]分时数据
∟ pricestring当前分钟的收盘价格
∟ timestampint64当前分钟的开始时间
∟ volumeint64成交量
∟ turnoverstring成交额
∟ avg_pricestring均价

Protobuf

protobuf
message SecurityIntradayResponse{
  string symbol = 1;
  repeated Line lines = 2;
}

message Line {
  string price = 1;
  int64 timestamp = 2;
  int64 volume = 3;
  string turnover = 4;
  string avg_price = 5;
}

Response JSON Example

json
{
  "symbol": "700.HK",
  "lines": [
    {
      "price": "330.400",
      "timestamp": 1651023000,
      "volume": 375870,
      "turnover": "123949699.000",
      "avg_price": "329.767470"
    },
    {
      "price": "331.200",
      "timestamp": 1651023060,
      "volume": 233095,
      "turnover": "77269032.800",
      "avg_price": "330.427416"
    },
    {
      "price": "330.400",
      "timestamp": 1651023120,
      "volume": 192565,
      "turnover": "63711556.000",
      "avg_price": "330.530719"
    },
    {
      "price": "330.800",
      "timestamp": 1651023180,
      "volume": 143397,
      "turnover": "47471072.400",
      "avg_price": "330.608989"
    },
    {
      "price": "330.800",
      "timestamp": 1651023240,
      "volume": 141834,
      "turnover": "46890605.600",
      "avg_price": "330.608078"
    }
  ]
}

错误码

协议错误码业务错误码描述排查建议
3301600无效的请求请求参数有误或解包失败
3301606限流降低请求频次
7301602服务端内部错误请重试或联系技术人员处理
7301600请求标的不存在检查请求的 symbol 是否正确
7301603标的无行情标的没有请求的行情数据
7301604无权限没有获取标的行情的权限