Index List
/indices?country_id=14&key=Contact us to get the key
PARAMS
name | Location | type | Required | illustrate |
---|---|---|---|---|
country_id | query | string | yes | Country ID |
key | query | string | yes | Contact us to get the key |
Example Response
json
// The index K-line interface and the stock share the same interface /kline
[
{
"Id": 535582575, // Index Id is also the pid of the index
"Name": "Nifty 50 Index", // Stock Name
"Symbol": "NIFTY", // Stock Code
"Last": "24961.45", // Latest stock price
"High": "24969.35", // Highest
"Low": "24856.5", // lowest
"Open": "24886.7", // Open today
"PrevClose": "24857.301", // Yesterday's harvest
"Time": "1722417000", // Price update time
"Volume": "239789061", // Trading Volume
"Chg": "104.15", // Increase
"ChgPct": "0.42", // Increase rate
"country_id": "14", // Country ID
"type": "NSE" // The exchange where the index is located
}
]
Example Request
java
import java.io.*;
import okhttp3.*;
public class main {
public static void main(String []args) throws IOException{
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("/indices?country_id=14&key=Contact us to get the key")
.method("GET", body)
.build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());
}
}
php
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '/indices?country_id=14&key=Contact us to get the key',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;