Is anyone using Amibroker and SaxoBank's Excel/VBA API

I've used Amibroker together with IBController to automatically place orders for a long time and have been really happy with it. Unfortunately, I've recently started trading instruments that I'm often unable to trade with IB, but I know I can trade them with SaxoBank. I'm not keen to go back to the old days of manually entering orders in their platform however.

Since I know Saxo offer an Excel/VBA API, I'm wondering if the following might be possible:

  1. Write and run an Amibroker Code that carries out an exploration and writes my required orders to a CSV/Excel file (I know how to to do this already)
  2. Use the SaxoTrader Excel/VBA API and write my own VBA program that can take this CSV/Excel sheet of orders and send them directly to SaxoTrader, to avoid having to do manual data entry. Note - I am an EOD trader only, so I don't need anything in real time.

I was wondering if there is anyone out there doing this already? Or is familiar with VBA or the Saxo Excel API and could tell me if this will be possible.

Apologies for the novice question. When I started trading, I taught myself Python and Amibroker, and in all honesty Amibroker and afl worked so well for me, I rarely even use Python any more and I never saw the need to learn any other language. I guess I'm trying to find out if what I want to do is possible before I make the time commitment to learning VBA.

Thank you.

After contacting the SaxoBank API team and further research, I'm pretty sure this will be possible. Anyone else looking to do this, may find these tutorials helpful:

8. Automatic bulk trader

8.1 Automatic Bulk Trader with related orders

I would still dearly love to hear from anyone already currently doing this.


1 Like

if you master Python I think now with the Python plugin you could make your own interface using for instance

i have no account at Saxo myself and have not tried something similar but I would think it would be possible to write for instance auto trading code in Python running it from within Amibroker


Thanks. I think "master" might be too strong a word for my Python abilities. But after having a look at the link you provided, I think you're right. By committing some time for learning and design, I could indeed use Python to generate the orders. I would still use Amibroker for backtesting as I definitely prefer it to Python backtesting, but I could generate the orders from Python, or indeed just run the exploration in AB and generate a CSV file, that I could then use to "batch send" the orders to SaxoBank. Many thanks for your input, that link was very helpful.

the Python plugin functions as a bridge (not sure if this is the correct terminology) between Amibroker and Python. So you can just send your orders from Amibroker. I think it should be possible. So you do not have to run 2 programs, you can do everything from within Amibroker

I posted a couple of example codes, see a simple one below. So you have to write your own functions in Amibroker that call functions written in Python.

Maybe it is not so simple, not sure. I possibly will try it because you can open a free developer account at Saxo it seems.

1 Like

FWIW: SaxoBank OpenAPI is being investigated for inclusion in RFC: Automated trading interface for REST based APIs


Thank you Tomasz. You almost gave me a heart attack, as I thought you meant SaxoBank was being investigated for something like financial misconduct, and I should avoid using them! Then I read more closely and realized I was totally misunderstanding.

I did come across this thread as I did a search on the forum for "Saxo Bank API", etc before posting, but I thought that the integration and auto-trading interface with Saxo was dead in the water when I read this comment from you: Nothing like "Saxo group": "We have shiny >>Open<< API icon on our web page, but you know, the API is nowhere to be found on it.

Personally, I would love to see this kind of automated trading interface with other internet brokers. I love Interactive Brokers, but I would love to have other options. For those Amibroker users like myself who are not from the computer/software/developer industry by trade or education, we don't have the time to commit to learning different languages and programs. I made the choice 10 years ago to commit to Amibroker and afl and haven't regretted it for a second. But since I am not good with any other languages, I lack the skills to build a "bridge" to the broker's API. IBController has allowed me to do things that I would never be able to build myself. I'd truly love to see something similar that would allow auto-trading with other brokers. If I have misunderstood the purpuse of the "RFC: Automated trading interface for REST based APIs" thread then I apologize, the technicalities are a bit over my head.

Thank you. Just to make sure I understand correctly (in layman's terms - because I am definitely a layman), what you are suggesting would be using 2 "bridges" in fact? AmiPy would be the bridge allowing me to connect Amibroker to Python, then I would require the Python saxo-openapi you linked earlier to connnect Python and SaxoBank's platform.

I think I understand now. I'm a long way from being able to do something like this myself, but AmiPy was a long term dream of mine to learn to use, so this sounds like a long term project for myself. I very much appreciate the guidance.

yes exactly. From Amibroker you call Python functions (using AmiPy) which on their turn interact with Saxo Bank. It is actually pretty easy to work with AmiPy. You have to put some time into it and you will see it is pretty easy to do.

The Python code to place an order is mostly already written for you. You just have to write it in a form that you can call it from an Amibroker function and send information like what you want to trade, how much, etc. So you do not really have to write all the Python code from scratch. Just on the API site there are already example codes.

But if Tomasz writes the SBc (Saxo Bank Controller) then maybe best wait for that :smiley:

Thank you, that is clear now. I've been wanting to learn and test AmiPy for ages, so it seems now is a good time to upgrade to 64 bit (which I should have done ages ago anyway) and start learning it. It will be a slow process for me (since I have other commitments) but that's ok, I learn a lot as I go. I appreciate you taking the time to explain.

If the Saxo Bank Controller comes out before I build my own solution, I'll go with that. Otherwise I will slowly work towards building my own solution. Thanks again.

OK, I should probably avoid the word "investigation" in the future :slight_smile: - anyway I edited the post so it does not cause cardiac issues :slight_smile:


This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.