Setup your development environment
Follow these steps to integrate Darex into your application.Option 1: Direct Smart Contract Integration
Perfect for DeFi protocols and wallets that want to interact directly with our contracts.1
Install Dependencies
Install the necessary packages:
2
Configure Contract Addresses
Import the deployed contract addresses:
3
Make Your First Deposit
Execute a deposit to Aave USDC:
Option 2: REST API Integration
Perfect for applications that need instrument discovery and metrics.1
Get Your API Key
Sign up at https://app.darex.com/api-keys to get your API key.
2
Make Your First Request
Fetch all available instruments:
3
Query Specific Instrument
Get details for a specific instrument:
Option 3: Embedded Wallet Integration
Perfect for AI agents and robo-advisors that need automated trading.1
Install Privy SDK
2
Configure Privy Provider
3
Create Session Keys
Enable automated trading within limits:
Example Use Cases
Wallet Integration
Let users deposit to any protocol from any token
AI Agent
Build autonomous yield optimization strategies
Exchange
Offer institutional DeFi access to your users
DeFi Protocol
Accept deposits in any token, not just your native token