# Time series cross

The Time Series Cross endpoint calculates and returns historical cross-rate data for exotic forex pairs, cryptocurrencies, or stocks (e.g., Apple Inc. price in Indian Rupees) on the fly. It provides metadata about the requested symbol and a time series array with Open, High, Low, and Close prices, sorted descending by time, enabling analysis of price history and market trends.

**API credits cost:** `5` per symbol

## Parameters

- `base` (string, required)
  Base currency symbol
  Example value: `JPY`


- `base_type` (string, optional)
  Base instrument type according to the `/instrument_type` endpoint
  Example value: `Physical Currency`


- `base_exchange` (string, optional)
  Base exchange
  Example value: `Binance`


- `base_mic_code` (string, optional)
  Base MIC code
  Example value: `XNGS`


- `quote` (string, required)
  Quote currency symbol
  Example value: `BTC`


- `quote_type` (string, optional)
  Quote instrument type according to the `/instrument_type` endpoint
  Example value: `Digital Currency`


- `quote_exchange` (string, optional)
  Quote exchange
  Example value: `Coinbase`


- `quote_mic_code` (string, optional)
  Quote MIC code
  Example value: `XNYS`


- `interval` (string, required)
  Interval between two consecutive points in time series
  Example value: `1min`
  Available values: `1min`, `5min`, `15min`, `30min`, `45min`, `1h`, `2h`, `4h`, `8h`, `1day`, `1week`, `1month`


- `outputsize` (integer, optional)
  Number of data points to retrieve. Supports values in the range from `1` to `5000`. Default `30` when no date parameters are set, otherwise set to maximum
  Example value: `30`


- `format` (string, optional)
  Format of the response data
  Example value: `JSON`
  Available values: `JSON`, `CSV`
  Default value: `JSON`


- `delimiter` (string, optional)
  Delimiter used in CSV file
  Example value: `;`
  Default value: `;`


- `prepost` (boolean, optional)
  Only for the `Pro` plan (individual) and `Venture` plan (business) and above.
Available at the `1min`, `5min`, `15min`, and `30min` intervals for US equities.
Open, high, low, close values are supplied without volume.
  Example value: `false`
  Default value: `false`


- `start_date` (string, optional)
  Start date for the time series data
  Example value: `2025-01-01`


- `end_date` (string, optional)
  End date for the time series data
  Example value: `2025-01-31`


- `adjust` (boolean, optional)
  Specifies if there should be an adjustment
  Default value: `true`


- `dp` (integer, optional)
  Specifies the number of decimal places for floating values.
Should be in range [0, 11] inclusive.
  Example value: `5`
  Default value: `5`


- `timezone` (string, optional)
  Timezone at which output datetime will be displayed. Supports:

1. Exchange for local exchange time
2. UTC for datetime at universal UTC standard
3. 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
  Example value: `UTC`



## Response

- `meta` (object)
  Json object with request general information
  - `base_instrument` (string)
    Base instrument symbol
  - `base_currency` (string)
    Base currency
  - `base_exchange` (string)
    Base exchange
  - `interval` (string)
    Interval between two consecutive points in time series
  - `quote_instrument` (string)
    Quote instrument symbol
  - `quote_currency` (string)
    Quote currency
  - `quote_exchange` (string)
    Quote exchange

- `values` (array of object)
  Array of time series data points
  - `datetime` (string)
    Datetime at local exchange time referring to when the bar with specified interval was opened
  - `open` (string)
    Price at the opening of the current bar
  - `high` (string)
    Highest price which occurred during the current bar
  - `low` (string)
    Lowest price which occurred during the current bar
  - `close` (string)
    Close price at the end of the bar


## Example Request

```bash
curl "https://api.twelvedata.com/time_series/cross?base=JPY&quote=BTC&interval=1min&apikey=demo"
```

## Example Response

```json
{
    "meta": {
        "base_instrument": "JPY/USD",
        "base_currency": "",
        "base_exchange": "PHYSICAL CURRENCY",
        "interval": "1min",
        "quote_instrument": "BTC/USD",
        "quote_currency": "",
        "quote_exchange": "Coinbase Pro"
    },
    "values": [
        {
            "datetime": "2025-02-28 14:30:00",
            "open": "0.0000081115665",
            "high": "0.0000081273069",
            "low": "0.0000081088287",
            "close": "0.0000081268066"
        }
    ]
}
```
