> For the complete documentation index, see [llms.txt](https://docs.koinju.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.koinju.io/free-demo-database.md).

# Free demo database

Free public SQL database with the previous day's trades, OHLCV candles, funding rates and option chains from 13 exchanges. No account or key needed.

A free, public ClickHouse database holding the previous validated UTC day of Koinju data. There is nothing to sign up for: the user is `demo` and its password is empty.

In `api`, `public_data` and `reference_data`, every table and view has the name and the columns it has in the Koinju database, so a query that reads only them runs unchanged with your own Koinju login.

## What it holds

The previous validated UTC day of every exchange, refreshed every day after validation, at about 06:00 UTC. When validation is late or fails, the copy starts at 09:00 UTC instead. It is one day, not a history. The day it holds:

```sql
SELECT min(timestamp), max(timestamp) FROM api.trade
```

## Connect

| Setting  | Value                                          |
| -------- | ---------------------------------------------- |
| Host     | `sn7u7x3woz.eu-central-1.aws.clickhouse.cloud` |
| HTTPS    | `8443`                                         |
| Native   | `9440` (TLS)                                   |
| User     | `demo`                                         |
| Password | none                                           |
| Database | `api`                                          |

{% tabs %}
{% tab title="Python" %}

```python
import clickhouse_connect

client = clickhouse_connect.get_client(
    host="sn7u7x3woz.eu-central-1.aws.clickhouse.cloud",
    port=8443,
    secure=True,
    username="demo",
    password="",
    database="api",
)
print(client.query("SELECT min(timestamp), max(timestamp) FROM api.trade").result_rows)
```

{% endtab %}

{% tab title="clickhouse-client" %}

```sh
clickhouse-client \
  --host sn7u7x3woz.eu-central-1.aws.clickhouse.cloud \
  --port 9440 \
  --secure \
  --user demo \
  --password '' \
  --database api
```

Pass `--password ''`: without it `clickhouse-client` sends the `CLICKHOUSE_PASSWORD` of your environment, if there is one, and the login fails with code 516.
{% endtab %}

{% tab title="curl" %}

```sh
curl --user demo: 'https://sn7u7x3woz.eu-central-1.aws.clickhouse.cloud:8443/?database=api' \
  --data-binary 'SELECT min(timestamp), max(timestamp) FROM api.trade'
```

{% endtab %}
{% endtabs %}

## Limits

| Limit                    | Value                                                    |
| ------------------------ | -------------------------------------------------------- |
| Per IP address, per hour | 300 queries, 1.7 GB of answers, 60 seconds of query time |

A query that goes over an hourly cap fails with code 201. The hourly counters start again at the top of the hour. When a cap stops an answer part-way, the HTTP status is already 200 and the body ends with the error message.

## Full history

This database is one day. The same objects, read with a Koinju login, go back further:

* Trades, futures and options data: the last 24 hours on Free, 90 days on Developer, 1 year on Professional, the complete history on Business and Enterprise.
* OHLCV: daily and hourly candles are full history on every plan; 1-minute candles are the last month on Free, the last year on Developer, full history from Professional.

See [Pricing](/pricing.md), or sign up at [koinju.io/pricing](https://koinju.io/pricing).
