Enums & Constants
Enum-like constants in the .NET SDK
The SDK represents fixed values (order side, order type, board, ...) as static classes holding string constants instead of standard C# enum. This keeps the exact string values sent/received by the API without conversion.
using SsiSdk;
var side = OrderSide.Buy; // "B"
var board = Board.HOSE; // "HOSE"All of these live in the SsiSdk namespace — no separate import needed.
Every class also has a FromValue(string? raw) helper: it returns the canonical value for a value or member name in any letter case (for example OrderSide.FromValue("buy") returns "B"), or null when it is not recognised.
OrderSide
| Constant | Value | Description |
|---|---|---|
OrderSide.Buy | "B" | Buy |
OrderSide.Sell | "S" | Sell |
OrderType
| Constant | Value | Description |
|---|---|---|
OrderType.ATO | "ATO" | At The Open |
OrderType.ATC | "ATC" | At The Close |
OrderType.LO | "LO" | Limit Order |
OrderType.MTL | "MTL" | Market To Limit |
OrderType.MP | "MP" | Market Price |
OrderType.MOK | "MOK" | Match Or Kill |
OrderType.MAK | "MAK" | Match And Kill |
OrderType.PLO | "PLO" | Post Lunch Order |
OrderStatus
| Constant | Value | Description |
|---|---|---|
OrderStatus.Pending | "PD" | Pending |
OrderStatus.PendingApproval | "WA" | Waiting for approval |
OrderStatus.Ready | "RS" | Ready |
OrderStatus.Sent | "SD" | Sent |
OrderStatus.Queued | "QU" | Queued |
OrderStatus.Filled | "FF" | Fully filled |
OrderStatus.PartialFilled | "PF" | Partially filled |
OrderStatus.PartialCancelled | "FFPC" | Partially filled, remainder cancelled |
OrderStatus.PendingModify | "WM" | Waiting to be modified |
OrderStatus.PendingCancel | "WC" | Waiting to be cancelled |
OrderStatus.Cancelled | "CL" | Cancelled |
OrderStatus.Rejected | "RJ" | Rejected |
OrderStatus.Expired | "EX" | Expired |
OrderStatus.PreSession | "IAV" | Pre-session |
OrderStatus.Soi | "SOI" | Status code SOI |
OrderStatus.Pas | "PAS" | Status code PAS |
OrderStatus.Cpl | "CPL" | Status code CPL |
OrderStatus.Requested | "RQ" | Requested |
OrderStatus.Error | "ERR" | Error |
The exact business meaning of
SOI,PASandCPLis not confirmed in this documentation; the SDK only defines the constants. See the status descriptions in the API reference.
Board
| Constant | Value | Description |
|---|---|---|
Board.HOSE | "HOSE" | HOSE exchange |
Board.HNX | "HNX" | HNX exchange |
Board.UPCOM | "UPCOM" | UPCOM exchange |
Board.DERIVATIVES | "DERIVATIVES" | Derivatives. Valid on the stream and master data only, not on the REST endpoints |
AccountType
| Constant | Value | Description |
|---|---|---|
AccountType.Equity | "Cash" | Cash equity account |
AccountType.EquityMargin | "Margin" | Margin account |
AccountType.Derivative | "Derivative" | Derivatives account |
FCOType
Conditional order type (Flexible Conditional Order).
| Constant | Value | Description |
|---|---|---|
FCOType.GTD | "gtd" | Good Till Date |
FCOType.Stop | "stop" | Stop Market |
FCOType.StopLimit | "stop_limit" | Stop Limit |
FCOType.TrailingStop | "trailing_stop" | Trailing Stop Market |
FCOType.TrailingStopLimit | "trailing_stop_limit" | Trailing Stop Limit |
FCOType.OCO | "oco" | One Cancels the Other |
FCOType.BullBear | "bullbear" | Bull Bear |
FCOOperator
Comparison operator that triggers Stop / Stop Limit orders.
| Constant | Value | Description |
|---|---|---|
FCOOperator.Greater | "greater" | Greater than (>) |
FCOOperator.GreaterOrEqual | "greater_or_equal" | Greater than or equal (>=) |
FCOOperator.Lesser | "lesser" | Less than (<) |
FCOOperator.LesserOrEqual | "lesser_or_equal" | Less than or equal (<=) |
FCOOperator.Equal | "equal" | Equal (=) |
FCOStatus
Processing status of a conditional order.
| Constant | Value | Description |
|---|---|---|
FCOStatus.Init | "INIT" | Newly created |
FCOStatus.Wait | "WAIT" | Waiting for trigger |
FCOStatus.Tri | "TRI" | Triggered |
FCOStatus.Trit | "TRIT" | Triggered successfully |
FCOStatus.Ter | "TER" | Terminated |
FCOStatus.Fis | "FIS" | Finished |
FCOStatus.Wc | "WC" | Waiting to be cancelled |
FCOStatus.Exp | "EXP" | Expired |
FCOStatus.Err | "ERR" | Error |
Timeframe
| Constant | Value | Description |
|---|---|---|
Timeframe.Minute1 | "1m" | 1 minute |
Timeframe.Minute3 | "3m" | 3 minutes |
Timeframe.Minute5 | "5m" | 5 minutes |
Timeframe.Minute15 | "15m" | 15 minutes |
Timeframe.Hour1 | "1h" | 1 hour |
Timeframe.Day1 | "1d" | 1 day |
Timeframe.Week1 | "1w" | 1 week (no longer usable, see below) |
Timeframe.Month1 | "1M" | 1 month (no longer usable, see below) |
Timeframe.Allowed is the set of timeframes the OHLC endpoint accepts: 1d, 1m, 3m, 5m, 15m, 1h. 1w and 1M are rejected by the server (code 400210); in the SDK the weekly/monthly OHLC methods are marked [Obsolete] and throw ValidationException.
Streaming: StreamingMethod, StreamingChannel
Used by the control messages of the streaming connection (see Streaming).
| Constant | Value |
|---|---|
StreamingMethod.Subscribe | "subscribe" |
StreamingMethod.Unsubscribe | "unsubscribe" |
StreamingMethod.PingPong | "ping_pong" |
StreamingMethod.ListSubscription | "list_subscription" |
StreamingChannel.Data | "DATA" |
StreamingChannel.Heartbeat | "HEARTBEAT" |
StreamingChannel.Trading | "TRADING" |
DataTopic
Topic prefixes of the data channel. They end with a dot; append a symbol or index code to get the full topic.
| Constant | Value |
|---|---|
DataTopic.Quote | "quote." |
DataTopic.Trade | "trade." |
DataTopic.OddLot | "oddlot." |
DataTopic.Market | "market." |
DataTopic.Room | "room." |
DataTopic.Put | "put." |
DataTopic.IndexSummary | "indexsummary." |
DataType
Data type received via StreamingService.SetOnData (based on the topic prefix, without the dot).
| Constant | Value | Description |
|---|---|---|
DataType.Trade | "trade" | Trades (and index ticks trade.index.*) |
DataType.Quote | "quote" | Bid/ask quotes |
DataType.OddLot | "oddlot" | Odd lot |
DataType.Market | "market" | Market status |
DataType.Room | "room" | Foreign room |
DataType.Put | "put" | Put-through |
DataType.IndexSummary | "indexsummary" | Index summary |
For the models received for each type, see Streaming Models.
StreamingType
Event type received via StreamingService.SetOnTrading.
| Constant | Value | Description |
|---|---|---|
StreamingType.Order | "orderEvent" | Order status update |
StreamingType.OrderMatch | "orderMatchEvent" | Order match event |
StreamingType.Portfolio | "clientPortfolioEvent" | Portfolio change |
StreamingType.FCOOrder | "fcoOrderEvent" | Conditional order (FCO) status update |
Note: the SDK parser recognises FCO events by the literal
eventType = "fcoEvent", not by the constantStreamingType.FCOOrder("fcoOrderEvent"). The two values differ in the SDK source; do not compareeventTypewithStreamingType.FCOOrderwhen handling raw messages yourself. It has not been confirmed on a live server that FCO events are pushed over streaming, see Streaming Models.