# SetDesiredPositions (deprecated)

This endpoint is deprecated and will be retired by the end of 2026. Please use SetDesiredPositionsV2 instead. The list of positions that must exist in the strategy. All C2 positions not in this list will be closed with market orders. Non-paginated endpoint.

Endpoint: POST /Strategies/SetDesiredPositions
Version: v4
Security: 

## Request fields (application/json):

  - `StrategyId` (integer,null)
    The C2 StrategyId

  - `Positions` (array,null)
    The list of positions that must exist in the strategy. Quantity must be non-zero. To close a position, simply omit it from the Positions array. Sending an empty Positions array will close all positions.

  - `Positions.StrategyId` (integer,null)
    The C2 StrategyId

  - `Positions.Quantity` (number,null)
    The net signed position quantity. Short positions will be negative.

  - `Positions.AvgPx` (number,null)
    The position average price

  - `Positions.C2Symbol` (object)

  - `Positions.C2Symbol.FullSymbol` (string,null)
    The full native C2 symbol e.g. BSRR2121Q22.5

  - `Positions.C2Symbol.SymbolType` (string,null)
    The type of instrument. e.g. 'stock', 'option', 'future', 'forex'

  - `Positions.C2Symbol.Underlying` (string,null)
    Option Underlying symbol. Read-only value sent in responses. It is ignored in requests.

  - `Positions.C2Symbol.Expiry` (string,null)
    Option expiry. Format is 'May21'. Read-only value sent in responses. It is ignored in requests.

  - `Positions.C2Symbol.PutOrCall` (string,null)
    Option 'put' or 'call'. Read-only value sent in responses. It is ignored in requests.

  - `Positions.C2Symbol.StrikePrice` (number,null)
    Option strike price. Read-only value sent in responses. It is ignored in requests.

  - `Positions.C2Symbol.Description` (string,null)
    (optional) Instrument description. Read-only value sent in responses. It is ignored in requests.

  - `Positions.ExchangeSymbol` (object)

  - `Positions.ExchangeSymbol.Symbol` (string,null)
    The exchange root symbol e.g. AAPL

  - `Positions.ExchangeSymbol.Currency` (string,null)
    The 3-character ISO instrument currency. E.g. 'USD'

  - `Positions.ExchangeSymbol.SecurityExchange` (string,null)
    The MIC Exchange code. Set to DEFAULT for stocks, forex & options. For Futures, valid values are: XCME, XEUR, XICE, XLIF, XNYB, XNYM, XASX, XCBF, XCBT, XCEC, XKBT, XSES. See details at http://www.iso15022.org/MIC/homepageMIC.htm

  - `Positions.ExchangeSymbol.SecurityType` (string,null)
    The SecurityType e.g. 'CS', 'FUT', 'OPT', 'FOR'

  - `Positions.ExchangeSymbol.MaturityMonthYear` (string,null)
    The MaturityMonthYear e.g. '202503' (March 2025), or if the contract requires a day: '20210521' (May 21, 2025)

  - `Positions.ExchangeSymbol.PutOrCall` (integer,null)
    The Option PutOrCall e.g. 0 = Put, 1 = Call

  - `Positions.ExchangeSymbol.StrikePrice` (number,null)
    The ISO Option Strike Price. Zero means none

  - `Positions.ExchangeSymbol.PriceMultiplier` (number,null)
    The multiplier to apply to the Exchange price to get the C2-formatted price. Read-only value sent in responses. It is ignored in requests.

## Response 200 fields (application/json):

  - `Results` (array,null)
    Result array

  - `Results.NewSignals` (array,null)
    New Signals

  - `Results.CanceledSignals` (array,null)
    Canceled Signals

  - `ResponseStatus` (object)

  - `ResponseStatus.ErrorCode` (string,null)
    The HTTP error code. Please see https://api-docs.collective2.com/guides/error-codes#http-errors.

  - `ResponseStatus.Message` (string,null)
    The human-readable meaning of the ErrorCode.

  - `ResponseStatus.Errors` (array,null)

  - `ResponseStatus.Errors.ErrorCode` (string,null)
    The C2 error code. Please see https://api-docs.collective2.com/guides/error-codes#c2-errors.

  - `ResponseStatus.Errors.FieldName` (string,null)
    The affected parameter.

  - `ResponseStatus.Errors.Message` (string,null)
    More details about the ErrorCode.

## Response 400 fields (application/json):

  - `ErrorCode` (string,null)
    The HTTP error code. Please see https://api-docs.collective2.com/guides/error-codes#http-errors.

  - `Message` (string,null)
    The human-readable meaning of the ErrorCode.

  - `Errors` (array,null)

  - `Errors.ErrorCode` (string,null)
    The C2 error code. Please see https://api-docs.collective2.com/guides/error-codes#c2-errors.

  - `Errors.FieldName` (string,null)
    The affected parameter.

  - `Errors.Message` (string,null)
    More details about the ErrorCode.

## Response 401 fields (application/json):

  - `ErrorCode` (string,null)
    The HTTP error code. Please see https://api-docs.collective2.com/guides/error-codes#http-errors.

  - `Message` (string,null)
    The human-readable meaning of the ErrorCode.

  - `Errors` (array,null)

  - `Errors.ErrorCode` (string,null)
    The C2 error code. Please see https://api-docs.collective2.com/guides/error-codes#c2-errors.

  - `Errors.FieldName` (string,null)
    The affected parameter.

  - `Errors.Message` (string,null)
    More details about the ErrorCode.

## Response 403 fields (application/json):

  - `ErrorCode` (string,null)
    The HTTP error code. Please see https://api-docs.collective2.com/guides/error-codes#http-errors.

  - `Message` (string,null)
    The human-readable meaning of the ErrorCode.

  - `Errors` (array,null)

  - `Errors.ErrorCode` (string,null)
    The C2 error code. Please see https://api-docs.collective2.com/guides/error-codes#c2-errors.

  - `Errors.FieldName` (string,null)
    The affected parameter.

  - `Errors.Message` (string,null)
    More details about the ErrorCode.

## Response 406 fields (application/json):

  - `ErrorCode` (string,null)
    The HTTP error code. Please see https://api-docs.collective2.com/guides/error-codes#http-errors.

  - `Message` (string,null)
    The human-readable meaning of the ErrorCode.

  - `Errors` (array,null)

  - `Errors.ErrorCode` (string,null)
    The C2 error code. Please see https://api-docs.collective2.com/guides/error-codes#c2-errors.

  - `Errors.FieldName` (string,null)
    The affected parameter.

  - `Errors.Message` (string,null)
    More details about the ErrorCode.

## Response 409 fields (application/json):

  - `ErrorCode` (string,null)
    The HTTP error code. Please see https://api-docs.collective2.com/guides/error-codes#http-errors.

  - `Message` (string,null)
    The human-readable meaning of the ErrorCode.

  - `Errors` (array,null)

  - `Errors.ErrorCode` (string,null)
    The C2 error code. Please see https://api-docs.collective2.com/guides/error-codes#c2-errors.

  - `Errors.FieldName` (string,null)
    The affected parameter.

  - `Errors.Message` (string,null)
    More details about the ErrorCode.

## Response 429 fields (application/json):

  - `ErrorCode` (string,null)
    The HTTP error code. Please see https://api-docs.collective2.com/guides/error-codes#http-errors.

  - `Message` (string,null)
    The human-readable meaning of the ErrorCode.

  - `Errors` (array,null)

  - `Errors.ErrorCode` (string,null)
    The C2 error code. Please see https://api-docs.collective2.com/guides/error-codes#c2-errors.

  - `Errors.FieldName` (string,null)
    The affected parameter.

  - `Errors.Message` (string,null)
    More details about the ErrorCode.

## Response 500 fields (application/json):

  - `ErrorCode` (string,null)
    The HTTP error code. Please see https://api-docs.collective2.com/guides/error-codes#http-errors.

  - `Message` (string,null)
    The human-readable meaning of the ErrorCode.

  - `Errors` (array,null)

  - `Errors.ErrorCode` (string,null)
    The C2 error code. Please see https://api-docs.collective2.com/guides/error-codes#c2-errors.

  - `Errors.FieldName` (string,null)
    The affected parameter.

  - `Errors.Message` (string,null)
    More details about the ErrorCode.

## Response 503 fields (application/json):

  - `ErrorCode` (string,null)
    The HTTP error code. Please see https://api-docs.collective2.com/guides/error-codes#http-errors.

  - `Message` (string,null)
    The human-readable meaning of the ErrorCode.

  - `Errors` (array,null)

  - `Errors.ErrorCode` (string,null)
    The C2 error code. Please see https://api-docs.collective2.com/guides/error-codes#c2-errors.

  - `Errors.FieldName` (string,null)
    The affected parameter.

  - `Errors.Message` (string,null)
    More details about the ErrorCode.


