• C#
  • Java
  • VB
  • C++
  • Python
Contact us
CSFB Algorithms

CSFB Algorithm Parameters

The socket-based APIs support the following CSFB Algo Strategies: CSFB Algos are not available in paper accounts.

Inline

Pathfinder

Blast

Guerrilla

Sniper

Crossfinder

I Would

Float Guerrilla

VWAP

Volume Inline

TWAP

Pre/Post

Close

Reserve

Float

Tex

LightPool

10b-18

Auction Algo

The following table lists all available CSFB algo strategies and parameters supported by the API.

csfbalgoparams971.png

Inline

Parameter Description Type Syntax/Values
StartTime Start time Time 9:00:00 EST
EndTime End time Time 15:00:00 EST
ExecStyle Execution Style String "Patient", "Normal", "Aggressive"
MinPercent Minimum percentage of volume Integer Range: 0 - 99
MaxPercent Maximum percentage volume Integer Range: 0 - 99
DisplaySize Size display for iceberg/reserve Integer
Auction String "Default", "Include_All", "Include_Open_Only", "Include_Close_Only", "Exclude_All", "Imbalance_Only"
Blockfinder Enables block finding Boolean "1", "0" (for Java "true", "false")
BlockPrice Price of the block. Cannot violate price of the algo order. Double
MinBlockSize Minimum block quantity Integer
MaxBlockSize Maximum block quantity Integer
IWouldPrice Double


