Skip to main content

Get Security Intraday

This API is used to obtain the intraday data of security.

SDK Links

Python
longport.openapi.QuoteContext.intraday
Rust
longport::quote::QuoteContext#intraday
Go
QuoteContext.Intraday
Node.js
QuoteContext#intraday

Request

Parameters

NameTypeRequiredDescription
symbolstringYesSecurity code, in ticker.region format, for example:700.HK

Protobuf

message SecurityIntradayRequest {
string symbol = 1;
}

Request Example

# Get Security Intraday
# https://open.longportapp.com/docs/quote/pull/intraday
# Before running, please visit the "Developers to ensure that the account has the correct quotes authority.
# If you do not have the quotes authority, you can enter "Me - My Quotes - Store" to purchase the authority through the "LongPort" mobile app.
from longport.openapi import QuoteContext, Config

config = Config.from_env()
ctx = QuoteContext(config)

resp = ctx.intraday("700.HK")
print(resp)

Response

Response Properties

NameTypeDescription
symbolstringSecurity code, for example: AAPL.US
linesobject[]Intraday line data
∟ pricestringClose price of the minute
∟ timestampint64Start time stamp of the minute
∟ volumeint64Volume
∟ turnoverstringTurnover
∟ avg_pricestringAverage price

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

{
"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"
}
]
}

Error Code

Protocol Error CodeBusiness Error CodeDescriptionTroubleshooting Suggestions
3301600Invalid requestInvalid request parameters or unpacking request failed
3301606Request rate limitReduce the frequency of requests
7301602Server errorPlease try again or contact a technician to resolve the issue
7301600Symbol not foundCheck that the requested symbol is correct
7301603No quotesSecurity no quote
7301604No accessNo access to security quote