Get VN index data
Get VN index data
curl --request GET \
--url https://api-gw.verolabs.co/api/v1/MarketData/GetVNIndex/{index}const options = {method: 'GET'};
fetch('https://api-gw.verolabs.co/api/v1/MarketData/GetVNIndex/{index}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api-gw.verolabs.co/api/v1/MarketData/GetVNIndex/{index}"
response = requests.get(url)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-gw.verolabs.co/api/v1/MarketData/GetVNIndex/{index}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}using RestSharp;
var options = new RestClientOptions("https://api-gw.verolabs.co/api/v1/MarketData/GetVNIndex/{index}");
var client = new RestClient(options);
var request = new RestRequest("");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);falseCURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);
curl_easy_setopt(hnd, CURLOPT_URL, "https://api-gw.verolabs.co/api/v1/MarketData/GetVNIndex/{index}");
CURLcode ret = curl_easy_perform(hnd);{
"isSuccess": true,
"data": {
"code": "<string>",
"name": "<string>",
"unixTime": 123,
"chg": 123,
"value": 123,
"high": 123,
"low": 123,
"totQty": 123,
"totVal": 123,
"totStock": 123,
"type": "<string>",
"up": 123,
"down": 123,
"noChange": 123,
"ceil": 123,
"floor": 123,
"UpQty": 123,
"downQty": 123,
"noChangeQty": 123,
"upVal": 123,
"downVal": 123,
"noChangeVal": 123,
"seq": 123
},
"returnCode": 123,
"serviceInstance": [
{
"serviceType": "<string>",
"instanceID": "<string>",
"lastUnixTime": 123
}
],
"requestID": "<string>",
"algoID": "<string>",
"positionID": "<string>",
"requestType": "<string>",
"detail": "<string>",
"dataType": "<string>",
"executionTime": 123,
"lastTime": 123
}{
"error": "<string>",
"message": "<string>",
"detail": "<string>",
"details": "<string>",
"status": 123
}{
"error": "<string>",
"message": "<string>",
"detail": "<string>",
"details": "<string>",
"status": 123
}{
"error": "<string>",
"message": "<string>",
"detail": "<string>",
"details": "<string>",
"status": 123
}{
"error": "<string>",
"message": "<string>",
"detail": "<string>",
"details": "<string>",
"status": 123
}Path Parameters
Index code such as VNINDEX, VN30, HNXINDEX, or UPCOMINDEX.
Response
VN index response with typed data payload.
Backend returned success flag.
Index snapshot payload.
Hide child attributes
Hide child attributes
Index code, for example VNINDEX.
Index display name.
Snapshot timestamp in Unix milliseconds.
Index change from reference value.
Current index value.
Session high value.
Session low value.
Total traded quantity.
Total traded value.
Number of component stocks.
Index type label.
Number of advancing stocks.
Number of declining stocks.
Number of unchanged stocks.
Number of ceiling-price stocks.
Number of floor-price stocks.
Total quantity of advancing stocks.
Total quantity of declining stocks.
Total quantity of unchanged stocks.
Total value of advancing stocks.
Total value of declining stocks.
Total value of unchanged stocks.
Market-data sequence/timestamp.
Backend return code; live success responses commonly return 0.
Market-data service instances that handled the request.
Request id generated by the market-data service.
Algo id echoed by the market-data service when supplied.
Position id echoed by the market-data service when supplied.
Backend request type label.
Backend detail message.
Backend payload type label.
Backend execution time in milliseconds when available.
Last market-data timestamp returned by the service.
curl --request GET \
--url https://api-gw.verolabs.co/api/v1/MarketData/GetVNIndex/{index}const options = {method: 'GET'};
fetch('https://api-gw.verolabs.co/api/v1/MarketData/GetVNIndex/{index}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api-gw.verolabs.co/api/v1/MarketData/GetVNIndex/{index}"
response = requests.get(url)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-gw.verolabs.co/api/v1/MarketData/GetVNIndex/{index}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}using RestSharp;
var options = new RestClientOptions("https://api-gw.verolabs.co/api/v1/MarketData/GetVNIndex/{index}");
var client = new RestClient(options);
var request = new RestRequest("");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);falseCURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);
curl_easy_setopt(hnd, CURLOPT_URL, "https://api-gw.verolabs.co/api/v1/MarketData/GetVNIndex/{index}");
CURLcode ret = curl_easy_perform(hnd);{
"isSuccess": true,
"data": {
"code": "<string>",
"name": "<string>",
"unixTime": 123,
"chg": 123,
"value": 123,
"high": 123,
"low": 123,
"totQty": 123,
"totVal": 123,
"totStock": 123,
"type": "<string>",
"up": 123,
"down": 123,
"noChange": 123,
"ceil": 123,
"floor": 123,
"UpQty": 123,
"downQty": 123,
"noChangeQty": 123,
"upVal": 123,
"downVal": 123,
"noChangeVal": 123,
"seq": 123
},
"returnCode": 123,
"serviceInstance": [
{
"serviceType": "<string>",
"instanceID": "<string>",
"lastUnixTime": 123
}
],
"requestID": "<string>",
"algoID": "<string>",
"positionID": "<string>",
"requestType": "<string>",
"detail": "<string>",
"dataType": "<string>",
"executionTime": 123,
"lastTime": 123
}{
"error": "<string>",
"message": "<string>",
"detail": "<string>",
"details": "<string>",
"status": 123
}{
"error": "<string>",
"message": "<string>",
"detail": "<string>",
"details": "<string>",
"status": 123
}{
"error": "<string>",
"message": "<string>",
"detail": "<string>",
"details": "<string>",
"status": 123
}{
"error": "<string>",
"message": "<string>",
"detail": "<string>",
"details": "<string>",
"status": 123
}
