{"uid":"cap_eQJsO1mr_1CpsS9WhhfwT","slug":"speraxos-perpetuals-open-position-transaction-builder-f33612b0","name":"SperaxOS Perpetuals Open Position Transaction Builder","description":"SperaxOS is an AI-powered DeFi operating system — track portfolios, execute swaps, analyze on-chain data, and collaborate with intelligent agents that manage your crypto workflow.","url":"https://chat.sperax.io/api/x402/tools/perpetuals/buildOpenPositionTx?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"side":{"enum":["long","short"],"type":"string","description":"Trade direction"},"market":{"type":"string","description":"Market symbol, e.g. \"ETH-USD\""},"chainId":{"type":"number","description":"Chain ID (e.g. 42161 for Arbitrum)"},"sizeUsd":{"type":"number","description":"Position size in USD"},"exchange":{"enum":["gmx","dydx"],"type":"string","description":"Exchange: gmx or dydx"},"leverage":{"type":"number","maximum":50,"minimum":1,"description":"Leverage multiplier (1–50)"},"walletAddress":{"type":"string","description":"Trader wallet address"},"collateralToken":{"type":"string","description":"Collateral token symbol, e.g. \"USDC\" or \"ETH\""}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_6x2y0LnL1Ne5Se91jlPM9","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0xD74f5255D557944cf7Dd0E45FF521520002D5748","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Builds an unsigned transaction to open a leveraged perpetual futures position on GMX or dYdX via the SperaxOS DeFi platform","exampleAgentPrompt":"Build me a transaction to open a 10x leveraged long on ETH-USD with $500 position size using USDC as collateral on GMX on Arbitrum (chain 42161) for my wallet 0xAbC123...","exampleUseCases":[{"title":"Automated long ETH on GMX","prompt":"I want to go long on ETH-USD with $1000 at 5x leverage using USDC collateral on GMX — can you build the open position transaction for my wallet 0xDEAD...BEEF on Arbitrum?"},{"title":"Short BTC with high leverage on dYdX","prompt":"Build me a transaction to open a short on BTC-USD at 20x leverage with $500 position size on dYdX using USDC collateral for wallet 0x1234...5678 — I want to fade this rally."},{"title":"DeFi agent automated perp trading","prompt":"My trading bot needs to open a 3x long on ETH-USD on GMX on Arbitrum with $200 in ETH as collateral for wallet 0xAAAA...BBBB — give me the unsigned transaction so I can sign and broadcast it."}],"resultDescription":"Returns an unsigned transaction object ready to be signed and broadcast by the trader's wallet, encoding all parameters for opening the specified leveraged perpetual position (side, market, size, leverage, collateral) on the chosen exchange (GMX or dYdX).","failureModes":["Invalid or unsupported market symbol returns an error","Leverage outside the 1–50 range is rejected","Unsupported chain ID for the chosen exchange","Invalid wallet address format","Exchange or market temporarily unavailable on the specified chain","Position size below exchange minimum threshold"],"whenToPreferThis":"Use this endpoint when you need to programmatically construct an open perpetual futures position transaction on GMX or dYdX via SperaxOS, particularly in agentic DeFi workflows where you need an unsigned transaction to be signed separately. Prefer this over direct exchange SDKs when you want a unified interface across GMX and dYdX with AI-assisted parameter validation.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-28T18:33:20.344Z","isFirstParty":false,"canonicalSlug":"speraxos-perpetuals-open-position-transaction-builder-f33612b0"}