Example CSFB Inline Algo

  • Contract contract = new Contract();
    contract.Symbol = "IBKR";
    contract.SecType = "STK";
    contract.Exchange = "CSFBALGO"; // must be direct-routed to CSFBALGO
    contract.Currency = "USD"; // only available for US stocks
    ...
    AvailableAlgoParams.FillCSFBInlineParams(baseOrder, "10:00:00 US/Eastern", "16:00:00 US/Eastern", "Patient", 10, 20, 100, "Default", false, 40, 100, 100, 35);
    client.placeOrder(nextOrderId++, ContractSamples.CSFBContract(), baseOrder);
    ...
    public static void FillCSFBInlineParams(Order baseOrder, string startTime, string endTime, string execStyle, int minPercent,
    int maxPercent, int displaySize, string auction, bool blockFinder, double blockPrice, int minBlockSize, int maxBlockSize, double iWouldPrice)
    {
    // must be direct-routed to "CSFBALGO"
    baseOrder.AlgoStrategy = "INLINE";
    baseOrder.AlgoParams = new List<TagValue>();
    baseOrder.AlgoParams.Add(new TagValue("startTime", startTime));
    baseOrder.AlgoParams.Add(new TagValue("endTime", endTime));
    baseOrder.AlgoParams.Add(new TagValue("execStyle", execStyle));
    baseOrder.AlgoParams.Add(new TagValue("minPercent", minPercent.ToString()));
    baseOrder.AlgoParams.Add(new TagValue("maxPercent", maxPercent.ToString()));
    baseOrder.AlgoParams.Add(new TagValue("displaySize", displaySize.ToString()));
    baseOrder.AlgoParams.Add(new TagValue("auction", auction));
    baseOrder.AlgoParams.Add(new TagValue("blockFinder", blockFinder ? "1" : "0"));
    baseOrder.AlgoParams.Add(new TagValue("blockPrice", blockPrice.ToString()));
    baseOrder.AlgoParams.Add(new TagValue("minBlockSize", minBlockSize.ToString()));
    baseOrder.AlgoParams.Add(new TagValue("maxBlockSize", maxBlockSize.ToString()));
    baseOrder.AlgoParams.Add(new TagValue("iWouldPrice", iWouldPrice.ToString()));
    }
  • Contract contract = new Contract();
    contract.symbol("IBKR");
    contract.secType("STK");
    contract.exchange("CSFBALGO"); // must be direct-routed to CSFBALGO
    contract.currency("USD"); // only available for US stocks
    ...
    AvailableAlgoParams.FillCSFBInlineParams(baseOrder, "10:00:00 US/Eastern", "16:00:00 US/Eastern", "Patient", 10, 20, 100, "Default", false, 40, 100, 100, 35 );
    client.placeOrder(nextOrderId++, ContractSamples.CSFBContract(), baseOrder);
    ...
    public static void FillCSFBInlineParams(Order baseOrder, String startTime, String endTime, String execStyle, int minPercent,
    int maxPercent, int displaySize, String auction, boolean blockFinder, double blockPrice,
    int minBlockSize, int maxBlockSize, double iWouldPrice) {
    // must be direct-routed to "CSFBALGO"
    baseOrder.algoStrategy("INLINE");
    baseOrder.algoParams(new ArrayList<>());
    baseOrder.algoParams().add(new TagValue("StartTime", startTime));
    baseOrder.algoParams().add(new TagValue("EndTime", endTime));
    baseOrder.algoParams().add(new TagValue("ExecStyle", execStyle));
    baseOrder.algoParams().add(new TagValue("MinPercent", String.valueOf(minPercent)));
    baseOrder.algoParams().add(new TagValue("MaxPercent", String.valueOf(maxPercent)));
    baseOrder.algoParams().add(new TagValue("DisplaySize", String.valueOf(displaySize)));
    baseOrder.algoParams().add(new TagValue("Auction", auction));
    baseOrder.algoParams().add(new TagValue("BlockFinder", blockFinder ? "1" : "0"));
    baseOrder.algoParams().add(new TagValue("BlockPrice", String.valueOf(blockPrice)));
    baseOrder.algoParams().add(new TagValue("MinBlockSize", String.valueOf(minBlockSize)));
    baseOrder.algoParams().add(new TagValue("MaxBlockSize", String.valueOf(maxBlockSize)));
    baseOrder.algoParams().add(new TagValue("IWouldPrice", String.valueOf(iWouldPrice)));
    }
  • Dim contract As Contract = New Contract()
    contract.Symbol = "IBKR"
    contract.SecType = "STK"
    contract.Exchange = "CSFBALGO" 'must be direct-routed to CSFBALGO
    contract.Currency = "USD" 'only available for US stocks
    ...
    AvailableAlgoParams.FillCSFBInlineParams(baseOrder, "10:00:00 US/Eastern", "16:00:00 US/Eastern", "Patient", 10, 20, 100, "Default", False, 40, 100, 100, 35)
    client.placeOrder(increment(nextOrderId), ContractSamples.CSFBContract(), baseOrder)
    ...
    Public Shared Sub FillCSFBInlineParams(baseOrder As Order, startTime As String, endTime As String, execStyle As String, minPercent As Integer, maxPercent As Integer, displaySize As Integer, auction As String,
    blockFinder As Boolean, blockPrice As Double, minBlockSize As Integer, maxBlockSize As Integer, iWouldPrice As Double)
    'Must be direct-routed to "CSFBALGO"
    baseOrder.AlgoStrategy = "INLINE"
    baseOrder.AlgoParams = New List(Of TagValue)
    baseOrder.AlgoParams.Add(New TagValue("startTime", startTime))
    baseOrder.AlgoParams.Add(New TagValue("endTime", endTime))
    baseOrder.AlgoParams.Add(New TagValue("execStyle", execStyle))
    baseOrder.AlgoParams.Add(New TagValue("minPercent", minPercent.ToString()))
    baseOrder.AlgoParams.Add(New TagValue("maxPercent", maxPercent.ToString()))
    baseOrder.AlgoParams.Add(New TagValue("displaySize", displaySize.ToString()))
    baseOrder.AlgoParams.Add(New TagValue("auction", auction))
    baseOrder.AlgoParams.Add(New TagValue("blockFinder", BooleantoString(blockFinder)))
    baseOrder.AlgoParams.Add(New TagValue("blockPrice", blockPrice.ToString()))
    baseOrder.AlgoParams.Add(New TagValue("minBlockSize", minBlockSize.ToString()))
    baseOrder.AlgoParams.Add(New TagValue("maxBlockSize", maxBlockSize.ToString()))
    baseOrder.AlgoParams.Add(New TagValue("iWouldPrice", iWouldPrice.ToString()))
    End Sub
  • Contract contract;
    contract.symbol = "IBKR";
    contract.secType = "STK";
    contract.exchange = "CSFBALGO";
    contract.currency = "USD";
    ...
    AvailableAlgoParams::FillCSFBInlineParams(baseOrder, "10:00:00 US/Eastern", "16:00:00 US/Eastern", "Patient", 10, 20, 100, "Default", false, 40, 100, 100, 35);
    m_pClient->placeOrder(m_orderId++, ContractSamples::CSFBContract(), baseOrder);
    ...
    void AvailableAlgoParams::FillCSFBInlineParams(Order baseOrder, std::string startTime, std::string endTime, std::string execStyle, int minPercent,
    int maxPercent, int displaySize, std::string auction, bool blockFinder, double blockPrice, int minBlockSize, int maxBlockSize, double iWouldPrice){
    // must be direct-routed to "CSFBALGO"
    baseOrder.algoStrategy = "INLINE";
    baseOrder.algoParams.reset(new TagValueList());
    TagValueSPtr tag1(new TagValue("StartTime", startTime));
    TagValueSPtr tag2(new TagValue("EndTime", endTime));
    TagValueSPtr tag3(new TagValue("ExecStyle", execStyle));
    TagValueSPtr tag4(new TagValue("MinPercent", std::to_string(minPercent)));
    TagValueSPtr tag5(new TagValue("MaxPercent", std::to_string(maxPercent)));
    TagValueSPtr tag6(new TagValue("DisplaySize", std::to_string(displaySize)));
    TagValueSPtr tag7(new TagValue("Auction", auction));
    TagValueSPtr tag8(new TagValue("BlockFinder", blockFinder ? "1" : "0"));
    TagValueSPtr tag9(new TagValue("BlockPrice", std::to_string(blockPrice)));
    TagValueSPtr tag10(new TagValue("MinBlockSize", std::to_string(minBlockSize)));
    TagValueSPtr tag11(new TagValue("MaxBlockSize", std::to_string(maxBlockSize)));
    TagValueSPtr tag12(new TagValue("IWouldPrice", std::to_string(iWouldPrice)));
    baseOrder.algoParams->push_back(tag1);
    baseOrder.algoParams->push_back(tag2);
    baseOrder.algoParams->push_back(tag3);
    baseOrder.algoParams->push_back(tag4);
    baseOrder.algoParams->push_back(tag5);
    baseOrder.algoParams->push_back(tag6);
    baseOrder.algoParams->push_back(tag7);
    baseOrder.algoParams->push_back(tag8);
    baseOrder.algoParams->push_back(tag9);
    baseOrder.algoParams->push_back(tag10);
    baseOrder.algoParams->push_back(tag11);
    baseOrder.algoParams->push_back(tag12);
    }
  • 1  contract = Contract()
    2  contract.symbol = "IBKR"
    3  contract.secType = "STK"
    4  contract.exchange = "CSFBALGO"
    5  contract.currency = "USD"
    ...
    1  AvailableAlgoParams.FillCSFBInlineParams(baseOrder, "10:00:00 US/Eastern", "16:00:00 US/Eastern", "Patient", 10, 20, 100, "Default", False, 40, 100, 100, 35)
    2  self.placeOrder(self.nextOrderId(), ContractSamples.CSFBContract(), baseOrder)
    ...
    1  @staticmethod
    2  def FillCSFBInlineParams(baseOrder: Order, startTime: str,
    3  endTime: str, execStyle: str,
    4  minPercent: int, maxPercent: int,
    5  displaySize: int, auction: str,
    6  blockFinder: bool, blockPrice: float,
    7  minBlockSize: int, maxBlockSize: int, iWouldPrice: float):
    8  # must be direct-routed to "CSFBALGO"
    9  baseOrder.algoStrategy = "INLINE"
    10  baseOrder.algoParams = []
    11  baseOrder.algoParams.append(TagValue("StartTime", startTime))
    12  baseOrder.algoParams.append(TagValue("EndTime", endTime))
    13  baseOrder.algoParams.append(TagValue("ExecStyle", execStyle))
    14  baseOrder.algoParams.append(TagValue("MinPercent", minPercent))
    15  baseOrder.algoParams.append(TagValue("MaxPercent", maxPercent))
    16  baseOrder.algoParams.append(TagValue("DisplaySize", displaySize))
    17  baseOrder.algoParams.append(TagValue("Auction", auction))
    18  baseOrder.algoParams.append(TagValue("BlockFinder", int(blockFinder)))
    19  baseOrder.algoParams.append(TagValue("BlockPrice", blockPrice))
    20  baseOrder.algoParams.append(TagValue("MinBlockSize", minBlockSize))
    21  baseOrder.algoParams.append(TagValue("MaxBlockSize", maxBlockSize))
    22  baseOrder.algoParams.append(TagValue("IWouldPrice", iWouldPrice))

