Agent skill

OKX Market Data

by HKUDS in HKUDS/Vibe-Trading

Retrieves public OKX cryptocurrency market data such as spot prices, candlesticks, funding rates and open interest through the OKX V5 REST API, with no authentication.

MITAuto-check passedBusiness, Finance & HR

Install OKX Market Data

skills CLI
$ npx skills add HKUDS/Vibe-Trading --skill okx-market -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install HKUDS/Vibe-Trading okx-market --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/HKUDS/Vibe-Trading.git skills-src && mkdir -p .claude/skills && cp -r skills-src/agent/src/skills/okx-market .claude/skills/okx-market && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
okx-market
GitHub stars
35k
Token cost
~1.3k tokens
SKILL.md length
470 words
Files
16 (incl. scripts, references)
Skills in repo
89
Repo updated
First seen
Licence
MIT

At a glance

Retrieves public OKX cryptocurrency market data such as spot prices, candlesticks, funding rates and open interest through the OKX V5 REST API, with no authentication.

  • Fetching the current price or order book of a crypto pair
  • SKILL.md covers Overview, Quick Start, Parameter Format Reference and Python Script Examples, plus 1 more section
  • Runs Python scripts from its folder; calls pip; reaches okx.com
  • Downloading candlestick history for analysis or backtesting

What it does

The public market-data endpoints of the OKX V5 REST API cover spot, perpetual swaps, delivery futures, options and index data, and need no account or token. The setup is Python with `requests` and `pandas`. The skill lists the parameter formats: instrument IDs such as `BTC-USDT` and `BTC-USDT-SWAP`, candle intervals from one minute up to one month, instrument types `SPOT`, `SWAP`, `FUTURES` and `OPTION`, millisecond Unix timestamps, and JSON responses where `code=0` means success.

Detailed endpoint documents under `references/` are grouped into contract market data (funding rate, funding history, open interest, mark price and price limits), index data (index tickers and candles) and spot data (candles, instrument lists, single and batch tickers, recent trades and order book depth). Two scripts, `scripts/market_data_example.py` and `scripts/candle_data_example.py`, show how to pull tickers and candlesticks into pandas.

When your agent uses it

  • Fetching the current price or order book of a crypto pair
  • Downloading candlestick history for analysis or backtesting
  • Checking funding rates and open interest on perpetual swaps

Example prompts

  • “Get the latest BTC-USDT spot ticker from OKX and print the last price.”
  • “Download hourly candles for ETH-USDT-SWAP into a pandas DataFrame.”
  • “What are the current funding rate and open interest for BTC-USDT-SWAP?”

Requirements

  • Python 3 with `requests` and `pandas`
  • Network access to the OKX public API

What it can do on your machine

Read from SKILL.md and the folder at commit 8e43007. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 2 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • pip

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • okx.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

OKX Market Data loads about 1.3k tokens when it runs, and up to ~5.9k if it reads all its reference files. Until then it costs about 67 tokens; SKILL.md has 470 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~67
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from HKUDS/Vibe-Trading at commit 8e43007, republished under its MIT licence (© HKUDS). 470 words, ~1,286 tokens.

