GetDailyStockPrice

Method

POST

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

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_stock_price(symbol, from_date, to_date, page_index, page_size, market, option, ct_config): md_rq = md_model_pb2.StockPriceRequest() 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 md_rq.Market = market.upper()

[End]

Not supported yet

Sample Response

{
  "data": [
    {
      "TradingDate": "07/05/2024",
      "PriceChange": "1",
      "PerPriceChange": "1",
      "CeilingPrice": "1",
      "FloorPrice": "1",
      "RefPrice": "1",
      "OpenPrice": "1",
      "HighestPrice": "1",
      "LowestPrice": "1",
      "ClosePrice": "1",
      "AveragePrice": "1",
      "ClosePriceAdjusted": "1",
      "TotalMatchVol": "1",
      "TotalMatchVal": "1",
      "TotalDealVal": "1",
      "TotalDealVol": "1",
      "ForeignBuyVolTotal": "1",
      "ForeignCurrentRoom": "1",
      "ForeignSellVolTotal": "1",
      "ForeignBuyValTotal": "1",
      "ForeignSellValTotal": "1",
      "TotalBuyTrade": "1",
      "TotalBuyTradeVol": "1",
      "TotalSellTrade": "1",
      "TotalSellTradeVol": "1",
      "NetBuySellVol": "1",
      "NetBuySellVal": "1",
      "TotalTradedVol": "1",
      "TotalTradedValue": "1",
      "Symbol": "SSI",
      "Time": "10:00:00"
    }
  ],
  "message": "SUCCESS",
  "status": "SUCCESS",
  "totalRecord": 1
}

Request Information

StockPriceRequest

Property Name Data Type Sample value Required Description
Symbol String SAMPLE YES Symbol of the security, Include Stock, CW and Derivatives
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 100 NO Size of a page, 10; 20; 50; 100; 1000 Default 10
Market String SAMPLE NO Identify what market for this symbol, 'HOSE, HNX, UPCOM, DER, BOND'

Response Information

StockPriceResponse

Property Name Data Type Property Name Data Type Sample value Description
Data DailyStockPriceResponseModel [ ] TradingDate String
Data DailyStockPriceResponseModel [ ] PriceChange String
Data DailyStockPriceResponseModel [ ] PerPriceChange String
Data DailyStockPriceResponseModel [ ] CeilingPrice String
Data DailyStockPriceResponseModel [ ] FloorPrice String
Data DailyStockPriceResponseModel [ ] RefPrice String
Data DailyStockPriceResponseModel [ ] OpenPrice String
Data DailyStockPriceResponseModel [ ] HighestPrice String
Data DailyStockPriceResponseModel [ ] LowestPrice String
Data DailyStockPriceResponseModel [ ] ClosePrice String
Data DailyStockPriceResponseModel [ ] AveragePrice String
Data DailyStockPriceResponseModel [ ] ClosePriceAdjusted String
Data DailyStockPriceResponseModel [ ] TotalMatchVol String
Data DailyStockPriceResponseModel [ ] TotalMatchVal String
Data DailyStockPriceResponseModel [ ] TotalDealVal String
Data DailyStockPriceResponseModel [ ] TotalDealVol String
Data DailyStockPriceResponseModel [ ] ForeignBuyVolTotal String
Data DailyStockPriceResponseModel [ ] ForeignCurrentRoom String
Data DailyStockPriceResponseModel [ ] ForeignSellVolTotal String
Data DailyStockPriceResponseModel [ ] ForeignBuyValTotal String
Data DailyStockPriceResponseModel [ ] ForeignSellValTotal String
Data DailyStockPriceResponseModel [ ] TotalBuyTrade String
Data DailyStockPriceResponseModel [ ] TotalBuyTradeVol String
Data DailyStockPriceResponseModel [ ] TotalSellTrade String
Data DailyStockPriceResponseModel [ ] TotalSellTradeVol String
Data DailyStockPriceResponseModel [ ] NetForeignVol String
Data DailyStockPriceResponseModel [ ] NetForeignVal String
Data DailyStockPriceResponseModel [ ] TotalTradedVol String
Data DailyStockPriceResponseModel [ ] TotalTradedValue String
Data DailyStockPriceResponseModel [ ] Symbol String
Data DailyStockPriceResponseModel [ ] Time String

Syntax protocol message

{

Syntax Request Protocol 2 Message

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

message StockPriceRequest {
   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 string Market = 6;
}

Syntax Request Protocol 3 Message

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

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

Syntax Response Protocol 2 Message

syntax = "proto2";

message DailyStockPriceResponseModel {
   optional string TradingDate = 1;
   optional string PriceChange = 2;
   optional string PerPriceChange = 3;
   optional string CeilingPrice = 4;
   optional string FloorPrice = 5;
   optional string RefPrice = 6;
   optional string OpenPrice = 7;
   optional string HighestPrice = 8;
   optional string LowestPrice = 9;
   optional string ClosePrice = 10;
   optional string AveragePrice = 11;
   optional string ClosePriceAdjusted = 12;
   optional string TotalMatchVol = 13;
   optional string TotalMatchVal = 14;
   optional string TotalDealVal = 15;
   optional string TotalDealVol = 16;
   optional string ForeignBuyVolTotal = 17;
   optional string ForeignCurrentRoom = 18;
   optional string ForeignSellVolTotal = 19;
   optional string ForeignBuyValTotal = 20;
   optional string ForeignSellValTotal = 21;
   optional string TotalBuyTrade = 22;
   optional string TotalBuyTradeVol = 23;
   optional string TotalSellTrade = 24;
   optional string TotalSellTradeVol = 25;
   optional string NetBuySellVol = 26;
   optional string NetBuySellVal = 27;
   optional string TotalTradedVol = 28;
   optional string TotalTradedValue = 29;
   optional string Symbol = 30;
   optional string Time = 31;
}
message ResponseBase_DailyStockPriceResponseModel {
   repeated DailyStockPriceResponseModel data = 1;
   optional string message = 2;
   optional string status = 3;
   optional int32 totalRecord = 4 [default = 0];
   oneof subtype {
      StockPriceResponse StockPriceResponse = 106;
   }
}
message ResponseClient_StockPriceResponse {
   optional bytes Data = 1;
   optional string Message = 2;
   optional int32 StatusCode = 3 [default = 0];
}
message StockPriceResponse {
}

Syntax Response Protocol 3 Message

syntax = "proto3";

message DailyStockPriceResponseModel {
   string TradingDate = 1;
   string PriceChange = 2;
   string PerPriceChange = 3;
   string CeilingPrice = 4;
   string FloorPrice = 5;
   string RefPrice = 6;
   string OpenPrice = 7;
   string HighestPrice = 8;
   string LowestPrice = 9;
   string ClosePrice = 10;
   string AveragePrice = 11;
   string ClosePriceAdjusted = 12;
   string TotalMatchVol = 13;
   string TotalMatchVal = 14;
   string TotalDealVal = 15;
   string TotalDealVol = 16;
   string ForeignBuyVolTotal = 17;
   string ForeignCurrentRoom = 18;
   string ForeignSellVolTotal = 19;
   string ForeignBuyValTotal = 20;
   string ForeignSellValTotal = 21;
   string TotalBuyTrade = 22;
   string TotalBuyTradeVol = 23;
   string TotalSellTrade = 24;
   string TotalSellTradeVol = 25;
   string NetBuySellVol = 26;
   string NetBuySellVal = 27;
   string TotalTradedVol = 28;
   string TotalTradedValue = 29;
   string Symbol = 30;
   string Time = 31;
}
message ResponseBase_DailyStockPriceResponseModel {
   repeated DailyStockPriceResponseModel data = 1;
   string message = 2;
   string status = 3;
   int32 totalRecord = 4;
   oneof subtype {
      StockPriceResponse StockPriceResponse = 106;
   }
}
message ResponseClient_StockPriceResponse {
   bytes Data = 1;
   string Message = 2;
   int32 StatusCode = 3;
}
message StockPriceResponse {
}
https://developers.google.com/protocol-buffers/docs/csharptutorial