Property missing for .ExternalTransactionID in GetOrders ExternalTransaction
I've gotten along pretty fine so far with the API, but ran into another road block with the API when attempting to get the ExternalTransactionID from the following: OrderArray.Order.ExternalTransaction.ExternalTransactionID Here is the link to the API info for this, but, unfortunately, this property simply does not exist (at least not from calling the GetOrders method ) [Click here for the link to this reference] Here is the relevant setup code (
VB.NET): Dim apicall As GetOrdersCall = New GetOrdersCall(Context) Dim orders As OrderTypeCollection = apicall.GetOrders(fltr, TradingRoleCodeType.Seller, OrderStatusCodeType.All) If orders.Count > 0 Then For Each order As OrderType In orders ... Anyway, trying to use something like dim extTransId as string = order.ExternalTransaction.ExternalTransactionID inside the loop won't work as ExternalTransactionID is not a property. I presume the API has changed and was not documented (again), or I'm not setting up the call correctly. I've seen some other posts on this elsewhere, but no one has a valid answer to this dilemma. Unfortunately, there are no code examples anywhere for this. TIA! :
I got it figure out. The main problem was exactly how to get all the details for this api call. Because I couldn't find a working example (there was one in Java), it was driving me nuts how to actually do this. After the apicall variable is defined, simply add this line after it: apicall.DetailLevelList.Add(DetailLevelCodeType.ReturnAll) so the code will look like this: Dim apicall As GetOrdersCall = New GetOrdersCall(Context) apicall.DetailLevelList.Add(DetailLevelCodeType.ReturnAll) Dim orders As OrderTypeCollection = apicall.GetOrders(fltr, TradingRoleCodeType.Seller, OrderStatusCodeType.All) The key was the .Add method which is what threw me for a loop once I realized I there was a setting I needed to get the call to return all the data. I hope this helps anyone who was scratching their head on how to set this up (an ACTUAL example! what a concept!).