Skip to main content

Overview

.env and agent.toml are both created by cloud-agent onboard β€” you typically don’t write them from scratch. The tables below describe each field so you can tune an existing config.

.env β€” Environment Variables

VariableDescriptionWritten byonboard
PARTY_AGENTYour Canton party IDyes
PARTY_AGENT_PRIVATE_KEYBase58 Ed25519 private key (32-byte seed)yes
PARTY_AGENT_PUBLIC_KEYBase58 Ed25519 public key (derived from the private key)yes
ORDERBOOK_GRPC_URLOrderbook gRPC endpointyes
CANTON_CHAINdevnet | testnet | mainnetyes
SYNCHRONIZER_IDCanton synchronizer IDyes
NODE_NAMECanton node name for routingyes
LEDGER_SERVICE_PUBLIC_KEYBase58 public key of the ledger service (for verifying responses)yes
DSODSO (Canton Coin admin) party IDyes
PARTY_SETTLEMENT_OPERATORSettlement operator party IDyes
PARTY_ORDERBOOK_FEEOrderbook fee collection partyyes
PARTY_TRAFFIC_FEESequencer traffic fee partyyes
TRAFFIC_FEE_PRICE_USD_MBTraffic fee rate in USD per MByes
JOIN_TRAFFIC_TRANSACTIONSBatch traffic-fee transactions (default: true)yes
AGENT_FEE_RESERVE_CCCC balance held back for fees (default: 5.0)yes
AGENT_FEE_CCPer-tx agent fee (CC)yes
PARTICIPANT_FEE_CCPer-tx participant fee (CC)yes
SIGNATURE_FEE_CCPer-tx signature fee (CC)yes
MERGE_THRESHOLDMerge worker triggers when selectable amulets exceed this countyes
MERGE_MAX_AMULETSMax amulets merged per round (default: 100)yes
MERGE_POLL_INTERVAL_SECMerge worker poll interval in seconds (default: 600)yes
LOG_DESTINATIONconsole | file (paired with LOG_DIR, LOG_FILE_PREFIX)yes
RECURRING_PAYMENT_PACKAGE_NAMERecurring-payment package name; required for subscription * commandsyes
SETTLEMENT_THREAD_COUNTConcurrent settlement threads (default used when unset)no
AGENT_MAX_SETTLEMENTSMax active settlements (default used when unset)

agent.toml β€” Agent Settings

Full example for an LP with grid orders and RFQ:
role = "trader"
auto_settle = true
poll_interval_secs = 7
token_ttl_secs = 3600
connection_timeout_secs = 30

# Liquidity provider identity (enables RFQ handling)
[liquidity_provider]
name = "My LP"
max_concurrent_rfqs = 10
default_quote_valid_secs = 60

[[markets]]
market_id = "CC-USDC"
enabled = true
price_change_threshold_percent = 0.1

# 3 bids below mid (negative deltas)
[[markets.bid_levels]]
delta_percent = -0.015
quantity = "10"
[[markets.bid_levels]]
delta_percent = -0.2
quantity = "10"
[[markets.bid_levels]]
delta_percent = -0.3
quantity = "10"

# 3 offers above mid (positive deltas)
[[markets.offer_levels]]
delta_percent = 0.015
quantity = "10"
[[markets.offer_levels]]
delta_percent = 0.2
quantity = "10"
[[markets.offer_levels]]
delta_percent = 0.3
quantity = "10"

# RFQ configuration for this market
[markets.rfq]
enabled = true
min_quantity = "5"
max_quantity = "1000"
bid_spread_percent = 0.5
offer_spread_percent = 0.5
quote_valid_secs = 60
allocate_before_secs = 3600
settle_before_secs = 7200