Tuesday, May 5, 2026

Amibroker API Integration



Required Amibroker version 6.3 or above


Installation instructions: Amibroker API Integration - Installation


Scrip Master Instructions: Amibroker API Integration - Scrip Master


Dashboard Instructions:  Amibroker API Integration - Dashboard


Points to Remember 

Don't run Amibroker as administrator. It is for data feed users . If you use order placing only, then no problem.

Backfill or live feed data go to the database which is opened in amibroker. So, if other database open, if live feed script running or strat backfill script, it will get filled.

Avoid using Antivirus. Windows defender is enough. If you have separate system for trading, you can stop defender also.



If you have installed both 32 bit and 64 bit take some care. Add formats files in both folder. I don't know, it make any other issue.

Datafeed send data to the opened amibroker, irrespective of default database . If you opened two databases (two Amibroker instances) take care.

Always keep two brokers for live feed. 

Start your datafeed as much as early as possible. We can start around 8AM also. Also if need place dummy order and check. Password expired, Expiry date changed, API issue etc. can verify.

When Backfilling or live feed there is green bar scrolling or blinking at bottom of Amibroker. For backfilling progress for importing is ok. But for live, it should like as blinking. In live , if it visible slowly, then there will be lag in data feed. In ram disk , live csv file size less than 20kb is good. If it more than 30kb it will slow. Don't use tick datafeed unnecessary.

You can run two feed parallel/simultaneously. Check both have different name for live CSV. Do this for one minute feed only . Not for tick data. Once I compared Flattrade with shoonya, Flattrade with Alice Blue all are same only. So one feed candle replace other. It won't make any issue. Initially I tried few days.

There is no limit in number of symbols. as per previous poll, 90% of users use only 500 symbols. you can use 2000+ symbols. There are limit with brokers. Shoonya allow 1000 symbols only. Flattrade and AliceBlow allow more than 1000 symbols. Flattrade depth feed allow only 200 symbols. Like this every broker has some limits.

Tick database 

If you use tickdata, for backfilling we get one minute data only. After backfill it come different kind of chart with mixed candle and ticks. So after deleting tick data backfill with one minute is good. Soon I add an option to delete quote.

Curl 

From 2018, all windows/server curl is pre installed. To check curl, open cmd and types as following and enter.

curl --help

It shows the help menu. Otherwise say error. If you use windows 7/8 only you need to install curl. Check my you YouTube video to install curl.

Python 

I am using official python and IDLE only. Current code are tested in 3.13.7 . Currently batch file install tested version libraries. 

VS code get python interpretor from Microsoft as add-on. But to use python outside of VScode we need to install python to execute from anywher. I think Anaconda users can install library only. If you are already using any older python version, anaconda, VS code or any other Python, you are considering as developer. So you should solve issues by yourself (with help of AI).

Initially I started with anaconda and develop through jupyter notebook. But now I use IDLE only. Don't use notebook. To check older notebook , I installed jupyter notebook with official python.


IDLE

At present login file and Live feed only run from IDLE or double click to excute in cmd. All other files need to excute from amibroker, because we send parameters to script from amibroker.


Sys.argv[]


in some scripts like historical data, master , you can see this sys.argv[1] these are need to execute from amibroker. these variable values are need to send from amibroker. if you execute this directly it give error as index out of range. if you want run directly from IDLE or execute, disable these inputs enable manually. remove the triple quotes for above inputs and disable sys.argv inputs


Backfill


During backfill, if you get this error " 'str' object has no attribute 'get'. No retry." means broker not give data for them, usually they are far OTM and illiquid scrips. Download Historical data in 1 min timeframe. I checked 15 min, It gives wrong candle on split days. 


Live Feed


if you click Start Feed and it come like this, it is ok. You are ready for live feed. To stop datafeed, just close the cmd window.


PreMarket Data

if you want Pre Market data, disable these two lines by put # at start of the line. it gives 9:00 and 9:07 tick for stocks. For Nifty and Sensex, 9:00 to 9:07 continuous candle

SSL Certificate Error 

This certificate verification can be bypassed. It may be ok for data, but not for the order place. 

First try Windows Update. Also try by disabling Firewall. 

After update also not work, Download Certi Cerificate to SSL.py script and double click to execute or run in IDLE. It copy Certi certificate to SSL.  It require admin. may require disable antivirus. If this script not work, do manually as follows

Copy certificate file cacert.pem from C:\Program Files\Python313\Lib\site-packages\certifi\  and create folder SSL in C:\Program Files\Common Files\SSL And paste it then rename it to cert.pem

If Certificate path cannot find, Download SSL Certi Certificate Path.py script and run in IDLE. It show the path of both certificates.


Bug
There is one bug in datafeed. Some times it start lag and the lag will increase. like at 9:45am, it printss 9:30 am canlde. but it feed come with this up to end of day and all canle will complete. I cannot find when it happen, so i cannot solve. It is not related to number of symbols. it happen some days. If it happen either restat PC or EndTask broker.exe in Task Manager. If you use VPS, restart VPS once at EOD.