flash-trade

Integrates Flash Trade perpetuals trading on Solana via the flash-sdk TypeScript client.

Updated Jul 10, 2026
One-click install
npx skills add https://github.com/Kaleb-Rupe/aurora --skill flash-trade-kaleb-rupe
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: flash-trade
Source: https://github.com/Kaleb-Rupe/aurora/tree/main/system/aurora-bridge/.claude/skills/flash-trade
Command: npx skills add https://github.com/Kaleb-Rupe/aurora --skill flash-trade-kaleb-rupe

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires flash-sdk, @coral-xyz/anchor, @solana/web3.js, bs58, and includes references (resource) components.

What problem does it solve? Building leveraged trading integrations on Flash Trade requires navigating pool-to-peer architecture, Pyth oracles, versioned transactions with address lookup tables, and 69 protocol error codes. This Skill provides the complete SDK reference, account structures, and production patterns needed to open positions, manage collateral, place orders, and provide liquidity without reverse-engineering the IDL. ## Core Features & Use Cases - Position Management: Open, close, increase, and decrease leveraged positions up to 100x (500x Degen Mode) with slippage protection and compute budget guidance. - Orders & Collateral: Place trigger orders (stop-loss/take-profit), limit orders, and add or remove collateral, including atomic swap-and-open and close-and-swap composability flows. - Liquidity & Staking: Provide LP liquidity, stake FLP and FLASH tokens, and query PnL, liquidation prices, and oracle data via ViewHelper read-only methods. - Use Case: Build a trading bot that opens a 10x SOL long with 100 USDC collateral, attaches stop-loss and take-profit triggers, and monitors PnL using the included production bot template. ## Quick Start Use the flash-trade skill to open a 10x long SOL position with 100 USDC collateral on the Crypto.1 pool.

Frequently Asked Questions about flash-trade

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

FAQPage Schema
How do I open a leveraged position on Flash Trade?

Call client.openPosition with the target symbol, collateral symbol, a priceWithSlippage OraclePrice, collateral amount, size in target token decimals, side, and PoolConfig. You must call client.loadAddressLookupTable(poolConfig) first or the versioned transaction will fail.

How do I place a stop-loss or take-profit order on Solana perpetuals?

Use client.placeTriggerOrder with a triggerPrice, deltaSizeAmount, and isStopLoss flag. Orders are executed by off-chain keepers when the oracle price crosses the threshold, with a maximum of 5 stop-loss and 5 take-profit orders per market.

Why does my Flash Trade transaction fail with error 6020?

Error 6020 is MaxPriceSlippage, meaning the oracle price moved beyond your priceWithSlippage tolerance. Widen the tolerance to 1-3% from the oracle price or retry with a fresh price quote.

What is Degen Mode on Flash Trade?

Degen Mode allows 125x-500x leverage on select assets like SOL, BTC, and ETH, configured per custody via PricingParams.max_init_degen_leverage. It is not available for limit or trigger orders and has separate exposure caps per market.

When should I not use the flash-trade skill?

Use the jupiter skill for plain swaps without positions, the drift skill for Drift Protocol perpetuals, the solana-dev skill for general Solana program development, and the helius skill for priority fee estimation.