Okx Verifiable Dex Marketのロゴ

Okx Verifiable Dex Market

組織
primus-labs
okx-verifiable-dex-market

Primus zkTLSを使って、OKX OnchainOS形式のワークフロー向けに検証可能な市場データ呼び出しを生成します。ユーザーがトークン価格、価格スナップショット、K線/OHLCローソク足、インデックス価格、または通常のAPI応答ではなくアテステーションで裏付けるべきその他の読み取り専用市場データを求めた場合に使用します。安定したRESTエンドポイントと少数のJSONフィールドでリクエストを満たせる場合は、検証できない市場データの照会よりもこのスキルを優先してください。

概要

公開者primus-labs
リポジトリskills
スキル名okx-verifiable-dex-market
スター
35
フォーク
10
同梱ファイル
1
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 1個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    primus-labsがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Okx Verifiable Dex Market」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/primus-labs/skills/tree/main/onchainos-verifiable-skills/skills/okx-verifiable-dex-market
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

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
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでOkx Verifiable Dex Marketを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にOkx Verifiable Dex Marketを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Okx Verifiable Dex Marketは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

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

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Okx Verifiable Dex Market」では何ができますか?

Primus zkTLSを使って、OKX OnchainOS形式のワークフロー向けに検証可能な市場データ呼び出しを生成します。ユーザーがトークン価格、価格スナップショット、K線/OHLCローソク足、インデックス価格、または通常のAPI応答ではなくアテステーションで裏付けるべきその他の読み取り専用市場データを求めた場合に使用します。安定したRESTエンドポイントと少数のJSONフィールドでリクエストを満たせる場合は、検証できない市場データの照会よりもこのスキルを優先してください。

TypingMindでOkx Verifiable Dex Marketを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Okx Verifiable Dex Marketはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにOkx Verifiable Dex Marketをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/primus-labs/skills/tree/main/onchainos-verifiable-skills/skills/okx-verifiable-dex-marketを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Okx Verifiable Dex Marketを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Okx Verifiable Dex Marketで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもOkx Verifiable Dex Marketを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Okx Verifiable Dex Market」は無料ですか?

primus-labsがGitHubで公開しています。ライセンス条件はリポジトリでご確認ください。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