GetDailyOHLC
Method
POST
http://fc-data.ssi.com.vn/api/Market/GetDailyOHLC
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_OHLC(symbol, from_date, to_date, page_index, page_size, option, ct_config): md_rq = md_model_pb2.DailyOHLCRequest() md_rq.Symbol = symbol.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[End]
Not supported yet
Sample Response
{ "data": [ { "Symbol": "SAMPLE", "Market": "SAMPLE", "TradingDate": "03/05/2024", "Time": null, "Open": "1", "High": "1", "Low": "1", "Close": "1", "Volume": "1", "Value": "1" } ], "message": "SUCCESS", "status": "SUCCESS", "totalRecord": 1 }
Request Information
DailyOHLCRequest
Property Name | Data Type | Sample value | Required | Description |
---|---|---|---|---|
Symbol | String | SSI | YES | Input Index ID or Instrument Symbol to get data. Including Stock, Derivatives, CW |
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 | Number of page, start from 1, default 1 |
PageSize | Int32 | 10 | NO | Size of a page, 10; 20; 50; 100; 1000 Default 10 |
Response Information
DailyOhlcResponse
Property Name | Data Type | Property Name | Data Type | Sample value | Description |
---|---|---|---|---|---|
Data | DailyOHLCResponseModel [ ] | Symbol | String | ||
Data | DailyOHLCResponseModel [ ] | Market | String | ||
Data | DailyOHLCResponseModel [ ] | TradingDate | String | ||
Data | DailyOHLCResponseModel [ ] | Time | String | ||
Data | DailyOHLCResponseModel [ ] | Open | String | ||
Data | DailyOHLCResponseModel [ ] | High | String | ||
Data | DailyOHLCResponseModel [ ] | Low | String | ||
Data | DailyOHLCResponseModel [ ] | Close | String | ||
Data | DailyOHLCResponseModel [ ] | Volume | String | ||
Data | DailyOHLCResponseModel [ ] | Value | String |
Syntax protocol message
{
Syntax Request Protocol 2 Message
syntax = "proto2"; package SSI.FastConnect.DataContracts.Market.Request; message DailyOHLCRequest { optional string Symbol = 1; optional string FromDate = 2; optional string ToDate = 3; optional int32 PageIndex = 4 [default = 0]; optional int32 PageSize = 5 [default = 0]; }
Syntax Request Protocol 3 Message
syntax = "proto3"; package SSI.FastConnect.DataContracts.Market.Request; message DailyOHLCRequest { string Symbol = 1; string FromDate = 2; string ToDate = 3; int32 PageIndex = 4; int32 PageSize = 5; }
{
Syntax Response Protocol 2 Message
syntax = "proto2"; message DailyOHLCResponseModel { optional string Symbol = 1; optional string Market = 2; optional string TradingDate = 3; optional string Time = 4; optional string Open = 5; optional string High = 6; optional string Low = 7; optional string Close = 8; optional string Volume = 9; optional string Value = 10; } message DailyOhlcResponse { } message ResponseBase_DailyOHLCResponseModel { repeated DailyOHLCResponseModel data = 1; optional string message = 2; optional string status = 3; optional int32 totalRecord = 4 [default = 0]; oneof subtype { DailyOhlcResponse DailyOhlcResponse = 101; } } message ResponseClient_DailyOhlcResponse { optional bytes Data = 1; optional string Message = 2; optional int32 StatusCode = 3 [default = 0]; }
Syntax Response Protocol 3 Message
syntax = "proto3"; message DailyOHLCResponseModel { string Symbol = 1; string Market = 2; string TradingDate = 3; string Time = 4; string Open = 5; string High = 6; string Low = 7; string Close = 8; string Volume = 9; string Value = 10; } message DailyOhlcResponse { } message ResponseBase_DailyOHLCResponseModel { repeated DailyOHLCResponseModel data = 1; string message = 2; string status = 3; int32 totalRecord = 4; oneof subtype { DailyOhlcResponse DailyOhlcResponse = 101; } } message ResponseClient_DailyOhlcResponse { bytes Data = 1; string Message = 2; int32 StatusCode = 3; }
https://developers.google.com/protocol-buffers/docs/csharptutorial