Live Management

Live Commands

Introduction

Create a live command.

Request

Sends a command to a live deployment to trigger an action such as placing orders. The /live/commands/create API accepts requests in the following format:

CreateLiveCommandRequest Model - Request to create a live command.
projectId integer
example: 19626262

Project for the live instance we want to run the command against.
command object
example: {'$type': 'OrderCommand', 'symbol': {'id': 'BTCUSD 2XR', 'value': 'BTCUSD'}, 'order_type': 'market', 'quantity': '0.1', 'limit_price': 0, 'stop_price': 0, 'tag': ''}

The command to run.
Example
{
  "projectId": 19626262,
  "command": {
    "$type": "OrderCommand",
    "symbol": {
        "id": "BTCUSD 2XR",
        "value": "BTCUSD"
    },
    "order_type": "market",
    "quantity": "0.1",
    "limit_price": 0,
    "stop_price": 0,
    "tag": ""
}
}

Responses

The /live/commands/create API provides a response in the following format:

200 Success

RestResponse Model - Base API response class for the QuantConnect API.
success boolean
Indicate if the API request was successful.
errors string Array
List of errors with the API call.
Example
{
  "success": true,
  "errors": [
    "string"
  ]
}

401 Authentication Error

UnauthorizedError Model - Unauthorized response from the API. Key is missing, invalid, or timestamp is too old for hash.
www_authenticate string
Header

You can also see our Videos. You can also get in touch with us via Discord.

Did you find this page helpful?

Contribute to the documentation: