Skip to content

Instantly share code, notes, and snippets.

@samdelagarza
Created May 15, 2013 18:36
Show Gist options
  • Save samdelagarza/5586214 to your computer and use it in GitHub Desktop.
Save samdelagarza/5586214 to your computer and use it in GitHub Desktop.
emptyOrder = {
TradeAction: 'buy',
AccountKey: 111,
AssetType: 'EQ',
Duration: null,
LimitPrice: null,
OrderID: null,
OrderType: 'Limit',
Quantity: null,
Route: null,
StopPrice: null,
Symbol: null
}
baseOCOOrder = {
"Type": "OCO",
"Orders": [
{
"AssetType": "EQ",
"Symbol": null,
"Quantity": null,
"LimitPrice": "",
"OrderType": "Market",
"Duration": "DAY",
"AccountKey": "16995684",
"TradeAction": "Buy",
"AdvancedOptions": {
"TrailingStop": null
},
"OSOs": [{
"Type": "OCO",
"Orders": [
{
"AssetType": "EQ",
"Symbol": null,
"Quantity": null,
"LimitPrice": "",
"OrderType": "Market",
"Duration": "DAY",
"AccountKey": "16995684",
"TradeAction": "Buy",
"AdvancedOptions": {
"TrailingStop": null
},
"OSOs": []
},
{
"AssetType": "EQ",
"Symbol": null,
"Quantity": null,
"LimitPrice": "",
"OrderType": "Market",
"Duration": "DAY",
"AccountKey": "16995684",
"TradeAction": "Buy",
"AdvancedOptions": {
"TrailingStop": null
},
"OSOs": []
}]
},
{
"AssetType": "EQ",
"Symbol": null,
"Quantity": null,
"LimitPrice": "",
"OrderType": "Market",
"Duration": "DAY",
"AccountKey": "16995684",
"TradeAction": "Buy",
"AdvancedOptions": {
"TrailingStop": null
},
"OSOs": []
}
]
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment