DeFi Protocols
DeFi protocols use wallet-based authentication instead of API keys. Transactions are signed on-chain.
Hyperliquid
Section titled “Hyperliquid”ID: hyperliquid | Markets: On-chain perpetuals DEX | Chain: L1
Hyperliquid is a fully on-chain order book for perpetual futures. Authentication uses an EVM private key for signing.
| Parameter | Type | Default | Description |
|---|---|---|---|
private_key | string | Required | EVM private key (hex, with or without 0x prefix). |
testnet | string | "false" | "true" for testnet. |
curl -X POST https://agents.systemr.ai/v1/broker/connect \ -H "X-API-Key: sr_agent_..." \ -H "Content-Type: application/json" \ -d '{ "broker_type": "hyperliquid", "connection_params": { "private_key": "0xYOUR_PRIVATE_KEY", "testnet": "false" } }'Your private key is encrypted with per-agent AES-256 encryption and stored at rest. It is decrypted only at the moment of signing a transaction.
ID: dydx | Markets: Decentralized perpetuals | Version: dYdX v4 (app chain)
dYdX v4 runs on its own Cosmos SDK app chain. Authentication requires an Ethereum address and STARK key pair.
| Parameter | Type | Default | Description |
|---|---|---|---|
eth_address | string | Required | Ethereum wallet address. |
api_key | string | Required | dYdX API key. |
api_secret | string | Required | dYdX API secret. |
api_passphrase | string | Required | dYdX API passphrase. |
testnet | string | "false" | "true" for testnet. |
curl -X POST https://agents.systemr.ai/v1/broker/connect \ -H "X-API-Key: sr_agent_..." \ -H "Content-Type: application/json" \ -d '{ "broker_type": "dydx", "connection_params": { "eth_address": "0xYOUR_ETH_ADDRESS", "api_key": "YOUR_API_KEY", "api_secret": "YOUR_API_SECRET", "api_passphrase": "YOUR_PASSPHRASE", "testnet": "false" } }'ID: drift | Markets: Solana-native perpetuals | Chain: Solana
Drift Protocol is the leading perpetuals DEX on Solana. Uses Ed25519 wallet signing.
| Parameter | Type | Description |
|---|---|---|
wallet_pubkey | string | Solana wallet public key (base58). |
private_key | string | Solana wallet private key (base58 or byte array). |
curl -X POST https://agents.systemr.ai/v1/broker/connect \ -H "X-API-Key: sr_agent_..." \ -H "Content-Type: application/json" \ -d '{ "broker_type": "drift", "connection_params": { "wallet_pubkey": "YOUR_SOLANA_PUBKEY", "private_key": "YOUR_SOLANA_PRIVATE_KEY" } }'Your private key is encrypted with per-agent AES-256 encryption immediately upon connection. System R never stores plaintext keys at rest.
Security notes for DeFi connections
Section titled “Security notes for DeFi connections”All DeFi broker credentials (private keys, secrets) are:
- Encrypted in transit via HTTPS/TLS.
- Encrypted at rest using per-agent AES-256 keys derived via PBKDF2.
- Decrypted only at execution time when signing a transaction or placing an order.
- Isolated per agent using unique encryption keys. One agent cannot access another’s credentials.
For maximum security, use a dedicated trading wallet with only the funds you intend to trade. Do not use your primary cold storage wallet.