Skip to main content
POST
/
v1
/
ttsql
TTSQL
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 |"
  }
}

Authorizations

X-API-KEY
string
header
required

Body

application/json
query
string
required

Natural language query to be converted to SQL

Example:

"Show me NVIDIA's quarterly revenue and net income for 2024"

Response

Query executed successfully

code
integer
required

Response code (0 for success)

Example:

0

success
boolean
required

Indicates whether the request was successful

Example:

true

message
string
required

Response message

Example:

"success"

response
object
required