Jump to content
Sign in to follow this  

Market Trade

Recommended Posts

The New Trade documentation and the API documentation show several conflicting examples of the inputs contained in the NewTradeOrderRequestDTO which are required for a Market Trade Request to be completed.

From what I have read the required inputs are :

"MarketID", "OfferPrice", "BidPrice", & "AuditID" are required.

I assume what is also required is 'Direction", "Quantity" and "TradingAccountID" and "PriceTolerance" which would be needed to place the trade correctly.

However do I need to also include "AutoRollover", "QuoteId", "Close", "Currency" and "Reference" ?  I am looking for the bare minimum.

I see clearly that the Optional parameters are also "Source", "OrderReference" and "IfDone"  so I know I don't need those.



Share this post

Link to post


Please clarify: where do you see conflicting examples between the Trade page and any other page in the API documentation? I'll look to get that changed. Thank you. 

The absolute bare minimum you can send to have a trade successfully placed is:

  • MarketID
  • TradingAccountID
  • AuditID
  • PositionMethodID
  • isTrade
  • Direction
  • Quantity
  • BidPrice
  • OfferPrice

Kind Regards, PM!

Share this post

Link to post

Let's start here...The Trade Post Body API documentation and the NewTradeOrderRequestDTO do not match at all.

There seem to be many 'optional' parameters that are not marked 'optional'.   How and which parameters to use is very confusing and does not make a lot of sense (to me). 

1.  The Trade API documentation has a post request body that has a lot of additional parameters as 'null'  so why are they even there?  Are they needed for Order Id Response or do they somehow direct additional Limit Orders to be placed to sell. Perhaps I should ask what exactly is the difference between Trade and Order?

2.  Where does the "IsTrade" Parameter come from and how is it used?  I don't see it in the documentation anywhere.

Trade API Order Parameters:





:1,"TradingAccountId":400239061,"MarketName":"Wall Street CFD","Status":null,"isTrade":true}


Share this post

Link to post

The post body example in the Trade page only contains the properties required to place the example trade as stated on that page. The NewTradeOrderRequestDTO on the other hand specifies all properties that exist in that DTO, hence why there are some differences.  

Many of the parameters are conditionally optional, depending upon what you are trying to do. Since they are required under certain circumstances, the parameter is not marked as optional. I'll illustrate with 2 examples.

AutoRollover: this parameter applies if the market you are trading has an underlying that is a futures contract. It only becomes "optional" and not required when the market you are trading has an underlying that is NOT a futures contract.

Close: this parameter is required when you are closing an open position. Only when you are opening a new position does it become "optional".

  1. The way we have coded our calls, when a property is not needed we send it as null rather than dropping that property entirely. You do not have to do it the same way; you can choose to drop properties that are not required for what you are doing in a particular call, and only include them when you need them. In this industry, a trade is referred to as a market order, so it is a subclass of an order.
  2. isTrade is no longer used and was accidentally left in the example. A note has been made to clean references to it in the examples at the next refresh of the documentation.


Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this