Type Alias: WebsocketSubscription
ts
type WebsocketSubscription =
| {
dex?: string;
type: "allMids";
}
| {
dex?: string;
type: "assetCtxs";
}
| {
coin: string;
type: "activeAssetCtx";
}
| {
coin: string;
type: "activeAssetData";
user: string;
}
| {
type: "allDexsAssetCtxs";
}
| {
type: "allDexsClearinghouseState";
user: string;
}
| {
coin: string;
type: "bbo";
}
| {
coin: string;
interval: CandleInterval;
type: "candle";
}
| {
dex?: string;
type: "clearinghouseState";
user: string;
}
| {
type: "fastAssetCtxs";
}
| {
coin: string;
fast?: boolean;
mantissa?: 1 | 2 | 5 | null;
nSigFigs?: 2 | 3 | 4 | 5 | null;
type: "l2Book";
}
| {
type: "notification";
user: string;
}
| {
dex?: string;
type: "openOrders";
user: string;
}
| {
type: "orderUpdates";
user: string;
}
| {
type: "outcomeMetaUpdates";
}
| {
type: "spotAssetCtxs";
}
| {
ignorePortfolioMargin?: boolean;
isPortfolioMargin?: never;
type: "spotState";
user: string;
}
| {
ignorePortfolioMargin?: never;
isPortfolioMargin?: boolean;
type: "spotState";
user: string;
}
| {
coin: string;
type: "trades";
}
| {
dex?: string;
type: "twapStates";
user: string;
}
| {
type: "userEvents";
user: string;
}
| {
aggregateByTime?: boolean;
type: "userFills";
user: string;
}
| {
type: "userFundings";
user: string;
}
| {
type: "userHistoricalOrders";
user: string;
}
| {
type: "userNonFundingLedgerUpdates";
user: string;
}
| {
type: "userTwapHistory";
user: string;
}
| {
type: "userTwapSliceFills";
user: string;
}
| {
type: "webData3";
user: string;
};