Developers

Tahlil Plus AI API Documentation

Complete technical documentation for Crypto API, Stock API, and Forex API, including authentication, plans, limits, symbol discovery, utility endpoints, response headers, errors, compact metric responses, and endpoint usage examples.

Overview

Tahlil Plus AI provides multiple API products for market-related data access. The current API family includes Crypto API, Stock API, and Forex API.

These APIs are designed for charting, data workflows, product integration, symbol discovery, and structured access to market information.

Authentication

All protected endpoints require an API key in the Authorization header.

Authorization: Bearer YOUR_API_KEY

Requests without a valid key will return an authentication error such as MISSING_API_KEY or INVALID_API_KEY.

Base URLs

API Base URL Purpose
Crypto API https://crypto-api.tahlil-plus.dk Crypto prices, history, grouped highs/lows, symbol discovery, and crypto market metrics
Stock API https://stock-api.tahlil-plus.dk Stock prices, history, grouped highs/lows, and stock symbol discovery
Forex API https://forex-api.tahlil-plus.dk Forex prices, history, grouped highs/lows, and forex symbol discovery

Plans & Access

Access limits depend on the selected plan. Plans define request volume and maximum history access depth.

Plan Requests / Minute Requests / Day Requests / Month History Access
Free 60 1,000 20,000 7 days
Starter 120 10,000 200,000 90 days
Pro 300 100,000 2,000,000 730 days
Enterprise 1000 1,000,000 20,000,000 3650 days
Internal admin or development keys may expose larger limits than public plans. Public integrations should follow official plan limits.

Rate Limits

Rate limits are currently enforced on multiple windows:

  • Per-minute requests
  • Per-day requests
  • Per-month requests

If a request exceeds allowed usage, the API may return RATE_LIMIT_EXCEEDED.

History Access Limits

Historical requests are restricted by plan. Each plan has a maximum allowed history access depth expressed in days.

  • If the requested history range exceeds your plan access, the API may return HISTORY_LIMIT_EXCEEDED.
  • If the time range is invalid, reversed, or malformed, the API may return INVALID_TIME_RANGE or other validation errors.

Symbol Discovery

Symbol discovery is available through standard endpoints:

  • /search — search by query text
  • /symbols — retrieve metadata for one specific symbol
  • /symbol_info — return bulk symbol metadata
Note: /symbol_info can return very large payloads depending on the API and symbol universe.

Utility Endpoints

GET /health

Returns a health status response for the API service.

GET /time

Returns current server time as a UNIX timestamp string.

GET /config

Returns configuration metadata such as exchanges, supported resolutions, and capability flags.

GET /usage

Returns current plan, limits, usage counters, remaining quotas, and reset timings.

Usage Endpoint

The /usage endpoint returns current plan details, configured limits, usage counters, remaining counters, and reset timing.

{ "ok": true, "status": "ok", "compact": false, "plan": "admin", "limits": { "minute": 100000, "day": 100000000, "month": 1000000000, "max_history_days": 3650 }, "usage": { "minute": 0, "day": 751, "month": 8883 }, "remaining": { "minute": 100000, "day": 99999249, "month": 999991117 }, "reset": { "minute_seconds": 29, "day_utc": "2026-05-15T00:00:00Z", "month_utc": "2026-06-01T00:00:00Z" } }

Response Format

Standard data endpoints typically return a JSON structure with fields such as:

  • ok
  • status
  • symbol
  • price, or high / low, or results
  • compact
  • divisor

Chart endpoints return array-based candle responses, typically using TradingView-style fields such as t, o, h, l, c, and v.

Response Headers

Responses may include plan-aware usage headers such as:

Header Meaning
X-RateLimit-Limit-MinuteMaximum allowed requests in the current minute window
X-RateLimit-Remaining-MinuteRemaining requests in the current minute window
X-RateLimit-Limit-DayMaximum allowed requests in the current day window
X-RateLimit-Remaining-DayRemaining requests in the current day window
X-RateLimit-Limit-MonthMaximum allowed requests in the current month window
X-RateLimit-Remaining-MonthRemaining requests in the current month window
HTTP/1.1 200 OK X-RateLimit-Limit-Minute: 100000 X-RateLimit-Remaining-Minute: 99999 X-RateLimit-Limit-Day: 100000000 X-RateLimit-Remaining-Day: 99999249 X-RateLimit-Limit-Month: 1000000000 X-RateLimit-Remaining-Month: 999991117

