> For the complete documentation index, see [llms.txt](https://docs.openalgo.in/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.openalgo.in/trading-platform/amibroker/amiquotes.md).

# AmiQuotes

**This tool helps you to fetch data (1 minute / Daily) directly from the broker and seamlessly update Amibroker using the AmiQuote tool every minute.**

AmiQuote is a polling downloader, not a streaming feed. The `OpenAlgo.ads` file below is an AmiQuote data-source definition: each time AmiQuote runs it issues one HTTP GET per symbol against the OpenAlgo [Ticker API](/api-documentation/v1/data-api/ticker.md) and imports the plain-text result into the AmiBroker database.

```
GET http://127.0.0.1:5000/api/v1/ticker/{symbol}?apikey={api_key}&interval={interval}&from={from}&to={to}&format=txt
```

Two consequences worth knowing before you start:

* The data source declares only two usable intervals: **Daily** (`interval=D`, up to 3650 days per request) and **1-minute** (`interval=1m`, 1 day per request). The other periodicities listed by AmiQuote carry no OpenAlgo interval token and will not download.
* The Ticker API clamps the requested date range server side: intraday intervals are capped at 30 days back from the end date, and D/W/M at 10 years. Longer requests are silently trimmed rather than rejected.

If you want a live tick feed and realtime charts instead of a once-a-minute snapshot import, use the [OpenAlgo AmiBroker Plugin](/trading-platform/amibroker/amibroker-plugin.md), which streams from the OpenAlgo WebSocket proxy.

### Prerequisites

OpenAlgo and OpenAlgo API Key

Amibroker 6.0 or higher

Amiquotes 4.10 or higher (mostly preinstalled with Amibroker) if not download from [Amibroker Download section](https://amibroker.com/download.html)

OpenAlgo supported Brokers providing Historical Data / Intraday Data API

Note : As of now kotak not supporting intraday/historical data API

### Step 1 : Download OpenAlgo - Amiquotes (Plugin)

{% file src="/files/NIyXBlRr4z0n5lfY995V" %}

Download the file and save under **Amibroker -> Amiquotes -> DataSource Folder**

<figure><img src="https://17901342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBwEhITzgv0O0fEGIIRN%2Fuploads%2FPtrzbYVzbQhSIDnuLgue%2Fimage.png?alt=media&amp;token=ca3fdb10-471c-42a1-9129-28ff9e56c876" alt=""><figcaption></figcaption></figure>

### Step 2 : Create the Amibroker Database

Open Amibroker Goto File Menu -> New -> Database

<figure><img src="https://17901342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBwEhITzgv0O0fEGIIRN%2Fuploads%2FI44CxY3hDTnlhwlSr26b%2Fimage.png?alt=media&amp;token=abfe59d3-cf8b-46f2-ad8b-718c8f732ad7" alt=""><figcaption></figcaption></figure>

Create a New Database

Enter the Database Name, Base Time Interval and Click Create

<figure><img src="https://17901342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBwEhITzgv0O0fEGIIRN%2Fuploads%2F04eADIlm3v4f35hmP5ob%2Fimage.png?alt=media&amp;token=3f9d56a0-da7c-421f-8304-18d1f7252eea" alt=""><figcaption></figcaption></figure>

Enter the Database Source as (local database) and Number of Bars as 75000

<figure><img src="https://17901342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBwEhITzgv0O0fEGIIRN%2Fuploads%2FpKGW2kxsGWNNPKAvnbCF%2Fimage.png?alt=media&amp;token=5235cfbb-0461-4acf-97ca-7d6c687a042f" alt=""><figcaption></figcaption></figure>

Now click on Intraday Settings and Enable Allow Mixed EOD/Interval data and press ok

<figure><img src="https://17901342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBwEhITzgv0O0fEGIIRN%2Fuploads%2FAQsTGLiFFypDqpy8Waus%2Fimage.png?alt=media&amp;token=68e57553-cc2c-4902-9dea-215029f98235" alt=""><figcaption></figcaption></figure>

### Step 3 : Add OpenAlgo Ticker Symbols

Add Ticker Symbols from the Symbols menu -> New

The AmiBroker ticker name is pasted straight into the Ticker API path, so it must be written as `EXCHANGE:SYMBOL`, for example `NSE:RELIANCE`, `BSE:TCS`, `MCX:CRUDEOIL18JUN26FUT`, `NSE_INDEX:NIFTY`. This is the reverse of the `SYMBOL-EXCHANGE` format used by the OpenAlgo AmiBroker data plugin. A ticker with no `EXCHANGE:` prefix does not fail cleanly: the Ticker API falls back to `NSE:RELIANCE` and you will silently import the wrong instrument.

<figure><img src="https://17901342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBwEhITzgv0O0fEGIIRN%2Fuploads%2FR64U6n63bSWO1Y8tP7tS%2Fimage.png?alt=media&amp;token=39c505a8-bff9-4b4f-a66d-db873b19601e" alt=""><figcaption></figcaption></figure>

You can Also add the ticker symbol with comma separated

<figure><img src="https://17901342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBwEhITzgv0O0fEGIIRN%2Fuploads%2F3hrzjMuJ7BgGvN4vgxC5%2Fimage.png?alt=media&amp;token=b5f99296-eea1-4322-94cd-3393ee2c8bc7" alt=""><figcaption></figcaption></figure>

If you want to import bulk symbols consider using Watchlist import method (Supports .txt or .csv or .tls format)

<figure><img src="https://17901342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBwEhITzgv0O0fEGIIRN%2Fuploads%2Fu7YgvHmewMR5Z3eBEKKM%2Fimage.png?alt=media&amp;token=c06aefcf-9cda-4b0b-abd4-d32c385d90d2" alt=""><figcaption></figcaption></figure>

### Step 4 : Amiquote Realtime Update

Open Amiquote from Tools Menu -> Auto-update quotes (AmiQuote)

<figure><img src="https://17901342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBwEhITzgv0O0fEGIIRN%2Fuploads%2F4y9PtyCqpGi3hjbE52Lp%2Fimage.png?alt=media&amp;token=1357ac88-e131-478e-bf1b-9f0c2ca8aefa" alt=""><figcaption></figcaption></figure>

From the dropdown of Amiquote Select OpenAlgo

<figure><img src="https://17901342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBwEhITzgv0O0fEGIIRN%2Fuploads%2FxT2Ud1yV4uIXPOt9QrW1%2Fimage.png?alt=media&amp;token=b3258412-2813-4608-ad23-86cb49156625" alt=""><figcaption></figcaption></figure>

Alternatively, you can also import the openalgo template using the import method. Goto **Data Source Menu -> Import**

<figure><img src="https://17901342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBwEhITzgv0O0fEGIIRN%2Fuploads%2F3oWZ4Zd6jhV3VJQKIGXU%2Fimage.png?alt=media&amp;token=05ec954b-5498-41a6-bcdd-a094c492be4d" alt=""><figcaption></figcaption></figure>

configure the OpenAlgo API key

Get the OpenAlgo API Key by visiting **openalgo -> Dashboard -> Click on Profile Icon -> APIKey**

Create one if you installed openalgo for the first time. Copy the API key and paste in the User-definable data source -> API Key Section as shown below and press ok

<figure><img src="https://17901342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBwEhITzgv0O0fEGIIRN%2Fuploads%2FZMWtuCqQHptrrykRHaBC%2Fimage.png?alt=media&amp;token=a8aaebf6-e090-4e82-a0d0-8e0c1593133d" alt=""><figcaption></figcaption></figure>

Now Select the desired interval and set Run every 1min and press the play button

<figure><img src="https://17901342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBwEhITzgv0O0fEGIIRN%2Fuploads%2FFBtiGDlkaFyo7iKsUvm9%2Fimage.png?alt=media&amp;token=06dca8ac-528f-4d06-9c32-8c95ddef49b7" alt=""><figcaption></figcaption></figure>

Now the Data Download from the Broker via OpenAlgo Starts

<figure><img src="https://17901342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBwEhITzgv0O0fEGIIRN%2Fuploads%2FwYg1qCQWkU2koAWhWaxW%2Fimage.png?alt=media&amp;token=c78516ca-3121-4c11-bd70-299c4e3bbcb9" alt=""><figcaption></figcaption></figure>

Now you can see that openalgo is Auto updating the Amibroker Database every 1 minute

<figure><img src="https://17901342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBwEhITzgv0O0fEGIIRN%2Fuploads%2F1KrpDzssbcIdO8gfsHBm%2Fimage.png?alt=media&amp;token=513979d9-6760-4130-b2d5-533b3327062b" alt=""><figcaption></figcaption></figure>

Make sure that Charts are loaded properly.

<figure><img src="https://17901342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBwEhITzgv0O0fEGIIRN%2Fuploads%2F0XmX0BvnmZZ9Wwe2WxbA%2FAmibroker%20Chart.png?alt=media&amp;token=684e60b0-69ac-4e9b-9ae6-4c1aeb9b3230" alt=""><figcaption></figcaption></figure>

Start using your brokers data for your analysis purpose.<br>

For more details and troubleshooting refer the [Ticker API](/api-documentation/v1/data-api/ticker.md)

Make sure to login to openalgo every day to fetch the live intraday/EOD quotes