Pathfinder

Parameter Description Type Syntax/Values
StartTime Start time Time 9:00:00 EST
EndTime End time Time 15:00:00 EST
DisplaySize Size display for iceberg/reserve Integer

Blast

Parameter Description Type Syntax/Values
StartTime Start time Time 9:00:00 EST
EndTime End time Time 15:00:00 EST
ExecStyle Execution Style String "Patient", "Normal", "Aggressive"
DisplaySize Size display for iceberg/reserve Integer

Guerrilla

Parameter Description Type Syntax/Values
StartTime Start time Time 9:00:00 EST
EndTime End time Time 15:00:00 EST
ExecStyle Execution Style String "Patient", "Normal", "Aggressive"
MinPercent
MaxPercent Maximum percentage volume Integer range: 0 - 99
DisplaySize Size display for iceberg/reserve Integer
Blockfinder Enables block finding Boolean "1", "0" (for Java "true", "false")
BlockPrice Price of the block. Cannot violate price of the algo order. Double
MinBlockSize Minimum block quantity Integer
MaxBlockSize Maximum block quantity Integer
IWouldPrice Double

Sniper

Parameter Description Type Syntax/Values
StartTime Start time Time 9:00:00 EST
EndTime End time Time 15:00:00 EST
ExecStyle Execution Style String "Patient", "Normal", "Aggressive"
MaxPercent Maximum percentage volume Integer range: 0 - 99
DisplaySize Size display for iceberg/reserve Integer
Blockfinder Enables block finding Boolean "1", "0" (for Java "true", "false")
BlockPrice Price of the block. Cannot violate price of the algo order. Double
MinBlockSize Minimum block quantity Integer
MaxBlockSize Maximum block quantity Integer

