Tradovate API via C# StartOrderStrategy not working

Hi,

I am testing the Tradovate API via the C# example on github. I can successfully place and Buy/Sell orders.
But when I try to use the startorderstrategy for a bracket order with this code:

var ordersApi = new OrdersApi();
var request = new StartOrderStrategy(accountId: account.Id,
accountSpec: account.Name,
symbol: symbol,
orderStrategyTypeId: 2,
action: (StartOrderStrategy.ActionEnum)action
);

        request.Params = "{\"entryVersion\":{\"orderQty\":1,\"orderType\":\"Market\"},\"brackets\":[{\"qty\":1,\"profitTarget\":2,\"stopLoss\":-3,\"trailingStop\":false}]}";

var response = await ordersApi.StartOrderStrategyAsync(request);

I get the error:

Tradovate.Services.Client.ApiException
HResult=0x80131500
Message=Error calling StartOrderStrategy:
Source=Tradovate.Services
StackTrace:
at Tradovate.Services.Api.OrdersApi.d__238.MoveNext()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() at Tradovate.Services.Api.OrdersApi.<StartOrderStrategyAsync>d__237.MoveNext() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult()

I can see that all the required are filled in correctly.

Does anybody have success with this? If yes, can you please share the request example?

Thanks alot!

@Alexander, can you please have a look at this issue. Thanks a lot.

Hi @LB1,

Right now we’re in the process of fixing this endpoint. The API currently doesn’t allow starting multibracket strategies via API.

See this post for reference. There are also some alternatives and suggestions posted near the bottom of that thread. We are actively working on a fix for multibracket strategies via API, and I’ll be keeping that thread updated as we make progress.

@Alexander, thanks for your reply. I will check that post for progress.

Strategy Orders are definitely working through the API now.