Okx Verifiable Dex Market logo

Okx Verifiable Dex Market

Organization
primus-labs
okx-verifiable-dex-market

Generate verifiable market-data calls for OKX OnchainOS-style workflows using Primus zkTLS. Use when the user asks for token prices, price snapshots, K-line/OHLC candles, index prices, or other read-only market data that should be backed by an attestation rather than a plain API response. Prefer this skill over non-verifiable market queries when a stable REST endpoint and a small set of JSON fields can satisfy the request.

Overview

Publisherprimus-labs
Repositoryskills
Skill nameokx-verifiable-dex-market
Stars
35
Forks
10
Bundled files
1
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by primus-labs on GitHub. Read the source before you install it.

Installation

Install the Okx Verifiable Dex Market AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/primus-labs/skills/tree/main/onchainos-verifiable-skills/skills/okx-verifiable-dex-market
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/primus-labs/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/onchainos-verifiable-skills/skills/okx-verifiable-dex-market .claude/skills/okx-verifiable-dex-market
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Okx Verifiable Dex Market in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Okx Verifiable Dex Market on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Okx Verifiable Dex Market is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

OKX Verifiable DEX Market

Use this skill together with primus-zktls-core-sdk when the user wants market data with a proof.

Scope

Prefer this skill for:

  • single token price
  • batch prices for a small token list
  • latest K-line / OHLC bars
  • index price snapshots

Do not force this skill for:

  • wallet PnL history
  • long paginated trade history
  • very large candle windows

Those cases may fall back to normal API usage or a narrower verifiable sub-query.

Shared references

Read these when implementing or extending a proof:

  • ../../references/primus-zktls-patterns.md
  • ../../references/response-contracts.md
  • ../../references/fallback-decision-trees.md
  • ../../references/interaction-examples.md
  • ../../references/endpoint-catalog.md
  • ../../references/limitations.md

Workflow

  1. Confirm the user only needs a read-only market claim.
  2. Identify the narrowest endpoint and field set that answers the question.
  3. Build one AttNetworkRequest.
  4. Build AttNetworkResponseResolve rules only for the fields the user needs.
  5. Generate the attestation with PrimusCoreTLS.
  6. Verify locally when possible.
  7. Return the extracted claim and clearly label it as attested or fallback.

Default proof patterns

Single price

Use one request and reveal only:

  • token identity
  • chain
  • price
  • timestamp, if available

Recommended endpoint:

  • POST https://web3.okx.com/api/v6/dex/market/price

Preferred request body:

json
[
  {
    "chainIndex": "1",
    "tokenContractAddress": "0x0000000000000000000000000000000000000000"
  }
]

Example resolve shape:

ts
const responseResolves = [
  { keyName: "chainIndex", parseType: "json", parsePath: "$.data[0].chainIndex" },
  { keyName: "token", parseType: "json", parsePath: "$.data[0].tokenContractAddress" },
  { keyName: "price", parseType: "json", parsePath: "$.data[0].price" },
  { keyName: "time", parseType: "json", parsePath: "$.data[0].time" }
];

K-line / latest OHLC

Prefer proving only the latest bar or a very small fixed window. Reveal:

  • open
  • high
  • low
  • close
  • time

Avoid proving long candle arrays in the first release.

Recommended endpoint:

  • GET https://web3.okx.com/api/v6/dex/market/candles

Preferred query pattern:

text
?chainIndex=501&tokenContractAddress=So11111111111111111111111111111111111111112&bar=1H&limit=1

Example resolve shape:

ts
const responseResolves = [
  { keyName: "ts", parseType: "json", parsePath: "$.data[0][0]" },
  { keyName: "open", parseType: "json", parsePath: "$.data[0][1]" },
  { keyName: "high", parseType: "json", parsePath: "$.data[0][2]" },
  { keyName: "low", parseType: "json", parsePath: "$.data[0][3]" },
  { keyName: "close", parseType: "json", parsePath: "$.data[0][4]" },
  { keyName: "confirm", parseType: "json", parsePath: "$.data[0][7]" }
];

Index price

Treat this like a single derived numeric claim. Reveal:

  • index price
  • timestamp
  • asset identifier

Until the concrete official response example is captured locally, model this after the single-price pattern and only prove:

  • asset identifier
  • index price
  • timestamp

Attestation rules

  • Default to proxytls.
  • Prefer the documented method, which may be GET or a simple JSON POST.
  • Keep headers minimal and deterministic.
  • Use attConditions only if the user asks for a bound such as "prove price is above X".
  • If the endpoint response is too large, switch to a narrower query before giving up.

Output contract

For a verifiable reply, structure the result around:

  • claim: what upstream fact was requested
  • extracted fields: the exact values revealed from the response
  • proof status: attested or fallback
  • local verification: passed, failed, or not-run

Never say a result is verified if no attestation was produced.

For broad chart requests, use the partial response contract:

  • verified subclaim: latest price or latest candle
  • unverified remainder: the larger history window

Fallback rules

Use fallback when:

  • the user requests too many candles
  • the endpoint is not stable enough for a small proof
  • the market request is bundled with wallet-personalized PnL data

When falling back:

  1. say the broader query is not yet modeled as a reliable proof
  2. offer a smaller verifiable alternative such as:
    • latest price only
    • latest candle only
    • one fixed index snapshot

Decision tree

  1. Is the request a single price, index snapshot, or latest candle?
    • yes -> use an attested flow
  2. Is it a small fixed batch of prices?
    • yes -> use a partial or attested flow depending on payload size
  3. Is it a long history or wallet-personalized PnL request?
    • no -> fallback or narrow the query

Examples

Verifiable price

User intent:

text
What is the current BTC price on Ethereum? I want a verifiable result.

Preferred behavior:

  • resolve the target asset
  • build a single price request
  • prove only price and timestamp
  • report whether local verification succeeded

Verifiable K-line

User intent:

text
Show me the latest 1H candle for SOL with a proof.

Preferred behavior:

  • request the candle endpoint with a fixed interval
  • reveal only the most recent bar
  • avoid returning a large historical array

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Okx Verifiable Dex Market AI skill do?

Generate verifiable market-data calls for OKX OnchainOS-style workflows using Primus zkTLS. Use when the user asks for token prices, price snapshots, K-line/OHLC candles, index prices, or other read-only market data that should be backed by an attestation rather than a plain API response. Prefer this skill over non-verifiable market queries when a stable REST endpoint and a small set of JSON fields can satisfy the request.

Why use Okx Verifiable Dex Market on TypingMind?

Because you install it once and use it with any model. Okx Verifiable Dex Market is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Okx Verifiable Dex Market in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/primus-labs/skills/tree/main/onchainos-verifiable-skills/skills/okx-verifiable-dex-market. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Okx Verifiable Dex Market?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Okx Verifiable Dex Market?

As many as you like. As long as a model supports skills, you can use Okx Verifiable Dex Market with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Okx Verifiable Dex Market AI skill free?

It is published on GitHub by primus-labs. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