GMX · Schema

PrepareRequest

DeFiPerpetual ExchangeDEXTradingLeverageLiquidity PoolsGLPGM TokensGLVArbitrumAvalancheWeb3

Properties

Name Type Description
subaccountApproval object
subaccountAddress string
from string
mode object
uiFeeReceiver string
referralCode string
autoCancel boolean
tpsl array
twapConfig object
gasPaymentToken string
manualSwapPath array
keepLeverage boolean
receiveToken string
collateralToPay object
executionFeeBufferBps number
acceptablePriceImpactBps string
slippage number
collateralToken string
triggerPrice string
size string
orderType object
direction string
symbol string
kind object
View JSON Schema on GitHub

JSON Schema

PrepareRequest.json Raw ↑
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://api-evangelist.github.io/gmx/json-schema/PrepareRequest.json",
  "title": "PrepareRequest",
  "properties": {
    "subaccountApproval": {
      "$ref": "#/components/schemas/Record_string.any_"
    },
    "subaccountAddress": {
      "type": "string"
    },
    "from": {
      "type": "string"
    },
    "mode": {
      "$ref": "#/components/schemas/TransactionMode"
    },
    "uiFeeReceiver": {
      "type": "string"
    },
    "referralCode": {
      "type": "string"
    },
    "autoCancel": {
      "type": "boolean"
    },
    "tpsl": {
      "items": {
        "properties": {
          "size": {
            "type": "string"
          },
          "triggerPrice": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "take-profit",
              "stop-loss"
            ]
          }
        },
        "required": [
          "triggerPrice",
          "type"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "twapConfig": {
      "properties": {
        "frequency": {
          "type": "number",
          "format": "double"
        },
        "parts": {
          "type": "number",
          "format": "double"
        },
        "duration": {
          "type": "number",
          "format": "double"
        }
      },
      "required": [
        "parts",
        "duration"
      ],
      "type": "object"
    },
    "gasPaymentToken": {
      "type": "string"
    },
    "manualSwapPath": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "keepLeverage": {
      "type": "boolean"
    },
    "receiveToken": {
      "type": "string"
    },
    "collateralToPay": {
      "properties": {
        "token": {
          "type": "string"
        },
        "amount": {
          "type": "string"
        }
      },
      "required": [
        "token",
        "amount"
      ],
      "type": "object"
    },
    "executionFeeBufferBps": {
      "type": "number",
      "format": "double"
    },
    "acceptablePriceImpactBps": {
      "type": "string"
    },
    "slippage": {
      "type": "number",
      "format": "double"
    },
    "collateralToken": {
      "type": "string"
    },
    "triggerPrice": {
      "type": "string"
    },
    "size": {
      "type": "string"
    },
    "orderType": {
      "$ref": "#/components/schemas/SimpleOrderType"
    },
    "direction": {
      "type": "string",
      "enum": [
        "long",
        "short"
      ]
    },
    "symbol": {
      "type": "string"
    },
    "kind": {
      "$ref": "#/components/schemas/OrderKind"
    }
  },
  "required": [
    "mode",
    "orderType",
    "kind"
  ],
  "type": "object"
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/PrepareRequest"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.