Advanced Order API
Execute stop, take profit or trailing stop orders on every exchange
All the trade endpoints require a signature
Required input:
Returns:
object with the guid as key and `AdvancedOrderBase` as value.
Example URL:
http://127.0.0.1:8040/GetAdvancedOrders
Required input:
- guid : the guid of the advanced order
Returns:
`AdvancedOrderBase`
Example URL:
http://127.0.0.1:8040/ActivateAdvancedOrder?guid=74b0673d-b6d5-4769-b3d7-49f432ad21a8
Required input:
- guid : the guid of the advanced order
Returns:
`AdvancedOrderBase`
Example URL:
http://127.0.0.1:8040/DeactivateAdvancedOrder?guid=74b0673d-b6d5-4769-b3d7-49f432ad21a8
Required input:
- guid : the guid of the advanced order
Returns:
boolean
Example URL:
http://127.0.0.1:8040/RemoveAdvancedOrder?guid=74b0673d-b6d5-4769-b3d7-49f432ad21a8
Required input:
- accountGuid : the guid of the account
- primaryCoin : primary coin of the market.
- secondaryCoin : secondary coin of the market.
- contractName : contract name of the market (optional)
- leverage : the leverage of the order
- name : the name of the advanced order
- orderDirection : string of `EnumOrderType` or string of `EnumFundsPosition`
- amount : number
- triggerPrice : the stop price
- executionPrice : the price on which to place the order when the stop has triggered
- executingTemplateGuid : the template guid which is used to place the order once the stop has triggered.
- activate : boolean
- startOrderOnActivation : boolean. When true a order will be placed to get into the position.
- startOrderPrice : the price on which to place the start order.
- startTemplateGuid : the template guid which is used to place the start order
Returns:
`StopTakeProfitOrder`
Example URL:
http://127.0.0.1:8040/AddStopOrder?accountGuid=6d2ff412-03ac-43ab-9dc6-47100a2fd266&activate=False&amount=1&executingTemplateGuid=LOCKEDLIMITORDERGUID&executionPrice=3000&leverage=0&name=Test-Order&orderDirection=0&primaryCoin=BTC&secondaryCoin=USD&startOrderOnActivation=False&startOrderPrice=0&startTemplateGuid=LOCKEDLIMITORDERGUID&triggerPrice=10000
Required input:
- guid : the guid of the advanced order
- accountGuid : the guid of the account
- primaryCoin : primary coin of the market.
- secondaryCoin : secondary coin of the market.
- contractName : contract name of the market (optional)
- leverage : the leverage of the order
- name : the name of the advanced order
- orderDirection : string of `EnumOrderType` or string of `EnumFundsPosition`
- amount : number
- triggerPrice : the stop price
- executionPrice : the price on which to place the order when the stop has triggered
- executingTemplateGuid : the template guid which is used to place the order once the stop has triggered.
- activate : boolean
- startOrderOnActivation : boolean. When true a order will be placed to get into the position.
- startOrderPrice : the price on which to place the start order.
- startTemplateGuid : the template guid which is used to place the start order
Returns:
`StopTakeProfitOrder`
Example URL:
http://127.0.0.1:8040/SetupStopOrder?accountGuid=6d2ff412-03ac-43ab-9dc6-47100a2fd266&activate=False&amount=1&executingTemplateGuid=LOCKEDLIMITORDERGUID&executionPrice=3000&leverage=0&name=Test-Order&orderDirection=0&primaryCoin=BTC&secondaryCoin=USD&startOrderOnActivation=False&startOrderPrice=0&startTemplateGuid=LOCKEDLIMITORDERGUID&triggerPrice=10000
Required input:
- accountGuid : the guid of the account
- primaryCoin : primary coin of the market.
- secondaryCoin : secondary coin of the market.
- contractName : contract name of the market (optional)
- leverage : the leverage of the order
- name : the name of the advanced order
- orderDirection : string of `EnumOrderType` or string of `EnumFundsPosition`
- amount : number
- triggerPrice : the take profit price
- executionPrice : the price on which to place the order when the take profit has triggered
- executingTemplateGuid : the template guid which is used to place the order once the take profit has triggered.
- activate : boolean
- startOrderOnActivation : boolean. When true a order will be placed to get into the position.
- startOrderPrice : the price on which to place the start order.
- startTemplateGuid : the template guid which is used to place the start order
Returns:
`StopTakeProfitOrder`
Example URL:
http://127.0.0.1:8040/AddTakeProfitOrder?accountGuid=6d2ff412-03ac-43ab-9dc6-47100a2fd266&activate=False&amount=1&executingTemplateGuid=LOCKEDLIMITORDERGUID&executionPrice=3000&leverage=0&name=Test-Order&orderDirection=0&primaryCoin=BTC&secondaryCoin=USD&startOrderOnActivation=False&startOrderPrice=0&startTemplateGuid=LOCKEDLIMITORDERGUID&triggerPrice=10000
Required input:
- guid : the guid of the advanced order
- accountGuid : the guid of the account
- primaryCoin : primary coin of the market.
- secondaryCoin : secondary coin of the market.
- contractName : contract name of the market (optional)
- leverage : the leverage of the order
- name : the name of the advanced order
- orderDirection : string of `EnumOrderType` or string of `EnumFundsPosition`
- amount : number
- triggerPrice : the take profit price
- executionPrice : the price on which to place the order when the take profit has triggered
- executingTemplateGuid : the template guid which is used to place the order once the take profit has triggered.
- activate : boolean
- startOrderOnActivation : boolean. When true a order will be placed to get into the position.
- startOrderPrice : the price on which to place the start order.
- startTemplateGuid : the template guid which is used to place the start order
Returns:
`StopTakeProfitOrder`
Example URL:
http://127.0.0.1:8040/SetupTakeProfitOrder?accountGuid=6d2ff412-03ac-43ab-9dc6-47100a2fd266&activate=False&amount=1&executingTemplateGuid=LOCKEDLIMITORDERGUID&executionPrice=3000&leverage=0&name=Test-Order&orderDirection=0&primaryCoin=BTC&secondaryCoin=USD&startOrderOnActivation=False&startOrderPrice=0&startTemplateGuid=LOCKEDLIMITORDERGUID&triggerPrice=10000
Required input:
- accountGuid : the guid of the account
- primaryCoin : primary coin of the market.
- secondaryCoin : secondary coin of the market.
- contractName : contract name of the market (optional)
- leverage : the leverage of the order
- name : the name of the advanced order
- orderDirection : string of `EnumOrderType` or string of `EnumFundsPosition`
- amount : number
- trailingStopPercentage : the trailing stop percentage
- executingTemplateGuid : the template guid which is used to place the order once the take profit has triggered.
- activate : boolean
- startOrderOnActivation : boolean. When true a order will be placed to get into the position.
- startOrderPrice : the price on which to place the start order.
- startTemplateGuid : the template guid which is used to place the start order
Returns:
`TrailingStop`
Example URL:
http://127.0.0.1:8040/AddTrailingStopOrder?accountGuid=6d2ff412-03ac-43ab-9dc6-47100a2fd266&activate=True&amount=1&executingTemplateGuid=LOCKEDLIMITORDERGUID&leverage=0&name=Test-Order&orderDirection=0&primaryCoin=BTC&secondaryCoin=USD&startOrderOnActivation=False&startOrderPrice=0&startTemplateGuid=LOCKEDLIMITORDERGUID&trailingStopPercentage=18.5
Required input:
- guid : the guid of the advanced order
- accountGuid : the guid of the account
- primaryCoin : primary coin of the market.
- secondaryCoin : secondary coin of the market.
- contractName : contract name of the market (optional)
- leverage : the leverage of the order
- name : the name of the advanced order
- orderDirection : string of `EnumOrderType` or string of `EnumFundsPosition`
- amount : number
- trailingStopPercentage : the trailing stop percentage
- executingTemplateGuid : the template guid which is used to place the order once the take profit has triggered.
- activate : boolean
- startOrderOnActivation : boolean. When true a order will be placed to get into the position.
- startOrderPrice : the price on which to place the start order.
- startTemplateGuid : the template guid which is used to place the start order
Returns:
`TrailingStop`
Example URL:
http://127.0.0.1:8040/SetupTrailingStopOrder?accountGuid=6d2ff412-03ac-43ab-9dc6-47100a2fd266&activate=True&amount=1&executingTemplateGuid=LOCKEDLIMITORDERGUID&leverage=0&name=Test-Order&orderDirection=0&primaryCoin=BTC&secondaryCoin=USD&startOrderOnActivation=False&startOrderPrice=0&startTemplateGuid=LOCKEDLIMITORDERGUID&trailingStopPercentage=18.5
Last modified 4yr ago