CURL scripts for TradeStation
Project detail
I’m a long-time commodity trader, trying to automate some tasks in TradeStation. I need someone to help me convert their examples into CURL scripts that I can actually execute. For you, this will be simple. For me, it appears to be impossible.
I need to execute this from a DOS shell (in a batch file):
curl –request POST
–url ‘https://api.tradestation.com/v3/orderexecution/ordergroups’
–header ‘Authorization: Bearer TOKEN’
–header ‘content-type: application/json’
–data ‘{“Type”:”OCO”,”Orders”:[{“AccountID”:”123456782″,”Symbol”:”MSFT”,”Quantity”:”10″,”OrderType”:”Limit”,”TradeAction”:”BUY”,”LimitPrice”:”230.00″,”Route”:”Intelligent”,”TimeInForce”:{“Duration”:”DAY”}},{“AccountID”:”123456782″,”Symbol”:”MSFT”,”Quantity”:”10″,”OrderType”:”StopMarket”,”TradeAction”:”BUY”,”StopPrice”:”250″,”Route”:”Intelligent”,”TimeInForce”:{“Duration”:”DAY”}}]}’
Seems so simple, no?