Conditional Order Reference
Detailed guide on how to place conditional orders (FCO) via the FastConnect API, including order types, parameters, and examples.
Conditional Order Reference
Overview
Conditional orders (FCO - FastConnect Conditional Order) allow you to place orders automatically when pre-configured conditions are met. The system supports 7 types of conditional orders, each with its own set of parameters suited to different trading strategies.
All conditional orders are submitted via the POST /api/v3/trading/fco/order endpoint, with the type field specifying the order type.
Common Parameters
The following parameters apply to all types of conditional orders:
| Parameter | Type | Required | Description |
|---|---|---|---|
accountNo | string | Yes | Order account (cash or derivatives). |
symbol | string | Yes | Securities symbol or derivatives contract code. |
side | string | Yes | Buy or sell side: B (Buy) or S (Sell). |
type | string | Yes | Conditional order type (see the table below). |
quantity | integer | Yes | Quantity to order. |
deviceId | string | Yes | Device identifier (MAC address or IMEI). |
price | string | No | Order price. Supports a numeric price or a special order type (MP, MOK, MTL). |
priceSlip | number | No | Allowed price slippage. |
from | string | No | Effective start date, in YYYY/MM/DD hh:mm:ss format. Defaults to the order creation time. |
to | string | No | Effective end date, in YYYY/MM/DD hh:mm:ss format. Defaults to 24h, maximum 31 days. |
code | string | No | OTP or PIN verification code (required if the token has not been verified with OTP). |
userAgent | string | No | Information about the browser or application sending the request. |
clientRequestId | string | No | Client-generated order identifier, used to reconcile the response and streaming. |
ipAddress | string | No | IP address of the device sending the request. |
Conditional Order Types and Parameters
1. Stop Limit (stop_limit)
Similar to a Stop order, however the order is pushed to the exchange at the limit price the client has set.
Specific parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
price | string | Yes | Limit price used to push the order to the exchange. |
stopPrice | number | Yes | Stop price. When the market price reaches this level, the order is triggered. |
operator | string | Yes | Price comparison operator: greater_or_equal, lesser_or_equal, greater, lesser, equal. |
Example request body:
{
"symbol": "SSI",
"side": "S",
"type": "stop_limit",
"price": "30500",
"priceSlip": 0,
"quantity": 1000,
"accountNo": "0001234",
"from": "2025/07/10 08:00:00",
"to": "2025/07/15 23:59:59",
"stopPrice": 30500,
"operator": "greater_or_equal",
"code": "",
"userAgent": "agent fctrading app",
"deviceId": "0A:B1:92:D3:5S:8G"
}2. Stop (stop)
Stop order. The order is triggered when the price condition is met. The order is pushed to the exchange at market price.
Specific parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
stopPrice | number | Yes | Stop price. When the market price reaches this level, the order is triggered. |
operator | string | Yes | Price comparison operator: greater_or_equal, lesser_or_equal, greater, lesser, equal. |
Example request body:
{
"symbol": "SSI",
"side": "S",
"type": "stop",
"price": "30500",
"priceSlip": 0,
"quantity": 1000,
"accountNo": "0001234",
"from": "2025/07/10 08:00:00",
"to": "2025/07/15 23:59:59",
"stopPrice": 30500,
"operator": "greater_or_equal",
"code": "",
"userAgent": "agent fctrading app",
"deviceId": "0A:B1:92:D3:5S:8G"
}3. Good Till Date (gtd)
An order effective over multiple days. The order is triggered each day until one of the following conditions is met, at which point it stops:
- The full quantity of the original order has been filled
- The user cancels the order
- After the expiry date
Specific parameters:
No specific parameters beyond the common ones. However, from and to must be set to define the effective time range.
Example request body:
{
"symbol": "SSI",
"side": "S",
"type": "gtd",
"price": "30500",
"priceSlip": 0,
"quantity": 1000,
"accountNo": "0001234",
"from": "2025/07/10 08:00:00",
"to": "2025/07/15 23:59:59",
"code": "",
"userAgent": "agent fctrading app",
"deviceId": "0A:B1:92:D3:5S:8G"
}4. Bull Bear (bullbear)
Take profit and stop loss order (no existing position): allows the client to attach a take profit (Take Profit) and stop loss (Stop Loss) order to a main order.
When the main order is filled, the system generates an OCO order in the opposite direction of the main order.
Specific parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
tpActivePrice | number | Yes | Trigger price for the take profit (Take Profit) order. |
tpPrice | string | Yes | Take profit price. Supports a numeric price or MP, MOK, MTL. |
tpSlip | number | Yes | Take profit price slippage margin. |
slActivePrice | number | Yes | Trigger price for the stop loss (Stop Loss) order. |
slPrice | string | Yes | Stop loss price. Supports a numeric price or MP, MOK, MTL. |
slSlip | number | Yes | Stop loss price slippage margin. |
Example request body (derivatives):
{
"symbol": "41I1F7000",
"side": "B",
"type": "bullbear",
"price": "MTL",
"priceSlip": 0.50,
"quantity": 1,
"accountNo": "0D01234",
"from": "2025/07/10 08:00:00",
"to": "2025/07/15 23:59:59",
"stopPrice": 0,
"activePrice": 0.0,
"trailingAmount": 0,
"tpActivePrice": 1555,
"slActivePrice": 1540,
"tpPrice": "1556",
"slPrice": "1541",
"tpSlip": 1,
"slSlip": 1,
"operator": "",
"code": "",
"userAgent": "agent fctrading app",
"deviceId": "0A:B1:92:D3:5S:8G"
}5. OCO - One Cancels Other (oco)
A paired order used to place take profit and stop loss orders for an existing position in the portfolio.
When the trigger condition of one order (a) is met, the system checks:
- If the remaining order (b) has already been triggered, cancel that order's child order
- Push the order that met the trigger condition after the cancellation succeeds. The quantity of the order = the remaining unfilled quantity of the child order of order (b)
Specific parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
tpActivePrice | number | Yes | Trigger price for the take profit (Take Profit) order. |
tpPrice | string | Yes | Take profit price. Supports a numeric price or MP, MTL, MOK, MAK. |
tpSlip | number | Yes | Take profit price slippage margin. |
slActivePrice | number | Yes | Trigger price for the stop loss (Stop Loss) order. |
slPrice | string | Yes | Stop loss price. Supports a numeric price or MP, MTL, MOK, MAK. |
slSlip | number | Yes | Stop loss price slippage margin. |
Example request body:
{
"symbol": "SSI",
"side": "S",
"type": "oco",
"price": "MP",
"priceSlip": 0.0,
"quantity": 1000,
"accountNo": "0001234",
"from": "2025/07/10 08:00:00",
"to": "2025/07/15 23:59:59",
"stopPrice": 0,
"activePrice": 0.0,
"trailingAmount": 0,
"tpActivePrice": 30500,
"slActivePrice": 20000,
"tpPrice": "30500",
"slPrice": "30500",
"tpSlip": 100,
"slSlip": 100,
"operator": "",
"code": "",
"userAgent": "agent fctrading app",
"deviceId": "0A:B1:92:D3:5S:8G"
}6. Trailing Stop (trailing_stop)
A Stop order whose stop price moves along with the market trend. The order is pushed at market price.
Specific parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
activePrice | number | Yes | Initial trigger price of the conditional order. |
trailingAmount | number | Yes | Trailing price amount (the distance between the market price and the stop price). |
Example request body:
{
"symbol": "SSI",
"side": "S",
"type": "trailing_stop",
"price": "MP",
"priceSlip": 0.0,
"quantity": 1000,
"accountNo": "0001234",
"from": "2025/07/10 08:00:00",
"to": "2025/07/15 23:59:59",
"activePrice": 28000,
"trailingAmount": 1000,
"code": "",
"userAgent": "agent fctrading app",
"deviceId": "0A:B1:92:D3:5S:8G"
}7. Trailing Stop Limit (trailing_stop_limit)
A Stop order whose stop price moves along with the market trend. The order push price is a price calculated from the stop price.
Specific parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
price | string | Yes | Limit price used to push the order to the exchange. |
activePrice | number | Yes | Initial trigger price of the conditional order. |
trailingAmount | number | Yes | Trailing price amount (the distance between the market price and the stop price). |
Example request body:
{
"symbol": "SSI",
"side": "S",
"type": "trailing_stop_limit",
"price": "MP",
"priceSlip": 0.0,
"quantity": 1000,
"accountNo": "0001234",
"from": "2025/07/10 08:00:00",
"to": "2025/07/15 23:59:59",
"activePrice": 28000,
"trailingAmount": 1000,
"userAgent": "agent fctrading app",
"deviceId": "0A:B1:92:D3:5S:8G"
}Order Type Summary Table
| # | Order Type | type | Specific Parameters |
|---|---|---|---|
| 1 | Stop Limit | stop_limit | price, stopPrice, operator |
| 2 | Stop | stop | stopPrice, operator |
| 3 | Good Till Date | gtd | (none) |
| 4 | Bull Bear | bullbear | tpActivePrice, tpPrice, tpSlip, slActivePrice, slPrice, slSlip |
| 5 | OCO | oco | tpActivePrice, tpPrice, tpSlip, slActivePrice, slPrice, slSlip |
| 6 | Trailing Stop | trailing_stop | activePrice, trailingAmount |
| 7 | Trailing Stop Limit | trailing_stop_limit | price, activePrice, trailingAmount |
operator Values
The operator operator is used for stop and stop_limit orders to define the trigger condition:
| Value | Description |
|---|---|
greater_or_equal | Market price ≥ stop price |
lesser_or_equal | Market price ≤ stop price |
greater | Market price > stop price |
lesser | Market price < stop price |
equal | Market price = stop price |
Special Price Types
Some order types support special prices instead of a specific numeric price:
| Value | Description |
|---|---|
MP | Market Price |
MOK | Match or Kill |
MTL | Match then Limit - match, then convert to a limit order |
MAK | Match and Kill - match and cancel the remainder |