API reference
API discovery
Search the indexed financial API endpoints in natural language, and list the providers discovery covers.
Search endpoints
/api/v1/discoverDescribe what you need in plain English and get the closest matches from ENTON's index of financial API endpoints. The query is embedded and compared against the index by vector similarity, highest score first.
Request
JSON body
| Field | Description |
|---|---|
querystringrequired | What you want to do, up to 500 characters.up to 500 characters |
topKinteger | Number of matches to return, 1 to 50.default 10 · 1 to 50 |
minScorenumber | Validated and echoed. Matches are not currently filtered by it; filter on score yourself.default 0.7 · 0 to 1 |
Response
200 Matching endpoints, highest score first.
| Field | Description |
|---|---|
endpointsarray of object | Matches. |
endpoints[].providerstring | Provider id, for example "alpaca". |
endpoints[].providerNamestring | Display name, or the id. |
endpoints[].pathstring | The provider's endpoint path. |
endpoints[].methodstring | HTTP method. "GET" when the index has none. |
endpoints[].descriptionstring | What the endpoint does. |
endpoints[].scorenumber | Similarity, 0 to 1. |
endpoints[].relevancestring | high above 0.9, medium above 0.7, low otherwise.one of "high", "medium", "low" |
endpoints[].availableboolean | True when you have connected this provider to your ENTON account, or when you have connected none at all. |
endpoints[].requiresAuthboolean | Currently always true. |
endpoints[].authTypestring | How the provider authenticates: "apiKey" or "oauth". |
endpoints[].documentationstring | Link to the provider's docs, when indexed. |
endpoints[].exampleRequestobject | Example request, when indexed. |
endpoints[].exampleResponseobject | Example response, when indexed. |
endpoints[].requiredParamsarray of string | Required parameters, when indexed. |
endpoints[].optionalParamsarray of string | Optional parameters, when indexed. |
endpoints[].rateLimitstring | Provider rate limit, or "Unknown". |
endpoints[].categoriesarray of string | Currently always empty. |
endpoints[].tagsarray of string | Currently always empty. |
metadataobject | Request metadata. |
metadata.totalFoundinteger | Number of matches returned. |
metadata.querystring | Your query. |
metadata.topKinteger | The topK used. |
metadata.minScorenumber | The minScore you sent. |
metadata.responseTimeinteger | Milliseconds this request took, measured by the API. |
metadata.searchMethodstring | "semantic". |
metadata.providersSearchedarray of string | Providers that appear in the matches. |
{
"endpoints": [
{
"provider": "alpaca",
"providerName": "alpaca",
"path": "/v2/stocks/{symbol}/bars",
"method": "GET",
"description": "...",
"score": 0.91,
"relevance": "high",
"available": true,
"requiresAuth": true,
"authType": "oauth",
"requiredParams": [],
"optionalParams": [],
"rateLimit": "Unknown",
"categories": [],
"tags": []
}
],
"metadata": {
"totalFound": 1,
"query": "historical stock prices",
"topK": 5,
"minScore": 0.7,
"responseTime": 640,
"searchMethod": "semantic",
"providersSearched": [
"alpaca"
]
}
}Errors
| Status | When | error |
|---|---|---|
| 403 | The key has neither "api:discover" nor "*". | Insufficient permissions. Required scope: api:discover |
| 400 | query is missing or empty. | Missing required field: query |
| 400 | query is over 500 characters. | Query too long. Maximum length is 500 characters |
| 400 | topK is out of range. | Invalid topK. Must be between 1 and 50 |
| 400 | minScore is out of range. | Invalid minScore. Must be between 0 and 1 |
| 500 | The search failed, or the body was not valid JSON. | Failed to discover APIs. Please try again. |
Errors use the standard error body. Any request can also get the authentication errors (401) and the rate-limit error (429).
Examples
curl -X POST "https://enton.ai/api/v1/discover" \
-H "Authorization: Bearer $ENTON_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "get historical stock prices",
"topK": 5
}'List discovery providers
/api/v1/discoverA fixed list of the data providers discovery describes, with how each one authenticates. Needs a valid key; no scope is checked.
Request
No parameters and no body.
Response
200 The providers.
| Field | Description |
|---|---|
providersarray of object | Providers. |
providers[].namestring | Provider id. |
providers[].displayNamestring | Display name. |
providers[].descriptionstring | What it offers. |
providers[].categoriesarray of string | Data categories. |
providers[].authRequiredboolean | Whether you must connect it yourself. |
providers[].authTypestring | "oauth" or "apiKey". |
totalProvidersinteger | Length of providers. |
{
"providers": [
{
"name": "alpaca",
"displayName": "Alpaca",
"description": "Stock and crypto trading",
"categories": [
"trading",
"stocks",
"crypto"
],
"authRequired": true,
"authType": "oauth"
},
{
"name": "finnhub",
"displayName": "Finnhub",
"description": "Market data and news",
"categories": [
"market-data",
"news",
"fundamentals"
],
"authRequired": false,
"authType": "apiKey"
}
],
"totalProviders": 5
}Errors
Errors use the standard error body. Any request can also get the authentication errors (401) and the rate-limit error (429).
Examples
curl "https://enton.ai/api/v1/discover" \
-H "Authorization: Bearer $ENTON_API_KEY"