diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-08-17 08:03:11 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-08-17 08:03:11 +0800 |
commit | 64a85dfb9cc60212dcf1c70ca7be4874936dd332 (patch) | |
tree | 9052883b8893d2bfeb40525c3640987698481c68 /packages/connect/src/types.ts | |
parent | e079790f7fe82452471fc69fa9583c07848f801d (diff) | |
download | dexon-0x-contracts-64a85dfb9cc60212dcf1c70ca7be4874936dd332.tar dexon-0x-contracts-64a85dfb9cc60212dcf1c70ca7be4874936dd332.tar.gz dexon-0x-contracts-64a85dfb9cc60212dcf1c70ca7be4874936dd332.tar.bz2 dexon-0x-contracts-64a85dfb9cc60212dcf1c70ca7be4874936dd332.tar.lz dexon-0x-contracts-64a85dfb9cc60212dcf1c70ca7be4874936dd332.tar.xz dexon-0x-contracts-64a85dfb9cc60212dcf1c70ca7be4874936dd332.tar.zst dexon-0x-contracts-64a85dfb9cc60212dcf1c70ca7be4874936dd332.zip |
Rename websocket files and types
Diffstat (limited to 'packages/connect/src/types.ts')
-rw-r--r-- | packages/connect/src/types.ts | 18 |
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 = |