{"uid":"cap_seKpf6UP464-TMk5mFUbQ","slug":"ozmium-opentrade-calldata-gains-network-eeebffca","name":"Ozmium openTrade Calldata (Gains Network)","description":"Gains Network openTrade calldata with EXACT on-chain scaling (leverage x1e3, prices x1e10, USDC 6dp, slippage x1e3) and the USDC approve step when needed. MARKET, LIMIT, or STOP; the full venue leverage range (crypto 200x, forex to 1000x). Full details: GET /v1.","url":"https://ozmium.org/v1/tx/risk/open","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"sl":{"type":"number"},"tp":{"type":"number"},"long":{"type":"boolean"},"owner":{"type":"string"},"leverage":{"type":"number"},"markPrice":{"type":"number"},"pairIndex":{"type":"number"},"collateralUsdc":{"type":"number"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_b21_7yIQmrrT4o6sx2vHB","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates on-chain calldata to open a leveraged trade (MARKET, LIMIT, or STOP) on Gains Network with exact blockchain-ready scaling, plus a USDC approve step when required.","exampleAgentPrompt":"Open a 50x leveraged long on BTC (pair index 0) on Gains Network using 200 USDC collateral from my wallet 0xABC…, current mark price is 68500.12, set stop loss at 65000 and take profit at 75000.","exampleUseCases":null,"resultDescription":"Returns blockchain-ready calldata for the Gains Network openTrade function with all parameters scaled to exact on-chain precision (leverage x1e3, prices x1e10, USDC 6 decimals, slippage x1e3), plus a USDC approve transaction object when the contract allowance needs to be increased first. The agent can broadcast these transactions directly to Base mainnet.","failureModes":["Invalid pairIndex returns 400 with unsupported pair error","Leverage out of range for the selected pair (e.g. >1000x forex, >200x crypto) returns validation error","Collateral below minimum or above maximum for the pair returns rejection","Missing required fields (owner, pairIndex, collateralUsdc, leverage, long, markPrice) returns 400","Payment not included or insufficient returns 402 Payment Required","Network or Gains Network contract unavailability returns 503"],"whenToPreferThis":"Use this endpoint when an AI agent needs to open a new leveraged perpetuals position on Gains Network (gTrade) and requires correctly scaled, broadcast-ready calldata rather than computing the on-chain encoding manually. Preferred over generic transaction builders because it handles exact Gains Network parameter scaling (1e3, 1e10, 6dp), supports all order types (MARKET, LIMIT, STOP), covers the full leverage range, and bundles the USDC approve step automatically.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:36:01.576Z","isFirstParty":false}