Credentials
The trading surface is consumer-only: you bring your own keypairs and the SDK signs trades with them. Two self-service paths generate those keypairs and register them on-chain — both emit the same canonical TRIA_TRADE_* .env block, so your downstream config never changes.
The agent (HL) and delegate (Decibel) keys are trade-only — authorized via
approveAgent (HL) and delegateTradingTo (Decibel). Neither grants
withdrawal authority, and both are revocable any time from the Tria app.
What each credential is
- Name
TRIA_TRADE_HL_ACCOUNT_ADDRESS- Type
- 0x + 40 hex
- Description
Your HL master EVM address — where funds and positions live. Not used to sign anything.
- Name
TRIA_TRADE_HL_AGENT_KEY- Type
- 0x + 64 hex (secp256k1)
- Description
Agent private key, pre-approved by your master under the name
Tria SDK. Signs every order action. Cannot withdraw funds.
- Name
TRIA_TRADE_DECIBEL_APTOS_OWNER_ADDRESS- Type
- AIP-40, 64 hex
- Description
Your master Aptos wallet address. The SDK derives the primary subaccount from this at runtime — a hand-edited
.envcan't point trades at a non-primary subaccount.
- Name
TRIA_TRADE_DECIBEL_DELEGATE_KEY- Type
- 0x + 64 hex (Ed25519)
- Description
Delegate private key, pre-delegated on your subaccount with a 90-day expiry. Signs every Decibel trade. Cannot withdraw funds.
- Name
TRIA_TRADE_DECIBEL_NODE_API_KEY- Type
- Geomi Api key
- Description
Required — Decibel rejects anonymous reads with
401. Service typeApi(orAll).
- Name
TRIA_TRADE_DECIBEL_GAS_STATION_KEY- Type
- Geomi Gs key (optional)
- Description
When set, Aptos writes are sponsored and your account needs no APT. Service type
Gs— a distinct key from the node API key.
- Name
TRIA_TRADE_DECIBEL_SUBACCOUNT_ADDRESS- Type
- deprecated
- Description
Derived subaccount address, kept for backward compatibility. If set alongside the owner address it must match the derived primary, or the client refuses to start.
How to obtain them
A. In-app — Settings → API Keys (recommended)
Turnkey-signed; no seed phrase. In the Tria web wallet:
- Go to Settings → API Keys and pick a venue (Hyperliquid and/or Decibel), set a name + expiry (default 90 days, max 180, or "No expiry").
- Confirm — Turnkey signs the on-chain setup (builder-fee approval + agent / delegate registration).
- A one-time modal shows the keys. Click "Copy as … .env block" — already in canonical
TRIA_TRADE_*form:
# Decibel block (HL block is the analogous TRIA_TRADE_HL_* set)
TRIA_TRADE_NETWORK=mainnet
TRIA_TRADE_DECIBEL_DELEGATE_KEY=0x…
TRIA_TRADE_DECIBEL_APTOS_OWNER_ADDRESS=0x…
TRIA_TRADE_DECIBEL_SUBACCOUNT_ADDRESS=0x… # informational; SDK re-derives
TRIA_TRADE_DECIBEL_NODE_API_KEY=geomi-…
The keys are shown once — copy them then. The page also lists your existing agents / delegates (with expiry) and lets you revoke any of them.
B. CLI wizard — npx tria-trade-provision
Derives keys from a seed phrase. Interactive walkthrough with two personas:
- Tria user — paste your seed phrase from Settings → Account → Recover from Turnkey. The wizard derives HL (secp256k1) + Aptos (Ed25519) keys via standard BIP-44 paths and never touches your existing in-app agents.
- Fresh user — bring your own master keys; the wizard walks through Geomi signup, gas-station setup, and Aptos USDC bridging.
npx tria-trade-provision
It mints the agent / delegate, approves the Tria builder, funds collateral, and emits a ready-to-use .env.
Importing the keys
However you generated the block, it imports the same way — the names match the SDK and MCP exactly.
import { TriaClient } from '@tria-sdk/api-trading'
const client = new TriaClient({
network: process.env.TRIA_TRADE_NETWORK as 'mainnet',
hl: {
agentPrivateKey: process.env.TRIA_TRADE_HL_AGENT_KEY!,
accountAddress: process.env.TRIA_TRADE_HL_ACCOUNT_ADDRESS!,
},
decibel: {
delegatePrivateKey: process.env.TRIA_TRADE_DECIBEL_DELEGATE_KEY!,
aptosOwnerAddress: process.env.TRIA_TRADE_DECIBEL_APTOS_OWNER_ADDRESS!,
nodeApiKey: process.env.TRIA_TRADE_DECIBEL_NODE_API_KEY!,
},
})
Expiry
Both venues support an expiry. The wizard and the in-app flow default to 90 days; pass a custom window 1–180, or none/0 for no expiry.
- Decibel —
--decibel-delegate-ttl-days <1–180 | none>. An explicit timestamp ondelegate_trading_to. - Hyperliquid —
--hl-agent-ttl-days <1–180 | none>. HL has no expiry field onapproveAgent; the expiry is encoded in the agent name as<name> valid_until <unix-seconds>.
You can always revoke early from Settings → API Keys.
Keys are revocable any time and revocation propagates to the venue within
seconds. HL allows 3 named + 2 unnamed agent slots per account; the Tria SDK
named slot is used here and your existing in-app agents stay intact. Decibel
allows multiple delegates per subaccount natively.