Prerequisites
Before using UOA, you need:1
Create a Magic Account
Visit the Magic Dashboard and sign up for a Magic developer account.
2
Get your API keys
In your dashboard, create a new application and obtain your Secret Key. You will use this as the
X-MAGIC-SECRET-KEY header on all requests.3
Set up authentication
Configure your application to issue JWTs for end users.
4
Set up Server Wallets
Follow the dashboard guide to set up Server Wallets for your application. Use the same Magic credential and returned provider ID when registering your UOA wallet setup.
5
Register your app with UOA
Register your application with your Magic secret key and OIDC configuration so UOA can validate your user JWTs.
cURL
Authentication
UOA requires a JWT (Authorization header) and your Magic secret key (X-MAGIC-SECRET-KEY header) on every authenticated request. Your application is responsible for generating the end-user JWT.
Include both the user’s JWT and your Magic secret key on every request:
Create an Account
Create or fetch a user account. This provisions wallet addresses for supported EVM and Solana chains.cURL
Calling
POST /account multiple times for the same user returns the same account. Wallet addresses are derived deterministically.Fetch Wallet Balances
Use the wallet addresses returned fromPOST /account to fetch wallet balances directly from your frontend or backend using your preferred EVM and Solana RPC providers.
Initialize a Perp DEX
Perp DEX setup has three high-level steps:- Initialize the venue account with
POST /account/init-perp-dex. - Make an initial deposit if the venue requires funding before trading setup.
- Initialize trading with
POST /account/init-perp-dex-trading.
cURL
cURL
cURL
Execute a Transfer
Create a transfer to move funds between locations. UOA plans the route and executes it asynchronously.Estimate Costs
Before executing, estimate the transfer cost:cURL
Create the Transfer
cURL
Monitor Progress
Poll the task to track execution:cURL
Next Steps
API Reference
Explore the complete API surface including all endpoints, parameters, and response schemas.
Express API
Learn about the underlying Express API that powers UOA wallet operations.