long_short_ratio
Pack: okx · Endpoint: https://gateway.pipeworx.io/okx/mcp
Long/short account ratio for a crypto perpetual contract on the OKX venue — the ratio of accounts holding longs to accounts holding shorts, bucketed by period. A value above 1 means more accounts sit long. Use for positioning and crowd-sentiment reads on a perp.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
instId | string | yes | |
period | string | no | 5m, 15m, 30m, 1H, 2H, 4H, 6H, 12H or 1D. Default 5m. |
buckets | number | no | Recent buckets to return. Default 24, max 100. |
Example call
Arguments
{
"instId": "MASK-USDT-SWAP",
"period": "5m",
"buckets": 24
}
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":"long_short_ratio","arguments":{"instId":"MASK-USDT-SWAP","period":"5m","buckets":24}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('long_short_ratio', {
"instId": "MASK-USDT-SWAP",
"period": "5m",
"buckets": 24
});
More examples
{
"instId": "ETHUSDT"
}
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.