TypeScript types
The types of answers, requests and stream frames.
Decimal
type Decimal = stringA decimal number as the terminal sends it: "67000.10" stays "67000.10".
Never convert it with Number() — bring a decimal library if you need
arithmetic.
Timestamp
type Timestamp = numberUTC milliseconds since the epoch, an integer.
InstrumentAddress
type InstrumentAddress = stringInstrument address: exchange:market:symbol, exchange in lower case.
Side
type Side = "buy" | "sell"Trade side.
Scope
type Scope = "market:read" | "connections:read" | "account:read" | "trading:write" | OpenStringToken scopes known to v1. New scopes may appear within v1.
MarketTopic
type MarketTopic = "trades" | "ticker" | "mark_price" | "book.top" | "clusters"Market topics: instrument is required on subscribe, connection_id is chosen by the general rule.
AccountTopic
type AccountTopic = "account.orders" | "account.positions" | "account.balances" | "account.fills"Account topics: connection_id is required on subscribe, instrument is not used.
TerminalTopic
type TerminalTopic = "workspace" | "settings"The terminal's own topics: one per terminal, subscribed without instrument or connection.
WorkspaceTopic
type WorkspaceTopic = "workspace"Topic
type Topic = MarketTopic | AccountTopic | TerminalTopicStream topics known to v1.
ErrorCode
type ErrorCode = | "unauthorized"
| "forbidden"
| "forbidden_scope"
| "not_found"
| "invalid_request"
| "unsupported"
| "not_active"
| "rate_limited"
| "not_tradable"
| "unavailable"
| OpenStringError codes of the contract. New codes may appear within v1.
ConnectionState
type ConnectionState = "disabled" | "enabled" | "connecting" | "connected" | "failed"status.state of a connection.
OrderType
type OrderType = "limit" | "market"Order type: limit needs a price, market takes none.
OrderStatus
type OrderStatus = "pending" | "open" | "partially_filled"Status of an open order.
TriggerType
type TriggerType = "stop_loss" | "take_profit" | "stop"Kind of a trigger order.
TriggerRule
type TriggerRule = "price_above_or_equal" | "price_below_or_equal"When a trigger fires.
TriggerStatus
type TriggerStatus = "open" | "finished" | "inactive" | "invalid"Status of a trigger order.
PositionSide
type PositionSide = "long" | "short"Side of a position.
TimeInForce
type TimeInForce = "gtc" | "ioc" | "fok" | "post_only"Time in force of a placed order; absent — the venue's default.
ErrorEnvelope
The error envelope every non-2xx response carries.
| Field | Type | Description |
|---|---|---|
error | { code: ErrorCode; message: string; } |
List
Lists are wrapped as { data: [...] }.
| Field | Type | Description |
|---|---|---|
data | T[] |
Limits
Limits printed by /v1/meta.
| Field | Type | Description |
|---|---|---|
ws_connections_per_token | number | |
subscriptions_per_connection | number | |
api_only_instruments | number | |
exchange_subscriptions_per_second | number | |
commands_per_secondoptional | number | Trading commands per second per listener. Absent on terminals older than the writing stage of the Local API. |
workspace_commands_per_secondoptional | number | Workspace commands per second per listener. Absent before the window stage. |
settings_commands_per_secondoptional | number | Settings writes per second per listener. Absent before the settings stage. |
Meta
GET /v1/meta.
| Field | Type | Description |
|---|---|---|
api_version | string | "1" for this contract. |
app_version | string | |
build_hash | string | |
build_env | string | |
features | string | Enabled build features, as one string. |
scopes | Scope[] | Scopes granted to the token used for the request. |
limits | Limits | |
topics | Topic[] | Empty when the terminal was built without the market-data tap. |
Health
GET /v1/health.
| Field | Type | Description |
|---|---|---|
status | string | |
uptime_ms | number | |
clients | number | Open stream connections. |
streams | number | Pairs the hub holds. |
api_only_instruments | number | Pairs opened only for the API. |
dropped_events | number | Events the hub did not accept from the market-data loop. |
dropped_frames | number | Frames that did not fit into client queues. |
overflow_closes | number | Clients closed with code 4008. |
stream_available | boolean | false when the build has no market-data tap. |
ConnectionEvent
The last record of a connection's history.
| Field | Type | Description |
|---|---|---|
code | string | A code from the same feed the Settings App shows. |
ts | Timestamp |
ConnectionStatus
Connection status derived from the toggle and the history feed.
| Field | Type | Description |
|---|---|---|
state | ConnectionState | |
last_eventoptional | ConnectionEvent | Absent when the connection has no history record in this session. |
Connection
A terminal connection. Carries no secrets: no keys, no address, no mask.
| Field | Type | Description |
|---|---|---|
id | number | |
exchange | string | Exchange name in lower case, as in instrument addresses. |
market | string | spot, futures, … |
label | string | |
enabled | boolean | |
read_only | boolean | A connection without credentials, created by the terminal for market data. |
has_credentials | boolean | |
proxy_bound | boolean | |
status | ConnectionStatus |
Instrument
An instrument of the exchange catalogue.
| Field | Type | Description |
|---|---|---|
instrument | InstrumentAddress | |
exchange | string | |
market | string | |
symbol | string | |
base | string | |
quote | string | |
status | string | As the exchange reported it: active, inactive, … |
tick_size | Decimal | null | null when the exchange did not report it. |
lot_size | Decimal | null | |
min_size | Decimal | null | |
contract_value | Decimal | null |
InstrumentsPage
One page of GET /v1/instruments.
| Field | Type | Description |
|---|---|---|
exchange | string | |
market | string | |
data | Instrument[] | |
next_cursor | string | null | Pass as cursor for the next page; null on the last page. |
Candle
A candle; ts is the bar open, volume is in the base coin.
| Field | Type | Description |
|---|---|---|
ts | Timestamp | |
open | Decimal | |
high | Decimal | |
low | Decimal | |
close | Decimal | |
volume | Decimal | |
quote_volume | Decimal | |
closed | boolean |
Candles
GET /v1/market/candles.
| Field | Type | Description |
|---|---|---|
instrument | InstrumentAddress | |
connection_id | number | |
interval | string | |
data | Candle[] |
Interval
An interval the terminal knows; duration_ms is nominal (30 days for 1M).
| Field | Type | Description |
|---|---|---|
id | string | |
duration_ms | number |
Intervals
GET /v1/market/intervals.
| Field | Type | Description |
|---|---|---|
candles | Interval[] | |
clusters | Interval[] |
Trade
A trade. ts is when it passed through the terminal.
| Field | Type | Description |
|---|---|---|
id | string | null | Exchange trade id; always null in v1. |
price | Decimal | |
qty | Decimal | |
side | Side | |
ts | Timestamp | |
exchange_ts | Timestamp |
Trades
GET /v1/market/trades, oldest to newest.
| Field | Type | Description |
|---|---|---|
instrument | InstrumentAddress | |
connection_id | number | |
data | Trade[] |
Level
type Level = [price: Decimal, size: Decimal]A book level as [price, size].
Ticker
The 24h ticker.
| Field | Type | Description |
|---|---|---|
price | Decimal | |
change_24h_pct | Decimal | null | |
volume_24h | Decimal | |
high_24h | Decimal | null | |
low_24h | Decimal | null | |
best_bid | Decimal | null | |
best_ask | Decimal | null | |
ts | Timestamp |
MarkPrice
Mark price, the data of a mark_price event.
| Field | Type | Description |
|---|---|---|
mark_price | Decimal | |
ts | Timestamp |
Snapshot
GET /v1/market/snapshot: the latest the hub knows about the pair.
| Field | Type | Description |
|---|---|---|
instrument | InstrumentAddress | |
connection_id | number | |
ts | Timestamp | |
best_bid | Level | null | From the hub's book; null until a book snapshot has arrived. |
best_ask | Level | null | |
last_trade | Trade | null | |
mark_price | Decimal | null | |
ticker | Ticker | null |
BookTop
Top of the book: bids from the best downwards, asks from the best upwards.
| Field | Type | Description |
|---|---|---|
ts | Timestamp | |
depth | number | |
bids | Level[] | |
asks | Level[] |
Orderbook
interface Orderbook extends BookTopGET /v1/market/orderbook.
| Field | Type | Description |
|---|---|---|
instrument | InstrumentAddress | |
connection_id | number |
ClusterLevel
One price level of a cluster bucket.
| Field | Type | Description |
|---|---|---|
price | Decimal | |
volume | Decimal | |
buy_volume | Decimal | |
sell_volume | Decimal | |
buy_trades | number | |
sell_trades | number |
ClusterBucket
A cluster bucket; levels run from the lowest price to the highest.
| Field | Type | Description |
|---|---|---|
interval | string | |
ts | Timestamp | Bucket start. |
end_ts | Timestamp | |
volume | Decimal | |
buy_volume | Decimal | |
sell_volume | Decimal | |
trades | number | |
vwap | Decimal | null | null for a bucket without trades. |
min_price | Decimal | null | |
max_price | Decimal | null | |
completed | boolean | |
last_trade_ts | Timestamp | 0 for a bucket from history without a trade time. |
levels | ClusterLevel[] |
Clusters
GET /v1/market/clusters, oldest to newest, at most ten buckets.
| Field | Type | Description |
|---|---|---|
instrument | InstrumentAddress | |
connection_id | number | |
interval | string | The interval selected for the instrument in the terminal. |
ts | Timestamp | |
data | ClusterBucket[] |
Order
An open order of a connection.
| Field | Type | Description |
|---|---|---|
key | string | null | The terminal's order key (t-…); null while unknown. |
exchange_id | string | null | The exchange's order id; null while unknown. |
instrument | InstrumentAddress | |
side | Side | |
type | OrderType | |
price | Decimal | |
size | Decimal | In the base coin. |
filled | Decimal | |
remaining | Decimal | |
notional | Decimal | null | The quote amount the trader entered; null for an order from an exchange snapshot. |
status | OrderStatus | |
created_ts | Timestamp |
TriggerOrder
A trigger order (stop loss, take profit, stop) of a connection.
| Field | Type | Description |
|---|---|---|
id | string | |
instrument | InstrumentAddress | |
type | TriggerType | |
trigger_price | Decimal | |
rule | TriggerRule | |
size | Decimal | null | |
notional | Decimal | null | |
status | TriggerStatus | |
order_type | string | null | The order placed when the trigger fires; null when unknown. |
client_id | string | null | |
created_ts | Timestamp | null |
AccountOrders
GET /v1/account/orders: open orders and trigger orders of one connection.
| Field | Type | Description |
|---|---|---|
connection_id | number | |
data | Order[] | |
triggers | TriggerOrder[] |
Position
An open position.
| Field | Type | Description |
|---|---|---|
instrument | InstrumentAddress | |
side | PositionSide | |
size | Decimal | In the base coin; on MOEX in lots. |
lot_size | Decimal | Base units per lot. |
entry_price | Decimal | |
notional | Decimal | In the quote. |
unrealized_pnl | Decimal | As the terminal computes it. |
mark_price | Decimal | null | The terminal's mark: best bid for a long, best ask for a short; null until the first book tick. |
AccountPositions
GET /v1/account/positions.
| Field | Type | Description |
|---|---|---|
connection_id | number | |
data | Position[] |
Balance
The latest balance of one currency, as the exchange reported it.
| Field | Type | Description |
|---|---|---|
currency | string | |
total | Decimal | |
available | Decimal | null | null when the venue does not report it. |
locked | Decimal | null | |
ts | Timestamp | Exchange time where there is one, otherwise the receive time. |
AccountBalances
GET /v1/account/balances: currencies that changed since the API was switched on.
| Field | Type | Description |
|---|---|---|
connection_id | number | |
data | Balance[] |
Fill
A fill of the connection's own order.
| Field | Type | Description |
|---|---|---|
trade_id | string | |
order_id | string | |
instrument | InstrumentAddress | |
side | Side | |
price | Decimal | |
qty | Decimal | |
fee | Decimal | |
fee_currency | string | |
position_side | PositionSide | null | long / short on hedged venues, otherwise null. |
ts | Timestamp |
AccountFills
GET /v1/account/fills, oldest to newest.
| Field | Type | Description |
|---|---|---|
connection_id | number | |
data | Fill[] |
PlaceOrderRequest
The body of POST /v1/orders as sent on the wire.
| Field | Type | Description |
|---|---|---|
connection_id | number | |
instrument | InstrumentAddress | |
side | Side | |
type | OrderType | |
priceoptional | Decimal | Required for limit, absent for market. |
sizeoptional | Decimal | Amount in the base coin; exactly one of size and notional. |
notionaloptional | Decimal | The quote amount; exactly one of size and notional. |
reduce_onlyoptional | boolean | |
post_onlyoptional | boolean | |
time_in_forceoptional | TimeInForce | |
client_keyoptional | string | Idempotency key: a repeat with the same key returns the previous answer. |
InstrumentCommandRequest
The body of POST /v1/orders/cancel-all, POST /v1/orders/trigger/cancel-all and POST /v1/positions/close.
| Field | Type | Description |
|---|---|---|
connection_id | number | |
instrument | InstrumentAddress |
PlaceTriggerRequest
The body of POST /v1/orders/trigger. stop_loss and take_profit are
placed on the open position (side, size and rule come from it); a stop
carries its own side, notional and optional rule.
| Field | Type | Description |
|---|---|---|
connection_id | number | |
instrument | InstrumentAddress | |
kind | TriggerType | |
trigger_price | Decimal | |
sideoptional | Side | stop only. |
notionaloptional | Decimal | stop only: the quote amount. |
ruleoptional | TriggerRule | stop only; absent means above the market for a buy, below for a sell. |
client_keyoptional | string | Idempotency key, as for POST /v1/orders. |
AmendTriggerRequest
The body of PATCH /v1/orders/trigger/{id}: a new trigger price.
| Field | Type | Description |
|---|---|---|
connection_id | number | |
instrument | InstrumentAddress | |
kind | TriggerType | |
trigger_price | Decimal | |
sideoptional | Side | stop only. |
ruleoptional | TriggerRule | stop only. |
LeverageMode
type LeverageMode = "manual" | "max" | "smart"The terminal's leverage mode of an instrument, not the exchange's.
MarginMode
type MarginMode = "cross" | "isolated"Margin mode of a futures instrument.
Leverage
GET /v1/account/leverage: leverage and margin mode of one futures
instrument, from the terminal's cache. An instrument the terminal has not
touched yet answers 409 not_active.
| Field | Type | Description |
|---|---|---|
connection_id | number | |
instrument | InstrumentAddress | |
leverage | number | |
max_leverage | number | |
mode | LeverageMode | |
margin_mode | MarginMode |
SetLeverageRequest
The body of POST /v1/account/leverage: exactly one of leverage and mode.
| Field | Type | Description |
|---|---|---|
connection_id | number | |
instrument | InstrumentAddress | |
leverageoptional | number | An integer of at least 1. |
modeoptional | "max" | "smart" |
SetMarginModeRequest
The body of POST /v1/account/margin-mode.
| Field | Type | Description |
|---|---|---|
connection_id | number | |
instrument | InstrumentAddress | |
margin_mode | MarginMode |
Accepted
The answer of every trading command: accepted by the terminal, not by
the exchange. The exchange's confirmation, fill or rejection arrives
through account.orders in the stream or GET /v1/account/orders.
| Field | Type | Description |
|---|---|---|
accepted | boolean | |
operation_id | string | The operation in the terminal's operations file. |
key | string | null | The terminal's key under which the order (t-…) or trigger (sl_…,
tp_…, stop_…) appears in account.orders; null for cancellations,
amendments and leverage. |
connection_id | number | |
instrument | InstrumentAddress |
CellPosition
A cell of a tab's grid: column left to right, row top to bottom, cell within the row.
| Field | Type | Description |
|---|---|---|
column | number | |
row | number | |
cell | number |
Stack
A stack — order book with its trade tape and clusters — inside a tab.
widget_id is global for this run of the terminal; instrument and
connection_id are null while the stack is empty; position is
null for a stack hidden inside a stack group.
| Field | Type | Description |
|---|---|---|
widget_id | number | |
instrument | InstrumentAddress | null | |
connection_id | number | null | |
empty | boolean | |
frozen | boolean | |
position | CellPosition | null |
Chart
A chart inside a tab; owner_widget_id is the stack it follows, null when standalone.
| Field | Type | Description |
|---|---|---|
widget_id | number | |
instrument | InstrumentAddress | null | |
connection_id | number | null | |
interval | string | Candle interval code (1m, 5m, …). |
owner_widget_id | number | null | |
position | CellPosition | null |
Tab
A tab of a window: id is numbered per window from 1; exactly one tab per window is active.
| Field | Type | Description |
|---|---|---|
id | number | |
name | string | |
active | boolean | |
stacks | Stack[] | |
charts | Chart[] |
WindowGeometry
Window position and size in logical screen pixels.
| Field | Type | Description |
|---|---|---|
x | number | |
y | number | |
width | number | |
height | number | |
maximized | boolean |
Window
A terminal window; main cannot be closed through the API, chart_window is a torn-off chart.
| Field | Type | Description |
|---|---|---|
id | number | |
main | boolean | |
chart_window | boolean | |
focused | boolean | |
geometry | WindowGeometry | |
monitor | string | null | The OS's monitor name, or null. |
tabs | Tab[] |
WorkspaceSnapshot
data of GET /v1/workspace and of a workspace event: every window, by ascending id.
| Field | Type | Description |
|---|---|---|
windows | Window[] |
Workspace
GET /v1/workspace. The ids are internal to this run of the terminal.
| Field | Type | Description |
|---|---|---|
data | WorkspaceSnapshot |
WorkspaceWindow
GET /v1/workspace/windows/{id}.
| Field | Type | Description |
|---|---|---|
data | Window |
OpenTarget
type OpenTarget = "new_tab" | "new_window"Where a workspace opening lands.
OpenStackRequest
The body of POST /v1/workspace/stacks.
| Field | Type | Description |
|---|---|---|
instrument | InstrumentAddress | |
connection_idoptional | number | |
chartoptional | boolean | A chart of the same instrument over the stack. |
targetoptional | OpenTarget | new_tab (default) or new_window. |
window_idoptional | number | The window for a new tab; the focused window when omitted. |
activateoptional | boolean | false opens the tab in the background; a new window always takes focus. |
OpenMultiviewRequest
The body of POST /v1/workspace/multiview.
| Field | Type | Description |
|---|---|---|
base | string | A coin (BTC) or a pair (BTC/USDT). |
targetoptional | OpenTarget | Omitted: the Multiview «open as» setting decides. |
window_idoptional | number | |
activateoptional | boolean |
TabItemRequest
One column of POST /v1/workspace/tabs and …/tabs/{tab}/stacks: a stack and, with chart, a chart over it.
| Field | Type | Description |
|---|---|---|
instrument | InstrumentAddress | |
connection_idoptional | number | |
chartoptional | boolean |
OpenTabRequest
The body of POST /v1/workspace/tabs: a column per item, one to fifty.
| Field | Type | Description |
|---|---|---|
items | TabItemRequest[] | |
nameoptional | string | Up to 64 characters; omitted, the terminal names the tab after the instruments. |
targetoptional | OpenTarget | |
window_idoptional | number | |
activateoptional | boolean |
AddStacksRequest
The body of POST /v1/workspace/windows/{id}/tabs/{tab}/stacks.
| Field | Type | Description |
|---|---|---|
items | TabItemRequest[] |
StackInstrumentRequest
The body of PATCH /v1/workspace/stacks/{widget_id}.
| Field | Type | Description |
|---|---|---|
instrument | InstrumentAddress | |
connection_idoptional | number |
WorkspaceOutcome
What the window did for a workspace command. For an opening: the window,
the new tab and its stacks and charts in column order. For closing and
activating: the touched ids, the rest null or empty.
| Field | Type | Description |
|---|---|---|
window_id | number | null | |
tab_id | number | null | |
stacks | number[] | |
charts | number[] |
SettingRow
One row of the terminal's settings table, as stored. scope is global
or order_book; scope_id is default, an instrument address, or null
for hotkeys; connection_id is the owning connection or null. value
is the decoded JSON, numbers as written. writable says whether
PATCH /v1/settings accepts the key; a settings stream frame carries no
such flag.
| Field | Type | Description |
|---|---|---|
scope | string | |
scope_id | string | null | |
connection_id | number | null | |
category | string | |
key | string | |
value | unknown | |
writableoptional | boolean |
Settings
GET /v1/settings: rows as stored, without the default ladder.
| Field | Type | Description |
|---|---|---|
data | SettingRow[] |
ResolvedFrom
type ResolvedFrom = "instrument" | "connection" | "app_instrument" | "global" | OpenStringThe level a stack setting was resolved from.
OrderbookSetting
One stack setting with the level it came from.
| Field | Type | Description |
|---|---|---|
value | unknown | |
resolved_from | ResolvedFrom | |
writable | boolean |
OrderbookSettings
GET /v1/settings/orderbook: data[category][key] as the instrument's stack sees them.
| Field | Type | Description |
|---|---|---|
connection_id | number | |
instrument | InstrumentAddress | |
data | Record<string, Record<string, OrderbookSetting>> |
SettingChange
One change of PATCH /v1/settings. instrument addresses the pair's row
(scope order_book); connection_id with scope: "order_book" and no
instrument addresses the connection's default; neither addresses the
global default. Global settings take no connection.
| Field | Type | Description |
|---|---|---|
scopeoptional | "global" | "order_book" | |
instrumentoptional | InstrumentAddress | |
connection_idoptional | number | |
category | string | |
key | string | |
value | unknown |
UpdateSettingsRequest
The body of PATCH /v1/settings.
| Field | Type | Description |
|---|---|---|
changes | SettingChange[] |
SettingsApplied
PATCH /v1/settings: how many changes were applied (all of them, or the call rejected).
| Field | Type | Description |
|---|---|---|
applied | number |
BookTopParams
Parameters of a book.top subscription; other topics take none. Wire names.
| Field | Type | Description |
|---|---|---|
depthoptional | number | 1–200, default 50. |
interval_msoptional | number | Conflation interval, at least 50, default 100. |
SubscribeRequest
A subscribe request as sent on the wire.
| Field | Type | Description |
|---|---|---|
type | "subscribe" | |
request_id | string | |
topic | Topic | |
instrumentoptional | InstrumentAddress | Required for market topics, omitted for account.*. |
connection_idoptional | number | Chosen by the general rule for market topics, required for account.*. |
paramsoptional | BookTopParams |
UnsubscribeRequest
An unsubscribe request as sent on the wire.
| Field | Type | Description |
|---|---|---|
type | "unsubscribe" | |
request_id | string | |
sub | string |
SubscribedFrame
Server reply to subscribe.
| Field | Type | Description |
|---|---|---|
type | "subscribed" | |
request_idoptional | string | |
sub | string | Subscription id, "{stream}:{topic}" ("{connection}:account.<topic>", "workspace"); pass it to unsubscribe. |
connection_idoptional | number | The connection chosen for market and account topics; absent for workspace. |
UnsubscribedFrame
Server reply to unsubscribe.
| Field | Type | Description |
|---|---|---|
type | "unsubscribed" | |
request_idoptional | string | |
sub | string |
ErrorFrame
An error frame: with request_id it answers a request, with sub and no
request_id it says the server removed that subscription.
| Field | Type | Description |
|---|---|---|
type | "error" | |
request_idoptional | string | |
suboptional | string | |
code | ErrorCode | |
message | string |
EventFrame
An event frame as it arrives, before the client tags it with its topic.
| Field | Type | Description |
|---|---|---|
type | "event" | |
sub | string | |
seq | number | Event number within the subscription; grows by one for trades. |
ts | Timestamp | |
data | T |
Gap
A gap frame: events from_seq..to_seq of a trades subscription were lost.
| Field | Type | Description |
|---|---|---|
type | "gap" | |
sub | string | |
from_seq | number | |
to_seq | number | |
reason | string |
SubscriptionError
The server removed a subscription (an error frame with sub, no request_id).
| Field | Type | Description |
|---|---|---|
type | "error" | |
sub | string | |
code | ErrorCode | |
message | string |
Subscribed
interface Subscribed extends SubscribedFrameWhat subscribe resolves with: the subscribed frame plus what was asked for.
| Field | Type | Description |
|---|---|---|
topic | Topic | |
instrumentoptional | InstrumentAddress | Absent for account.* subscriptions. |
OrdersUpdate
data of an account.orders event: orders and triggers of one instrument after a change.
| Field | Type | Description |
|---|---|---|
instrument | InstrumentAddress | |
orders | Order[] | |
triggers | TriggerOrder[] |
PositionUpdate
data of an account.positions event; a close arrives as position: null.
| Field | Type | Description |
|---|---|---|
instrument | InstrumentAddress | |
position | Position | null |
TradesEvent
interface TradesEvent extends EventFrame<Trade[]>Every event the client can tag by topic; topic is read from sub (the part after the first colon).
| Field | Type | Description |
|---|---|---|
topic | "trades" |
TickerEvent
interface TickerEvent extends EventFrame<Ticker>| Field | Type | Description |
|---|---|---|
topic | "ticker" |
MarkPriceEvent
interface MarkPriceEvent extends EventFrame<MarkPrice>| Field | Type | Description |
|---|---|---|
topic | "mark_price" |
BookTopEvent
interface BookTopEvent extends EventFrame<BookTop>| Field | Type | Description |
|---|---|---|
topic | "book.top" |
ClustersEvent
interface ClustersEvent extends EventFrame<ClusterBucket>| Field | Type | Description |
|---|---|---|
topic | "clusters" |
AccountOrdersEvent
interface AccountOrdersEvent extends EventFrame<OrdersUpdate>| Field | Type | Description |
|---|---|---|
topic | "account.orders" |
AccountPositionsEvent
interface AccountPositionsEvent extends EventFrame<PositionUpdate>| Field | Type | Description |
|---|---|---|
topic | "account.positions" |
AccountBalancesEvent
interface AccountBalancesEvent extends EventFrame<Balance>| Field | Type | Description |
|---|---|---|
topic | "account.balances" |
AccountFillsEvent
interface AccountFillsEvent extends EventFrame<Fill>| Field | Type | Description |
|---|---|---|
topic | "account.fills" |
WorkspaceEvent
interface WorkspaceEvent extends EventFrame<WorkspaceSnapshot>data of a workspace event: the whole layout; the first frame is the current snapshot.
| Field | Type | Description |
|---|---|---|
topic | "workspace" |
SettingsEvent
interface SettingsEvent extends EventFrame<SettingRow>data of a settings event: one written row, without writable.
| Field | Type | Description |
|---|---|---|
topic | "settings" |
UnknownTopicEvent
interface UnknownTopicEvent extends EventFrame<unknown>An event of a topic this client version does not know (the contract may add
topics within v1). topic is undefined; the raw topic name is the part of
sub after the colon.
| Field | Type | Description |
|---|---|---|
topic | undefined |
Event
type Event = | TradesEvent
| TickerEvent
| MarkPriceEvent
| BookTopEvent
| ClustersEvent
| AccountOrdersEvent
| AccountPositionsEvent
| AccountBalancesEvent
| AccountFillsEvent
| WorkspaceEvent
| SettingsEvent
| UnknownTopicEventAn event frame, discriminated by topic.
StreamFrame
type StreamFrame = Event | Gap | SubscriptionErrorWhat iterating a Stream yields, in arrival order.
Generated from the code of @spectre-trade/terminal at commit 2d1c324.