SUBTC-CLI V2 — Commands Overview

permalink SUBTC
#commands#overview#subtccli

SUBTC CLI V2

Unified command system using:<br>./subtc

All commands are organized and consistent.

Key

./subtc key create<br>Create API key and save locally

./subtc key status<br>Check key validity

Network

./subtc config set-net test<br>Set network to testnet (default)

./subtc config set-net main<br>Set network to mainnet (persistent)

./subtc --net=main <cmd><br>Temporary override for one command

./subtc --net=test <cmd><br>Temporary override for one command

SUBTC_NET=main ./subtc <cmd><br>Override using environment variable

Wallet

./subtc wallet create<br>Create wallet on current network

./subtc wallet list<br>List all wallets

./subtc wallet receive <wid><br>Generate receive address

./subtc wallet balance <wid><br>Get balance (SAT + BTC)

Send

./subtc send <wid> <sat><br>Send with automatic idempotency

./subtc send <wid> <sat> <idem-key><br>Send with custom idempotency key

Rules:

  • Mainnet requires typing YES to confirm
  • Minimum: 50000 sat
  • Fee: 3%

Inbox

./subtc inbox <wid> <expected_sat><br>Create inbox for expected payment

Wait / Poll

./subtc wait <wid> <sat><br>Long-poll (blocking)

./subtc wait <wid> <sat> <timeout_sec><br>Custom timeout

./subtc wait <wid> <sat> 300 https://example.com/webhook<br>Webhook mode

./subtc poll <wid> <sat><br>Single check

./subtc poll <wid> <sat> --loop<br>Loop every 3 seconds

./subtc poll <wid> <sat> --loop --interval=5<br>Loop every 5 seconds

Config

./subtc config show<br>Show current key and network

./subtc config set-key <key><br>Save API key

./subtc config set-net <test|main><br>Change default network

Health

./subtc health<br>Check node status

Environment Variables

SUBTC_KEY=xxx ./subtc wallet list<br>Override API key

SUBTC_NET=main ./subtc wallet create<br>Override network

Config File

Path:<br>~/.subtc.json

Example:<br>{<br>"key": "SUBTC-KEY-...",<br>"network": "test"<br>}

link tools v2 : https://subtc.net/post/subtc-cli-v2-unified-bitcoin-cli