Skip to main content
Glama

Crypto Bot Audit + Market Data (x402 paid)

OKX instrument specification

market_okx_instrument_spec
Read-onlyIdempotent

Contract rules as OKX defines them: tick and lot size, minimum size, price limits, whether it is a swap or option, and settlement date. Costs $0.001 USDC per call. Byte-identical to GET /market/okx-instrument-spec?instId=BTC-USDT&instType=SPOT.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
instIdYesOKX instrument id, BASE-QUOTE (BTC-USDT, ETH-USDT-SWAP) [required]
instTypeNowhich OKX instrument family to look in (default "SPOT")

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
tsNo
ulyNo
noteNo
ctValNo
foundNo
leverNo
lotSzNo
minSzNo
staleNo
stateNo
caveatNo
ctMultNo
ctTypeNo
instIdNo
reasonNo
sourceNo
tickSzNo
baseCcyNo
optTypeNo
categoryNo
ctValCcyNo
instTypeNo
maxLmtSzNo
maxMktSzNo
openTypeNo
quoteCcyNo
ruleTypeNo
expTimeMsNo
maxLmtAmtNo
settleCcyNo
instFamilyNo
listTimeMsNo
positionLimitNo
positionLimitPctNo
tradeQuoteCcyListNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "baseCcy": {
      +      "type": "string"
      +    },
      +    "category": {
      +      "type": "string"
      +    },
      +    "caveat": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "ctMult": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "ctType": {
      +      "type": "string"
      +    },
      +    "ctVal": {
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "ctValCcy": {
      +      "type": "string"
      +    },
      +    "expTimeMs": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "found": {
      +      "type": "boolean"
      +    },
      +    "instFamily": {
      +      "type": "string"
      +    },
      +    "instId": {
      +      "type": "string"
      +    },
      +    "instType": {
      +      "type": "string"
      +    },
      +    "lever": {
      +      "type": "string"
      +    },
      +    "listTimeMs": {
      +      "type": "integer"
      +    },
      +    "lotSz": {
      +      "type": "string"
      +    },
      +    "maxLmtAmt": {
      +      "type": "string"
      +    },
      +    "maxLmtSz": {
      +      "type": "string"
      +    },
      +    "maxMktSz": {
      +      "type": "string"
      +    },
      +    "minSz": {
      +      "type": "string"
      +    },
      +    "note": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "openType": {
      +      "type": "string"
      +    },
      +    "optType": {
      +      "type": "string"
      +    },
      +    "positionLimit": {
      +      "type": "string"
      +    },
      +    "positionLimitPct": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "quoteCcy": {
      +      "type": "string"
      +    },
      +    "reason": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "ruleType": {
      +      "type": "string"
      +    },
      +    "settleCcy": {
      +      "type": "string"
      +    },
      +    "source": {
      +      "type": "string"
      +    },
      +    "stale": {
      +      "type": [
      +        "boolean",
      +        "null"
      +      ]
      +    },
      +    "state": {
      +      "type": "string"
      +    },
      +    "tickSz": {
      +      "type": "string"
      +    },
      +    "tradeQuoteCcyList": {
      +      "items": {},
      +      "type": "array"
      +    },
      +    "ts": {
      +      "type": "string"
      +    },
      +    "uly": {
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  2. Added

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already establish read-only, idempotent, non-destructive behavior. The description adds genuinely useful context by disclosing the $0.001 USDC cost and stating that the response is byte-identical to the named OKX GET endpoint, which clarifies data provenance and exactness beyond the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and front-loaded, leading with the resource and output contents, then adding cost and endpoint provenance. Every sentence earns its place without redundant filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present and annotations covering side effects, the description does not need to explain return structure. It covers cost, provenance, and core output fields. The only minor gap is lack of guidance on which instType values to use for swap/option specs, but the schema and example provide a reasonable baseline.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already documents instId and instType. The description adds only a concrete URL example with instId=BTC-USDT and instType=SPOT, which is helpful but does not materially expand parameter semantics or enumerate instType values for swap/option instruments.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly identifies the resource (OKX contract rules) and enumerates the returned fields: tick/lot size, minimum size, price limits, swap/option type, and settlement date. The 'Byte-identical to GET /market/okx-instrument-spec' line reinforces that it is a data retrieval operation and distinguishes it from other market_okx_* tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The field list implies when the tool is useful, but the description does not explicitly state when to use it versus sibling alternatives such as market_okx_ticker or market_okx_funding_rate. Cost and provenance are mentioned, but no exclusions or alternative-selection criteria are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources