Data Source
Retrieve a list of available data sources.
ENDPOINTS
POST /api/v1/tradeAnalytics/source
Request parameters
None
curl https://api.tradedata.io/api/v1/tradeAnalytics/source \
-H "Authorization: Bearer yourTokenHere" \
-H "Content-Type: application/json" \
-d '{}'
import requests
response = requests.post(
"https://api.tradedata.io/api/v1/tradeAnalytics/source",
headers={
"Authorization": "Bearer yourTokenHere",
"Content-Type": "application/json",
},
json={},
)
print(response.json())
const response = await fetch("https://api.tradedata.io/api/v1/tradeAnalytics/source", {
method: "POST",
headers: {
"Authorization": "Bearer yourTokenHere",
"Content-Type": "application/json",
},
body: JSON.stringify({}),
});
const data = await response.json();
<?php
$ch = curl_init("https://api.tradedata.io/api/v1/tradeAnalytics/source");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer yourTokenHere",
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => json_encode([]),
]);
echo curl_exec($ch);
Response parameters
code
int
Status code
- Example:
200
data
array
Result container
data.continent
string
Continent name
- Example:
ASIA
data.continentCn
string
Continent name (Chinese)
- Example:
亚洲
data.countryList
array
List of countries under the continent
- Example:
-
data.countryList.CountryCn
string
Country name (Chinese)
- Example:
中国
data.countryList.value
string
Country ISO3 code
- Example:
CHN
data.countryList.CountryEn
string
Country name (English)
- Example:
CHINA
data.countryList.period
string
Latest data period
- Example:
202501
Response Example
{
"code": 200,
"success": true,
"data": [
{
"continent": "ASIA",
"continentCn": "亚洲",
"countryList": [
{
"CountryCn": "中国",
"value": "CHN",
"CountryEn": "CHINA",
"period": "202501"
}
]
}
],
"msg": "success",
"total": 0,
"pageSize": 0,
"current": 0,
"sumResult": null
}