Report API FAQ
Report API
What is the Report API?
The Report API is a tool that allows you to generate FXCM reports by code, instead of through a GUI. Java is the only supported interface, at the moment. The data for the report is represented in its raw XML format, whereas when generated from an existing FXCM GUI, it can be translated to HTML, XLS, or PDF.
What reports are available?
The combined account statement is the only report available through the Report API at the moment. The report format is XML, and the specifications for the report are included in the documentation. An example of this report in HTML/XLS/PDF can be found by creating a report from the FXCM Trading Station.
What are the *_pasttables in the XML output (e.g. open_floating_positions_past)?
*_past tables appears only when end date selected for the report is in the past. They contain data which was in effect at the end date.
In the closed_trade_listtable, some values are present twice: for example, ‘commission’ and ‘already posted commission’. What’s the difference between the two values?
The main difference is that
- plain value like 'commission' is the summarized value for the given position at the whole position lifetime,
- 'already posted' value is the value which was posted onto the account during the report time frame.
The best example is 'rollover'.
Assume you have a position opened at Jan 1 and closed at Jan 5.
Four rollover values (i.e. $1) were posted on account at Jan 1, Jan 2, Jan 3 and Jan 4.
If you receive report from Jan 3 to Jan 5 you will see
- rollover = $4 (for the whole position lifetime)
- already posted rollover = $2 (rollover posted between Jan 3 and Jan 5, report timeframe)
'Already posted' is equivalent to 'Posted at statement period of time'.
In the account_summarytable, are the various values (e.g. PnL, commission, rollover fees) delta values between the start and end of the reporting dates? Are these delta values valid even if the end date of the report is past the current date?
Correct, this is a deltas between 'from' and 'till' dates. It is valid for any 'till' dates, past or current.
What is the difference between columns I9 and Q26? Both say contract currency.
There is no difference between these columns.
Contract currency is always the first currency, right?
For most instruments the contract currency is the first currency of the instrument.
There is no mention if the opening or closing trade is buy or sell. What is the criteria to determine whether the position is a buy (long) or sell (short) position.
To clarify, a trade can be neither opening nor closing. Only orders can be opening or closing in relation to the trade. "Trade" is equal to "position", not to "order".
The trade is always associated with two orders: opening and closing.
The opening and closing orders always have opposite sides.
The trade is named "buy" if the opening order is a buy order. In that case the the column "K19 The number of lots" will have a positive value. The trade is named "sell" in case the opening order is a sell order. In that case the column "K19 The number of lots" will have a negative value.
Is it possible to see the order ID of the opening order of the Trade?
There is no way to get opening order id of the closed trade using Report API.
A trade ticket number is assigned once the opening order is created (i.e. before the trade is opened) and uniquely identifies the trade for the whole lifetime of the trade.
What is the column Q34?
This represents the date when the trade was opened (Open Date).
How can I get the ending balance of the account in the account_summary table?
There is no direct value of ending balance in XML data, but you can calculate it as:
ending_balance = beginning_balance + sum(column "V" from all account_summary table rows where "ID" > 0)
The report doesn't have any column for Equity. How would this be calculated?
Equity can be calculated using:
Equity = Ending Balance + Floating P/L
Is "Rollover Fee" the same thing that appears in the xml report as "Interest fee"? In the html report the code is "Rollover" while in xml it's "Intr", are they same?
They are the same.
I see a number of possible charges, though none have actually been charged, what do these items such as ASP Commission or Management Fee relate to?
These items are used in special circumstances. If you have an account that is effected by these, you will be aware what they relate to. Most accounts will not be effected by any of these items.
Is it possible to see the currency that the account is based in?
There is no way to get account currency using Report API.
Does the platform offer options trading? I saw few related tables (open_option_past, close_option, option_spot_opn_past, option_spot_clsd) in the report structure.
There is no system installation which offers options trading at this time, neither real nor demo. These are currently legacy tables.
Last edited by FXCM Help; 06-09-2009 at 02:19 AM..
|