GDEX Trading Skills

Deep dive on all 14 GDEX trading skills โ€” capabilities, example prompts, supported chains, and the authentication flow

The 14 GDEX trading skills give any Gemach agent full-stack DeFi capability via the @gdexsdk/gdex-skill package. From simple spot buys to cross-chain bridging to perpetual futures with copy trading โ€” these skills cover the complete trading lifecycle.

Supported Chains

All GDEX trading skills operate across the following networks:

Chain
Chain ID

Solana

622112261

Ethereum

1

Base

8453

Arbitrum

42161

BNB Smart Chain

56

Optimism

10

Sui

(native)

Sonic

(native)

Berachain

(native)

Authentication Flow

Most trading skills require an active GDEX session before executing transactions. Authentication uses a session key pair model:

import {
  generateGdexSessionKeyPair,
  buildGdexSignInMessage,
  buildGdexSignInComputedData,
} from '@gdexsdk/gdex-skill';
import { ethers } from 'ethers';

// 1. Generate a disposable session key pair
const sessionKeyPair = generateGdexSessionKeyPair();

// 2. Build the sign-in message with your wallet address
const message = buildGdexSignInMessage({
  walletAddress: '0xYourWalletAddress',
  sessionPublicKey: sessionKeyPair.publicKey,
});

// 3. Sign the message with your wallet
const wallet = new ethers.Wallet(privateKey);
const signature = await wallet.signMessage(message);

// 4. Build computed authentication data
const computedData = buildGdexSignInComputedData({
  message,
  signature,
  sessionKeyPair,
});

The session key pair is ephemeral โ€” it authorizes the agent to act on behalf of your wallet for the duration of the session without exposing your private key.


Skill Reference

gdex-authentication

Purpose: Manage the full GDEX authentication lifecycle โ€” generating session key pairs, constructing sign-in messages, and maintaining session state.

Key capabilities:

  • Generate session key pairs for wallet-delegated signing

  • Build and sign GDEX authentication messages

  • Refresh expired sessions automatically

  • Store session state securely for use by other skills

Example prompts:

Prerequisite for: All transaction-executing skills (gdex-spot-trading, gdex-perp-trading, gdex-bridge, etc.)


gdex-wallet-setup

Purpose: Configure and register wallets for use across all GDEX trading skills.

Key capabilities:

  • Register EVM wallets (MetaMask, hardware wallets, raw private keys)

  • Register Solana wallets (Phantom, raw keypairs)

  • Set a default wallet for agent-initiated transactions

  • Validate wallet connectivity and balance checks

Example prompts:


gdex-onboarding

Purpose: Guide first-time users through the complete GDEX setup process.

Key capabilities:

  • Walk through wallet creation or import

  • Set up GDEX API key configuration

  • Fund wallet with Apple Pay, bank transfer, or on-chain deposit

  • Verify end-to-end connectivity before first trade

MCP Tools exposed (available to IDE agents via MCP):

Tool
Description

search_gdex_docs

Search GDEX documentation for any topic

get_sdk_pattern

Retrieve TypeScript code patterns for SDK operations

get_api_info

Look up API endpoint details and parameters

explain_workflow

Get step-by-step explanations of GDEX workflows

get_chain_info

Retrieve chain IDs, RPC endpoints, and network details

get_trading_guide

Spot and limit order trading guidance

get_copy_trade_guide

Copy trading setup and configuration

get_component_guide

SDK component usage and integration patterns

Example prompts:


gdex-spot-trading

Purpose: Execute spot buy and sell orders across all supported chains.

Key capabilities:

  • Market buys and sells for any token by address or symbol

  • Configurable slippage tolerance

  • Multi-chain support (Solana, Ethereum, Base, BNB Chain, Arbitrum, Optimism, and more)

  • Transaction confirmation with receipt parsing

Core SDK functions:

Example prompts:


gdex-limit-orders

