Lấy dữ liệu VN index
Lấy dữ liệu VN index
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
}Tham số đường dẫn
Index code such as VNINDEX, VN30, HNXINDEX, or UPCOMINDEX.
Phản hồi
Response chỉ số VN với payload data có schema cụ thể.
Cờ thành công do backend trả về.
Payload snapshot chỉ số.
Hide child attributes
Hide child attributes
Mã chỉ số, ví dụ VNINDEX.
Tên hiển thị của chỉ số.
Timestamp snapshot dạng Unix milliseconds.
Mức thay đổi của chỉ số so với tham chiếu.
Giá trị hiện tại của chỉ số.
Giá trị cao nhất trong phiên.
Giá trị thấp nhất trong phiên.
Tổng khối lượng giao dịch.
Tổng giá trị giao dịch.
Số lượng mã thành phần.
Nhãn loại chỉ số.
Số mã tăng.
Số mã giảm.
Số mã đứng giá.
Số mã trần.
Số mã sàn.
Tổng khối lượng của nhóm tăng.
Tổng khối lượng của nhóm giảm.
Tổng khối lượng của nhóm đứng giá.
Tổng giá trị của nhóm tăng.
Tổng giá trị của nhóm giảm.
Tổng giá trị của nhóm đứng giá.
Sequence/timestamp của market-data.
Mã trả về của backend; response thành công thường trả 0.
Request id do market-data service sinh ra.
Algo id được echo lại khi request có truyền.
Position id được echo lại khi request có truyền.
Nhãn loại request do backend trả về.
Thông điệp chi tiết từ backend.
Nhãn loại payload từ backend.
Thời gian xử lý của backend tính bằng milliseconds khi có.
Timestamp dữ liệu mới nhất do service trả về.
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
}
