Skip to content

Openfish CLI

Repository: https://github.com/billcheung10/openfish-cli

Latest documented release: v0.1.11.

Shell installer:

Terminal window
curl -sSL https://raw.githubusercontent.com/billcheung10/openfish-cli/main/openfish-cli/install.sh | sh

Homebrew:

Terminal window
brew tap billcheung10/openfish-cli https://github.com/billcheung10/openfish-cli
brew install openfish

Source install:

Terminal window
git clone https://github.com/billcheung10/openfish-cli
cd openfish-cli
cargo install --path openfish-cli

Supported release binaries:

PlatformTarget
Linux x64x86_64-unknown-linux-gnu
Linux ARM64aarch64-unknown-linux-gnu
macOS Intelx86_64-apple-darwin
macOS Apple Siliconaarch64-apple-darwin
Windows x64x86_64-pc-windows-msvc
Terminal window
openfish upgrade

If installed from source:

Terminal window
cd openfish-cli
git pull
cargo install --path openfish-cli --force

Uninstall a Cargo install:

Terminal window
cargo uninstall openfish-cli

For release-installer installs, remove the openfish binary from your PATH. This does not delete wallet/API configuration.

Production endpoints:

Terminal window
export OPENFISH_CLOB_HOST=https://api.openfish.me/
export OPENFISH_GAMMA_HOST=https://gamma.openfish.me/
export OPENFISH_DATA_HOST=https://data.openfish.me/
export OPENFISH_BRIDGE_HOST=https://bridge.openfish.me/

The CLI supports these variables for local testing and for agents that need an explicit deployment target.

Terminal window
openfish wallet create
openfish clob create-api-key --agent-env-file .openfish/agent.env
openfish clob account-status

Important distinction:

StepMeaning
openfish wallet createCreates local signing material.
openfish clob create-api-keyRegisters/derives the Openfish CLOB account and credentials.
--agent-env-fileWrites API-backed agent credentials to a local 0600 env file.
openfish clob account-statusPerforms a readiness check against Openfish account state.

Do not paste private keys or generated API secrets into chat. Use env files or secret managers.

Terminal window
openfish markets list --limit 5
openfish markets search "bitcoin" --limit 5
openfish clob book <token_id>
openfish clob midpoint <token_id>
openfish clob spread <token_id>

Every command supports machine-readable output:

Terminal window
openfish -o json markets search "bitcoin" --limit 5
openfish -o json clob book <token_id>
Terminal window
openfish -o json clob balance --asset-type collateral

The balance is returned in human FISH units. It is not USDC base units.

{
"allowances": {},
"balance": "100000"
}
Terminal window
openfish bridge supported-assets
openfish bridge deposit $(openfish wallet address)
openfish bridge status <deposit_address>

Withdrawal preview:

Terminal window
openfish bridge withdraw $(openfish wallet address) \
--to-chain-id 56 \
--to-token-address <fish_token_address> \
--recipient <bsc_recipient> \
--amount all \
--preview

Submit without --preview only after reviewing the debit and fee details.

Limit order:

Terminal window
openfish clob create-order \
--token <token_id> \
--side buy \
--price 0.50 \
--size 10

Market-style order:

Terminal window
openfish clob market-order \
--token <token_id> \
--side buy \
--amount 5

Cancel:

Terminal window
openfish clob cancel <order_id>
openfish clob cancel-orders "ORDER1,ORDER2"
openfish clob cancel-market --market <condition_id>
openfish clob cancel-all

Agent-generated workflows should use dry-run first and require explicit approval before any live order.

Generate credentials into an env file:

Terminal window
openfish clob create-api-key --agent-env-file .openfish/agent.env

The file contains:

Terminal window
OPENFISH_CLOB_HOST=https://api.openfish.me/
OPENFISH_ADDRESS=0x...
OPENFISH_API_KEY=...
OPENFISH_SECRET=...
OPENFISH_PASSPHRASE=...

The CLI keeps terminal output redacted and writes the file with restrictive permissions on Unix systems.