Refresh a live data block
curl --request GET \
--url https://api.andiai.com/api/v1/data/refresh \
--header 'x-api-key: <api-key>'import requests
url = "https://api.andiai.com/api/v1/data/refresh"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.andiai.com/api/v1/data/refresh', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.andiai.com/api/v1/data/refresh",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.andiai.com/api/v1/data/refresh"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.andiai.com/api/v1/data/refresh")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.andiai.com/api/v1/data/refresh")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"quote": {
"symbol": "<string>",
"price": 123,
"name": "<string>",
"exchange": "<string>",
"currency": "<string>",
"change": 123,
"changePercent": 123,
"previousClose": 123,
"open": 123,
"low": 123,
"high": 123,
"marketState": "open",
"close": 123,
"extendedPrice": 123,
"extendedChange": 123,
"delayMinutes": 123,
"series": [
123
],
"refresh": "<string>",
"source": {
"name": "<string>",
"url": "<string>"
},
"asOf": "<string>",
"stale": true
},
"score": {
"league": "<string>",
"status": "scheduled",
"teams": [
{
"name": "<string>",
"shortName": "<string>",
"logo": "<string>",
"score": 123,
"home": true
}
],
"clock": "<string>",
"startTime": "<string>",
"events": [
"<string>"
],
"reason": "<string>",
"games": [
{}
],
"refresh": "<string>",
"source": {
"name": "<string>",
"url": "<string>"
},
"asOf": "<string>",
"stale": true
},
"asOf": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}API Reference
Refresh a live data block
Returns only the latest figure for one live quote or score block, without running a search. Use the block’s refresh value as ref. Call it at most once a minute: calls within a minute share one copy.
GET
/
api
/
v1
/
data
/
refresh
Refresh a live data block
curl --request GET \
--url https://api.andiai.com/api/v1/data/refresh \
--header 'x-api-key: <api-key>'import requests
url = "https://api.andiai.com/api/v1/data/refresh"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.andiai.com/api/v1/data/refresh', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.andiai.com/api/v1/data/refresh",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.andiai.com/api/v1/data/refresh"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.andiai.com/api/v1/data/refresh")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.andiai.com/api/v1/data/refresh")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"quote": {
"symbol": "<string>",
"price": 123,
"name": "<string>",
"exchange": "<string>",
"currency": "<string>",
"change": 123,
"changePercent": 123,
"previousClose": 123,
"open": 123,
"low": 123,
"high": 123,
"marketState": "open",
"close": 123,
"extendedPrice": 123,
"extendedChange": 123,
"delayMinutes": 123,
"series": [
123
],
"refresh": "<string>",
"source": {
"name": "<string>",
"url": "<string>"
},
"asOf": "<string>",
"stale": true
},
"score": {
"league": "<string>",
"status": "scheduled",
"teams": [
{
"name": "<string>",
"shortName": "<string>",
"logo": "<string>",
"score": 123,
"home": true
}
],
"clock": "<string>",
"startTime": "<string>",
"events": [
"<string>"
],
"reason": "<string>",
"games": [
{}
],
"refresh": "<string>",
"source": {
"name": "<string>",
"url": "<string>"
},
"asOf": "<string>",
"stale": true
},
"asOf": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Authorizations
API key from the API Console.

