nathanramoscfa / etradebot

Tools for automated trading on E-Trade
https://etradebot.readthedocs.io/en/latest/index.html
MIT License
10 stars 4 forks source link

Error while running the bot #18

Open manudeep1991 opened 1 year ago

manudeep1991 commented 1 year ago

Etradebot

Not able to run the bot, getting an error during the strategy execution

nathanramoscfa commented 1 year ago

This traceback indicates a couple of issues, but the main one is that Python cannot find the Bloomberg API (blpapi) C++ SDK library. This library is needed by the tia package that is a dependency in ETradeBot. If you've already installed the Bloomberg API C++ SDK, the issue might be that Python can't find it. This is especially common if you're using Python 3.8+ on Windows, because Python changed how it searches for DLLs. It seems like your Python distribution can't find the blpapi DLLs.

First, make sure you followed the instructions here. Assuming you have installed the Bloomberg API C++ SDK to your computer, during installation, you should have extracted the zip file to a folder that may be called "blpapi" or just "blp" somewhere on your computer. For example, on my computer, the path is C:/blp. NOTE: When I first did this in development, the folder was called "blpapi", now it's called "blp".

Please follow these instructions (for Windows 11) to add the following folders to your system environment variables:

  1. Search for "Edit the system environment variables" in the Windows search bar, usually located in the bottom left of the Windows taskbar.
  2. In the ‘System Properties’ window, go to the ‘Advanced’ tab and click on ‘Environment Variables’.
  3. Under ‘System variables’, click on ‘New’ and add the following variable (example below), making sure the value is the path to your "blp" or blpapi" folder, whichever one it's called on your computer. Click OK when done:

image

Next, in the list of system variables, click on 'Path'. Click 'New' and then add the following folders (see screenshot). Replace the paths you see with the actual path on your computer. There are two folders which you can see in the screenshot, ensure they are both added to "Path". Click OK when done:

image

To ensure this works, you may need to restart your computer. Otherwise, try running ETradeBot again after you have added these folders to your system environment variables.

Let me know if this works, as it seems I may have to change the documentation to address your issue, for example, when I wrote the documentation the "blp" folder used to be called "blpapi", but Bloomberg might have changed the name during one of their software updates.

nathanramoscfa commented 1 year ago

Etradebot

Not able to run the bot, getting an error during the strategy execution

@manudeep1991 I have updated ETradeBot to not require the Bloomberg SDK/API to be installed which may solve your issue. Could you please update your installation of ETradeBot and try again. Also, feel free to schedule a consultation with me here.