Compact Market Metrics

Selected internal crypto market metric symbols can return compact numeric responses by default. This behavior currently applies to:

  • TOTAL
  • TOTAL2
  • TOTAL3
  • OTHERS

Default Behavior

  • compact=true by default for these symbols
  • divisor is returned at the top level
  • The visible numeric fields are compacted

Optional Query Controls

  • compact=false returns raw values
  • compact_detail=true returns raw and display metadata

Example

{ "ok": true, "status": "ok", "symbol": "TOTAL", "price": 2.77, "compact": true, "divisor": 1000000000000, "compact_detail": { "price": { "raw": 2773292602696.2803, "display": "2.77T", "suffix": "T", "unit_name": "trillion" } } }

Error Codes

Error Code HTTP Code Meaning
MISSING_PARAMETER400Required parameter is missing
INVALID_PARAMETER400Parameter value is invalid
INVALID_REQUEST_BODY400Request body is invalid or incomplete
INVALID_TIMESTAMP400Timestamp is invalid
INVALID_RESOLUTION400Resolution is not supported
INVALID_RANGE400Requested range is invalid
SYMBOL_NOT_FOUND404Symbol not found
UNSUPPORTED_SYMBOL400Symbol is not supported
UNSUPPORTED_MARKET400Market is not supported
NO_DATA_AVAILABLE404No data available
HISTORY_DATA_UNAVAILABLE404History data is unavailable
CURRENT_PRICE_UNAVAILABLE404Current price is unavailable
TIME_PRICE_UNAVAILABLE404Time price is unavailable
RANGE_DATA_UNAVAILABLE404Range data is unavailable
PROVIDER_ERROR502External provider error
PROVIDER_TIMEOUT504External provider timeout
PROVIDER_RATE_LIMITED502External provider rate limit reached
PROVIDER_BAD_RESPONSE502Provider returned an invalid response
UPSTREAM_SYMBOL_NOT_FOUND502Symbol exists but provider returned no data
PROCESSING_ERROR500Failed to process request
INTERNAL_ERROR500Internal server error
SERVICE_UNAVAILABLE503Service temporarily unavailable
MISSING_API_KEY401API key is missing
INVALID_API_KEY401API key is invalid
RATE_LIMIT_EXCEEDED429Rate limit exceeded
HISTORY_LIMIT_EXCEEDED403Requested range is outside plan history access
INVALID_TIME_RANGE400Invalid time range
FORBIDDEN403Access denied

Crypto API Overview

Crypto API supports runtime crypto symbols from Binance as well as internal crypto market metrics such as market dominance and total market values.

Crypto API — Symbols

GET /symbols?symbol=BTCUSDT
GET Single Symbol Metadata

Return full metadata for one specific symbol.

Required Parameters

  • symbol

Example Response

{ "symbol": "BTCUSDT", "ticker": "BTCUSDT", "name": "BTCUSDT", "full_name": "BTCUSDT", "description": "BTC / USDT", "exchange": "BINANCE", "listed_exchange": "BINANCE", "type": "CRYPTOCURRENCY", "currency_code": "USDT", "session": "24x7", "timezone": "UTC", "pricescale": 100, "supported_resolutions": ["1","3","5","15","30","60","120","240","360","480","720","1D","3D","1W","1M"], "provider": "binance", "provider_symbol": "BTCUSDT", "source": "provider" }

Crypto API — Symbol Info

GET /symbol_info
GET Bulk Metadata

Returns bulk symbol metadata for available crypto symbols.

Crypto API — Current Price

GET /current_price?symbol=BTCUSDT
GET Latest Price Auth Required

Returns the latest available price for the requested crypto symbol.

Required Parameters

  • symbol

Optional Parameters

  • compact — relevant for supported internal market metric symbols
  • compact_detail — include compact metadata for supported compact symbols

Example Request

curl -H "Authorization: Bearer YOUR_API_KEY" \ "https://crypto-api.tahlil-plus.dk/current_price?symbol=BTCUSDT"

Example Success Response

{ "ok": true, "status": "ok", "symbol": "BTCUSDT", "price": 81246.91, "compact": false, "divisor": 1 }

Example Error Response

{ "ok": false, "error_code": "SYMBOL_NOT_FOUND", "error_message": "Symbol not found.", "error_details": { "symbol": "UNKNOWN" } }

Crypto API — Time Price

GET /time_price?symbol=BTCUSDT&timestamp=UNIX_TS
GET Historical Point

