GetIndexComponents
Method
POST
http://fc-data.ssi.com.vn/api/Market/GetIndexComponents
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_index_components(index_code, page_index, page_size, option, ct_config): md_rq = md_model_pb2.IndexComponentRequest() md_rq.IndexCode = index_code.upper() # 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[End]
Not supported yet
Sample Response
{ "data": [ { "IndexCode": "SAMPLE", "IndexName": "SAMPLE", "Exchange": "SAMPLE", "TotalSymbolNo": "1", "IndexComponent": [ { "Isin": "SAMPLE", "StockSymbol": "SAMPLE" } ] } ], "message": "Undefine", "status": "Undefine", "totalRecord": 0 }
Request Information
IndexComponentRequest
Property Name | Data Type | Sample value | Required | Description |
---|---|---|---|---|
IndexCode | String | SAMPLE | YES | Input Index Code to get consituent stocks |
PageIndex | Int32 | 10 | NO | Number of page, start from 1, default 1 |
PageSize | Int32 | 100 | NO | Size of a page, 10; 20; 50; 100; 1000 Default 10 |
Response Information
IndexComponentResponse
Property Name | Data Type | Property Name | Data Type | Sample value | Description |
---|---|---|---|---|---|
Data | IndexComponentResponseModel [ ] | IndexCode | String | ||
Data | IndexComponentResponseModel [ ] | IndexName | String | ||
Data | IndexComponentResponseModel [ ] | Exchange | String | ||
Data | IndexComponentResponseModel [ ] | TotalSymbolNo | String | ||
Data | IndexComponentResponseModel [ ] | IndexComponent | IndexComponent [ ] | ||
Isin | String | ||||
StockSymbol | String |
Syntax protocol message
{
Syntax Request Protocol 2 Message
syntax = "proto2"; package SSI.FastConnect.DataContracts.Market.Request; message IndexComponentRequest { optional string IndexCode = 1; optional int32 PageIndex = 2 [default = 0]; optional int32 PageSize = 3 [default = 0]; }
Syntax Request Protocol 3 Message
syntax = "proto3"; package SSI.FastConnect.DataContracts.Market.Request; message IndexComponentRequest { string IndexCode = 1; int32 PageIndex = 2; int32 PageSize = 3; }
{
Syntax Response Protocol 2 Message
syntax = "proto2"; message IndexComponent { optional string Isin = 5; optional string StockSymbol = 6; } message IndexComponentResponse { } message IndexComponentResponseModel { optional string IndexCode = 1; optional string IndexName = 2; optional string Exchange = 3; optional string TotalSymbolNo = 4; repeated IndexComponent IndexComponent = 5; } message ResponseBase_IndexComponentResponseModel { repeated IndexComponentResponseModel data = 1; optional string message = 2; optional string status = 3; optional int32 totalRecord = 4 [default = 0]; oneof subtype { IndexComponentResponse IndexComponentResponse = 102; } } message ResponseClient_IndexComponentResponse { optional bytes Data = 1; optional string Message = 2; optional int32 StatusCode = 3 [default = 0]; }
Syntax Response Protocol 3 Message
syntax = "proto3"; message IndexComponent { string Isin = 5; string StockSymbol = 6; } message IndexComponentResponse { } message IndexComponentResponseModel { string IndexCode = 1; string IndexName = 2; string Exchange = 3; string TotalSymbolNo = 4; repeated IndexComponent IndexComponent = 5; } message ResponseBase_IndexComponentResponseModel { repeated IndexComponentResponseModel data = 1; string message = 2; string status = 3; int32 totalRecord = 4; oneof subtype { IndexComponentResponse IndexComponentResponse = 102; } } message ResponseClient_IndexComponentResponse { bytes Data = 1; string Message = 2; int32 StatusCode = 3; }
https://developers.google.com/protocol-buffers/docs/csharptutorial