pokeperps

Trade perpetual futures on Pokemon TCG card prices via the PokePerps DEX on Solana. Search cards, analyze prices, simulate trades, open/close leveraged long/short positions, and manage portfolios. Use when the user asks about Pokemon card trading, perpetual futures, or PokePerps.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "pokeperps" with this command: npx skills add ankushKun/pokeperps

PokePerps AI Agent Skill

Platform: PokePerps — Decentralized Perpetual Futures Exchange for Pokemon TCG Card Prices Blockchain: Solana (mainnet-beta) Backend API: https://backend.pokeperps.fun WebSocket: wss://backend.pokeperps.fun/ws/trading Program ID: 8hH5CWo14R5QhaFUuXpxJytchS6NgrhRLHASyVeriEvN Collateral: USDC (EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v)

PokePerps lets you trade perpetual futures contracts on real Pokemon Trading Card Game card prices. Prices are sourced from TCGPlayer marketplace in real-time and published on-chain via an Ed25519-signed oracle.

MCP Server (Recommended)

The easiest way for AI agents to interact with PokePerps is via the Model Context Protocol (MCP) server.

Read-only mode (no wallet required):

{
  "mcpServers": {
    "pokeperps": {
      "command": "npx",
      "args": ["@pokeperps/mcp"]
    }
  }
}

With trade execution (requires Solana keypair):

{
  "mcpServers": {
    "pokeperps": {
      "command": "npx",
      "args": ["@pokeperps/mcp"],
      "env": {
        "POKEPERPS_KEYPAIR": "/path/to/your/keypair.json"
      }
    }
  }
}

MCP Environment Variables

VariableDescriptionDefault
POKEPERPS_KEYPAIRPath to Solana keypair JSON(none - read-only mode)
POKEPERPS_API_URLBackend API URLhttps://backend.pokeperps.fun
POKEPERPS_RPC_URLSolana RPC URLhttps://api.mainnet-beta.solana.com

MCP Tools

Read-only tools (always available):

ToolDescription
get_market_moversTop gainers, losers, and most volatile cards
get_portfolioComplete portfolio with computed PnL for a wallet
get_trading_signalsPre-computed trading signals and recommendations
prepare_tradeValidate a trade before opening (margin, fees, risks)
simulate_tradeSimulate PnL scenarios at different price levels
search_cardsSearch Pokemon cards by name
get_card_detailsFull card info with listings, sales, history
batch_get_cardsFetch up to 50 cards in one request
get_tradable_productsList all product IDs with active markets
get_trading_configTrading parameters (leverage, fees, etc.)

Execution tools (require POKEPERPS_KEYPAIR):

ToolDescription
open_positionOpen a new long/short position
close_positionClose an existing position to realize PnL
depositDeposit USDC into trading account
withdrawWithdraw USDC from trading account
get_wallet_statusCheck wallet balance and execution status

MCP Resources

  • pokeperps://docs/trading-guide — Trading guide and risk parameters
  • pokeperps://docs/api-reference — Full OpenAPI specification

Trading Parameters

ParameterValue
Max leverage50x
Min position size$1 USDC
Max position per user$100,000 USDC
Trading fee0.05% (5 bps) on open and close
Maintenance margin1% (100 bps)
Liquidation fee0.5% to liquidator + 0.5% to insurance
Funding interval8 hours
Funding rate cap±0.05% per interval
Oracle price max age15 seconds
CollateralUSDC (SPL Token)

What you can do:

  • Go long (bet price goes up) or short (bet price goes down)
  • Use 1x–50x leverage
  • Positions have no expiry (perpetual)
  • Close anytime to realize PnL
  • Prices track real TCGPlayer marketplace prices

Architecture

