phemex-trade
Trade on Phemex (USDT-M futures, Coin-M futures, Spot) — place orders, manage positions, check balances, and query market data. Use when the user wants to (1) check crypto prices or market data on Phemex, (2) place, amend, or cancel orders, (3) view account balances or positions, (4) set leverage or switch position modes, (5) transfer funds between spot and futures wallets, or (6) any task involving the Phemex exchange.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/bubble501/phemex-tradePhemex Trading
Trade on Phemex via the phemex-cli tool. Supports USDT-M futures, Coin-M futures, and Spot markets.
What's New in v1.2.0
list_symbolstool — Discover all available trading pairs, filtered by contract type. No more guessing symbol names.- Config file (
~/.phemexrc) — Store API credentials persistently. No need toexportenv vars every session. --helpfor every tool — Runphemex-cli <tool> --helpto see parameters, defaults, and usage examples inline.- Friendly field names — API field suffixes (
closeRp,fundingRateRr) are mapped to readable names (closePrice,fundingRate). Use--rawto get the original names. - Enhanced error messages — Errors now include
suggestionandtipfields with actionable guidance instead of raw API codes.
Before you start
Ensure you have the latest version installed:
npm install -g phemex-trade-mcp@latest
How to call tools
phemex-cli <tool_name> --param1 value1 --param2 value2
Or with JSON args:
phemex-cli <tool_name> '{"param1":"value1","param2":"value2"}'
Output is always JSON. Credentials are loaded from environment variables or ~/.phemexrc (see Setup).
Tool help
Every tool supports --help with full parameter docs and examples:
phemex-cli place_order --help
Output:
Usage: phemex-cli place_order [options]
Place an order (Market, Limit, Stop, StopLimit)
Required Parameters:
--symbol <string> Trading pair (e.g. BTCUSDT)
--side <string> Buy or Sell
--orderQty <number> Quantity. linear: base amount (0.01 = 0.01 BTC). ...
--ordType <string> Order type: Market, Limit, Stop, StopLimit
Optional Parameters:
--price <number> Limit price (required for Limit/StopLimit)
--timeInForce <string> GoodTillCancel, PostOnly, ... [default: GoodTillCancel]
--reduceOnly <boolean> Only reduce position [default: false]
...
Examples:
phemex-cli place_order --symbol BTCUSDT --side Buy --orderQty 0.01 --ordType Market
phemex-cli place_order --symbol BTCUSDT --side Sell --orderQty 0.01 --ordType Limit --price 90000 --timeInForce PostOnly
More help examples:
phemex-cli get_ticker --help # see params for price ticker
phemex-cli get_klines --help # see resolution values for candlesticks
phemex-cli set_leverage --help # see leverage param format
phemex-cli transfer_funds --help # see direction values
phemex-cli list_symbols --help # see contractType filter
Friendly field names
By default, output uses readable field names:
phemex-cli get_ticker --symbol BTCUSDT
{
"closePrice": "70549.9",
"openPrice": "70192.7",
"highPrice": "70750",
"lowPrice": "69160",
"markPrice": "70549.9",
"fundingRate": "-0.00003417",
"volume": "5303.525",
"turnover": "371204351.5978"
}
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-bubble501-phemex-trade": {
"enabled": true,
"auto_update": true
}
}
}