Now Live: Cboe Europe real-time data for all major European stocks.

Advanced

High-throughput and management endpoints for power users—submit and monitor batch jobs to pull large datasets asynchronously, track your API usage and quotas programmatically, and access other developer-focused tools for automating and scaling your data workflows.

Batches Useful

The batch request endpoint allows users to request data for multiple financial instruments, time intervals, and data types simultaneously. This endpoint is useful for efficiently gathering diverse financial data in a single operation, reducing the need for multiple individual requests. Errors in specific requests do not affect the processing of others, and each error is reported separately, enabling easy troubleshooting.

Request body

Only JSON POST requests are supported. The request content structure consists of key-value items. The key is a unique request ID. The value is requested url.

Response

The response contains key-value data. The key is a unique request ID. The value is returned data.

API credits

  • The number of concurrent requests is limited by your subscription plan.
  • Credits are consumed per requested endpoint, with the total usage equal to the sum of individual requests in the batch.
  • If the requested data exceeds your available credits, only partial data will be returned asynchronously until your quota is exhausted.
  • If one or more requests in the batch contain errors (e.g., invalid symbols or unsupported intervals), it will not affect the successful processing of other requests. Errors are reported individually within the response, allowing you to identify and correct specific issues without impacting the entire batch.

Route

No parameters are required

code

integer

HTTP status code

status

string

Status of the request

data

map (key: string, value: object)

Response data containing individual request results

Copy for LLM
View as Markdown

Request example

curl --location 'https://api.twelvedata.com/batch' \
--header 'Content-Type: application/json' \
--header 'Authorization: apikey demo' \
--data @- << EOF
{
    "req_1": {
        "url": "/time_series?symbol=AAPL&interval=1min&apikey=demo&outputsize=2"
    },
    "req_2": {
        "url": "/exchange_rate?symbol=USD/JPY&apikey=demo"
    },
    "req_3": {
        "url": "/currency_conversion?symbol=USD/JPY&amount=122&apikey=demo"
    }
}
EOF

Response

{
    "code": 200,
    "status": "success",
    "data": {
        "req_1": {
            "response": {
                "meta": {
                    "currency": "USD",
                    "exchange": "NASDAQ",
                    "exchange_timezone": "America/New_York",
                    "interval": "1min",
                    "mic_code": "XNGS",
                    "symbol": "AAPL",
                    "type": "Common Stock"
                },
                "status": "ok",
                "values": [
                    {
                        "close": "248.6",
                        "datetime": "2025-02-21 12:51:00",
                        "high": "248.6",
                        "low": "248.4",
                        "open": "248.5",
                        "volume": "22290"
                    },
                    {
                        "close": "248.52",
                        "datetime": "2025-02-21 12:50:00",
                        "high": "248.59",
                        "low": "248.43",
                        "open": "248.52",
                        "volume": "64085"
                    }
                ]
            },
            "status": "success"
        },
        "req_2": {
            "response": {
                "rate": 149.25999,
                "symbol": "USD/JPY",
                "timestamp": 1740160260
            },
            "status": "success"
        },
        "req_3": {
            "response": {
                "amount": 18209.71933,
                "rate": 149.25999,
                "symbol": "USD/JPY",
                "timestamp": 1740160260
            },
            "status": "success"
        }
    }
}

API usage

The API Usage endpoint provides detailed information on your current API usage statistics. It returns data such as the number of requests made, remaining requests, and the reset time for your usage limits. This endpoint is essential for monitoring and managing your API consumption to ensure you stay within your allocated limits.

Route

API credits cost

1 per request

format

string

Output format

Supports: JSON, CSV

Default: JSON

delimiter

string

Specify the delimiter used when downloading the CSV file

Default: ;

timezone

string

Timezone at which output datetime will be displayed. Supports:

  • 1. UTC for datetime at universal UTC standard
  • 2. Timezone name according to the IANA Time Zone Database. E.g. America/New_York, Asia/Singapore. Full list of timezones can be found here.
Take note that the IANA Timezone name is case-sensitive

Default: UTC

timestamp

string

Current timestamp in UTC timezone

current_usage

integer

Number of requests made in last minute

plan_limit

integer

Your personal API limit (requests/minute) depending on the plan

daily_usage

integer

Number of requests made in the current day. Returned only when the plan has a daily limit.

plan_daily_limit

integer

Your personal API limit (requests/day) depending on the plan. Returned only when the plan has a daily limit.

plan_category

string

Plan category name

Copy for LLM
View as Markdown

Response

{
    "timestamp": "2025-05-07 11:10:12",
    "current_usage": 4003,
    "plan_limit": 20000,
    "daily_usage": 12500,
    "plan_daily_limit": 100000,
    "plan_category": "enterprise"
}