Regarding python API integration from amibroker

I have a requirement to invoke python API from the AmiBroker to place the order automatically.
I have seen amiPy is something which acts as an interface between python and AmiBroker . I thought, I will use this functionality.
Further, I could load the amiPy plugin in to my AmiBroker . But i could not perform the PyLoadFromFile api call as it is showing module not Found Error.

I am attaching the amiPy log snippet:

34117963.91 ms (TID: 0000411c) : ERROR: Error occured during Python execution:
* PyErr type: ModuleNotFoundError
* PyErr value:  No module named 'breezeAPIInterface'
* PyErr callstack:
* * File: 'E:\pythonProject\', line 1   (in <module>)

Code Snippet from

My code changes, Different API implementation

import breezeAPIInterface as breezeinterface    --> My trade terminal interface API
import tradeCache as tradeinformation              --> My executed trade cache interface
import logger as log                                            --> Log the transaction

# Different API defined here.

Please note: All files present in the same path which i used in PyLoadFromFile. It seems like , While parsing the python file, Amipy Couldn't parse the other user defined file.

Could some one guide me here.?

Thank you very much for the response.


it can not find the module. I had a similar problem once. What you can try is to add the path of the module at the top of the Python code. An example:

import sys
sys.path.append('C:/Users/win 10/AppData/Roaming/Python/Python38/site-packages')
sys.path.append('C:/Users/win 10/AppData/Local/Programs/Python/Python38/Lib/site-packages')

not sure this will solve it but usually there is a solution to be found