Skip to main content
Solana Agent Kit provides comprehensive integration with Adrena Protocol for perpetual trading. The integration supports both long and short positions with configurable leverage and slippage parameters.

Key Features

  • Long/Short position trading
  • Configurable leverage up to 100x
  • Slippage protection
  • Automated token account setup
  • Price feed integration
  • Support for multiple collateral types

Opening Positions

Long Position

Short Position

Closing Positions

Close Long Position

Close Short Position

LangChain Integration

Solana Agent Kit provides LangChain tools for automated trading:

Open Trade Tool

Close Trade Tool

Example Prompts

For LangChain AI tools, here are example prompts:

Opening Trades

Closing Trades

Important Notes

  1. Leverage Configuration
    • Leverage is specified in basis points (10000 = 1x)
    • Maximum leverage varies by market
    • Example: 50000 = 5x leverage
  2. Collateral Types
    • Long positions: Use same token as tradeMint to avoid swaps
    • Short positions: USDC recommended as collateral
  3. Price and Slippage
    • Price in USD
    • Slippage as percentage (0.3 = 0.3%)
    • Always monitor price impact before trading

Error Handling

Technical Details

Program ID

Price Decimals

Default Values

Token Support

  • jitoSOL
  • USDC
  • Additional assets based on protocol liquidity