DeepBook CLI Skill for Openclaw

A powerful command-line interface for end-to-end DeepBook operations including market data, account management, and on-chain execution.

astinz
v0.0.1
Feb 4, 2026
1
2.2k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install deepbook-cli

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install deepbook-cli using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is DeepBook CLI Skill?

The DeepBook CLI Skill is a robust technical toolset designed for developers and power users to interact seamlessly with the DeepBook protocol on the Sui network. By leveraging this integration within Openclaw Skills, users can manage the entire trading lifecycle—from initial market research and orderbook inspection to the execution of complex spot and margin trades. The skill provides a bridge between high-level trading strategies and low-level on-chain interactions, ensuring precision and reliability in decentralized finance environments.

Built with developer experience in mind, it handles global configuration, account aliasing, and provider-side streaming. Whether you are building automated trading bots or performing manual high-stakes swaps, this skill provides the necessary infrastructure to interact with DeepBook's REST and SSE endpoints, ensuring that users of Openclaw Skills have real-time access to liquidity and execution services across both mainnet and testnet.

DeepBook CLI Skill Use Cases

  • Monitoring real-time orderbook depth and trade history for specific asset pools.
  • Executing on-chain spot market and limit orders via dedicated balance managers.
  • Performing instant token swaps with exact-input semantics for optimized routing.
  • Managing leveraged margin positions, including collateral deposits and debt repayment.
  • Automating multi-account wallet management and configuration across different Sui networks.

How DeepBook CLI Skill Works

  1. The user initializes the skill by checking for the binary and ensuring the global configuration file is present in the home directory.
  2. Connectivity is established by selecting a provider and setting the network to either mainnet or testnet.
  3. Market data is fetched through commands like orderbook or ohlcv to analyze current liquidity.
  4. For trading, a balance or margin manager is selected or created to handle the transaction assets and fee buffers.
  5. Commands are executed with optional dry-run flags to simulate the transaction on-chain without spending gas.
  6. Once validated, the live transaction is signed and broadcasted, with the execution details returned in a structured JSON format.

DeepBook CLI Skill Setup

To get started with this skill within Openclaw Skills, ensure the CLI is installed and configured correctly:

# Install the CLI globally
npm install -g deepbook-cli

# Verify installation
deepbook --version

# Configure your network and provider
deepbook config set-network mainnet
deepbook config set-provider surflux

# Import your private key for on-chain actions
deepbook config import-key <your-private-key> --alias my-wallet

DeepBook CLI Skill Data Schema & Taxonomy

The skill manages persistent data and state through the following schema:

Component Type Description
Global Config JSON Located at ~/.deepbook/config.json, storing network and RPC defaults.
Account Data Alias Map Maps human-readable aliases to private keys and Sui addresses.
Manager Objects Move Objects MarginManager<Base, Quote> objects are tracked to handle specific pool collateral.
Execution Logs Structured JSON Captures execution.kind and execution.type for audit trails.

DeepBook CLI Skill Advanced Features

  • Real-time SSE (Server-Sent Events) trade streaming for low-latency market monitoring.
  • Automated lot-size normalization to ensure full-close margin orders satisfy protocol constraints.
  • Internal fee buffer management that automatically deposits DEEP or collateral to prevent transaction reverts.
  • Multi-manager resolution logic that auto-selects compatible balance managers based on the signer address.
  • Comprehensive dry-run simulation for all state-changing commands to verify Move abort codes before execution.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*