Skip to main content

Intraday Volumes

Futures and Options price-volume data(query by symbol)

intraday/volumes/{symbol}

Parameters

NameTypeDescription
symbol*stringContract Symbol
sessionstringTrading Sessiom,valid in afterhours odd-lot

Response

NameTypeDescription
date*stringDate
type*stringTicker type
exchange*stringExahange
marketstringMarket Type
symbol*stringStock Number
dataobject[]list
>> pricenumberTrading Price
>> volumenumberAccumulative Volume on this Price
>> volumeAtBidnumberAccumulative Bid Volume
>> volumeAtAsknumberAccumulative Ask Volume
info

'*' Indicates mandatory disclosure fields.

Example

from fubon_neo.sdk import FubonSDK, Order

sdk = FubonSDK()

accounts = sdk.login("Your ID", "Your password", "Your cert path", "Your cert password")

sdk.init_realtime()

restfutopt = sdk.marketdata.rest_client.futopt
# restfutopt.intraday.volumes(symbol='TXFC4') # Version 2.2.3 and before

## Aftrer version 2.2.4 (use Exception for exception handling)
from fubon_neo.fugle_marketdata.rest.base_rest import FugleAPIError

try:
restfutopt.intraday.volumes(symbol='TXFC4')
except FugleAPIError as e:
print(f"Error: {e}")
print("------------")
print(f"Status Code: {e.status_code}") # Ex: 429
print(f"Response Text: {e.response_text}") # Ex: {"statusCode":429,"message":"Rate limit exceeded"}

Response Body:

{
"date": "2024-01-18",
"type": "FUTURE",
"exchange": "TAIFEX",
"symbol": "TXFC4",
"data": [
{
"price": 17316,
"volume": 12
},
{
"price": 17315,
"volume": 12
},
{
"price": 17314,
"volume": 12
},
{
"price": 17313,
"volume": 8
},
{
"price": 17312,
"volume": 4
},
{
"price": 17311,
"volume": 4
},
{
"price": 17310,
"volume": 16
},
{
"price": 17309,
"volume": 4
},
{
"price": 17307,
"volume": 12
},
{
"price": 17306,
"volume": 4
},
{
"price": 17305,
"volume": 20
},
{
"price": 17304,
"volume": 20
},
{
"price": 17303,
"volume": 12
},
......
]
}