API Key Management
curl --request GET \
--url https://api.tickdb.ai/v1/apikeys/subscriptions \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.tickdb.ai/v1/apikeys/subscriptions"
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.tickdb.ai/v1/apikeys/subscriptions', 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.tickdb.ai/v1/apikeys/subscriptions",
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.tickdb.ai/v1/apikeys/subscriptions"
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.tickdb.ai/v1/apikeys/subscriptions")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tickdb.ai/v1/apikeys/subscriptions")
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{
"code": 0,
"data": {
"server_time": "2023-11-07T05:31:56Z",
"total": 1,
"api_keys": [
{
"key_prefix": "<string>",
"name": "<string>",
"plan": "<string>",
"status": "active",
"expires_at": "2023-11-07T05:31:56Z",
"remaining_seconds": 1,
"created_at": "2023-11-07T05:31:56Z"
}
]
},
"message": "<string>"
}Other APIs
API Key Management
Check when your API keys expire and set up alerts without signing in to the website.
GET
/
v1
/
apikeys
/
subscriptions
API Key Management
curl --request GET \
--url https://api.tickdb.ai/v1/apikeys/subscriptions \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.tickdb.ai/v1/apikeys/subscriptions"
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.tickdb.ai/v1/apikeys/subscriptions', 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.tickdb.ai/v1/apikeys/subscriptions",
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.tickdb.ai/v1/apikeys/subscriptions"
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.tickdb.ai/v1/apikeys/subscriptions")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tickdb.ai/v1/apikeys/subscriptions")
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{
"code": 0,
"data": {
"server_time": "2023-11-07T05:31:56Z",
"total": 1,
"api_keys": [
{
"key_prefix": "<string>",
"name": "<string>",
"plan": "<string>",
"status": "active",
"expires_at": "2023-11-07T05:31:56Z",
"remaining_seconds": 1,
"created_at": "2023-11-07T05:31:56Z"
}
]
},
"message": "<string>"
}Plan Access
| Plan | Available |
|---|---|
| Free | ✅ |
| Starter | ✅ |
| Professional | ✅ |
| Full-Market Plans (A-Shares, HK Stocks, US Stocks) | ✅ |
| Enterprise | ✅ |
Request parameters
This endpoint has no query parameters.Example request
curl -H "X-API-Key: YOUR_API_KEY" \
"https://api.tickdb.ai/v1/apikeys/subscriptions"
Response fields
The fields below are insidedata; an outer code of 0 indicates success.
| Field | Description |
|---|---|
| server_time | Server time of this request, as a date-time string with a time zone. |
| total | Number of API keys returned. |
| api_keys | API keys under the account. |
| └─ key_prefix | Prefix used to identify the key; this is not the complete key. |
| └─ name | API key name. |
| └─ plan | Plan identifier associated with the key. |
| └─ status | Key status: active, expired, suspended, or revoked. |
| └─ expires_at | Expiration time, or null if no expiration is set. |
| └─ remaining_seconds | Seconds until expiration; 0 if expired, or null if no expiration is set. |
| └─ created_at | API key creation time. |
