ranger-financelisted
Install: claude install-skill sendaifun/skills
# Ranger Finance SDK Development Guide
A comprehensive guide for building Solana applications with Ranger Finance - the first perpetual futures aggregator on Solana.
## Overview
Ranger Finance is a Smart Order Router (SOR) that aggregates perpetual futures trading across multiple Solana protocols:
- **Drift Protocol**: Leading perps DEX on Solana
- **Flash Trade**: High-performance perpetuals
- **Adrena**: Leverage trading protocol
- **Jupiter Perps**: Jupiter's perpetuals platform
### Key Benefits
- **Best Execution**: Automatically routes orders to venues with best pricing
- **Unified API**: Single interface for all supported perp protocols
- **Position Aggregation**: View and manage positions across all venues
- **AI Agent Support**: Built-in MCP server for AI trading agents
## Quick Start
### Installation (TypeScript)
```bash
# Clone the SDK demo
git clone https://github.com/ranger-finance/sor-ts-demo.git
cd sor-ts-demo
npm install
```
### Environment Setup
Create a `.env` file:
```bash
RANGER_API_KEY=your_api_key_here
SOLANA_RPC_URL=https://api.mainnet-beta.solana.com
WALLET_PRIVATE_KEY=your_base58_private_key # Optional, for signing
```
### Basic Setup
```typescript
import { SorApi, TradeSide } from 'ranger-sor-sdk';
import dotenv from 'dotenv';
dotenv.config();
// Initialize the SOR API client
const sorApi = new SorApi({
apiKey: process.env.RANGER_API_KEY!,
solanaRpcUrl: process.env.SOLANA_RPC_URL,
});
// Your wallet public key
const walletAddress