Agent (you)
  │
  ├── REST API (https://backend.pokeperps.fun/api/...)
  │     ├── Read-only: card data, prices, markets, positions
  │     └── Transaction builders: returns params for Solana transactions
  │
  ├── WebSocket (wss://backend.pokeperps.fun/ws/trading)
  │     └── Real-time price updates, position events
  │
  └── Solana RPC (https://api.mainnet-beta.solana.com)
        └── Sign & send transactions built from API params

The backend does NOT sign or submit transactions. It provides instruction data and account addresses. You build, sign, and submit transactions client-side.

Key API Endpoints

Base URL: https://backend.pokeperps.fun

Card Discovery

MethodPathDescription
GET/api/cards/search?q={query}&limit={1-50}Search cards by name
GET/api/dashboard?limit={1-200}Top tradable cards + biggest mover
GET/api/cards/{product_id}Full card details
GET/api/cards/{product_id}/bundleAll card data in one call
GET/api/cards/{product_id}/history?range=monthPrice history
GET/api/cards/{product_id}/signalsTrading signals & recommendations
POST/api/cards/batchFetch up to 50 cards at once

Trading

MethodPathDescription
GET/api/trading/tradableAll tradable product IDs
GET/api/trading/configTrading parameters
GET/api/trading/exchangeExchange state
GET/api/trading/market/{product_id}Market state
GET/api/trading/market/{product_id}/statsMarket statistics
GET/api/trading/account/{wallet}User account
GET/api/trading/account/{wallet}/positionsUser positions
GET/api/trading/portfolio/{wallet}Full portfolio with computed PnL
GET/api/trading/prepare-trade/{id}?wallet=X&side=Y&size=Z&leverage=WPre-trade validation
POST/api/trading/simulateTrade simulation with scenarios
GET/api/trading/analytics/movers?limit={1-50}Top gainers, losers, volatile

Transaction Builders

MethodPathDescription
POST/api/trading/tx/create-accountCreate trading account
POST/api/trading/tx/depositDeposit USDC
POST/api/trading/tx/withdrawWithdraw USDC
POST/api/trading/tx/open-positionOpen long/short position
POST/api/trading/tx/close-positionClose position
POST/api/trading/tx/add-marginAdd margin to position

Oracle

MethodPathDescription
GET/api/oracle/pricesAll current oracle prices
GET/api/oracle/router/pricesBest available prices
GET/api/trading/oracle/{product_id}Single product price
POST/api/trading/oracle/pricesBatch oracle prices

See references/API.md for full request/response schemas.

Optimized Trading Flow

1. GET /api/trading/analytics/movers       → Find opportunities
2. POST /api/cards/batch                   → Fetch details for candidates
3. GET /api/cards/{id}/signals             → Get trading recommendation
4. GET /api/trading/prepare-trade/{id}     → Validate trade
5. POST /api/trading/tx/open-position      → Execute trade
6. GET /api/trading/portfolio/{wallet}     → Monitor positions

This uses 6 API calls instead of 15+ in the traditional flow.

PnL Calculation

margin = size / leverage
fee = size * 0.0005  (0.05% on open, same on close)

For long:
  unrealized_pnl = size * (current_price - entry_price) / entry_price
  liquidation_price = entry_price * (1 - (margin - maintenance_margin) / size)

For short:
  unrealized_pnl = size * (entry_price - current_price) / entry_price
  liquidation_price = entry_price * (1 + (margin - maintenance_margin) / size)

Maintenance margin = size * 0.01 (1%)

Decision-Making Signals

Use /api/cards/{id}/signals for pre-computed analysis:

Bullish (go long):

  • Positive change_24h with high activity_score
  • Recent sales trending above market_price
  • Decreasing listing count (supply shrinking)
  • High short OI relative to long (potential short squeeze)

Bearish (go short):

  • Negative change_24h and change_30d
  • Recent sales trending below market_price
  • Increasing listing count (supply growing)
  • High long OI relative to short (potential long squeeze)

WebSocket

Connect to wss://backend.pokeperps.fun/ws/trading:

{ "type": "subscribe", "products": [123456], "accounts": ["YourWallet"] }
{ "type": "ping" }

Events: price_update, position_opened, position_closed, market_stats, account_update

Rate Limits

LimitValue
Global API rate limit300 requests/min per IP
Oracle price signing2 per 10 seconds per IP per product
WebSocket connections25 per IP, 1000 total
Max batch product IDs200 per request

Error Codes

CodeNameMeaning
6012InvalidAmountZero or negative amount
6013InsufficientBalanceNot enough USDC
6014ExchangePausedExchange is paused
6015InvalidLeverageOutside 1-50 range
6016PositionTooSmallBelow $1 minimum
6018MarketInactiveMarket disabled
6019MaxOpenInterestExceededOI at capacity
6030OraclePriceStalePrice older than 15s
6031PositionTooLargeAbove $100k max
6035InvalidEd25519InstructionEd25519 precompile malformed

See references/API.md for full error reference.

Agent Best Practices

Minimize API Calls

Instead of...Use...
GET /account + GET /positions + oracle callsGET /api/trading/portfolio/{wallet} (1 call)
Multiple GET /api/cards/{id} callsPOST /api/cards/batch (1 call for up to 50)
5+ calls to validate a tradeGET /api/trading/prepare-trade/{id} (1 call)
Scanning all cards for moversGET /api/trading/analytics/movers (1 call)

Position Management

  1. Check riskStatus before opening new positions — avoid if warning or danger
  2. Use distanceToLiquidation for stop-loss (conservative: close if <10%, moderate: <5%)
  3. Monitor fundingDirection — avoid positions that pay funding
  4. Check wouldExceedOI before large trades

Security

  • Always verify PDAs client-side before signing transactions
  • Never expose private keys in API calls
  • Validate oracleAge < 15 seconds before trading
  • Check canTrade from prepare-trade before proceeding

Additional References

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Workout Readiness Check In

Create a same-day workout readiness decision card for users who planned to exercise today but feel tired, sore, stressed, underslept, ill, or uncertain. Use...

Registry SourceRecently Updated
General

URL to Markdown

Convert HTML web pages from HTTP/HTTPS URLs to clean, readable Markdown files with optional batch processing and formatting features.

Registry SourceRecently Updated
General

Appliance Manual Command Card

Assist in creating a one-page appliance command card for tracking maintenance, troubleshooting, warranty info, and repair preparation.

Registry SourceRecently Updated
General

Fireseed Writing Expert

全能小说写作专家,支持从零创作、DNA提取与克隆、风格仿写、一键发布到 fireseed.online。用户可以用自然语言描述需求,系统自动调度子技能完成科学、闭环的写作与发布流程。

Registry SourceRecently Updated