Purpose: Place limit buy and sell orders with optional take-profit and stop-loss automation.

Key capabilities:

  • Set entry price for automated buy execution

  • Set exit price with take-profit targets

  • Trailing stop-loss configuration

  • View and cancel open orders

Core SDK functions:

Example prompts:


gdex-token-discovery

Purpose: Find trending, new, and high-potential tokens with security and volume analysis.

Key capabilities:

  • Scan trending tokens across all supported chains

  • Filter by minimum security score, volume threshold, and holder count

  • Get token metadata: market cap, 24h volume, holder distribution, contract audit status

  • Identify newly launched tokens in configurable time windows

Core SDK functions:

Example prompts:


gdex-portfolio

Purpose: Track holdings, aggregate balances, and calculate P&L across all wallets and chains.

Key capabilities:

  • Aggregate token balances across multiple wallets and chains

  • Real-time USD value calculation

  • P&L tracking with cost-basis history

  • Exportable portfolio snapshots

  • Alert thresholds for significant value changes

Example prompts:


gdex-bridge

Purpose: Transfer assets cross-chain between any supported GDEX network.

Key capabilities:

  • Estimate bridge fees and time before committing

  • Execute bridge transactions with status tracking

  • Support for all major bridge routes (Solana โ†” EVM, EVM โ†” EVM)

  • Transaction receipt parsing with destination chain confirmation

Core SDK functions:

Bridge response types:

Example prompts:


gdex-perp-trading

Purpose: Open, manage, and close leveraged perpetual futures positions on HyperLiquid.

Key capabilities:

  • Market and limit entry for long/short positions

  • Leverage configuration (1xโ€“50x depending on asset)

  • Position management: add margin, partial close, full close

  • Real-time P&L and liquidation price monitoring

Example prompts:


gdex-perp-funding

Purpose: Monitor and manage perpetual funding rate exposure across all open positions.

Key capabilities:

  • Real-time funding rate monitoring for all open positions

  • Funding rate history and trend analysis

  • Alert on high funding rate conditions

  • Automatic position flip when funding becomes severely negative

Example prompts:


gdex-copy-trading

Purpose: Mirror the spot trading activity of identified high-performing wallets.

Key capabilities:

  • Search for and evaluate top-performing wallets by win rate and P&L

  • Configure copy parameters: position size scaling, token allowlist/blocklist

  • Monitor copy performance vs. source wallet

  • Pause or stop copying individual traders

Example prompts:


gdex-perp-copy-trading

Purpose: Mirror the perpetual futures strategies of top HyperLiquid traders.

Key capabilities:

  • Identify top HyperLiquid traders by ROI and Sharpe ratio

  • Copy both entries and exits with configurable lag

  • Risk management: max position size, max leverage override

  • Independent pause/stop per copied trader

Example prompts:


gdex-trading

Purpose: High-level trading orchestration skill that coordinates other trading skills for complex, multi-step strategies.

Key capabilities:

  • Execute compound strategies that span multiple skills (e.g., discover โ†’ analyze โ†’ buy โ†’ set limit sell)

  • Manage strategy state across multiple trades

  • Schedule and automate recurring trading actions

  • Aggregate results from multiple trading sub-skills into unified reports

Example prompts:


gdex-sdk-debugging

Purpose: Diagnose and resolve GDEX SDK integration issues, failed transactions, and API errors.

Key capabilities:

  • Decode GDEX SDK error codes with plain-language explanations

  • Trace failed transaction causes (insufficient balance, slippage, RPC error, etc.)

  • Check API connectivity and rate limit status

  • Suggest fixes for common integration issues

Example prompts:


How Skills Interact with the GDEX SDK

Each GDEX trading skill wraps the @gdexsdk/gdex-skill npm package. The SDK provides TypeScript functions that the skill's helper scripts invoke; the skill's SKILL.md instructions tell the agent when and how to call those helpers.

The interaction chain:

Installing the SDK:


See also:

Last updated