API Account Setup
Set up your account for API access on Localnet or Testnet
API Account Setup
This guide walks you through setting up an account for programmatic API access on Cascade. You'll create an account, fund it with test assets, and configure a delegate address for signing API requests.
Overview
Cascade provides two environments for development:
| Localnet | Testnet | |
|---|---|---|
| UI | tr4d3.cascade.xyz | tr4d3-testnet.cascade.xyz |
| Matcher | matcher.cascade.xyz | matcher-testnet.cascade.xyz |
| Chain | Internal (chainId 31337) | Arbitrum Sepolia |
| Funds | Faucet (instant) | Mock USDC (mintable) |
| Best for | Rapid development, testing | Pre-production, chain integration |
Recommendation: Start with Localnet for faster iteration, then move to Testnet when you need to test on-chain settlement flows.
Localnet Setup
Localnet runs on Cascade's internal infrastructure with instant faucet funding. This is the fastest way to start building.
Step 1: Access the Trading Interface
Navigate to https://tr4d3.cascade.xyz/trade.
Step 2: Enter Invite Code
When prompted, enter an invite code. Contact the engineering team to obtain one.
Step 3: Create Account
Sign up using your email address. You'll receive a verification code to complete registration.
Step 4: Fund Your Account
Once logged in, use the Faucet to receive test funds:
- Click the Faucet button in the trading interface
- Receive 100,000 test USDC instantly
- Funds appear in your account balance immediately
Step 5: Create a Delegate Address
A delegate address allows your API client to sign requests on behalf of your account without exposing your main wallet. See Setting Up a Delegate Address below.
Testnet Setup
Testnet runs on Arbitrum Sepolia and requires minting mock USDC before depositing.
Step 1: Access the Trading Interface
Navigate to https://tr4d3-testnet.cascade.xyz/.
Step 2: Enter Invite Code
When prompted, enter an invite code. Contact the engineering team to obtain one.
Step 3: Create Account
Sign up using your email address. Complete the verification process.
Step 4: Mint Mock USDC
You'll need to mint mock USDC on Arbitrum Sepolia:
Contract Address:
0x0964018860620fcC232fC8C0A0fc0dC2911c4100Function:
mint(address to, uint256 amount)You can mint tokens using:
- Etherscan: Navigate to the contract on Arbiscan, connect your wallet, and call
mint()with your address and desired amount (remember USDC has 6 decimals, so1000000000= 1,000 USDC) - Cast (Foundry):
cast send 0x0964018860620fcC232fC8C0A0fc0dC2911c4100 \
"mint(address,uint256)" \
<your-address> \
1000000000 \
--rpc-url https://sepolia-rollup.arbitrum.io/rpc \
--private-key <your-private-key>Step 5: Deposit Funds
- In the trading interface, locate your deposit address
- Transfer your minted USDC to this deposit address on Arbitrum Sepolia
- Wait for the transaction to confirm (typically 1-2 minutes)
- Funds will appear in your Cascade account balance
Step 6: Create a Delegate Address
Configure a delegate address for API signing. See Setting Up a Delegate Address below.
Setting Up a Delegate Address
A delegate address is a separate keypair that can sign API requests on behalf of your main account. This provides several benefits:
- Security: Your main wallet's private key never touches your trading infrastructure
- Isolation: Revoke delegate access without affecting your main account
- Automation: Store the delegate's private key in your trading bot securely
Creating a Delegate
- Generate a new keypair for your delegate. You can use any Ethereum wallet generator:
# Using cast (Foundry)
cast wallet new-
Navigate to Account Settings in the trading interface
-
Add Delegate Address:
- Go to the delegates or signers section
- Enter the public address of your new keypair
- Confirm the transaction to authorize this delegate
-
Store the private key securely. Your API client will use this private key to sign requests.
Using Your Delegate
When authenticating with the API, you'll sign challenges using your delegate's private key. The API will verify that the signer is an authorized delegate for your account.
See the REST API Authentication guide for implementation details.
Next Steps
With your account set up and delegate configured, you're ready to start building:
REST API Authentication
Authenticate your API requests with JWT tokens
WebSocket Connection
Subscribe to real-time market data and order updates
REST API Reference
Explore available endpoints and schemas
Troubleshooting
Funds not appearing after deposit (Testnet)
- Verify the transaction confirmed on Arbitrum Sepolia
- Check that you sent to the correct deposit address
- Allow a few minutes for the system to process the deposit
Delegate not authorized
- Ensure the delegate address was added successfully in the UI
- Verify you're signing with the correct delegate private key
- Check that the delegate hasn't been revoked
Invalid invite code
- Contact the engineering team to obtain a valid invite code
- Ensure you're on the correct environment (Localnet vs Testnet)