Skip to main content
Go from an empty wallet to a resting ETH-PERP order on testnet in five steps.
Set PRIVATE_KEY (your account owner wallet) in your environment before running the snippets below. The examples use a public Sepolia RPC endpoint, so no RPC setup is needed.
1

Get Sepolia ETH for gas

Your wallet pays gas for the on-chain deposit. Grab testnet ETH from the Google Cloud Sepolia faucet.
2

Mint testnet USDC

Open testnet.app.derive.xyz/developers, connect your wallet, and click Mint to receive testnet USDC — the collateral you’ll deposit in the next step.
3

Choose a manager and risk universe

Every subaccount lives under a manager in a risk universe — together they set the margin model and which markets you can trade. Risk universe 1 is the prime universe, where ETH-PERP trades. See Managers & risk universes for the full model.
4

Deposit to create your account

Your first deposit creates your Derive account and its first subaccount under the manager you chose — there is no separate “create account” call. Your wallet submits the on-chain deposit.
5

Place an ETH-PERP order

Open the WebSocket, log in, and place a limit order. place() encodes the trade action, EIP-712-signs it locally with your key, and submits private/order — the exchange only ever settles what you signed.
maxFee caps the fee baked into the signature; omit it and the SDK defaults to 3× the current taker cost. To stream your fills as they happen, subscribe to the {subaccountId}.trades channel — see Subscriptions.

Next steps

Authentication

Session login, JWT, and the wallet-vs-session-key auth paths.

Action signing

The full EIP-712 Action envelope, per-module data layouts, and nonces.

Session keys

Delegate a signing key so you never hot-wire your wallet into a bot.

Contracts

On-chain contract addresses per deployment (action manager, vApp, outbox, spot vault).