Getting Powerful Trading Account Reporting: Using the MyFXBook API

One of the most important challenges in Asirikuy has always been to organize large amounts of live trading account data in a way which is easily readable and accessible by all Asirikuy members. Currently there are about 90 different live accounts in Asirikuy (with more added every now and then) and definitely it is no easy task to display all this information in a manner which allows users to search for different account characteristics or to organize accounts according to different sets of statistics. After searching a lot and playing with several different solutions the MyFXBook API has become the easiest and most powerful tool to organize all this data in a manner which fulfills the majority of our community’s needs regarding account reporting and organization.On today’s post I am going to talk about how I used the MyFXBook API, what it is still missing and how this will bring great benefit to all Asirikuy members.

MyFXBook is definitely a great website which allows you to add and organize your accounts, processing large amounts of statistics and enabling you to easily get an idea of how your accounts are doing from many different perspectives. However the problem is that a large part of the useful information provided by Asirikuy (such as the portfolio “bird’s view” of all accounts) is only available to the owner of the myfxbook account and moreover, the information within this page is still limited in it lacks any type of sorting or searching behavior which becomes necessary when you truly want to compare trading strategies or order strategies according to a certain criteria (trading time length, draw down, profit, etc).

However when you explore the MyFXBook website you come across a very interesting feature which is the MyFXBook API. This API is merely a set of commands which allows you to make requests to certain URL addresses which are answered in XML format with certain information about your accounts. For example you can query the MyFXBook website so that it can give you all your account information or you can even query more specific stuff such as the number of open trades, the current floating profit/loss per trade, etc. The fact that you can query this information so easily enables you to build very powerful web scripts to create webpages which contain all your account information sorted in whichever way you might desire. This is tremendously powerful as it allows you to save, update and sort account information in very easy ways.

In order to use the MyFXBook API for Asirikuy I created a php script which creates a webpage with all the Asirikuy account information. The webpage displays account name, profit, balance, deposit, age and the last update time using the commands provided by the API. Additionally the table created by the php script is also sorted using jquery so you can easily search the table, sort the table values by clicking on the headers or select the maximum amount of results being displayed. Additionally I also included a balance chart on the table so you can get a glimpse of how the strategy has behaved during the whole testing period. Without ever revealing my personal myfxbook account information I have now managed to give Asirikuy members the ability to get real-time updated statistics from myfxbook in the same way as I could do when I log into the account. Additionally the table I have created has advanced data table capabilities so it is in fact a wonderful solution not even available through the MyFXBook user pages.

The wonderful thing about this API based solution is that it automatically updates according to any changes that happen on MyFXBook so if we add any more accounts or if any accounts are deleted the table automatically takes care of the addition or removal of all of the relevant information. By simply refreshing the table any Asirikuy member will also be able to easily see how account balances evolve though each trading day without having to go through several account private links. Definitely this powerful new php solution using the MyFXBook API greatly increases the reporting power available for Asirikuy members with a clear ability to better monitor Asirikuy system statistics.

Of course nothing is perfect and there are still several things which are missing that would make this API perfect. Perhaps the feature I would value the most is the ability to query an account’s private invitation link so that these can be obtained directly through the API, something which would enable us to build tables which have the private MyFXbook links dynamically included within them. I would be absolutely thrilled if this feature was implemented so that I could have a single table which displayed all relevant account information. However since this isn’t possible right now – although I have just made the request – we will have to live with two tables with one including private links/settings/worst case scenarios and another containing the “bird’s view” statistics dynamically generated  using the MyFXBook API.

Another feature which I believe is necessary is the ability to get the statistics for certain custom dates as although the balance graph is adequately generated – when a custom date is specified within the account setup – profit and draw down are calculated over the account’s whole trading period. Certainly this poses no problem for when you start monitoring the account as soon as you fund it but when you have accounts that have been traded before in some other way and you want to start monitoring statistics from a determined point in time (where you loaded the new system) it becomes primordial for the API to use custom dates. The ideal thing would be for the API to do what the balance graph apparently does (use the custom dates already saved within the MyFXBook account).

If you’re an Asirikuy member then please remember to go to the test’s section where a link has just been created above the regular MyFXBook link table which will take you towards the newly implemented table using the MyFXBook API. If you would like to learn more about my work in automated trading and how you too can increase your chances of becoming a successful trader through learning and understanding please consider joining Asirikuy.com, a website filled with educational videos, trading systems, development and a sound, honest and transparent approach towards automated trading in general . I hope you enjoyed this article ! :o)

Print Friendly, PDF & Email
You can leave a response, or trackback from your own site.

6 Responses to “Getting Powerful Trading Account Reporting: Using the MyFXBook API”

  1. Franco says:

    Excellent thanks Daniel!

  2. KlamseN says:

    Exactly what I needed, THANKS Daniel!!

    YOur second point on your whishlist would be great – we could than add information like the growth in the actual day/month/week/year! That would be too nice :)

    • KlamseN says:

      Well…. only 3 of all the accounts can show the image.. The others say: Can not show image as it contains errors :-/

      • admin says:

        Hi KlamseN,

        Thank you for posting :o) Yes, they have a problem with the generation of custom widgets for private accounts but there will be an API update next week which I am told will include a fix for this problem. I hadn’t noticed this problem because the widgets are generated correctly when I am logged in parallel to myfxbook but they break when I log out and try to get them. This is an internal API problem so for this reason only accounts which are public (Watukushay FE and Atinalla FE) actually show the images. Let us hope they’ll fix it by next week :o)

        Best Regards,

        Daniel

    • admin says:

      Hi Klamsen,

      Thank you for posting :o) Actually the widget right now can be used to generate custom growth values per week/month/year but this is computationally expensive from a php perspective (due to the amount of loops around account history which need to be carried out). I think I won’t be able to fully exploit the power of the API until I change Asirikuy’s server to a more powerful solution :o). There are many cool things I am working on (such as the ability to see floating P/L within the column as well :o) Thanks again for your comment!

      Best Regards,

      Daniel

Leave a Reply

WordPress › Error

There has been a critical error on this website.

Learn more about troubleshooting WordPress.