• General
  • XML
  • JSON
Want to create an iPhone/Android application, or a Facebook widget? Now you can with the Myfxbook API.
The API allows you to access your account's data programmatically and create your own customized applications.

Important notes and tips
  • A session is non-expiring. In order to expire a session, use the logout method.
  • Use "debug=1" in json type for easier development (plain and formatted text).
  • Use a secure connection (HTTPS) for maximal security.
  • In case of an error, check the "message" field for the reason.
  • Transaction timestamps (open orders/trades, history, data points for daily gain/balance) are in local broker's time zone.
  • All response fields are self explanatory; id is the entity's id, accountId is the account's number.
  • Sizing type can be lots or units (Oanda accounts).
  • The API allows access to personal information only.

The API consists of the following methods:

Method Description Comments
login Login to your account Creates a new session
logout Logout from your account Invalidates the current session
get-my-accounts Get a list of my accounts and their data  
get-watched-accounts Get a list of my watched accounts  
get-open-trades Get open trades for an account  
get-open-orders Get open orders for an account  
get-history Get history for an account History is limited to the last 50 transactions
get-daily-gain Get daily gain values Use to create a growth chart
get-gain Get gain value between dates  
get-custom-widget Get a custom widget Use to create a custom widget of the balance or growth chart of the account
get-community-outlook Get the community outlook data Free version up to 100 requests per 24 hours.
Paid version up to 2880 requests per 24 hours.
get-community-outlook-by-country Get the community outlook by country data Must provide symbol name
get-data-daily Get daily data Use to create a growth, balance, equity, pips, or profit chart

Error handling
There are several possible error types:
  • Required fields missing.
  • Wrong email/password.
  • Invalid session.
  • Invalid account.

Software guide lines
Since we strive at Myfxbook to keep our service free of any charge, any software you develop should be free.
Well designed and properly working applications will be featured in our application area (coming soon).

Please use the programming section to post any questions regarding the API.

Terms Of Use
By using the Myfxbook API, you agree to the Terms of Use.

API version
Current version of the API is v1.37 (July 19, 2020) - Please check back once in a while for changes and updates.
07/19/20 - get-community-outlook has now two versions - in the free version it is limited to 100 requests per 24 hours while the paid version limit is increased to 2880 requests per 24 hours.
10/04/12 - get-daily-balance method deprecated, added pips to get-my-accounts, added get-data-daily. Version changed to 1.37
11/27/11 - added profit factor to get-my-accounts method. Version changed to 1.36
09/21/11 - added currency to get-my-accounts method. Version changed to 1.35
08/23/11 - added get-gain. Version changed to 1.34
08/07/11 - added profit to Daily Gain . Version changed to 1.33
06/23/11 - added invitationUrl . Version changed to 1.32
05/18/11 - added comment to open orders method and to open trades method. Version changed to 1.31
03/27/11 - added commission to get-my-accounts method. Added interest and commission to get-history method. Version changed to v1.3
11/14/10 - added avgLongPrice/avgShortPrice to get-community-outlook method. Version changed to v1.2
11/01/10 - get-community-outlook and get get-community-outlook-by-country added. Version changed to v1.1
10/03/10 - firstTradeDate added. Version changed to v1.03
06/27/10 - get-custom-widget added. Version changed to v1.02
05/23/10 - get-watched-accounts added. Version Changed to v1.01
04/11/10 - gmtOffset field deprecated.
EURUSD 1.19088 GBPUSD 1.33794
USDJPY 104.384 USDCAD 1.29959







Twitter |  Facebook |  Sitekarta  |  Villkor  |   Privacy Policy
©2020 Myfxbook Ltd. All Rights Reserved.
HIGH RISK WARNING: Foreign exchange trading carries a high level of risk that may not be suitable for all investors. Leverage creates additional risk and loss exposure. Before you decide to trade foreign exchange, carefully consider your investment objectives, experience level, and risk tolerance. You could lose some or all of your initial investment; do not invest money that you cannot afford to lose. Educate yourself on the risks associated with foreign exchange trading, and seek advice from an independent financial or tax advisor if you have any questions. Any data and information is provided 'as is' solely for informational purposes, and is not intended for trading purposes or advice. Past performance is not indicative of future results.