curl --request POST \
--url https://api.linqalpha.com/v1/ttsql \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data @- <<EOF
{
"query": "Show me NVIDIA's quarterly revenue and net income for 2024"
}
EOF{
"code": 0,
"success": true,
"message": "success",
"response": {
"execution_id": "2548d578-0446-4abc-b6f6-f50c966d341c",
"stock_name_mapping": {
"BBG001S5TZJ6": "NVIDIA Corporation"
},
"currency_info": [
{
"currency": "USD",
"exchange_rate": 1
}
],
"field_currency_info": {
"BBG001S6Q004": {
"SALES": "TWD",
"EPS": "TWD",
"ff_sales": "TWD"
}
},
"execution_duration": 171,
"date_range": [
"2024-01-01",
"2024-12-31"
],
"rdb_result": "### Company Annual Financials\n\n| name | Fiscal Period End Date | Dividends Per Share |\n| --- | --- | --- |\n| NVIDIA Corporation | 2024-01-31 | 0.016 |"
}
}Converts natural language query to SQL, executes it, and returns results in markdown format
curl --request POST \
--url https://api.linqalpha.com/v1/ttsql \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data @- <<EOF
{
"query": "Show me NVIDIA's quarterly revenue and net income for 2024"
}
EOF{
"code": 0,
"success": true,
"message": "success",
"response": {
"execution_id": "2548d578-0446-4abc-b6f6-f50c966d341c",
"stock_name_mapping": {
"BBG001S5TZJ6": "NVIDIA Corporation"
},
"currency_info": [
{
"currency": "USD",
"exchange_rate": 1
}
],
"field_currency_info": {
"BBG001S6Q004": {
"SALES": "TWD",
"EPS": "TWD",
"ff_sales": "TWD"
}
},
"execution_duration": 171,
"date_range": [
"2024-01-01",
"2024-12-31"
],
"rdb_result": "### Company Annual Financials\n\n| name | Fiscal Period End Date | Dividends Per Share |\n| --- | --- | --- |\n| NVIDIA Corporation | 2024-01-31 | 0.016 |"
}
}Natural language query to be converted to SQL
"Show me NVIDIA's quarterly revenue and net income for 2024"
Query executed successfully
Response code (0 for success)
0
Indicates whether the request was successful
true
Response message
"success"
Show child attributes
Unique identifier for the query execution
"2548d578-0446-4abc-b6f6-f50c966d341c"
Query results formatted as markdown tables
"### Company Annual Financials\n\n| name | Fiscal Period End Date | Dividends Per Share |\n| --- | --- | --- |\n| NVIDIA Corporation | 2024-01-31 | 0.016 |"
Execution duration in milliseconds
Date range for the query [start_date, end_date]
2 elements["2024-01-01", "2024-12-31"]Was this page helpful?