Models
Response data models in the .NET SDK
All models live in the SsiSdk.Models namespace as sealed class (or record) types with auto-properties:
using SsiSdk.Models;General conventions since 3.3.x: money and prices are decimal (never double); a field the server may omit is nullable (int?, decimal?, string?) and is null when absent.
Authentication
Token
| Field | Type | Description |
|---|---|---|
AccessToken | string | Access token (a credential, never log it) |
TokenType | string | Token type (default "Bearer") |
ExpiresAt | long | Access token expiry, epoch seconds. 0 means unknown (treated as expired) |
RefreshToken | string | Refresh token (a credential) |
RefreshTokenExpiresAt | long | Refresh token expiry, epoch seconds. 0 means unknown |
EffectiveExpiresAt | long (read-only) | The earliest known expiry of the two tokens, or 0 if neither is known |
CanRefresh | bool (read-only) | Whether the refresh token can be used to renew |
Token.ToString() masks AccessToken and RefreshToken.
OtpResponse
Result of RequestOtpTypedAsync().
| Field | Type | Description |
|---|---|---|
Message | string | Message from the server |
TransactionId | string? | Smart OTP transaction id used to poll for approval, when the server issues one (null otherwise) |
Account
Account
| Field | Type | Description |
|---|---|---|
AccountNo | string | Account number |
AccountType | string? | An AccountType value ("Cash", "Margin", "Derivative"); the raw text if the type is not recognised; null when absent |
Market Data
OhlcData
| Field | Type | Description |
|---|---|---|
Symbol | string | Ticker symbol |
TradingDate | string | Trading date |
OpenPrice | decimal | Open price |
HighPrice | decimal | High price |
LowPrice | decimal | Low price |
ClosePrice | decimal | Close price |
Volume | int | Volume |
Value | decimal | Traded value |
MarketIndexes
| Field | Type | Description |
|---|---|---|
Index | string | Index code |
IndexName | string | Index name |
Board | string? | Board, as sent by the server (null when empty) |
MarketIndexSummary
| Field | Type | Description |
|---|---|---|
Index | string | Index code |
Board | string | Board |
TradingDate | string | Trading date |
IndexValue | decimal | Index value |
IndexChange | decimal | Change |
IndexChangePercent | decimal | Change (%) |
TotalTrade | int | Total traded volume |
TotalTradeValue | decimal | Total traded value |
TotalAdvanceStock | int | Advancing stocks |
TotalDeclineStock | int | Declining stocks |
TotalSteadyStock | int | Unchanged stocks |
TotalMatch | int | Total matched volume |
TotalMatchValue | decimal | Total matched value |
TotalDeal | int | Total put-through volume |
TotalDealValue | decimal | Total put-through value |
TotalCeilingStock | int | Stocks at ceiling |
TotalFloorStock | int | Stocks at floor |
TotalPropBuy / TotalPropSell | int | Proprietary buy / sell volume |
TotalPropBuyValue / TotalPropSellValue | decimal | Proprietary buy / sell value |
TotalBuyForeign / TotalSellForeign | decimal? | Foreign buy / sell volume |
TotalBuyForeignValue / TotalSellForeignValue | decimal? | Foreign buy / sell value |
NetPurchasesForeignVolume / NetPurchasesForeignValue | decimal? | Foreign net buy volume / value |
SecuritiesInfo
| Field | Type | Description |
|---|---|---|
Symbol | string | Ticker symbol |
Board | string? | Board |
Index | string | Index |
SymbolNameVi | string | Vietnamese name |
SymbolNameEn | string | English name |
LotSize | int? | Lot size (null when the server omits it) |
ListedShares | int? | Listed shares (null when the server omits it) |
IcbCode / IcbName | string? | ICB industry code / name |
MaturityDate | string? | Maturity date |
FirstTradingDate / LastTradingDate | string? | First / last trading date |
CwUnderlyingSymbol | string? | CW underlying symbol |
CwExercisePrice / CwExecutionRatio | decimal? | CW exercise price / ratio |
IIndex | decimal? | I-index |
INav | decimal? | iNAV |
OpenInterest | decimal? | Open interest |
SettlementPrice | decimal? | Settlement price |
StockType | string? | Security type |
SecuritiesSummary
| Field | Type | Description |
|---|---|---|
Symbol | string | Ticker symbol |
TradingDate | string | Trading date |
PriceChange / PriceChangePercent | decimal | Price change / price change (%) |
OpenPrice / HighPrice / LowPrice / ClosePrice | decimal | Open / high / low / close |
AveragePrice | decimal | Average price |
TotalMatch / TotalMatchValue | int / decimal | Matched volume / value |
TotalBuy / TotalTradeBuy | int / decimal | Buy volume / value |
TotalSell / TotalTradeSell | int / decimal | Sell volume / value |
TotalForeignBuy / TotalForeignSell | int | Foreign buy / sell volume |
TotalForeignBuyValue / TotalForeignSellValue | decimal | Foreign buy / sell value |
RemainForeignRoom / TotalForeignRoom | int | Remaining / total foreign room |
TotalDeal / TotalDealValue | int / decimal | Put-through volume / value |
OpenInterest / SettlementPrice | decimal | Open interest / settlement price |
Ceiling / Floor / RefPrice | decimal? | Ceiling / floor / reference price |
MasterData
| Field | Type | Description |
|---|---|---|
Board | string? | Board |
Symbol | string | Ticker symbol |
TradingDate | string | Trading date |
Ceiling | decimal | Ceiling price |
Floor | decimal | Floor price |
RefPrice | decimal | Reference price |
CorporateAction
Every field is a string exactly as the server sends it: dates stay YYYY/MM/DD text and Ratio is not parsed, because its meaning depends on the event type. A field the server leaves blank or omits is "" (not null).
| Field | Type | Description |
|---|---|---|
Symbol | string | Ticker symbol |
EventTitle | string | Event title |
ExrightDate | string | Ex-rights date |
RecordDate | string | Record date |
IssueDate | string | Issue date |
Exchange | string | Exchange |
Ratio | string | Ratio |
Returned by GetCorporateActionsAsync and GetCorporateActionsHistoricalAsync (section 3.7 of API Services).
DownloadDatais no longer part of the SDK: theDownload*methods throwNotImplementedException.
Portfolio
EquityAccountBalance
| Field | Type | Description |
|---|---|---|
AccountNo | string | Account number |
AccountBalance | decimal | Account balance (available cash) |
TotalDebt | decimal | Total debt |
InterestLoan | decimal | Loan interest |
OverdueFeeLoan | decimal | Overdue loan fee |
Withdrawable | decimal | Withdrawable cash |
OnHoldCash | decimal | Cash on hold |
SellUnmatched / BuyUnmatched | decimal | Unmatched sell / buy amount |
SellT0 / SellT1 / SellT2 | decimal | Sell amount T0 / T1 / T2 |
BuyT0 / BuyT1 / BuyT2 | decimal | Buy amount T0 / T1 / T2 |
AdvanceCashT0 / AdvanceCashT1 | decimal | Cash advance T0 / T1 |
HoldSubscription | decimal | Cash held for subscription |
Dividend | decimal | Dividend |
DerivativeAccountBalance
| Field | Type | Description |
|---|---|---|
AccountNo | string | Account number |
AccountBalance | decimal | Account balance |
Fee / Commission / Interest / ExtInterest | decimal | Fee / commission / interest |
Loan | decimal | Loan |
DeliveryAmount | decimal | Delivery amount |
FloatingPL / TradingPL / TotalPL | decimal | Floating / trading / total P&L |
Withdrawable | decimal | Withdrawable amount |
CashSSI / ValidNonCashSSI / WithdrawableSSI | decimal | Cash / valid non-cash assets / withdrawable (SSI) |
CashVSDC / ValidNonCashVSDC / WithdrawableVSDC | decimal | Same, at VSDC |
CashWithdrawableSSI and CashWithdrawableVSDC are old names marked [Obsolete]; use WithdrawableSSI and WithdrawableVSDC.
EquityPosition
| Field | Type | Description |
|---|---|---|
AccountNo | string | Account number |
Symbol | string | Ticker symbol |
Quantity | int | Total quantity |
SellableQuantity | int | Sellable quantity |
CostPrice | decimal | Cost price |
BuyingQuantity / SellingQuantity | int | Quantity being bought / sold |
BoughtQuantity / SoldQuantity | int | Quantity bought / sold |
MortgageQuantity | int | Mortgaged quantity |
BlockQuantity | int | Blocked quantity |
DividendQuantity | int | Dividend quantity |
T1SellQuantity / T2SellQuantity | int | T1 / T2 sell quantity |
T1BuyQuantity / T2BuyQuantity | int | T1 / T2 buy quantity |
RestrictedQuantity | int | Restricted quantity |
DerivativePosition
| Field | Type | Description |
|---|---|---|
AccountNo | string | Account number |
Symbol | string | Contract code |
Long / Short / Net | int | Long / short / net position |
BidAvgPrice / AskAvgPrice | decimal | Average buy / sell price |
TradePrice | decimal | Trade price |
FloatingPL / TradingPL | decimal | P&L |
AllDerivativePosition
| Field | Type | Description |
|---|---|---|
OpenPositions | List<DerivativePosition> | Open positions |
ClosedPositions | List<DerivativePosition> | Closed positions |
AccountNo | string | Account number |
Position
Positions of one account; a part the server did not return is null.
| Field | Type | Description |
|---|---|---|
Equity | List<EquityPosition>? | Equity positions |
Derivative | AllDerivativePosition? | Derivative positions |
Order
| Field | Type | Description |
|---|---|---|
AccountNo | string | Account number |
ClientRequestId | string | Client request ID |
OrderId | string | Order ID |
Symbol | string | Ticker symbol |
Side | string? | "B" / "S"; the raw text if not recognised; null when absent |
OrderType | string? | Order type (see OrderType); the raw text if not recognised; null when absent |
Price | decimal | Order price; 0 when the order has no numeric price (see PriceMarker) |
PriceMarker | string? | The price word the server sent instead of a number (for example "ATO", "MP"); null for a numeric price |
AvgPrice | decimal | Average matched price |
Quantity | int | Ordered quantity |
OsQuantity | int? | Outstanding quantity (null when the server omits it) |
FilledQuantity | int | Filled quantity |
CancelQuantity | int | Cancelled quantity |
Status | string? | Status code (see OrderStatus); the raw text if not recognised; null when absent |
InputTime / ModifyTime | string | Input / modify time |
Message | string | Message |
OrderBook
The orders of an account plus the total record count reported by the server.
| Field | Type | Description |
|---|---|---|
Orders | List<Order> | Orders |
TotalOrders | int | Total records |
EquityPPMMR / DerivativePPMMR
These two models carry many detailed margin metrics (margin ratio, limits, collateral, ...), all decimal. The most commonly used fields:
| Field | Type | Description |
|---|---|---|
AccountNo | string | Account number |
PurchasingPower (EquityPPMMR) | decimal | Purchasing power |
Withdrawable | decimal | Withdrawable cash/assets |
MarginRatio (EquityPPMMR) | decimal | Margin ratio |
TotalEquity | decimal | Total net equity |
AccountBalance | decimal | Account balance |
Trading Responses
PlaceOrderResponse
OrderId, ClientRequestId, Status: all string.
ModifyOrderResponse
ClientModifyId, OrderId, ClientRequestId, Status: all string.
CancelOrderResponse
ClientCancelId, OrderId, ClientRequestId, Status: all string.
MaxBuySellResponse
| Field | Type | Description |
|---|---|---|
AccountNo | string | Account number |
Symbol | string | Ticker symbol |
MaxBuyQuantity | int | Maximum buy quantity |
MaxSellQuantity | int | Maximum sell quantity |
MarginRatio | string? | Margin ratio |
PurchasingPower | long? | Purchasing power (VND); null when the server does not return it |
PurchasePower (a string) is the old name, marked [Obsolete]; use PurchasingPower.
Batch Order Models
The models used by PlaceBatchOrdersAsync and CancelBatchOrdersAsync (REST) and by batch over the Trading WebSocket. The methods, limits, behaviour and examples are in section 5.6 of API Services; this page only lists the structures.
The per-batch order limit is
Config.MaxBatchOrders(default 20). The API reference states a server-side limit of 50, which has not been checked against a live server; raisingMaxBatchOrdersis the caller's decision.
BatchPlaceOrderItem
A record with the same parameters as PlaceOrderAsync.
| Property | Type | Required | Description |
|---|---|---|---|
AccountNo | string | Yes | Trading account. Orders in one batch may belong to different accounts, but the API Key must be granted access to all of them. |
Symbol | string | Yes | Ticker symbol |
Side | string | Yes | OrderSide.Buy ("B") or OrderSide.Sell |
Quantity | int | Yes | Quantity, must be greater than 0 |
Price | decimal? | Yes | Price, must not be negative. null is sent as "0" for market-type orders. Required for OrderType.LO and OrderType.PLO. |
OrderType | string | Yes | OrderType.LO, OrderType.ATO, OrderType.ATC, OrderType.MP, ... |
ClientRequestId | string? | No | Your own order id, 1 to 20 characters. If null, the SDK generates one. |
BatchCancelOrderItem
| Property | Type | Required | Description |
|---|---|---|---|
AccountNo | string | Yes | Trading account |
OrderId | string? | One of the two | System-generated order id |
ClientRequestId | string? | One of the two | The ClientRequestId you used when placing the order |
Each cancel item needs exactly one of OrderId or ClientRequestId, otherwise ValidationException is thrown.
BatchOrderResponse
| Property | Type | Description |
|---|---|---|
BatchRequestId | string | Batch id returned |
Results | List<BatchOrderResult> | One element per order, in the same order as the request |
BatchOrderResult
| Property | Type | Description |
|---|---|---|
ClientRequestId | string | The order id you sent, or the generated one |
OrderId | string | System order id (when accepted) |
Status | string | Order status after the request (orderStatus) |
Success | bool | true if the order was accepted for processing |
ErrorCode | string | Error code of this order when Success is false |
ErrorMessage | string | Error description of this order when Success is false |
ClientCancelId | string | Cancel id, in cancel results |
Always check Success on every element of Results: a rejected order does not throw an exception.
Conditional Orders (FCO)
FcoPrice
The price field of a conditional order: a number (100.5m, 25000) or an order-type word ("MP", OrderType.MTL). A string is sent verbatim. There are implicit conversions from decimal, int, long and string. With a market word (ATO, ATC, MTL, MP, MOK, MAK) the price slip is not applied.
FCOPlaceResponse
Result of placing a conditional order: FCOID (string).
FCOCancelResponse
Result of cancelling a conditional order: FCOID (string).
FCOListResponse
List of conditional orders (paged).
| Field | Type | Description |
|---|---|---|
PageIndex | int | Current page |
PageSize | int | Page size |
ItemsCount | int | Total records |
PagesCount | int | Total pages |
FCOList | List<FCOInfo> | List of FCO orders |
FCOInfo
Details of one conditional order.
| Field | Type | Description |
|---|---|---|
FCOID | string | FCO order id |
ClientID | string | Username / Client ID |
AccountNo | string | Account number |
Quantity | int | Ordered quantity |
Price | string | Order price |
PriceSlip | decimal? | Price slip |
Symbol | string | Ticker symbol |
Type | string? | Conditional order type (see FCOType) |
FromDate | string | Effective from |
ToDate | string | Effective until |
MatchedQuantity | int | Matched quantity |
IsPlaceOrder | bool | Whether the order has been sent to the order book |
Status | string? | FCO status (see FCOStatus) |
Detail | string | Status detail |
Params | FCOParams? | Trigger parameters of the FCO order |
OrderType | string? | Order type |
FCOParams
Trigger parameters of a conditional order. A value that is not set is null.
| Field | Type | Description |
|---|---|---|
StopPrice | decimal? | Stop / trigger price |
Side | string? | Order side (Buy/Sell) |
ActivePrice | decimal? | Activation price (Trailing Stop) |
TrailingAmount | decimal? | Trailing amount |
TPActivePrice | decimal? | Take Profit activation price |
SLActivePrice | decimal? | Stop Loss activation price |
TPPrice | string? | Take Profit price |
SLPrice | string? | Stop Loss price |
TPSlip | decimal? | Take Profit slip |
SLSlip | decimal? | Stop Loss slip |
Operator | string? | Comparison operator that triggers the order (see FCOOperator). The server may return a number 0..4 in responses; the SDK maps it back to the name |
FCOOrderBookResponse
FCO matching log (paged).
| Field | Type | Description |
|---|---|---|
PageIndex | int | Current page |
PageSize | int | Page size |
ItemsCount | int | Total records |
PagesCount | int | Total pages |
OrderBook | List<FCOOrder> | FCO order log |
FCOOrder
Execution log of an FCO order.
| Field | Type | Description |
|---|---|---|
FCOID | string | Parent FCO id |
AccountNo | string | Account number |
Quantity | int | Quantity |
Price | string | Order price |
Symbol | string | Ticker symbol |
Side | string? | Order side |
OrderType | string? | Child order type |
IsMainOrder | bool | Is the main order |
IsAttachedOrder | bool | Is an attached order |
CreatedTime / UpdatedTime | string | Created / updated time |
UniqueID | string | Unique id |
OrderID | string | Order id on the exchange |
MatchedQuantity | int | Matched quantity |
OSQuantity | int | Outstanding quantity |
AvgPrice | decimal | Average matched price |
Status | string? | Child order status |
Detail | string | Detail |
Type | string? | Conditional order type |
FCOStatusHistoryItem
One status transition of an FCO order.
| Field | Type | Description |
|---|---|---|
State | string | State |
Time | string | Time |
Code | string? | Code |
Detail | string | Detail |
Streaming Models
Streaming messages are sealed class types in SsiSdk.Models. They arrive through SetOnData / OnData (market data) and SetOnTrading (trading events) typed as object: check the type with pattern matching. A frame the SDK has no model for stays a raw JsonElement. How to subscribe is covered in section 6 of API Services.
The parser picks the model from the topic of a data frame:
| Topic | Model |
|---|---|
trade.index.CODE | IndexTickMessage |
trade.index.CODE@1m / @5m | IntervalMessage |
trade.CODE | TradeMessage |
trade.CODE@1m / @5m | IntervalMessage |
quote.CODE | QuoteMessage |
room.CODE | ForeignRoomMessage |
indexsummary.CODE | IndexSummaryMessage |
market.flag | MarketFlagMessage |
market.* (has s, ce, fl or ref) | MarketDataMessage |
market.* (otherwise) | MarketStatusMessage |
put.CODE | PutMessage |
oddlot.CODE | OddLotMessage |
Trading events are chosen by eventType: orderEvent is OrderStatusMessage, orderMatchEvent is OrderMatchMessage, clientPortfolioEvent is PortfolioMessage, fcoEvent is FCOOrderUpdateMessage. When there is no eventType, an order.* topic is treated as OrderStatusMessage and portfolio.* as PortfolioMessage.
Unconfirmed: the SDK only maps server keys to properties. The exact meaning of each tick field (units, whether it is cumulative over the session, for example
Value,TotalMatchQuantity, and theOpen/High/Low/Avgfields ofTradeMessage) has not been confirmed against a live server. UseRaworDatawhen you need to cross-check, and do not base critical logic on them before verifying.
HeartbeatMessage
Method, Channel, Status, Message: all string.
TradeMessage
| Field | Type | Server key | Description |
|---|---|---|---|
Type | string | Data type | |
TradingTime | string | t | Trading time |
Symbol | string | s | Ticker symbol |
Price | decimal | p | Matched price |
Quantity | int | q | Matched quantity |
Side | string | si | Match side; defaults to "U" when the server omits it |
TotalVolume | int | v | Total volume |
Open / High / Low / Avg | decimal? | o, h, l, a | null when the server omits them |
IndexTickMessage
The tick of the index itself, from trade.index.CODE.
| Property | Type | Server key | Description |
|---|---|---|---|
Type | string | Message type (trade) | |
Symbol | string | s | Index code |
Board | string | b | Board |
Status | string | ss | Index status |
TradingTime | string | t | Trading time |
Value | decimal? | v | Index value |
Change | decimal? | c | Change (points) |
ChangePercent | decimal? | cr | Change (%) |
Advances | decimal? | adv | Advancing stocks |
Declines | decimal? | dec | Declining stocks |
NoChange | decimal? | nc | Unchanged stocks |
Ceilings | decimal? | ce | Stocks at ceiling |
Floors | decimal? | fl | Stocks at floor |
TotalMatchValue | decimal? | tmv | Matched value |
TotalMatchQuantity | decimal? | tmq | Matched quantity |
TotalPutValue | decimal? | tvp | Put-through value |
TotalPutQuantity | decimal? | tqp | Put-through quantity |
TotalQuantity | decimal? | tq | Total quantity |
TotalValue | decimal? | tv | Total value |
Raw | Dictionary<string, JsonElement> | The payload exactly as the server sent it |
Numeric fields are null when the server omits them. Use Raw for keys the SDK does not map. The "Description" column is the SDK's naming and is not confirmed against the server (see the note at the top of this section).
IntervalMessage
A candle, from trade.CODE@1m / @5m or trade.index.CODE@1m / @5m.
| Property | Type | Server key | Description |
|---|---|---|---|
Type | string | Message type (trade) | |
IntervalTime | string | st | Candle start time |
TradingTime | string | t | Trading time |
Symbol | string | s | Symbol |
Open, High, Low, Close | decimal | o, h, l, c | Candle prices |
Volume | int | v | Volume |
IndexSummaryMessage
From indexsummary.CODE.
| Member | Type | Description |
|---|---|---|
Index | string | Index code, upper case |
Data | Dictionary<string, JsonElement> | The fields exactly as the server sent them (not mapped to typed properties) |
Get(params string[] keys) | JsonElement? | The first key present in Data, or null |
The API reference lists the index summary keys: s, b, ss, t, v, c, cr, adv, dec, nc, ce, fl, tmv, tmq, tvp, tqp, tq, tv, with the same meaning as in the tick table above. tq equals tmq plus tqp, and tv equals tmv plus tvp.
stream.Streaming.OnIndexSummary = m =>
{
// Get returns the first key that is present (a JsonElement), or null
Console.WriteLine($"{m.Index}: v={m.Get("v")} ({m.Data.Count} fields)");
};QuoteMessage
| Field | Type | Description |
|---|---|---|
Type | string | Data type |
TradingTime | string | Time |
Symbol | string | Ticker symbol |
BidPrices / AskPrices | List<decimal> | Bid / ask price levels |
BidVolumes / AskVolumes | List<int> | Volume of each level |
MarketStatusMessage
Market, Status, TradingDate: all string.
MarketFlagMessage
Market session flag (ATO, LO, ATC, ...), from the market.flag topic.
| Field | Type | Server key | Description |
|---|---|---|---|
Board | string | b | Board |
TradingTime | string | t | Time |
Flag | string | f | Session flag |
MarketDataMessage
Reference data (ceiling, floor, reference) of one symbol, from market.SYMBOL.
| Field | Type | Server key | Description |
|---|---|---|---|
Symbol | string | s | Ticker symbol |
Board | string | b | Board |
TradingTime | string | t | Time |
Ceiling / Floor / RefPrice | decimal? | ce, fl, ref | Ceiling / floor / reference price |
ForeignRoomMessage
Type, TradingTime, Symbol (string); TotalRoom, CurrentRoom, BuyQuantity, SellQuantity (int); BuyValue, SellValue (long).
PutMessage
Type, TradingTime, Symbol (string); Price (decimal); Quantity, TotalQuantity (int); TotalValue (long).
OddLotMessage
Type, TradingTime, Symbol (string); Price (decimal); Quantity (int); BidPrices, AskPrices (List<decimal>); BidVolumes, AskVolumes (List<int>).
OrderStatusMessage
Order status update (orderEvent, topic order.<accountNo>).
| Field | Type | Description |
|---|---|---|
Type | string | Event type |
AccountNo | string | Account number |
ClientRequestId / OrderId | string | Client request id / order id |
Symbol | string | Ticker symbol |
Side | string? | "B" / "S"; the raw text if not recognised |
OrderType | string? | Order type |
Price | decimal | Order price; 0 when the server sent a price word (see PriceMarker) |
PriceMarker | string? | Price word sent instead of a number (for example "ATO") |
Quantity / OsQuantity / FilledQuantity / CancelQuantity | int | Ordered / outstanding / filled / cancelled quantity |
AvgPrice | decimal | Average matched price |
Status | string? | Status code (see OrderStatus) |
InputTime / ModifiedTime | string | Input / modified time. ModifyTime is the old name, [Obsolete] |
Message | string | Message |
RejectReason | string | Reject reason |
SystemRequestId, ErrorCode, ErrorMessage, NotifyId, ConnectionId | string | System and error information carried with the event |
OrderMatchMessage
One match of an order (orderMatchEvent).
| Field | Type | Description |
|---|---|---|
Type | string | Event type |
NotifyId, ConnectionId | string | System information |
ClientRequestId / OrderId | string | Client request id / order id |
Symbol | string | Ticker symbol |
Side | string? | "B" / "S" |
AccountNo | string | Account number |
MatchPrice | decimal | Matched price |
MatchQty | int | Matched quantity |
MatchTime | string | Match time |
PortfolioMessage
Position update (clientPortfolioEvent, derivative accounts only). A value the server does not send is null.
| Field | Type | Description |
|---|---|---|
Type | string | Event type |
AccountNo | string | Account number |
Symbol | string | Contract code |
LongQty / ShortQty / Net | int | Long / short / net quantity |
BidAvgPrice / AskAvgPrice | decimal? | Average buy / sell price |
TradePrice / MarketPrice | decimal? | Trade price / market price |
FloatingPL / TradingPL | decimal? | Floating / trading P&L |
PositionType | string | Position type |
TotalAsset, CashBalance and StockValue are still in the class but deprecated: the server never sends them, so they are always null.
FCOOrderUpdateMessage
Status update of a conditional (FCO) order, received through SetOnTrading when eventType is "fcoEvent". No fco_order.* or fco.* topic is parsed separately.
Unconfirmed: the SDK code parses
fcoEvent, but the SDK CHANGELOG listsfcoEventstreaming as not implemented. It has not been verified against a live server; do not rely on this stream for critical logic.
| Field | Type | Description |
|---|---|---|
FCOID | string | FCO order id |
ProcessStatus | string? | Processing status of the FCO order (INIT, WAIT, WC, TER, ... see FCOStatus) |
MatchedQuantity | int | Matched quantity |
IsPlaceOrder | bool | Whether the order has been sent to the order book |
Symbol | string | Ticker symbol |
Quantity | int | Ordered quantity |
Price | string | Order price |
AccountNo | string | Account number |
UpdatedTime | string | Updated time |
Status | string | Status code |
Message | string | Detail message / trigger reason |
Username | string | Username that placed the order |
EventType | string | Event type ("fcoEvent") |
FCOType | string? | Conditional order type (gtd, stop, ... see FCOType) |
ConnectionEvent
record ConnectionEvent(string State, int ReconnectCount = 0, Exception? Error = null), received through OnConnection. State is one of the ConnectionState constants: "connected", "reconnected", "disconnected", "failed". ReconnectCount is the number of reconnects; Error is the accompanying exception when there is one.
TradingWsResponse
A successful frame from the Trading WebSocket (namespace SsiSdk, not SsiSdk.Models). See section 7 of API Services.
| Field | Type | Description |
|---|---|---|
Id | string | Request id of the command |
Method | string | Name of the method that was sent |
Status | int | Status code, default 200 |
Result | JsonElement | The result part; Undefined when the frame has none |
RateLimit | IReadOnlyDictionary<string, JsonElement> | Limits the server reported with the frame (limit / remaining / resetMs) |
ReceivedTime | long? | Time the server received the command |
Other
RateLimitInfo
record RateLimitInfo(int? Limit, int? Remaining): rate-limit information of the latest response, read through auth.RateLimit.