Returns a point-in-time price for the requested symbol and timestamp.

Required Parameters

  • symbol
  • timestamp

Crypto API — History

GET /history?symbol=BTCUSDT&resolution=60&from=START_TS&to=END_TS
GET Chart Data TradingView Format

Returns historical candles in array-based chart format.

Required Parameters

  • symbol
  • resolution
  • from
  • to

Crypto API — Time High Low

GET /time_high_low?symbol=BTCUSDT&from=START_TS&to=END_TS
GET Aggregated Range Admin Plan

Returns one aggregated high/low summary for the requested time range.

Crypto API — Daily High Low

GET /daily_high_low?symbol=BTCUSDT&from=START_TS&to=END_TS
GET Grouped Daily Admin Plan

Returns daily grouped high/low values inside the requested time range.

Crypto API — Hourly High Low

GET /hourly_high_low?symbol=BTCUSDT&from=START_TS&to=END_TS
GET Grouped Hourly Admin Plan

Returns hourly grouped high/low values inside the requested time range.

Crypto API — Range High Low

GET /range_high_low?symbol=BTCUSDT&from=START_TS&to=END_TS
GET Range Summary Admin Plan

Returns high and low for the requested range, including candles_count and note when applicable.

Crypto API — Grouped Range High Low

POST /range_high_low_grouped
POST Multiple Ranges Admin Plan

Returns high/low values for multiple posted ranges in a single request.

Example Request Body

{ "symbol": "TOTAL2", "ranges": [ {"id": "r1", "from": 1778194800, "to": 1778209200}, {"id": "r2", "from": 1778209200, "to": 1778220000} ] }

Stock API Overview

Stock API provides stock symbol discovery, current prices, historical candles, and grouped high/low endpoints.

Stock API — Symbols

GET /symbols?symbol=AAPL

Return full metadata for one specific stock symbol.

Stock API — Symbol Info

GET /symbol_info

Returns bulk metadata for stock symbols.

Stock API — Current Price

GET /current_price?symbol=AAPL
GET Latest Price

Returns the latest available price for the requested stock symbol.

{ "ok": true, "status": "ok", "symbol": "AAPL", "price": 297.465087890625, "compact": false, "divisor": 1 }

Stock API — Time Price

GET /time_price?symbol=AAPL&timestamp=UNIX_TS

Returns a point-in-time price for the requested stock symbol.

Stock API — History

GET /history?symbol=AAPL&resolution=60&from=START_TS&to=END_TS

Returns chart-friendly candle arrays for supported stock symbols.

Stock API — Time High Low

GET /time_high_low?symbol=AAPL&from=START_TS&to=END_TS

Returns aggregated range high/low values for a stock symbol.

Stock API — Daily High Low

GET /daily_high_low?symbol=AAPL&from=START_TS&to=END_TS

Returns daily grouped high/low values inside the requested time range.

Stock API — Hourly High Low

GET /hourly_high_low?symbol=AAPL&from=START_TS&to=END_TS

Returns hourly grouped high/low values inside the requested time range.

Forex API Overview

Forex API provides currency pair discovery, current prices, historical candles, and grouped range endpoints.

Forex API — Symbols

GET /symbols?symbol=EURUSD

Return full metadata for one specific forex symbol.

Forex API — Symbol Info

GET /symbol_info

Returns bulk metadata for forex symbols.

Forex API — Current Price

GET /current_price?symbol=EURUSD
GET Latest Price

Returns the latest available price for the requested forex symbol.

{ "ok": true, "status": "ok", "symbol": "EURUSD", "price": 1.1678149700164795, "compact": false, "divisor": 1 }

Forex API — Time Price

GET /time_price?symbol=EURUSD&timestamp=UNIX_TS

Returns a point-in-time price for the requested forex symbol.

Forex API — History

GET /history?symbol=EURUSD&resolution=60&from=START_TS&to=END_TS

Returns chart-friendly historical candles for forex symbols.

Forex API — Time High Low

GET /time_high_low?symbol=EURUSD&from=START_TS&to=END_TS

Returns aggregated high/low values for the requested time range.

Forex API — Daily High Low

GET /daily_high_low?symbol=EURUSD&from=START_TS&to=END_TS

Returns daily grouped high/low values inside the requested time range.

Forex API — Hourly High Low

GET /hourly_high_low?symbol=EURUSD&from=START_TS&to=END_TS

Returns hourly grouped high/low values inside the requested time range.