Download SKILL.mdSave it as .claude/skills/okx-market/SKILL.md (or your agent's skills folder). This skill also uses 15 other files; get the full folder from GitHub.
name
okx-market
description
OKX cryptocurrency market data interface. Uses the OKX V5 REST API to retrieve spot, derivatives, index, and other crypto market data, including real-time prices, candlesticks, funding rates, open interest, and more. No authentication required, free to use.
category
data-source

OKX Market

Overview

The OKX V5 REST API provides comprehensive cryptocurrency market data covering spot, perpetual swaps, delivery futures, options, and more. All market-data endpoints are public and can be called directly without authentication. The data comes from OKX, the world's second-largest cryptocurrency exchange.

Quick Start

  • Install a Python runtime (Python 3.9+ recommended) and the required requests dependency.
bash
pip install requests pandas
  • No account registration or token configuration is required. Market-data endpoints are fully open.
  • Review the endpoint documentation below and locate the interface you need.
  • Use Python code to retrieve data according to the documentation. Example for the spot ticker endpoint:
python
import requests
import pandas as pd

BASE_URL = "https://www.okx.com/api/v5"

# Get the latest BTC-USDT market quote
resp = requests.get(f"{BASE_URL}/market/ticker", params={"instId": "BTC-USDT"})
data = resp.json()["data"][0]
print(f"BTC last price: {data['last']}  24h change: {float(data['last'])/float(data['open24h'])*100-100:.2f}%")

Parameter Format Reference

  • Instrument format (instId):
    • Spot: BTC-USDT, ETH-USDT
    • Perpetual swap: BTC-USDT-SWAP, ETH-USDT-SWAP
    • Delivery futures: BTC-USDT-250328 (expiry date in YYMMDD)
    • Options: BTC-USD-250328-95000-C (expiry-strike-C/P)
    • Index: BTC-USD, ETH-USD
  • Candlestick interval (bar): 1m, 3m, 5m, 15m, 30m, 1H, 2H, 4H, 6H, 12H, 1D, 1W, 1M
  • Instrument type (instType): SPOT (spot), SWAP (perpetual), FUTURES (delivery), OPTION (option)
  • Timestamp: millisecond Unix timestamp (for example 1773763200000)
  • Response format: JSON. code=0 indicates success, and data is returned in the data field

Link convention: every link to references/ in this document is written relative to this document (for example references/...) — the form GitHub resolves when someone opens the file in a browser. The read_file tool resolves the same string against the skill that owns it, so the agent and a human reader reach one file. When adding new skill docs, always use the relative form, and keep reference paths unique across skills: a path two skills both carry is reported as ambiguous rather than guessed.

Python Script Examples

Show full SKILL.md (204 more words)Show less

Market Data Endpoint List

IDEndpoint PathTitle (Detailed Documentation)CategoryDescription
1/market/tickerSingle TickerSpot MarketRetrieve the latest market data for a single trading instrument, including last price, bid/ask, 24h volume, and more
2/market/tickersBatch TickersSpot MarketRetrieve all market data for a given instrument class (SPOT/SWAP/FUTURES/OPTION) in batch
3/market/candlesCandlestick DataSpot MarketRetrieve candlestick (OHLCV) data with multiple supported intervals
4/market/tradesRecent TradesSpot MarketRetrieve recent trade-level details
5/public/instrumentsInstrument ListSpot MarketRetrieve metadata for all tradable instruments, including minimum order size and price precision
6/market/booksOrder Book DepthSpot MarketRetrieve bid/ask order book depth data
7/public/funding-rateFunding RateDerivatives MarketRetrieve current and historical funding rates for perpetual contracts
8/public/funding-rate-historyHistorical Funding RateDerivatives MarketRetrieve historical funding-rate data for perpetual contracts
9/public/mark-priceMark PriceDerivatives MarketRetrieve mark prices for derivatives, used for PnL and liquidation calculations
10/public/open-interestOpen InterestDerivatives MarketRetrieve open-interest data for derivatives
11/public/price-limitPrice LimitDerivatives MarketRetrieve the current maximum and minimum price limits for derivatives
12/market/index-tickersIndex TickersIndex MarketRetrieve index price market data
13/market/index-candlesIndex CandlesIndex MarketRetrieve index candlestick data

© HKUDS, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 15 other files (scripts, references) in agent/src/skills/okx-market of HKUDS/Vibe-Trading.

  • SKILL.md
  • references/合约行情/历史资金费率.md
  • references/合约行情/持仓量.md
  • references/合约行情/标记价格.md
  • references/合约行情/资金费率.md
  • references/合约行情/限价.md
  • references/指数行情/指数K线.md
  • references/指数行情/指数行情.md
  • references/现货行情/K线数据.md
  • references/现货行情/交易产品列表.md
  • references/现货行情/单个行情.md
  • references/现货行情/批量行情.md
  • references/现货行情/最近成交.md
  • references/现货行情/深度数据.md
  • scripts/candle_data_example.py
  • scripts/market_data_example.py

Open the folder on GitHubat commit 8e43007

Compare with similar skills

OKX Market Data next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

OKX Market Data compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
OKX Market Data this skillHKUDS/Vibe-Trading35k—~1.3kAutomated safety check: PassMIT
Futu OpenAPI Market and Trading Assistantqusong0627/QuantMind1.7k—~3.3kAutomated safety check: NotesAGPL-3.0
A-Share Daily Reviewqusong0627/QuantMind1.7k—~1.9kAutomated safety check: PassAGPL-3.0
Predexon Prediction Market DataBlockRunAI/ClawRouter6.6k—~4.7kAutomated safety check: PassMIT
Senpi Market PulseSenpi-ai/senpi-skills134—~4.9kAutomated safety check: PassApache-2.0
Insurance Operations Analysiszj-unicom-ai/UniEmployee360—~646Automated safety check: PassMIT

Similar skills

  • Queries Futu quotes, options, fundamentals and accounts and places orders through the Futu OpenAPI Python SDK, defaulting to simulated trading.

    1.7k GitHub stars~3.3k tokensUpdated today
    Business, Finance & HRAuto-check: notes
  • A-Share Daily Review

    qusong0627/QuantMind

    Produces a post-market review report for the China A-share market from local QuantDB data, news sentiment and model signals, ending in a next-day direction call.

    1.7k GitHub stars~1.9k tokensUpdated today
    Business, Finance & HRAuto-check passed
  • Predexon Prediction Market Data

    BlockRunAI/ClawRouter

    Reads structured prediction market data for Polymarket, Kalshi and other venues through a local BlockRun gateway: markets, search, leaderboards, wallet analytics and odds.

    6.6k GitHub stars~4.7k tokensUpdated 5 days ago
    Business, Finance & HRAuto-check passed
  • Senpi Market Pulse

    Senpi-ai/senpi-skills

    Produces a structured cross-asset read of the day across crypto, equities, indices, commodities and macro, using a bundled engine for data and ending with a signals brief.

    134 GitHub stars~4.9k tokensUpdated yesterday
    Business, Finance & HRAuto-check passed
  • Insurance Operations Analysis

    zj-unicom-ai/UniEmployee

    Analyzes insurance operating data such as premium, loss ratio, renewal rate and expense ratio by branch, product and channel, flags anomalies and builds an HTML dashboard.

    360 GitHub stars~646 tokensUpdated 2 days ago
    Business, Finance & HRAuto-check passed
  • CCXT Crypto Exchange Library

    2025Emma/vibe-coding-cn

    Reference help for the CCXT library covering crypto exchange APIs, market data, trading and order management across 150+ exchanges in JavaScript, Python and PHP.

    23k GitHub starsUsed in 1 repo~4.4k tokens
    Business, Finance & HRAuto-check passed

More from HKUDS/Vibe-Trading

All 89 skills in this repo
  • Eastmoney Market Data

    HKUDS/Vibe-Trading

    Index of Eastmoney's free, no-token market data interfaces for China A-shares and Hong Kong stocks: fund flows, dragon-tiger lists, margin trading, reports and news.

    35k GitHub stars~1k tokensUpdated today
    Auto-check passed
  • SEC EDGAR Filings Fetcher

    HKUDS/Vibe-Trading

    Fetches U.S. SEC EDGAR data: resolves tickers to CIK numbers, lists recent 10-K, 10-Q and 8-K filings with document URLs, and pulls XBRL financial series.

    35k GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • A-Share ST Risk Screener

    HKUDS/Vibe-Trading

    Predicts whether a mainland China A-share company risks an ST or *ST warning after its next annual report, using financial thresholds and Sina penalty records.

    35k GitHub stars~4.9k tokensUpdated today
    Auto-check passed
  • Breaks a structural trend such as AI infrastructure into its physical supply chain and ranks lesser-known listed companies sitting on each bottleneck.

    35k GitHub stars~2.7k tokensUpdated today
    Auto-check passed
  • Plans and drafts an eight-part, roughly 120k-word investigative series on one company, built around a strict fact-check pass rather than fast drafting.

    35k GitHub stars~2.4k tokensUpdated today
    Auto-check passed
  • Investment Thesis Tracker

    HKUDS/Vibe-Trading

    Keeps a written investment thesis for each stock you hold and re-checks it every quarter against new earnings, scoring its health and recommending hold, add, trim or exit.

    35k GitHub stars~2.2k tokensUpdated today
    Auto-check passed

Works with

Questions about OKX Market Data

What does OKX Market Data do?

Retrieves public OKX cryptocurrency market data such as spot prices, candlesticks, funding rates and open interest through the OKX V5 REST API, with no authentication. The public market-data endpoints of the OKX V5 REST API cover spot, perpetual swaps, delivery futures, options and index data, and need no account or token. The setup is Python with `requests` and `pandas`.

When should I use OKX Market Data?

OKX Market Data fits situations like: fetching the current price or order book of a crypto pair; downloading candlestick history for analysis or backtesting; checking funding rates and open interest on perpetual swaps.

How do I install OKX Market Data in Claude Code?

Run `npx skills add HKUDS/Vibe-Trading --skill okx-market -a claude-code`. Or copy the skill folder (agent/src/skills/okx-market in HKUDS/Vibe-Trading) into .claude/skills/okx-market in your project. Claude Code loads it when a task matches its description.

How do I install OKX Market Data in Codex?

Run `npx skills add HKUDS/Vibe-Trading --skill okx-market -a codex`. Or copy the skill folder (agent/src/skills/okx-market in HKUDS/Vibe-Trading) into .agents/skills/okx-market in your project. Codex loads it when a task matches its description.

Can I use OKX Market Data in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add HKUDS/Vibe-Trading --skill okx-market -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/okx-market, .gemini/skills/okx-market, .github/skills/okx-market and .opencode/skills/okx-market in your project.

What does OKX Market Data need to run?

Going by SKILL.md and its folder, OKX Market Data needs Python for the scripts in its folder and the command-line tools its instructions call (pip). Our summary lists: Python 3 with `requests` and `pandas`; Network access to the OKX public API.

Does OKX Market Data access the network?

SKILL.md names 1 domain. In commands or code: okx.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is OKX Market Data safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does OKX Market Data use?

OKX Market Data is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does OKX Market Data use?

About 1.3k tokens (SKILL.md is roughly 5.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 4.6k tokens, read only when the agent opens those files.

What are the alternatives to OKX Market Data?

Skills that share tags, products or a category with OKX Market Data: Futu OpenAPI Market and Trading Assistant (qusong0627/QuantMind, 1.7k stars), A-Share Daily Review (qusong0627/QuantMind, 1.7k stars), Predexon Prediction Market Data (BlockRunAI/ClawRouter, 6.6k stars) and Senpi Market Pulse (Senpi-ai/senpi-skills, 134 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains OKX Market Data?

HKUDS (a GitHub organization) maintains it in HKUDS/Vibe-Trading, which has 35,163 GitHub stars. The repository holds 89 skills in this directory. The repository was last updated on October 10, 2026.

Source: HKUDS/Vibe-Trading on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.