# SperaxOS Perpetuals Open Position Transaction Builder

> SperaxOS Perpetuals Open Position Transaction Builder is a paid API for AI agents from chat.sperax.io, paid per call via x402, $0.001/call, status unknown (last checked 2026-11-28).

Builds an unsigned transaction to open a leveraged perpetual futures position on GMX or dYdX via the SperaxOS DeFi platform

## Facts

- Endpoint: POST https://chat.sperax.io/api/x402/tools/perpetuals/buildOpenPositionTx?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-28
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/speraxos-perpetuals-open-position-transaction-builder-f33612b0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_eQJsO1mr_1CpsS9WhhfwT

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability speraxos-perpetuals-open-position-transaction-builder-f33612b0 -d '<json body>'
```

Example prompt: 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...

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

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.

## Output

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).

## Request schema (JSON Schema)

```json
{
 "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\""
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/speraxos-perpetuals-open-position-transaction-builder-f33612b0/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from chat.sperax.io](https://www.zero.xyz/host/chat.sperax.io/llms.txt)
