Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Configuration

Authentication

hlz needs a private key for trading operations. Market data commands work without auth.

Encrypted Keystore (Recommended)

# Generate a new key
hlz keys new trading
 
# Import an existing key
hlz keys import trading --private-key 0xYOUR_KEY
 
# Set as default
hlz keys default trading
 
# List all keys
hlz keys ls

Keys are stored encrypted at ~/.hlz/keys/. Use --key-name to select a specific key per command.

Environment Variables

VariableDescription
HL_KEYPrivate key (raw hex, no 0x prefix)
HL_PASSWORDKeystore password (for --key-name)
HL_ADDRESSDefault wallet address (for read-only queries)
HL_CHAINDefault chain: mainnet (default) or testnet
HL_OUTPUTDefault output format: json, pretty, or csv
NO_COLORDisable colored output

Config Files

hlz loads config from key=value files (same format as .env):

Project-level.env in the current directory:

HL_KEY=your_private_key_hex
HL_ADDRESS=0xYourAddress
HL_CHAIN=mainnet

System-level~/.hl/config (used as fallback if no .env found):

HL_KEY=your_private_key_hex
HL_ADDRESS=0xYourAddress
HL_CHAIN=mainnet

Supported keys: HL_KEY, TRADING_KEY, HL_ADDRESS, ADDRESS, HL_CHAIN, CHAIN.

Priority Order

  1. Command-line flags (--key, --key-name, --chain)
  2. Environment variables (HL_KEY, HL_CHAIN)
  3. .env file in current directory
  4. ~/.hl/config file
  5. Defaults (mainnet, no key)

Testnet

Add --chain testnet to any command:

hlz buy BTC 0.1 @50000 --chain testnet

Or set globally:

export HL_CHAIN=testnet

Output Formats

FlagWhenFormat
(none, TTY)Interactive terminalColored tables
(none, piped)hlz price BTC | jqJSON (auto-detected)
--jsonExplicitJSON
--output prettyExplicitFormatted tables
--output csvExplicitCSV
--quiet / -qMinimalJust the value