drift-sdk

Trade perpetual futures on Solana's Drift Protocol via its native SDK.

650|137|Updated Jan 26, 2026
One-click install
npx skills add https://github.com/alsk1992/CloddsBot --skill drift-sdk
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: drift-sdk
Source: https://github.com/alsk1992/CloddsBot/tree/main/src/skills/bundled/drift-sdk
Command: npx skills add https://github.com/alsk1992/CloddsBot --skill drift-sdk

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @solana/web3.js, bs58, drift-sdk, and includes scripts (resource) components.

What problem does it solve?

This Skill allows users to directly trade perpetual futures on the Drift Protocol on Solana using its SDK, bypassing the need for a separate gateway service.

Core Features & Use Cases

  • Direct SDK Integration: Trade without relying on a gateway server.
  • Perpetual Futures Trading: Open, close, and manage long/short positions on various crypto assets.
  • Order Management: Place limit and market orders, view open orders, and cancel them.
  • Account Management: Check balances, collateral, margin, and health factor.
  • Leverage Control: Set leverage for individual markets.
  • Use Case: A user wants to quickly open a long position on BTC-PERP with a specific size and leverage, and this Skill enables them to do so directly via a simple command.

Quick Start

Use the drift skill to open a long position for BTC with a size of 0.1.

Frequently Asked Questions about drift-sdk

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I trade perpetual futures on Solana without using a gateway server?

You can trade perpetual futures on Solana directly without a gateway server by using the native Drift Protocol SDK. This integration allows you to execute market and limit orders, manage positions, and adjust leverage through secure on-chain interactions.

What do I need to start trading crypto on the Drift Protocol?

To start trading crypto on the Drift Protocol, you need a Solana private key and an RPC URL configured as environment variables. These credentials enable secure, direct on-chain interaction for executing trades and managing your account.

Can I manage leverage and check my margin for Solana perp positions?

Yes, you can manage leverage and check margin for Solana perp positions via the Drift SDK. It facilitates setting leverage for individual markets and inquiring about balances, collateral, and your account's health factor.

What is the best way to open a long position on BTC-PERP using the Drift SDK?

The best way to open a long position on BTC-PERP using the Drift SDK is by specifying the asset, size, and leverage in a simple command. The Skill handles the direct execution of your market or limit orders on-chain.

Does the Drift SDK support placing limit orders for Solana perpetuals?

Yes, the Drift SDK supports placing limit orders for Solana perpetuals. It provides full order management capabilities, allowing you to place limit and market orders, view open orders, and cancel existing ones.