GetDailyIndex
Method
POST
http://fc-data.ssi.com.vn/api/Market/GetDailyIndex
Description
Sample code
Not supported yet
Detail
[Javascript] const rxjs = require('rxjs'); const express = require('express'); const config = require('./config.js'); const marketStreaming = require('./Streamings/marketStreaming'); const app = express(); const port = 3051; Not supported yet[End]
Detail
[Python] from .fc_client import TradingAPIClient from .fc_client import MarketDataClient from .models import tapi_model_pb2 from .models import md_model_pb2 from .config import fc_config # from fc_client import TradingAPIClient # from fc_client import MarketDataClient # from models import tapi_model_pb2 # from models import md_model_pb2 # from config import fc_config import random def md_get_daily_index(index_id, from_date, to_date, page_index, page_size, order_by, order, option, ct_config): md_rq = md_model_pb2.DailyIndexRequest() md_rq.RequestId = str(random.randint(0, 99999999)) md_rq.IndexId = index_id.upper() md_rq.FromDate = from_date md_rq.ToDate = to_date # md_rq.PageIndex = page_index # md_rq.PageSize = page_size ifpage_index == None: md_rq.PageIndex = 1 else: md_rq.PageIndex = page_index ifpage_size == None: md_rq.PageSize = 10 else: md_rq.PageSize = page_size md_rq.OrderBy = order_by.upper() md_rq.Order = order.upper()[End]
Not supported yet
Sample Response
{ "data": [ { "IndexId": "SAMPLE", "IndexValue": "1", "TradingDate": "28/04/2024", "Time": "08:34:36", "Change": "1", "RatioChange": "1", "TotalTrade": "1", "TotalMatchVol": "1", "TotalMatchVal": "1", "TypeIndex": "SAMPLE", "IndexName": "SAMPLE", "Advances": "1", "NoChanges": "1", "Declines": "1", "Ceilings": "1", "Floors": "1", "TotalDealVol": "1", "TotalDealVal": "1", "TotalVol": "1", "TotalVal": "1", "TradingSession": "ATO" } ], "message": "Success", "status": "Success", "totalRecord": 1 }
Request Information
DailyIndexRequest
Property Name | Data Type | Sample value | Required | Description |
---|---|---|---|---|
RequestId | String | SAMPLE | NO | |
IndexId | String | SAMPLE | YES | Valid values can be queried by api getIndexList |
FromDate | String | 11/11/2019 | NO | 'DD/MM/YYYY',If not specify get today date |
ToDate | String | 11/12/2019 | NO | 'DD/MM/YYYY',If not specify get today date |
PageIndex | Int32 | 1 | NO | |
PageSize | Int32 | 100 | NO | Size of a page, 10; 20; 50; 100; 1000 Default 10 |
OrderBy | String | SAMPLE | NO | |
Order | String | SAMPLE | NO |
Response Information
DailyIndexResponse
Property Name | Data Type | Property Name | Data Type | Sample value | Description |
---|---|---|---|---|---|
Data | DailyIndexResponseModel [ ] | IndexId | String | ||
Data | DailyIndexResponseModel [ ] | IndexValue | String | ||
Data | DailyIndexResponseModel [ ] | TradingDate | String | ||
Data | DailyIndexResponseModel [ ] | Time | String | ||
Data | DailyIndexResponseModel [ ] | Change | String | ||
Data | DailyIndexResponseModel [ ] | RatioChange | String | ||
Data | DailyIndexResponseModel [ ] | TotalTrade | String | ||
Data | DailyIndexResponseModel [ ] | TotalMatchVol | String | ||
Data | DailyIndexResponseModel [ ] | TotalMatchVal | String | ||
Data | DailyIndexResponseModel [ ] | TypeIndex | String | ||
Data | DailyIndexResponseModel [ ] | IndexName | String | ||
Data | DailyIndexResponseModel [ ] | Advances | String | ||
Data | DailyIndexResponseModel [ ] | NoChanges | String | ||
Data | DailyIndexResponseModel [ ] | Declines | String | ||
Data | DailyIndexResponseModel [ ] | Ceilings | String | ||
Data | DailyIndexResponseModel [ ] | Floors | String | ||
Data | DailyIndexResponseModel [ ] | TotalDealVol | String | ||
Data | DailyIndexResponseModel [ ] | TotalDealVal | String | ||
Data | DailyIndexResponseModel [ ] | TotalVol | String | ||
Data | DailyIndexResponseModel [ ] | TotalVal | String | ||
Data | DailyIndexResponseModel [ ] | TradingSession | String |
Syntax protocol message
{
Syntax Request Protocol 2 Message
syntax = "proto2"; package SSI.FastConnect.DataContracts.Market.Request; message DailyIndexRequest { optional string RequestId = 1; optional string IndexId = 2; optional string FromDate = 3; optional string ToDate = 4; optional int32 PageIndex = 5 [default = 0]; optional int32 PageSize = 6 [default = 0]; optional string OrderBy = 7; optional string Order = 8; }
Syntax Request Protocol 3 Message
syntax = "proto3"; package SSI.FastConnect.DataContracts.Market.Request; message DailyIndexRequest { string RequestId = 1; string IndexId = 2; string FromDate = 3; string ToDate = 4; int32 PageIndex = 5; int32 PageSize = 6; string OrderBy = 7; string Order = 8; }
{
Syntax Response Protocol 2 Message
syntax = "proto2"; message DailyIndexResponse { } message DailyIndexResponseModel { optional string IndexId = 1; optional string IndexValue = 2; optional string TradingDate = 3; optional string Time = 4; optional string Change = 5; optional string RatioChange = 6; optional string TotalTrade = 7; optional string TotalMatchVol = 8; optional string TotalMatchVal = 9; optional string TypeIndex = 10; optional string IndexName = 11; optional string Advances = 12; optional string NoChanges = 13; optional string Declines = 14; optional string Ceilings = 15; optional string Floors = 16; optional string TotalDealVol = 17; optional string TotalDealVal = 18; optional string TotalVol = 19; optional string TotalVal = 20; optional string TradingSession = 21; } message ResponseBase_DailyIndexResponseModel { repeated DailyIndexResponseModel data = 1; optional string message = 2; optional string status = 3; optional int32 totalRecord = 4 [default = 0]; oneof subtype { DailyIndexResponse DailyIndexResponse = 100; } } message ResponseClient_DailyIndexResponse { optional bytes Data = 1; optional string Message = 2; optional int32 StatusCode = 3 [default = 0]; }
Syntax Response Protocol 3 Message
syntax = "proto3"; message DailyIndexResponse { } message DailyIndexResponseModel { string IndexId = 1; string IndexValue = 2; string TradingDate = 3; string Time = 4; string Change = 5; string RatioChange = 6; string TotalTrade = 7; string TotalMatchVol = 8; string TotalMatchVal = 9; string TypeIndex = 10; string IndexName = 11; string Advances = 12; string NoChanges = 13; string Declines = 14; string Ceilings = 15; string Floors = 16; string TotalDealVol = 17; string TotalDealVal = 18; string TotalVol = 19; string TotalVal = 20; string TradingSession = 21; } message ResponseBase_DailyIndexResponseModel { repeated DailyIndexResponseModel data = 1; string message = 2; string status = 3; int32 totalRecord = 4; oneof subtype { DailyIndexResponse DailyIndexResponse = 100; } } message ResponseClient_DailyIndexResponse { bytes Data = 1; string Message = 2; int32 StatusCode = 3; }
https://developers.google.com/protocol-buffers/docs/csharptutorial