trading
GDEX Trading
For Claude: How to Use This Skill
Skill instructions are preloaded in context when this skill is active. Do not perform filesystem searches or tool-driven exploration to rediscover them; use the guidance below directly.
Overview
GDEX Trading gives AI agents access to cross-chain DeFi operations via managed-custody wallets. Agents can trade spot markets, open and manage perpetual futures positions, bridge assets, discover tokens, and monitor portfolios — all through a single unified API at https://trade-api.gemach.io/v1.
Supported chains: Solana, Sui, Ethereum, Base, Arbitrum, BSC, Avalanche, Polygon, and 8+ additional EVM networks.
Available Sub-Skills
| Sub-skill | Purpose |
|---|---|
gdex-authentication |
API key login, session management |
gdex-onboarding |
New user wallet setup and verification |
gdex-wallet-setup |
Wallet configuration and key management |
gdex-spot-trading |
Market buy/sell on any supported chain |
gdex-perp-trading |
Open, close, and manage perp positions |
gdex-perp-funding |
Deposit/withdraw perp margin |
gdex-perp-copy-trading |
Copy top-trader perp strategies |
gdex-copy-trading |
Copy top-trader spot strategies |
gdex-limit-orders |
Place, update, and cancel limit orders |
gdex-portfolio |
View balances, positions, trade history |
gdex-token-discovery |
Trending tokens, OHLCV, token details |
gdex-bridge |
Estimate and execute cross-chain bridges |
gdex-ui-install-setup |
Frontend SDK install and setup |
gdex-ui-page-layouts |
UI page layout components |
gdex-ui-portfolio-dashboard |
Portfolio dashboard UI |
gdex-ui-theming |
Theme and styling configuration |
gdex-ui-trading-components |
Trading UI components |
gdex-ui-wallet-connection |
Wallet connection UI |
gdex-sdk-debugging |
SDK debugging and error diagnostics |
Quick Decision Guide
- Buy or sell a token →
gdex-spot-trading - Open a leveraged position →
gdex-perp-trading - Bridge assets cross-chain →
gdex-bridge - Find trending tokens or price data →
gdex-token-discovery - Check portfolio or balances →
gdex-portfolio - Place limit orders →
gdex-limit-orders - Follow top traders →
gdex-copy-tradingorgdex-perp-copy-trading - First-time setup →
gdex-authenticationthengdex-onboarding
Installation
npm install @gdexsdk/gdex-skill
Authentication
GDEX uses a two-layer auth model:
- API Key — shared keys available via the GDEX dashboard or community keys. Set
GDEX_API_KEYin your environment or callloginWithApiKey(apiKey). - Managed-custody signing — trading actions require a secp256k1 session key derived from your control wallet's private key (
CONTROL_WALLET_PRIVATE_KEY). The SDK handles AES-256-CBC payload encryption and SHA256 key derivation automatically.
import { GdexSkill } from '@gdexsdk/gdex-skill';
const skill = new GdexSkill();
await skill.loginWithApiKey(process.env.GDEX_API_KEY);
Critical Notes
walletAddressis your CONTROL address, NOT the managed address. Always use the control wallet address for authentication and identity fields.- Solana
chainIdis622112261, not900. Using the wrong value causes silent failures. hlCloseAllis unreliable — use reduce-only orders instead to close Hyperliquid perp positions.hlUpdateLeverageis not implemented on the backend; useset_perp_leverageinstead.
Environment Variables
GDEX_API_KEY= # Shared API key
CONTROL_WALLET_PRIVATE_KEY= # Control wallet private key (for managed-custody trading)
Source Repository
Full SDK source, examples, and sub-skill implementations: https://github.com/GemachDAO/gdex-skill
More from serenorg/seren-skills
polymarket-bot
Autonomous trading agent for Polymarket prediction markets using Seren ecosystem
9polymarket-maker-rebate-bot
Provide two-sided liquidity on Polymarket with rebate-aware quoting, inventory controls, and dry-run-first execution for binary markets.
6saas-short-trader
Alpaca-branded SaaS short trader with MCP-native execution: scores AI disruption risk, builds capped short baskets, and tracks paper/live PnL in SerenDB.
2high-throughput-paired-basis-maker
Run a paired-market basis strategy on Polymarket with mandatory backtest-first gating before trade intents.
2seren-bounty
Work with Seren Bounty affiliate bounties: customers create and fund verifier-backed bounties; agents join to receive a referral_code and accrue earnings as qualifying events are verified; a release sweep pays matured earnings out of escrow.
2budget-tracker
Compare actual Wells Fargo spending against user-defined monthly budgets per category, calculate variance, and track budget adherence over time.
1