Rating: Empty Star Empty Star Empty Star Empty Star Empty Star
Question on "get-history" API method...
ahimsatrader

Member Since Oct 05, 2011  3 posts ahimsatrader Oct 18 2011 at 01:22
Will it also return specific withdrawals? In the example in the API docs, it only shows a closed trade:

<response error='false' message=''>
   <history>
       <transaction>
           <openDate>03/01/2010 14:13</openDate>
           <closeDate>03/01/2010 15:26</closeDate>
           <symbol>GBPUSD</symbol>
           <action>Buy Limit</action>
           <sizing>
               <type>lots</type>
               <value>0.04</value>
           </sizing>
           <openPrice>1.48310</openPrice>
           <closePrice>1.49340</closePrice>
           <tp>1.48810</tp>
           <sl>0.00000</sl>
           <pips>0.0</pips>
           <profit>0.00</profit>
           <comment>Best trade ever</comment>
           <interest>12.1</interest>
           <commission>0</commission>
       </transaction>
   </history>
</response>

If a withdrawal *would* be returned from this function, what tags would it be wrapped in?

Staff
Member Since Jul 31, 2009  1049 posts Ethan (Staff) Oct 18 2011 at 12:15
It would be wrapped with the same tags. Check the 'action' tag for the transaction type.

Got a question? Need help? Send me a message!
ahimsatrader

Member Since Oct 05, 2011  3 posts ahimsatrader Oct 18 2011 at 15:25
Would the action be 'Withdrawal'?

I'm referring to actually withdrawing money from the account, not a losing trade (which I've noticed MT also calls a withdrawal for whatever reason).

With that in mind, what tag would the $ amount withdrawn from the account be wrapped in?

Thank you for your insight!

Staff
Member Since Jul 31, 2009  1049 posts Ethan (Staff) Oct 19 2011 at 07:47
Yes, it would be a withdrawal. The types are marked the same as in your Metatrader platform. The 'withdrawal' definition may change from broker to broker.

All the other tags are the same - the 'profit' tag would represent the amount of the withdrawal.

Got a question? Need help? Send me a message!
ahimsatrader

Member Since Oct 05, 2011  3 posts ahimsatrader Oct 20 2011 at 03:52
Interesting, thank you for that clarity Ethan.

Please login to comment.
Tools Community Reviews Platform Company Support
Economic Calendar Community Brokers Features About FAQ
Forex Broker Spreads Systems Expert Advisors API Blog Help
Streaming Forex News Strategies Signal Providers Translations Twitter Contact Us
Community Outlook Contests VPS Services Mobile Facebook Report A Bug!
Widgets EA Programming        
RSS          

Site Map  |   Terms & Conditions  |   Privacy Policy
©2011 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.
*GFT is a sponsor of myfxbook.com for advertisement purposes only. GFT does not endorse any other products, services, or companies represented on myfxbook.com. The views of myfxbook.com and all other parties contained therein are not necessarily those of GFT, and GFT makes no warranty as to the accuracy of information provided.