CLI: Installation & Configuration
The Arca CLI is a Go binary built with the Cobra framework. It communicates with the Arca API and supports multiple named profiles.
Build from Source
cd cli && go build -o arca .# Optionally add cli/ to your PATHConfiguration File
Configuration is stored at ~/.arca/config.json. Each profile contains an API base URL, default realm, and optional API key.
{ "active_profile": "local", "profiles": { "local": { "api_base": "http://localhost:8080/api/v1", "realm": "development", "api_key": "arca_78ae7276_..." } }}Managing Profiles
# Create or update a profilearca config set local --api-base http://localhost:8080/api/v1arca config set local --realm developmentarca config set local --api-key arca_78ae7276_...
# Switch the active profilearca config use local
# List all profilesarca config list
# View a specific profilearca config get localEnvironment Variables
Environment variables override profile settings:
ARCA_API_BASEstringapi_base value.ARCA_REALMstringrealm value.ARCA_API_KEYstringapi_key and any saved JWT.ARCA_CONFIG_DIRstring~/.arca.Resolution Priority
For each setting, the CLI resolves values in this order (highest priority first):
- Command-line flags (
--api-key,--realm,--profile) - Environment variables (
ARCA_API_KEY,ARCA_REALM,ARCA_API_BASE) - Active profile in
~/.arca/config.json - Defaults (API base:
http://localhost:8080/api/v1)
Global Flags
Available on every command:
--realmstring--api-keystring--outputstringtext (default), json, or table.--no-colorboolean--profilestring~/.arca/config.json.Always use --output json when scripting or verifying behavior programmatically. Text output is for humans; JSON is for automation.
CLI: Auth Commands
Manage builder authentication. JWT tokens are stored at ~/.arca/token after login/signup.
signup
Create a new builder account. Prompts for organization name, email, and password.
arca auth signuplogin
Authenticate an existing builder. Prompts for email and password. Saves the JWT to ~/.arca/token.
arca auth loginlogout
Clear the saved JWT token.
arca auth logoutwhoami
Show the current authenticated identity (organization name, email, builder ID).
arca auth whoamitoken
Mint a scoped JWT for end-user access. Returns a short-lived token with IAM-style policy statements.
arca auth token \ --sub user123 \ --actions arca:Read,arca:TransferFrom,arca:ReceiveTo \ --resources "/users/user123/*" \ --expiration 30--substringrequired--actionsstring[]requiredarca:Read,arca:Transfer).--resourcesstring[]required/users/*).--realm-idstring--expirationnumberCLI: Realm Commands
Manage realms. Aliases: arca realms.
list
arca realm listarca realm list --output jsoncreate
arca realm create --name "Production" --type production --description "Live environment"--namestringrequired--typestringdemo (default) or production.--descriptionstringget
arca realm get <realm-id>delete
arca realm delete <realm-id>arca realm delete <realm-id> --force # skip confirmation--forcebooleanCLI: Object Commands
Manage Arca objects. Aliases: arca objects, arca obj.
create
arca object create --path /wallets/main --denomination USDarca object create --path /exchanges/hl1 --type exchange--pathstringrequired/wallets/main).--typestringdenominated (default), exchange, deposit, withdrawal, escrow.--denominationstringUSD). Default: USD.--metadatastring--operation-pathstringlist
arca object listarca object list --prefix /wallets --output jsonarca object list --include-deleted--prefixstring/wallets).--include-deletedbooleanget
Get an object by its path.
arca object get /wallets/mainarca object get /wallets/main --output jsondetail
Get full object detail including operations, events, deltas, and balances.
arca object detail <object-id> --output jsonbalances
Get current balances for an Arca object.
arca object balances <object-id>arca object balances <object-id> --output jsondelete
Delete an Arca object. If the object has non-zero balances, use --sweep-to to transfer remaining funds before deletion. For exchange objects with open positions, use --liquidate to close all positions via market order first. Deletion is blocked if the object has in-flight operations (pending transfers or deposits).
# Simple deletionarca object delete /wallets/old --force
# Deletion with balance sweeparca object delete /wallets/old --sweep-to /wallets/main --force
# Exchange deletion with liquidationarca object delete /exchanges/hl1 --sweep-to /wallets/main --liquidate --force--sweep-tostring--liquidateboolean--forcebooleanCLI: Transfer & Deposit
transfer
Execute an atomic transfer between two Arca objects. The --path serves as the idempotency key — resubmitting the same path returns the existing result without a double-spend.
arca transfer \ --path /op/transfer/alice-to-bob-1 \ --from /wallets/alice \ --to /wallets/bob \ --amount 250--pathstringrequired--fromstringrequired--tostringrequired--amountstringrequireddeposit
Initiate a deposit to a denominated Arca object. In demo realms, deposits are simulated with a configurable delay.
arca deposit --ref /wallets/main --amount 1000arca deposit --ref /wallets/main --amount 500 --duration 10arca deposit --ref /wallets/main --amount 100 --fail--refstringrequired--amountstringrequired--durationnumber--failbooleanCLI: Operation Commands
Inspect operations. Aliases: arca operations, arca op.
list
arca operation list --output jsonarca operation list --type transfer --output jsonarca operation list --type deposit--typestringtransfer, create, delete, deposit, order, cancel.get
Get operation detail with correlated events and state deltas.
arca operation get <operation-id> --output jsonnonce
Reserve the next unique nonce for a path prefix. Returns a path that can be used as the idempotency key for an operation or object creation.
# Operation nonce (colon separator)arca nonce --prefix /op/create/wallets/main --separator ":"# → /op/create/wallets/main:1
# Transfer nonce (default hyphen separator)arca nonce --prefix /op/transfer/fund# → /op/transfer/fund-1
# Object name noncearca nonce --prefix /orders/order# → /orders/order-47
# JSON output for scriptingarca nonce --prefix /op/transfer/fund --output json# → { "nonce": 1, "path": "/op/transfer/fund-1" }--prefixstringrequired/op/transfer/fund).--separatorstring/ if prefix ends with /, otherwise -. Use ":" for operation nonces.Always reserve the nonce before the operation and store the resulting path. On retry, reuse the stored path. Calling arca nonce inline (e.g., inside a retry loop or as a subshell) produces a new path on every call, turning each retry into a distinct operation and defeating idempotency.
# GOOD — reserve once, store, reuse on retryNONCE_PATH=$(arca nonce --prefix /op/transfer/fund --output json | jq -r .path)arca transfer --path "$NONCE_PATH" --from /wallets/alice --to /wallets/bob --amount 250
# BAD — inline nonce defeats idempotency (new path on every call)arca transfer --path "$(arca nonce --prefix /op/transfer/fund)" --from ... --to ... --amount 250CLI: Exchange Commands
Trade perpetual futures on exchange Arca objects. Aliases: arca ex.
state
Get exchange account state (equity, margin summary, positions, open orders).
arca exchange state <object-id> --output jsonleverage set
Set the leverage for a coin. Leverage is a per-coin setting, not per-order. Must be set before placing orders at non-default leverage.
arca exchange leverage set \ --object <exchange-object-id> \ --coin BTC --leverage 10order place
Place a market or limit order. The --path is the idempotency key. Orders use the leverage currently set for the coin.
# Market orderarca exchange order place \ --object <exchange-object-id> \ --coin BTC --side buy --size 0.01 \ --path /op/order/btc-buy-1
# Limit orderarca exchange order place \ --object <exchange-object-id> \ --coin ETH --side sell --type limit --price 3000 --size 1 \ --path /op/order/eth-sell-1--objectstringrequired--coinstringrequiredBTC, ETH).--sidestringrequiredbuy or sell.--sizestringrequired--pathstringrequired--typestringmarket (default) or limit.--pricestring--reduce-onlyboolean--tifstringGTC (default), IOC, ALO.order list
arca exchange order list --object <id> --output jsonarca exchange order list --object <id> --status OPEN--objectstringrequired--statusstringOPEN, FILLED, CANCELLED, FAILED.order get
Get a specific order with its fills.
arca exchange order get <order-id> --object <id> --output jsonorder cancel
Cancel an open order. The --path is the idempotency key.
arca exchange order cancel <order-id> \ --object <exchange-object-id> \ --path /op/cancel/btc-1position list
arca exchange position list --object <id> --output jsonmarket meta
Get market metadata (supported assets, max leverage, size decimals).
arca exchange market meta --output jsonmarket mids
Get current mid prices for all assets.
arca exchange market mids --output jsonmarket book
Get the L2 order book for a specific coin.
arca exchange market book BTC --output jsonCLI: Permissions
View the Arca action catalog — all available permissions grouped by category, plus convenience aliases.
arca permissions --output jsonSee the Scoped Tokens & Permissions section for the full catalog and authorization model.
CLI: Org & Team
Manage your organization and team members from the command line.
View Organization
arca org info --output jsonList Members
arca org members --output tableInvite a Member
arca org invite --email alice@example.com --role developerAvailable roles: admin, developer, viewer. The invitee receives an invitation link. You cannot assign a role higher than your own (privilege escalation protection).
Transfer Ownership
arca org transfer-ownership <user-id>Transfers organization ownership to another member. Only the current owner can do this.
CLI: Admin
Platform admin commands for internal Arca team use. Requires the is_platform_admin flag on your account.
Dashboard
arca admin dashboard --output jsonList Organizations
arca admin orgs --output tableList Users
arca admin users --output tableList All Realms
arca admin realms --output table