Phemex · Schema

Phemex Position

Schema for a Phemex trading position for perpetual contracts or hedged perpetuals.

CryptocurrencyDerivativesSpot TradingPerpetual ContractsFuturesWebSocketMarket Data

Properties

Name Type Description
symbol string Trading pair symbol
side string Position side for one-way mode
posSide string Position side for hedged mode
size integer Position size in contracts
sizeRq string Position size as real number (hedged perpetual)
avgEntryPriceEp integer Average entry price scaled (contract)
avgEntryPriceRp string Average entry price as real number (hedged perpetual)
leverageEr integer Effective leverage scaled (contract)
leverageRr string Effective leverage as real number (hedged perpetual)
liquidationPriceEp integer Liquidation price scaled (contract)
liquidationPriceRp string Liquidation price as real number (hedged perpetual)
unRealisedPnlEv integer Unrealized PNL scaled (contract)
unRealisedPnlRv string Unrealized PNL as real number (hedged perpetual)
markPriceEp integer Current mark price scaled (contract)
markPriceRp string Current mark price as real number (hedged perpetual)
cumRealisedPnlEv integer Cumulative realized PNL scaled
cumFundingFeeEv integer Cumulative funding fees paid scaled
posBalanceEv integer Isolated margin balance scaled
riskLimitEv integer Current risk limit scaled
View JSON Schema on GitHub

JSON Schema

position.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/phemex/main/json-schema/position.json",
  "title": "Phemex Position",
  "description": "Schema for a Phemex trading position for perpetual contracts or hedged perpetuals.",
  "type": "object",
  "properties": {
    "symbol": {
      "type": "string",
      "description": "Trading pair symbol"
    },
    "side": {
      "type": "string",
      "enum": ["Buy", "Sell", "None"],
      "description": "Position side for one-way mode"
    },
    "posSide": {
      "type": "string",
      "enum": ["Long", "Short", "Merged"],
      "description": "Position side for hedged mode"
    },
    "size": {
      "type": "integer",
      "description": "Position size in contracts"
    },
    "sizeRq": {
      "type": "string",
      "description": "Position size as real number (hedged perpetual)"
    },
    "avgEntryPriceEp": {
      "type": "integer",
      "description": "Average entry price scaled (contract)"
    },
    "avgEntryPriceRp": {
      "type": "string",
      "description": "Average entry price as real number (hedged perpetual)"
    },
    "leverageEr": {
      "type": "integer",
      "description": "Effective leverage scaled (contract)"
    },
    "leverageRr": {
      "type": "string",
      "description": "Effective leverage as real number (hedged perpetual)"
    },
    "liquidationPriceEp": {
      "type": "integer",
      "description": "Liquidation price scaled (contract)"
    },
    "liquidationPriceRp": {
      "type": "string",
      "description": "Liquidation price as real number (hedged perpetual)"
    },
    "unRealisedPnlEv": {
      "type": "integer",
      "description": "Unrealized PNL scaled (contract)"
    },
    "unRealisedPnlRv": {
      "type": "string",
      "description": "Unrealized PNL as real number (hedged perpetual)"
    },
    "markPriceEp": {
      "type": "integer",
      "description": "Current mark price scaled (contract)"
    },
    "markPriceRp": {
      "type": "string",
      "description": "Current mark price as real number (hedged perpetual)"
    },
    "cumRealisedPnlEv": {
      "type": "integer",
      "description": "Cumulative realized PNL scaled"
    },
    "cumFundingFeeEv": {
      "type": "integer",
      "description": "Cumulative funding fees paid scaled"
    },
    "posBalanceEv": {
      "type": "integer",
      "description": "Isolated margin balance scaled"
    },
    "riskLimitEv": {
      "type": "integer",
      "description": "Current risk limit scaled"
    }
  },
  "required": ["symbol"]
}

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/position"
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 form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

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