# SetDesiredPositionsV2

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 /v2/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.NewSignals.SignalId` (integer,null)
    The unique SignalId

  - `Results.NewSignals.OrderStatus` (string,null)
    'A' = PendingNew, '0' = Working, '1' = Partially filled, '2' = Filled, '4' = Canceled, '5' = Replaced, '6' = Pending Cancel, '8' = Rejected, 'C' = Expired, 'E' = Pending Replace

  - `Results.NewSignals.OrderType` (string,null)
    '1' = Market, '2' = Limit, '3' = Stop
    Enum: "1", "2", "3"

  - `Results.NewSignals.Side` (string,null)
    '1' = Buy, '2' = Sell
    Enum: "1", "2"

  - `Results.NewSignals.OpenClose` (string,null)
    'O' = Open, 'C' = Close
    Enum: "O", "C"

  - `Results.NewSignals.OrderQuantity` (number,null)
    The unsigned (absolute value) order quantity

  - `Results.NewSignals.Limit` (number,null)
    The C2-formatted Limit Price

  - `Results.NewSignals.Stop` (number,null)
    The C2-formatted Stop Price

  - `Results.NewSignals.TIF` (string,null)
    The time in force. 0 = Day, 1 = Good Till Cancel (GTC)
    Enum: "0", "1"

  - `Results.NewSignals.FilledQuantity` (number,null)
    The unsigned (absolute value) quantity filled

  - `Results.NewSignals.AvgFillPrice` (number,null)
    The average fill price, if FilledQuantity > 0

  - `Results.NewSignals.PostedDate` (string,null)
    UTC DateTime when the order was posted

  - `Results.NewSignals.C2Symbol` (object)

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

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

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

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

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

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

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

  - `Results.NewSignals.ExchangeSymbol` (object)

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

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

  - `Results.NewSignals.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

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

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

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

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

  - `Results.NewSignals.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.

  - `Results.NewSignals.RejectMessage` (string,null)
    The signal rejection message. Only available in response when OrderStatus = '8' (Rejected)

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

  - `Results.CanceledSignals.SignalId` (integer,null)
    The unique SignalId

  - `Results.CanceledSignals.OrderStatus` (string,null)
    'A' = PendingNew, '0' = Working, '1' = Partially filled, '2' = Filled, '4' = Canceled, '5' = Replaced, '6' = Pending Cancel, '8' = Rejected, 'C' = Expired, 'E' = Pending Replace

  - `Results.CanceledSignals.OrderType` (string,null)
    '1' = Market, '2' = Limit, '3' = Stop
    Enum: "1", "2", "3"

  - `Results.CanceledSignals.Side` (string,null)
    '1' = Buy, '2' = Sell
    Enum: "1", "2"

  - `Results.CanceledSignals.OpenClose` (string,null)
    'O' = Open, 'C' = Close
    Enum: "O", "C"

  - `Results.CanceledSignals.OrderQuantity` (number,null)
    The unsigned (absolute value) order quantity

  - `Results.CanceledSignals.Limit` (number,null)
    The C2-formatted Limit Price

  - `Results.CanceledSignals.Stop` (number,null)
    The C2-formatted Stop Price

  - `Results.CanceledSignals.TIF` (string,null)
    The time in force. 0 = Day, 1 = Good Till Cancel (GTC)
    Enum: "0", "1"

  - `Results.CanceledSignals.FilledQuantity` (number,null)
    The unsigned (absolute value) quantity filled

  - `Results.CanceledSignals.AvgFillPrice` (number,null)
    The average fill price, if FilledQuantity > 0

  - `Results.CanceledSignals.PostedDate` (string,null)
    UTC DateTime when the order was posted

  - `Results.CanceledSignals.C2Symbol` (object)

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

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

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

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

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

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

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

  - `Results.CanceledSignals.ExchangeSymbol` (object)

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

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

  - `Results.CanceledSignals.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

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

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

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

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

  - `Results.CanceledSignals.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.

  - `Results.CanceledSignals.RejectMessage` (string,null)
    The signal rejection message. Only available in response when OrderStatus = '8' (Rejected)

  - `Results.RejectedSignals` (array,null)
    Rejected Signals

  - `Results.RejectedSignals.SignalId` (integer,null)
    The unique SignalId

  - `Results.RejectedSignals.OrderStatus` (string,null)
    'A' = PendingNew, '0' = Working, '1' = Partially filled, '2' = Filled, '4' = Canceled, '5' = Replaced, '6' = Pending Cancel, '8' = Rejected, 'C' = Expired, 'E' = Pending Replace

  - `Results.RejectedSignals.OrderType` (string,null)
    '1' = Market, '2' = Limit, '3' = Stop
    Enum: "1", "2", "3"

  - `Results.RejectedSignals.Side` (string,null)
    '1' = Buy, '2' = Sell
    Enum: "1", "2"

  - `Results.RejectedSignals.OpenClose` (string,null)
    'O' = Open, 'C' = Close
    Enum: "O", "C"

  - `Results.RejectedSignals.OrderQuantity` (number,null)
    The unsigned (absolute value) order quantity

  - `Results.RejectedSignals.Limit` (number,null)
    The C2-formatted Limit Price

  - `Results.RejectedSignals.Stop` (number,null)
    The C2-formatted Stop Price

  - `Results.RejectedSignals.TIF` (string,null)
    The time in force. 0 = Day, 1 = Good Till Cancel (GTC)
    Enum: "0", "1"

  - `Results.RejectedSignals.FilledQuantity` (number,null)
    The unsigned (absolute value) quantity filled

  - `Results.RejectedSignals.AvgFillPrice` (number,null)
    The average fill price, if FilledQuantity > 0

  - `Results.RejectedSignals.PostedDate` (string,null)
    UTC DateTime when the order was posted

  - `Results.RejectedSignals.C2Symbol` (object)

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

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

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

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

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

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

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

  - `Results.RejectedSignals.ExchangeSymbol` (object)

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

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

  - `Results.RejectedSignals.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

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

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

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

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

  - `Results.RejectedSignals.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.

  - `Results.RejectedSignals.RejectMessage` (string,null)
    The signal rejection message. Only available in response when OrderStatus = '8' (Rejected)

  - `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.


