WebSocket API

fco.place

Place a conditional order — the response returns the order-creation result right away, unlike order.* which acks first and delivers the result later. If rejected, the response carries an error with error.code: "FCO_ERROR". Requires a signature. See also the Conditional Order Reference appendix.

Required scope: tradingws:fco:post.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

bodyobjectrequired
idstringrequired
methodstringrequired
paramsobjectrequired
symbolstringrequired

Underlying/derivative trading symbol.

sidestringrequired

Order side.

typestring | nulloptional

Conditional order type. See the Conditional Order Reference appendix.

pricestringrequired

Conditional order price. Required and must be > 0.

priceSlipnumber | nulloptional

Allowed price slippage.

quantityintegerrequired

Order quantity.

accountNostringrequired

Trading account number.

fromstring | nulloptional

Effective start time, format `yyyy/MM/dd HH:mm:ss`. If `to` is also present, `from` must be <= `to`.

tostring | nulloptional

Effective end time, format `yyyy/MM/dd HH:mm:ss`.

stopPricenumber | nulloptional

Trigger (stop) price.

activePricenumber | nulloptional

Conditional-order activation price.

trailingAmountnumber | nulloptional

Trailing-stop amount.

tpActivePricenumber | nulloptional

Take Profit activation price.

slActivePricenumber | nulloptional

Stop Loss activation price.

tpPricestring | nulloptional

Take Profit price.

slPricestring | nulloptional

Stop Loss price.

tpSlipnumber | nulloptional

Allowed slippage for Take Profit.

slSlipnumber | nulloptional

Allowed slippage for Stop Loss.

operatorstring | nulloptional

Comparison operator for the trigger condition.

codestring | nulloptional

OTP transaction-verification code (required if OTP verification is enabled for the account).

deviceIdstringrequired

Identifier of the device submitting the request.

userAgentstring | nulloptional

Information about the browser/application sending the request.

signaturestringrequired

RSA+SHA256 signature (base64). Required.

timestampintegerrequired

Response Body

application/json

application/json

Sample Request

wscat -c wss://api.ssi.com.vn/ws/v3/trading -x '{
  "id": "req-0004",
  "method": "fco.place",
  "params": {
    "symbol": "SSI",
    "side": "B",
    "type": "TS",
    "price": "45.00",
    "quantity": 4000,
    "accountNo": "1231496",
    "deviceId": "MAC-AABBCCDDEEFF"
  },
  "signature": "base64(RSA-SHA256(...))",
  "timestamp": 1755000003000
}'

Sample Response

{
  "id": "req-0004",
  "method": "fco.place",
  "status": 200,
  "result": {
    "fcoId": "7528ac20-a340-4233-8bb7-a2379fc3c638"
  },
  "rateLimit": {
    "limit": 50,
    "remaining": 44,
    "resetMs": 840
  }
}