aboutsummaryrefslogtreecommitdiffstats
path: root/packages/connect/src/types.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/connect/src/types.ts')
-rw-r--r--packages/connect/src/types.ts18
1 files changed, 8 insertions, 10 deletions
diff --git a/packages/connect/src/types.ts b/packages/connect/src/types.ts
index 44ea4abd6..e85a0542c 100644
--- a/packages/connect/src/types.ts
+++ b/packages/connect/src/types.ts
@@ -11,32 +11,30 @@ export interface Client {
submitOrderAsync: (signedOrder: SignedOrder) => Promise<void>;
}
-export interface OrderbookChannel {
- subscribe: (subscriptionOpts: OrderbookChannelSubscriptionOpts) => void;
+export interface OrdersChannel {
+ subscribe: (subscriptionOpts: OrdersChannelSubscriptionOpts) => void;
close: () => void;
}
/**
* baseAssetData: The address of assetData designated as the baseToken in the currency pair calculation of price
* quoteAssetData: The address of assetData designated as the quoteToken in the currency pair calculation of price
- * snapshot: If true, a snapshot of the orderbook will be sent before the updates to the orderbook
* limit: Maximum number of bids and asks in orderbook snapshot
*/
-export interface OrderbookChannelSubscriptionOpts {
+export interface OrdersChannelSubscriptionOpts {
baseAssetData: string;
quoteAssetData: string;
- snapshot: boolean;
limit: number;
}
-export interface OrderbookChannelHandler {
+export interface OrdersChannelHandler {
onUpdate: (
- channel: OrderbookChannel,
- subscriptionOpts: OrderbookChannelSubscriptionOpts,
+ channel: OrdersChannel,
+ subscriptionOpts: OrdersChannelSubscriptionOpts,
order: APIOrder,
) => void;
- onError: (channel: OrderbookChannel, err: Error, subscriptionOpts?: OrderbookChannelSubscriptionOpts) => void;
- onClose: (channel: OrderbookChannel) => void;
+ onError: (channel: OrdersChannel, err: Error, subscriptionOpts?: OrdersChannelSubscriptionOpts) => void;
+ onClose: (channel: OrdersChannel) => void;
}
export type OrdersChannelMessage =