Topics
26 May 2016, 16:48
 3223
 5
Replies

Jojo_asticot
31 May 2016, 13:07

Anything yet? 


@Jojo_asticot

Jojo_asticot
26 May 2016, 21:22

Data for an account

{\"accountId\":***,\"accountNumber\":***,\"live\":true,\"brokerName\":\"IC Markets\",\"brokerTitle\":\"IC Markets\",\"brokerCode\":154,\"depositCurrency\":\"EUR\",\"traderRegistrationTimestamp\":***,\"traderAccountType\":\"HEDGED\",\"leverage\":50,\"balance\":174325,\"deleted\":false,\"accountStatus\":\"ACTIVE\"}

Data for a trade

{\"dealId\":8673365,\"positionId\":22872333,\"orderId\":36837689,\"tradeSide\":\"SELL\",\"volume\":100000,\"filledVolume\":100000,\"symbolName\":\"EURUSD\",\"commission\":-3,\"executionPrice\":1.11921,\"baseToUsdConversionRate\":1.1192,\"marginRate\":1.0,\"channel\":\"cTrader Web\",\"label\":null,\"comment\":null,\"createTimestamp\":1463659042833,\"executionTimestamp\":1463659043113,\"positionCloseDetails\":{\"entryPrice\":1.12182,\"profit\":-233,\"swap\":0,\"commission\":-6,\"balance\":73883,\"balanceVersion\":109,\"comment\":\"positionEntity id 22872333\",\"stopLossPrice\":1.1192,\"takeProfitPrice\":1.1228,\"quoteToDepositConversionRate\":0.89347,\"closedVolume\":100000,\"profitInPips\":-26.1,\"roi\":-0.07115127097850404,\"equityBasedRoi\":-0.07651558637179712,\"equity\":73938}}

Bold is the wrong data.

This is the C# code I use:

WebClient wc = new WebClient();

string content = "";

content = wc.DownloadString(Config.API_HOST + "connect/tradingaccounts/" + Config.ACCOUNT_ID + "/deals?limit=750&oauth_token=" + Config.OAUTH_TOKEN);

 


@Jojo_asticot