> For the complete documentation index, see [llms.txt](https://guide.ssi.com.vn/ssi-products/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guide.ssi.com.vn/ssi-products/tieng-viet/thong-tin-bo-tro/fco-va-tham-so-theo-loai-lenh.md).

# FCO và tham số theo loại lệnh

Một số ví dụ về các tham số cần tương ứng với từng loại lệnh điều kiện

<table><thead><tr><th width="116" valign="top">Lệnh điều kiện</th><th width="160" valign="top">Params (Tham số cần)</th><th width="279" valign="top">Ví dụ</th><th valign="top">Mô tả</th></tr></thead><tbody><tr><td valign="top"><strong>stop_limit</strong></td><td valign="top"><p>"price": "string",</p><p>"side": "B/S",<br>"stopPrice": “postive float”,<br>"operator": "greater_or_equal/ lesser_or_equal/ greater/ lesser/ equal"</p></td><td valign="top"><p>{</p><p>    "instrumentID": "SSI",</p><p>    "side": "S",</p><p>    "type": "stop_limit",    </p><p>    "price": "30500",</p><p>    "priceSlip": 0,</p><p>    "quantity": 1000,</p><p>    "account": "<em>{{MarginAccount}}</em>",</p><p>    "fromDate": "10/07/2025 08:00:00",</p><p>    "toDate": "15/07/2025 23:59:59",</p><p>    "stopPrice": 30500,   </p><p>    "operator": "greater_or_equal",</p><p>    "code": "",    </p><p>    "userAgent": "agent fctrading app",</p><p>    "deviceID":"0A:B1:92:D3:5S:8G"</p><p>}</p></td><td valign="top">Tương tự lệnh Stop, tuy nhiên lệnh được đẩy lên sở với mức giá limit KH đã đặt. </td></tr><tr><td valign="top"><strong>Stop</strong></td><td valign="top"><p> Các tham số cần điền:<br>"side": "B/S",<br>"stopPrice": “postive float”,</p><p> "operator": "greater_or_equal/ lesser_or_equal/ greater/ lesser/ equal"<br>         </p></td><td valign="top"><p>{</p><p>    "instrumentID": "SSI",</p><p>    "side": "S",</p><p>    "type": "Stop",    </p><p>    "price": "30500",</p><p>    "priceSlip": 0,</p><p>    "quantity": 1000,</p><p>    "account": "<em>{{MarginAccount}}</em>",</p><p>    "fromDate": "10/07/2025 08:00:00",</p><p>    "toDate": "15/07/2025 23:59:59",</p><p>    "stopPrice": 30500,   </p><p>    "operator": "greater_or_equal",</p><p>    "code": "",    </p><p>    "userAgent": "agent fctrading app",</p><p>    "deviceID":"0A:B1:92:D3:5S:8G"</p><p>}</p><p> </p></td><td valign="top">Lệnh dừng. Lệnh sẽ được kích hoạt khi thỏa mãn điều kiện về giá. Lệnh được đẩy lên sở với giá thị trường.</td></tr><tr><td valign="top"><strong>gtd</strong></td><td valign="top">"side": "B/S"<br>       </td><td valign="top"><p>{</p><p>    "instrumentID": "SSI",</p><p>    "side": "S",</p><p>    "type": "gtd",    </p><p>    "price": "30500",</p><p>    "priceSlip": 0,</p><p>    "quantity": 1000,</p><p>    "account": "<em>{{MarginAccount}}</em>",</p><p>    "fromDate": "10/07/2025 08:00:00",</p><p>    "toDate": "15/07/2025 23:59:59",</p><p>    "code": "",    </p><p>    "userAgent": "agent fctrading app",</p><p>    "deviceID":"0A:B1:92:D3:5S:8G"</p><p>}</p><p> </p></td><td valign="top"><p>Lệnh có hiệu lực nhiều ngày. Lệnh được trigger mỗi ngày cho đến khi gặp một trong các điều kiện sau thì dừng:</p><p>Khớp hết KL lệnh gốc</p><p>Người dùng hủy lệnh</p><p>Sau ngày hết hiệu lực.</p></td></tr><tr><td valign="top">bullbear</td><td valign="top">"side": "B/S",<br>"tpActivePrice": "postive float",<br>"tpPrice": "5000/MP/MOK/MTL",<br>"tpSlip": "postive float",<br>"slActivePrice": "postive float",<br>"slPrice": "5000/MP/MOK/MTL",<br>"slSlip": "postive float"<br><br></td><td valign="top"><p>{</p><p>    "instrumentID": "41I1F7000",</p><p>    "side": "B",</p><p>    "type": "bullbear",    </p><p>    "price": "MTL",</p><p>    "priceSlip": 0.50,</p><p>    "quantity": 1,</p><p>    "account": "<em>{{DerivativeAccount}}</em>",</p><p>    "fromDate": "10/07/2025 08:00:00",</p><p>    "toDate": "15/07/2025 23:59:59",</p><p>    "stopPrice": 0,</p><p>    "activePrice": 0.0,</p><p>    "trailingAmount": 0,    </p><p>    "tpActivePrice": 1555,</p><p>    "slActivePrice": 1540,</p><p>    "tpPrice": "1556",</p><p>    "slPrice": "1541",</p><p>    "tpSlip": 1,</p><p>    "slSlip": 1,</p><p>    "operator": "",</p><p>    "code": "",    </p><p>    "userAgent": "agent fctrading app",</p><p>    "deviceID":"0A:B1:92:D3:5S:8G"</p><p>}</p><p> </p></td><td valign="top"><p>Lệnh chốt lãi, cắt lỗ (chưa có vị thế): Cho phép KH đính kèm lệnh chốt lãi, cắt lỗ với một lệnh chính.</p><p>Khi lệnh chính khớp, hệ thống sẽ sinh ra 1 lệnh OCO có chiều ngược với chiều của lệnh chính</p><p> </p></td></tr><tr><td valign="top">oco</td><td valign="top">"side": "B/S",<br>"tpActivePrice": "postive float",<br>"tpPrice": "50000/MP/MTL/MOK/MAK",<br>"tpSlip": "postive float",<br>"slActivePrice": "postive float",<br>"slPrice": "50000/MP/MTL/MOK/MAK",<br>"slSlip": "postive float"<br><br></td><td valign="top"><p> {</p><p>    "instrumentID": "SSI",</p><p>    "side": "S",</p><p>    "type": "oco",    </p><p>    "price": "MP",</p><p>    "priceSlip": 0.0,</p><p>    "quantity": 1000,</p><p>    "account": "<em>{{MarginAccount}}</em>",</p><p>    "fromDate": "10/07/2025 08:00:00",</p><p>    "toDate": "15/07/2025 23:59:59",</p><p>    "stopPrice": 0,</p><p>    "activePrice": 0.0,</p><p>    "trailingAmount": 0,    </p><p>    "tpActivePrice": 30500,</p><p>    "slActivePrice": 20000,</p><p>    "tpPrice": "30500",</p><p>    "slPrice": "30500",</p><p>    "tpSlip": 100,</p><p>    "slSlip": 100,</p><p>    "operator": "",</p><p>    "code": "",    </p><p>    "userAgent": "agent fctrading app",</p><p>    "deviceID":"0A:B1:92:D3:5S:8G"</p><p>}</p><p> </p></td><td valign="top"><p>Lệnh cặp dùng cho việc đặt lệnh chốt lãi, cắt lỗ cho vị thế đã có sẵn trong danh mục. </p><p>Khi điều kiện kích hoạt của một lệnh (a) thỏa mãn thì hệ thống sẽ kiểm tra:</p><p>Nếu lệnh còn lại (b) đã được kích hoạt thì hủy lệnh con của lệnh đó</p><p>Đẩy lệnh thỏa mãn điều kiện kích hoạt đi sau khi hủy lệnh thành công. KL của lệnh = KL khớp còn lại của lệnh con lệnh (b)</p></td></tr><tr><td valign="top">trailing_stop</td><td valign="top">"side": "B/S",<br>"activePrice": "postive float",<br>"trailingAmount": "postive float"<br><br></td><td valign="top"><p>{</p><p>    "instrumentID": "SSI",</p><p>    "side": "S",</p><p>    "type": "trailing_stop",    </p><p>    "price": "MP",</p><p>    "priceSlip": 0.0,</p><p>    "quantity": 1000,</p><p>    "account": "<em>{{MarginAccount}}</em>",</p><p>    "fromDate": "10/07/2025 08:00:00",</p><p>    "toDate": "15/07/2025 23:59:59",   </p><p>    "activePrice": 28000,</p><p>    "trailingAmount": 1000,   </p><p>    "code": "",    </p><p>    "userAgent": "agent fctrading app",</p><p>    "deviceID":"0A:B1:92:D3:5S:8G"</p><p>}</p><p> </p></td><td valign="top">Lệnh Stop với mức giá Stop dịch chuyển theo xu hướng của thị trường.  Mức giá đẩy lệnh là giá thị trường. </td></tr><tr><td valign="top">trailing_stop_limit</td><td valign="top"><p>"side": "B/S",</p><p>"price": "string",</p><p>"activePrice": "postive float",<br>"trailingAmount": "postive float"<br><br></p></td><td valign="top"><p>{</p><p>    "instrumentID": "SSI",</p><p>    "side": "S",</p><p>    "type": "trailing_stop_limit",    </p><p>    "price": "MP",</p><p>    "priceSlip": 0.0,</p><p>    "quantity": 1000,</p><p>    "account": "<em>{{MarginAccount}}</em>",</p><p>    "fromDate": "10/07/2025 08:00:00",</p><p>    "toDate": "15/07/2025 23:59:59",   </p><p>    "activePrice": 28000,</p><p>    "trailingAmount": 1000,    </p><p>    "userAgent": "agent fctrading app",</p><p>    "deviceID":"0A:B1:92:D3:5S:8G"</p><p>}</p><p> </p></td><td valign="top">Lệnh Stop với mức giá stop dịch chuyển theo xu hướng của thị trường. Mức giá đẩy lệnh đi là mức giá được tính toán từ giá stop.</td></tr></tbody></table>
