drift-protocol
Complete Drift Protocol SDK for building perpetual futures, spot trading, and DeFi applications on Solana. Use when building trading bots, integrating Drift markets, managing positions, or working with vaults.
npx skills add majiayu000/claude-skill-registry --skill drift-protocol --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Drift Protocol SDK Development Guide A comprehensive guide for building Solana applications with the Drift Protocol SDK - the leading perpetual futures and spot trading protocol on Solana. ## Overview Drift Protocol is a decentralized exchange on Solana offering: - **Perpetual Futures**: Up to 20x leverage on crypto assets - **Spot Trading**: Borrow/lend and margin trading - **Cross-Collateral**: Use multiple assets as collateral - **Vaults**: Delegated trading pools - **Jupiter Integration**: Direct spot swaps ## Quick Start ### Installation ```bash npm install @drift-labs/sdk @solana/web3.js @coral-xyz/anchor ``` For Python: ```bash pip install driftpy ``` ### Basic Setup (TypeScript) ```typescript import { Connection, Keypair } from '@solana/web3.js'; import { Wallet } from '@coral-xyz/anchor'; import { DriftClient, initialize, DriftEnv, BulkAccountLoader } from '@drift-labs/sdk'; // 1. Setup connection and wallet const connection = new Connection('https://api.mainnet-beta.solana.com'); const keypair = Keypair.fromSecretKey(/* your secret key */); const wallet = new Wallet(keypair); // 2. Initialize SDK const sdkConfig = initialize({ env: 'mainnet-beta' as DriftEnv }); // 3. C
- Overview
- Quick Start
- Installation
- Basic Setup (TypeScript)
- Basic Setup (Python)
- Core Concepts
- 1. Precision and BN (BigNumber)
- 2. Market Types
- 3. Order Types
- 4. Post-Only Parameters
- Trading Operations
- Placing Perpetual Orders
- Placing Spot Orders
- Multiple Orders
npm install @drift-labs/sdk @solana/web3.js @coral-xyz/anchor pip install driftpy
What does the drift-protocol skill do?
Complete Drift Protocol SDK for building perpetual futures, spot trading, and DeFi applications on Solana. Use when building trading bots, integrating Drift markets, managing positions, or working with vaults.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill drift-protocol --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
