Phemex Conversion API

The Conversion API from Phemex — 2 operation(s) for conversion.

Operations 3

GET /assets/quote Get conversion quote #
POST /assets/convert Execute currency conversion #
GET /assets/convert Get conversion history #

Work with this as data

Every API 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 apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • 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 API
curl "https://apis.io/api/v1/apis/phemex-conversion-api"
All apis
curl "https://apis.io/api/v1/apis?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.

OpenAPI Specification

phemex-conversion-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Phemex Contract Trading Account Conversion API
  description: REST API for trading perpetual contracts on Phemex, including order placement, position management, account queries, and market data.
  version: 1.0.0
  contact:
    name: Phemex Support
    url: https://phemex.com/help-center
servers:
- url: https://api.phemex.com
  description: Production
- url: https://testnet-api.phemex.com
  description: Testnet
security:
- HmacAuth: []
tags:
- name: Conversion
paths:
  /assets/quote:
    get:
      summary: Get conversion quote
      description: Get a conversion rate quote for currency exchange.
      operationId: getConversionQuote
      tags:
      - Conversion
      parameters:
      - name: fromCurrency
        in: query
        required: true
        schema:
          type: string
        description: Source currency
      - name: toCurrency
        in: query
        required: true
        schema:
          type: string
        description: Target currency
      - name: fromAmountEv
        in: query
        required: true
        schema:
          type: integer
        description: Amount to convert (scaled)
      responses:
        '200':
          description: Conversion quote
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuoteResponse'
  /assets/convert:
    post:
      summary: Execute currency conversion
      description: Execute a currency conversion using a previously obtained quote.
      operationId: executeConversion
      tags:
      - Conversion
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConvertRequest'
      responses:
        '200':
          description: Conversion result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConvertResponse'
    get:
      summary: Get conversion history
      description: Query currency conversion history.
      operationId: getConversionHistory
      tags:
      - Conversion
      parameters:
      - name: fromCurrency
        in: query
        schema:
          type: string
      - name: toCurrency
        in: query
        schema:
          type: string
      - name: startTime
        in: query
        schema:
          type: integer
      - name: endTime
        in: query
        schema:
          type: integer
      - name: offset
        in: query
        schema:
          type: integer
      - name: limit
        in: query
        schema:
          type: integer
      responses:
        '200':
          description: Conversion history
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
components:
  schemas:
    ApiResponse:
      type: object
      properties:
        code:
          type: integer
        msg:
          type: string
        data:
          type: object
    ConvertResponse:
      type: object
      properties:
        code:
          type: integer
        data:
          type: object
          properties:
            fromAmountEv:
              type: integer
            fromCurrency:
              type: string
            linkKey:
              type: string
            status:
              type: integer
            toAmountEv:
              type: integer
            toCurrency:
              type: string
    QuoteResponse:
      type: object
      properties:
        code:
          type: integer
        data:
          type: object
          properties:
            code:
              type: string
            quoteArgs:
              type: object
              properties:
                expireAt:
                  type: integer
                price:
                  type: string
                proceeds:
                  type: string
                quoteAt:
                  type: integer
                ttlMs:
                  type: integer
    ConvertRequest:
      type: object
      required:
      - toCurrency
      - fromCurrency
      - code
      properties:
        toCurrency:
          type: string
          description: Target currency
        fromCurrency:
          type: string
          description: Source currency
        fromAmountEv:
          type: integer
          description: Amount to convert (scaled, optional)
        code:
          type: string
          description: Encrypted conversion parameters from quote
  securitySchemes:
    HmacAuth:
      type: apiKey
      in: header
      name: x-phemex-access-token
      description: HMAC SHA256 signed request. Also requires x-phemex-request-expiry and x-phemex-request-signature headers.