GetIntradayOHLC

Method

POST

http://fc-data.ssi.com.vn/api/Market/GetIntradayOHLC

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_intraday_OHLC(symbol, from_date, to_date, page_index, page_size, option, ct_config): md_rq = md_model_pb2.IntradayOHLCRequest() 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",
      "Value": "1",
      "TradingDate": "07/05/2024",
      "Time": "11:11:11",
      "Open": "1",
      "High": "1",
      "Low": "1",
      "Close": "1",
      "Volume": "1"
    }
  ],
  "message": "Undefine",
  "status": "Undefine",
  "totalRecord": 0
}

Request Information

IntradayOHLCRequest

Property Name Data Type Sample value Required Description
Symbol String SAMPLE 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 10000 NO Size of a page, 10; 20; 50; 100; 1000 Default 10
Resolution Int32 10 NO 1S, 1P ,5P ,15P ,30P ,1H

Response Information

IntradayOHLCResponse

Property Name Data Type Property Name Data Type Sample value Description
Data IntradayOHLCResponseModel [ ] Symbol String
Data IntradayOHLCResponseModel [ ] Value String
Data IntradayOHLCResponseModel [ ] TradingDate String
Data IntradayOHLCResponseModel [ ] Time String
Data IntradayOHLCResponseModel [ ] Open String
Data IntradayOHLCResponseModel [ ] High String
Data IntradayOHLCResponseModel [ ] Low String
Data IntradayOHLCResponseModel [ ] Close String
Data IntradayOHLCResponseModel [ ] Volume String

Syntax protocol message

{

Syntax Request Protocol 2 Message

syntax = "proto2";
package SSI.FastConnect.DataContracts.Market.Request;

message IntradayOHLCRequest {
   optional string Symbol = 1;
   optional string FromDate = 2;
   optional string ToDate = 3;
   optional int32 PageIndex = 4 [default = 0];
   optional int32 PageSize = 5 [default = 0];
   optional int32 Resolution  = 6 [default = 0];
}

Syntax Request Protocol 3 Message

syntax = "proto3";
package SSI.FastConnect.DataContracts.Market.Request;

message IntradayOHLCRequest {
   string Symbol = 1;
   string FromDate = 2;
   string ToDate = 3;
   int32 PageIndex = 4;
   int32 PageSize = 5;
   int32 Resolution  = 6;
}
{

Syntax Response Protocol 2 Message

syntax = "proto2";

message IntradayOHLCResponse {
}
message IntradayOHLCResponseModel {
   optional string Symbol = 1;
   optional string Value = 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;
}
message ResponseBase_IntradayOHLCResponseModel {
   repeated IntradayOHLCResponseModel data = 1;
   optional string message = 2;
   optional string status = 3;
   optional int32 totalRecord = 4 [default = 0];
   oneof subtype {
      IntradayOHLCResponse IntradayOHLCResponse = 107;
   }
}
message ResponseClient_IntradayOHLCResponse {
   optional bytes Data = 1;
   optional string Message = 2;
   optional int32 StatusCode = 3 [default = 0];
}

Syntax Response Protocol 3 Message

syntax = "proto3";

message IntradayOHLCResponse {
}
message IntradayOHLCResponseModel {
   string Symbol = 1;
   string Value = 2;
   string TradingDate = 3;
   string Time = 4;
   string Open = 5;
   string High = 6;
   string Low = 7;
   string Close = 8;
   string Volume = 9;
}
message ResponseBase_IntradayOHLCResponseModel {
   repeated IntradayOHLCResponseModel data = 1;
   string message = 2;
   string status = 3;
   int32 totalRecord = 4;
   oneof subtype {
      IntradayOHLCResponse IntradayOHLCResponse = 107;
   }
}
message ResponseClient_IntradayOHLCResponse {
   bytes Data = 1;
   string Message = 2;
   int32 StatusCode = 3;
}
https://developers.google.com/protocol-buffers/docs/csharptutorial