@mysten/sui v2.0 and a new dApp Kit are here! Check out the migration guide
Mysten Labs SDKs
MigrationsMigrate to 2.0

@mysten/deepbook-v3

This package now exports a client extension that integrates with Sui clients.

- import { SuiClient, getFullnodeUrl } from '@mysten/sui/client';
- import { DeepBookClient } from '@mysten/deepbook-v3';
+ import { SuiGrpcClient } from '@mysten/sui/grpc'; // or SuiJsonRpcClient, SuiGraphQLClient
+ import { deepbook } from '@mysten/deepbook-v3';

- const suiClient = new SuiClient({ url: getFullnodeUrl('mainnet') });
- const deepBookClient = new DeepBookClient({
-   client: suiClient,
-   address: myAddress,
-   env: 'mainnet',
-   balanceManagers: { ... },
- });
+ const client = new SuiGrpcClient({
+   baseUrl: 'https://fullnode.mainnet.sui.io:443',
+   network: 'mainnet',
+ }).$extend(
+   deepbook({
+     address: myAddress,
+     // network is auto-detected from the client
+     balanceManagers: { ... },
+   }),
+ );

- await deepBookClient.checkManagerBalance(manager, asset);
+ await client.deepbook.checkManagerBalance(manager, asset);