perp_metrics
Pack: okx · Endpoint: https://gateway.pipeworx.io/okx/mcp
Crypto perpetual futures snapshot in one call: funding rate, open interest, taker buy/sell volume (CVD) and long/short account ratio for a perpetual swap. Accepts exchange-style symbols such as ‘MASKUSDT’, ‘MASK’ or ‘MASK-USDT-SWAP’. Figures come from the OKX venue and the response states that venue, so a symbol quoted on Binance or Bybit is answered with OKX’s own contract for that coin, labelled as such.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
instId | string | yes | Perpetual symbol — ‘MASKUSDT’, ‘MASK’, ‘MASK-USDT’ and ‘MASK-USDT-SWAP’ all resolve to the same OKX contract. |
period | string | no | Bucket size for taker flow and long/short ratio: 5m, 15m, 30m, 1H, 2H, 4H, 6H, 12H, 1D. Default 5m. |
buckets | number | no | How many recent buckets of taker flow to sum for CVD. Default 24, max 100. |
Example call
Arguments
{
"instId": "MASKUSDT",
"buckets": 6
}
curl
curl -X POST https://gateway.pipeworx.io/okx/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"perp_metrics","arguments":{"instId":"MASKUSDT","buckets":6}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('perp_metrics', {
"instId": "MASKUSDT",
"buckets": 6
});
More examples
{
"instId": "BTC-USDT-SWAP",
"period": "1H",
"buckets": 24
}
Connect
Add this to your MCP client config, or use one-click install buttons:
{
"mcpServers": {
"okx": {
"url": "https://gateway.pipeworx.io/okx/mcp"
}
}
}
See Getting Started for client-specific install steps.