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.
Install via Homebrew
brew install arcaresearch/tap/arcaBuild 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:3052/api/v1", "realm": "development", "api_key": "arca_78ae7276_..." } }}Managing Profiles
# Create or update a profilearca config set local --api-base http://localhost:3052/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_ORGstringARCA_CONFIG_DIRstring~/.arca.Resolution Priority
For each setting, the CLI resolves values in this order (highest priority first):
- Command-line flags (
--api-key,--realm,--org,--profile) - Environment variables (
ARCA_API_KEY,ARCA_REALM,ARCA_ORG,ARCA_API_BASE) - Active profile in
~/.arca/config.json - Defaults (API base:
http://localhost:3052/api/v1)
Global Flags
Available on every command:
--realmstring--api-keystring--outputstringtext (default), json, or table.--no-colorboolean--profilestring~/.arca/config.json.--orgstringARCA_ORG environment variable.Use ARCA_ORG to set the active organization for scripting and CI. It overrides the profile's org value.
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.
Quick Start
Running arca auth without a subcommand launches an interactive setup wizard that walks you through login (or account creation), API key setup, and realm selection.
arca authlogin
Sign in to an existing account. Opens your browser for authentication by default. Use --no-browser for headless environments (SSH, containers, CI).
arca auth login# Headless / CI:arca auth login --no-browsersignup
Create a new builder account. Opens your browser by default. Use --no-browser for terminal-based signup.
arca auth signuplogout
Clear the saved JWT token and revoke the refresh token.
arca auth logoutwhoami
Show the current authenticated identity (organization name, email, builder ID).
arca auth whoamistatus
Show the current authentication state: method (JWT or API key), active profile, API base, and realm.
arca auth statustoken
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.
ensure
arca object ensure --path /wallets/main --denomination USDarca object ensure --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. Each balance includes arriving, settled, departing, and total fields showing in-flight transfer state.
arca object balances <object-id>arca object balances <object-id> --output json[ { "denomination": "USD", "arriving": "200.00", "settled": "800.00", "departing": "0.00", "total": "1000.00" }]delete
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--forcebooleanlabels get
View current labels on an Arca object.
arca object labels get <object-id>arca object labels get <object-id> --output jsonlabels set
Set one or more labels on an Arca object. Uses merge semantics — existing labels not mentioned in the command are left unchanged.
arca object labels set <object-id> displayName="Main Wallet" tier=goldarca object labels set <object-id> stripeCustomerId=cus_abc123key=valuestringrequired., _, -, and be 1–63 characters. Values are max 256 characters. Keys prefixed with arca. or _ are reserved.labels remove
Remove one or more labels from an Arca object by key.
arca object labels remove <object-id> tier supportTicketarca object labels remove <object-id> displayNameCLI: Transfer & Fund Account
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--amountstringrequiredfund-account
Fund an Arca object (denominated or exchange). This is a developer tool for testing, competitions, and programmatic account seeding. In demo realms, funding is simulated with a configurable delay. For production deposit flows, use payment links.
arca fund-account --ref /wallets/main --amount 1000arca fund-account --ref /wallets/main --amount 500 --duration 10arca fund-account --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. Always reserve before the operation and store the result — see Nonce Best Practices in the API Reference.
# Reserve a nonce, then use itNONCE_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
# Colon separator for create-operation noncesarca nonce --prefix /op/create/wallets/main --separator ":"# → /op/create/wallets/main:1--prefixstringrequired--separatorstring- (or / if prefix ends with /). Use ":" for operation nonces.CLI: 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 hl: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. For take-profit / stop-loss triggers, pass --trigger with --trigger-px and --tpsl; use --trigger-market for a market execution when triggered, or omit it to use --price as the limit after trigger.
# Market orderarca exchange order place \ --object <exchange-object-id> \ --coin hl:BTC --side buy --size 0.01 \ --path /op/order/btc-buy-1
# Limit orderarca exchange order place \ --object <exchange-object-id> \ --coin hl:ETH --side sell --type limit --price 3000 --size 1 \ --path /op/order/eth-sell-1
# Trigger order (TP) — limit when triggeredarca exchange order place \ --object <exchange-object-id> \ --coin hl:BTC --side sell --type limit --price 100000 --size 0.01 \ --path /op/order/btc-tp-1 \ --trigger --trigger-px 99000 --tpsl tp --grouping normalTpsl--objectstringrequired--coinstringrequiredhl:BTC, hl:ETH).--sidestringrequiredbuy or sell.--sizestringrequired--pathstringrequired--typestringmarket (default) or limit.--pricestring--reduce-onlyboolean--tifstringGTC (default), IOC, ALO.--triggerboolean--trigger-px and --tpsl are required.--trigger-pxstring--trigger-marketboolean--price).--tpslstringtp (take profit) or sl (stop loss). Required with --trigger.--groupingstringna (default, standalone), normalTpsl (parent-linked OCO), positionTpsl (tracks position).order list
arca exchange order list --object <id> --output jsonarca exchange order list --object <id> --status OPEN--objectstringrequired--statusstringPENDING, OPEN, PARTIALLY_FILLED, FILLED, CANCELLED, FAILED, WAITING_FOR_TRIGGER, TRIGGERED.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 jsonfills
List historical fills (trades) with per-fill P&L, fee breakdown, and trade direction.
arca exchange fills --object <id> --output jsonarca exchange fills --object <id> --market hl:BTC --limit 50arca exchange fills --object <id> --start-time 2026-01-01T00:00:00.000000Z--objectstringrequired--marketstringhl:BTC).--start-timestring--end-timestring--limitnumber--cursorstringtrade-summary
Per-market P&L summary: realized P&L, total fees, trade count, and volume.
arca exchange trade-summary --object <id> --output jsonarca exchange trade-summary --object <id> --output table--objectstringrequired--start-timestring--end-timestringfunding-history
List hourly funding payments applied to an exchange account. Payments are signed — negative means the account paid, positive means it received.
arca exchange funding-history --object <id> --output jsonarca exchange funding-history --object <id> --limit 50 --output table--objectstringrequired--limitnumbermarket 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 tickers
Get 24h ticker data for all assets (volume, price change, funding, delisted status).
arca exchange market tickers --output jsonmarket book
Get the L2 order book for a specific coin.
arca exchange market book hl:BTC --output jsonCLI: PnL Commands
Compute profit-and-loss over time for a path prefix.
history
Fetch P&L history over a time range.
arca pnl history --from 2026-01-01T00:00:00Z --to 2026-03-10T00:00:00Zarca pnl history --prefix / --from 2026-01-01T00:00:00Z --to 2026-03-10T00:00:00Z --points 200 --output json--prefixstring/.--fromstringrequired--tostringrequired--pointsnumber--outputstringjson or table.CLI: Payment Link Commands
Create and manage shareable payment links for deposits and withdrawals. Aliases: arca pl.
create
Create a payment link. Returns the shareable URL for the end user.
arca payment-link create \ --type deposit \ --ref /wallets/main \ --amount 100
# With return URL (web redirect)arca payment-link create \ --type withdrawal \ --ref /wallets/main \ --amount 50 \ --return-url https://example.com/thanks \ --expires-in 60
# For native apps using in-app browsersarca payment-link create \ --type deposit \ --ref /wallets/main \ --amount 100 \ --return-strategy close--typestringrequireddeposit or withdrawal.--refstringrequired--amountstringrequired--return-urlstringredirect and navigate strategies.--return-strategystringredirect (default), navigate (custom URL scheme), or close (dismiss web view).--expires-innumberlist
List payment links in the current realm.
arca payment-link listarca payment-link list --output jsonarca payment-link list --type deposit --status pending--typestringdeposit or withdrawal.--statusstringpending, completed, expired.CLI: Summary
Show aggregate counts for the current realm.
arca summaryarca summary --output jsonReturns object count, operation count, event count, pending operations, and expired operations.
Advanced: API Keys, Permissions, Org, Fees & Admin ▸
CLI: API Key Commands
Manage API keys for programmatic access. Aliases: arca api-keys.
list
arca api-key listarca api-key list --output jsoncreate
Create a new API key. The raw key is shown once at creation — save it immediately.
arca api-key create --name "ci-pipeline"--namestringrequiredThe full key is only displayed at creation time. Store it securely — it cannot be retrieved later.
revoke
Permanently revoke an API key. This cannot be undone.
arca api-key revoke <key-id>arca api-key revoke <key-id> --force # skip confirmation--forcebooleanCLI: 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. Aliases: arca org, arca organizations.
list
List organizations you belong to.
arca org listarca org lsarca org list --output jsoncreate
Create a new organization. You become the owner.
arca org create --name "Acme Inc"--namestringrequiredswitch
Set the active organization in your profile for subsequent commands.
arca org switch acme-incarca org use org-uuidarca org switch <org-id-or-slug>org-id-or-slugstringrequiredView Organization
arca org info --output jsoninvitations
List pending invitations to your organization.
arca org invitationsarca org invitesarca org invitations --output jsonrevoke-invitation
Revoke a pending invitation.
arca org revoke-invitation <invitation-id>arca org revoke-invitation inv_abc123 --forceinvitation-idstringrequiredList Members
arca org members --output tableremove-member
Remove a member from the organization. Cannot remove the owner.
arca org remove-member <member-id>arca org remove-member member_abc123 --forcemember-idstringrequiredInvite 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: Fee Commands
Estimate fees and view the current fee schedule.
estimate
Estimate the fee for a transfer or order before executing it.
arca fees estimate --action transfer --from /wallets/main --to /exchange/main --amount 1000arca fees estimate --action transfer --amount 500 --output json--actionstringrequiredtransfer or order.--amountstringrequired--fromstring--tostringschedule
Display the current fee schedule.
arca fees schedulearca fees schedule --output tableCLI: Admin Commands (Internal)
The arca admin subcommands provide operator visibility into platform health. These are not published to Homebrew and require admin auth.
After arca admin auth login, print the Authorization header line for use with curl:
arca admin auth print-header
curl -sS "$ARCA_API_BASE/admin/chain-transactions/bulk-abandon" \ -H "$(arca admin auth print-header | tr -d '\n')" \ -H "Content-Type: application/json" \ -d '{"type":"unlinked","minAge":"7d"}'venue-health
Venue reconciliation diagnostics: fill audit, adjustments, drift state, and unmatched fills. See the venue reconciliation design doc for context.
# Aggregate statsarca admin venue-health summary --output json
# Fill audit (fee breakdown, cloid match status)arca admin venue-health fill-audit --realm-id <realmId> --output json
# Venue adjustment logarca admin venue-health adjustments --realm-id <realmId> --output json
# Per-account reconciliation statearca admin venue-health reconciliation --realm-id <realmId> --output jsonarca admin venue-health reconciliation --output json
# Unmatched fill operations (external trades)arca admin venue-health unmatched-fills --output json
# Acknowledge an adjustment (operator role)arca admin venue-health ack <adjustmentId>--realm-idstring--outputstringjson or table. Use json for scripting.