Intraday Volumes
Futures and Options price-volume data(query by symbol)
intraday/volumes/{symbol}
Parameters
| Name | Type | Description |
|---|---|---|
symbol* | string | Contract Symbol |
session | string | Trading Sessiom,valid in afterhours odd-lot |
Response
| Name | Type | Description |
|---|---|---|
date* | string | Date |
type* | string | Ticker type |
exchange* | string | Exahange |
market | string | Market Type |
symbol* | string | Stock Number |
data | object[] | list |
>> price | number | Trading Price |
>> volume | number | Accumulative Volume on this Price |
>> volumeAtBid | number | Accumulative Bid Volume |
>> volumeAtAsk | number | Accumulative Ask Volume |
info
'*' Indicates mandatory disclosure fields.
Example
- Python
- Node.js
- C#
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"}
const { FubonSDK } = require('fubon-neo');
const sdk = new FubonSDK();
const accounts = sdk.login("Your ID", "Your Password", "Your Cert Path", "Your Cert Password");
sdk.initRealtime();
const client = sdk.marketdata.restClient
client.futopt.intraday.volumes({ symbol: 'TXFC4' })
.then(data => console.log(data));
using FubonNeo.Sdk;
using FugleMarketData.QueryModels.FuOpt;
using FugleMarketData.QueryModels.FuOpt.Intraday;
var sdk = new FubonSDK();
var result = sdk.Login("Your ID", "Your Password", "Your Cert Path", "Your Cert Password");
sdk.InitRealtime();
var rest = sdk.MarketData.RestClient.FutureOption;
var volume = await rest.Intraday.Volumes("TXFC4");
// var volume = await rest.Intraday.Volumes("TXFA4", new(){Session=FugleMarketData.QueryModels.FuOpt.TradeSession.AfterHours}); // After hours
var volume_cont = volume.Content.ReadAsStringAsync().Result;
Console.WriteLine(volume_cont);
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
},
......
]
}