Crossfinder

Parameter Description Type Syntax/Values
StartTime Start time Time 9:00:00 EST
EndTime End time Time 15:00:00 EST
ExecStyle Execution Style String "Patient", "Normal", "Aggressive"
MaxPercent Maximum percentage volume Integer range: 0 - 99
DisplaySize Size display for iceberg/reserve Integer
Blockfinder Enables block finding Boolean "1", "0" (for Java "true", "false")
BlockPrice Price of the block. Cannot violate price of the algo order. Double
MinBlockSize Minimum block quantity Integer
MaxBlockSize Maximum block quantity Integer

I Would

Parameter Description Type Syntax/Values
StartTime Start time Time 9:00:00 EST
EndTime End time Time 15:00:00 EST
ExecStyle Execution Style String "Patient", "Normal", "Aggressive"
MinPercent
MaxPercent Maximum percentage volume Integer range: 0 - 99
DisplaySize Size display for iceberg/reserve Integer
Blockfinder Enables block finding Boolean "1", "0" (for Java "true", "false")
BlockPrice Price of the block. Cannot violate price of the algo order. Double
MinBlockSize Minimum block quantity Integer
MaxBlockSize Maximum block quantity Integer

Float Guerrilla

Parameter Description Type Syntax/Values
StartTime Start time Time 9:00:00 EST
EndTime End time Time 15:00:00 EST
ExecStyle Execution Style String "Patient", "Normal", "Aggressive"
MinPercent
MaxPercent Maximum percentage volume Integer range: 0 - 99
DisplaySize Size display for iceberg/reserve Integer
Blockfinder Enables block finding Boolean "1", "0" (for Java "true", "false")
BlockPrice Price of the block. Cannot violate price of the algo order. Double
MinBlockSize Minimum block quantity Integer
MaxBlockSize Maximum block quantity Integer
IWouldPrice Double

VWAP

Parameter Description Type Syntax/Values
StartTime Start time Time 9:00:00 EST
EndTime End time Time 15:00:00 EST
ExecStyle Execution Style String "Patient", "Normal", "Aggressive"
MaxPercent Maximum percentage volume Integer range: 0 - 99
Auction String "Default", "Include_All", "Include_Open_Only", "Include_Close_Only", "Exclude_All", "Imbalance_Only"
Blockfinder Enables block finding Boolean "1", "0" (for Java "true", "false")
BlockPrice Price of the block. Cannot violate price of the algo order. Double
MinBlockSize Minimum block quantity Integer
MaxBlockSize Maximum block quantity Integer
IWouldPrice Double

Volume Inline

Parameter Description Type Syntax/Values
StartTime Start time Time 9:00:00 EST
EndTime End time Time 15:00:00 EST
ExecStyle Execution Style String "Patient", "Normal", "Aggressive"
MinPercent
MaxPercent Maximum percentage volume Integer range: 0 - 99
DisplaySize Size display for iceberg/reserve Integer
Auction String "Default", "Include_All", "Include_Open_Only", "Include_Close_Only", "Exclude_All", "Imbalance_Only"
Blockfinder Enables block finding Boolean "1", "0" (for Java "true", "false")
BlockPrice Price of the block. Cannot violate price of the algo order. Double
MinBlockSize Minimum block quantity Integer
MaxBlockSize Maximum block quantity Integer
IWouldPrice Double

TWAP

Parameter Description Type Syntax/Values
StartTime Start time Time 9:00:00 EST
EndTime End time Time 15:00:00 EST
ExecStyle Execution Style String "Patient", "Normal", "Aggressive"
MaxPercent Maximum percentage volume Integer range: 0 - 99
Auction String "Default", "Include_All", "Include_Open_Only", "Include_Close_Only", "Exclude_All", "Imbalance_Only"
Blockfinder Enables block finding Boolean "1", "0" (for Java "true", "false")
BlockPrice Price of the block. Cannot violate price of the algo order. Double
MinBlockSize Minimum block quantity Integer
MaxBlockSize Maximum block quantity Integer
IWouldPrice Double

Pre/Post

Parameter Description Type Syntax/Values
StartTime Start time Time 9:00:00 EST
EndTime End time Time 15:00:00 EST
DisplaySize Size display for iceberg/reserve Integer

Close

Parameter Description Type Syntax/Values
StartTime Start time Time 9:00:00 EST
EndTime End time Time 15:00:00 EST

Reserve

Parameter Description Type Syntax/Values
StartTime Start time Time 9:00:00 EST
EndTime End time Time 15:00:00 EST
ExecStyle Execution Style String "Patient", "Normal", "Aggressive"
MaxPercent Maximum percentage volume Integer range: 0 - 99
DisplaySize Size display for iceberg/reserve Integer
Blockfinder Enables block finding Boolean "1", "0" (for Java "true", "false")
BlockPrice Price of the block. Cannot violate price of the algo order. Double
MinBlockSize Minimum block quantity Integer
MaxBlockSize Maximum block quantity Integer

Float

Parameter Description Type Syntax/Values
StartTime Start time Time 9:00:00 EST
EndTime End time Time 15:00:00 EST
ExecStyle Execution Style String "Patient", "Normal", "Aggressive"
MaxPercent Maximum percentage volume Integer range: 0 - 99
DisplaySize Size display for iceberg/reserve Integer
Blockfinder Enables block finding Boolean "1", "0" (for Java "true", "false")
BlockPrice Price of the block. Cannot violate price of the algo order. Double
MinBlockSize Minimum block quantity Integer
MaxBlockSize Maximum block quantity Integer

Tex

Parameter Description Type Syntax/Values
StartTime Start time Time 9:00:00 EST
EndTime End time Time 15:00:00 EST
ExecStyle Execution Style String "Patient", "Normal", "Aggressive"
MinPercent Minimum percentage of volume Integer Range: 0 - 99
MaxPercent Maximum percentage volume Integer Range: 0 - 99
DisplaySize Size display for iceberg/reserve Integer
Auction String "Default", "Include_All", "Include_Open_Only", "Include_Close_Only", "Exclude_All", "Imbalance_Only"
Blockfinder Enables block finding Boolean "1", "0" (for Java "true", "false")
BlockPrice Price of the block. Cannot violate price of the algo order. Double
MinBlockSize Minimum block quantity Integer
MaxBlockSize Maximum block quantity Integer
IWouldPrice Double

LightPool

Parameter Description Type Syntax/Values
StartTime Start time Time 9:00:00 EST
EndTime End time Time 15:00:00 EST
ExecStyle Execution Style String "Patient", "Normal", "Aggressive"
DisplaySize Size display for iceberg/reserve Integer

10b-18

Parameter Description Type Syntax/Values
StartTime Start time Time 9:00:00 EST
EndTime End time Time 15:00:00 EST
MaxPercent Maximum percentage volume Integer Range: 0 - 99

Auction Algo

Parameter Description Type Syntax/Values
ExecStyle Execution Style String "Patient", "Normal", "Aggressive"
DisplaySize Size display for iceberg/reserve Integer