本文へ移動
cccskills
無料GitHub で公開

okx-market

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.

インストール方法を見る

含まれるファイル(16)

  • SKILL.md5.2 KB
  • references/合约行情/历史资金费率.md1.4 KB
  • references/合约行情/持仓量.md1.1 KB
  • references/合约行情/标记价格.md1.1 KB
  • references/合约行情/资金费率.md1.6 KB
  • references/合约行情/限价.md889 B
  • references/指数行情/指数K线.md1.4 KB
  • references/指数行情/指数行情.md1.3 KB
  • references/现货行情/K线数据.md2.3 KB
  • references/现货行情/交易产品列表.md1.7 KB
  • references/现货行情/最近成交.md954 B
  • references/现货行情/单个行情.md2.0 KB
  • references/现货行情/批量行情.md1.3 KB
  • references/现货行情/深度数据.md1.1 KB
  • scripts/candle_data_example.py3.3 KB
  • scripts/market_data_example.py3.3 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

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.
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:
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

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

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

ADR/H-share/A-share cross-listing premium analysis — track pricing gaps between US-listed ADRs, HK-listed H-shares, and A-shares for arbitrage signals, dual-listing valuation, and delisting risk assessment.

日本語の概要は準備中です。原文の説明を表示しています。

HKUDS/Vibe-Trading3.5万2026年10月12日 更新

akshare

無料

AKShare financial data aggregator (18k+ stars). Free, no API key. Covers A-shares, US, HK, futures, macro, forex. Primary fallback for tushare and yfinance.

日本語の概要は準備中です。原文の説明を表示しています。

HKUDS/Vibe-Trading3.5万2026年10月12日 更新

alpha-zoo

無料

Browse and bench the bundled alpha zoos — prebuilt cross-sectional factor libraries (Kakushadze 101, GTJA 191, Qlib 158, Fama-French / Carhart). Use when the user asks "which alphas exist", wants metadata on a named alpha, or wants to run IC/IR on a whole zoo over a universe.

日本語の概要は準備中です。原文の説明を表示しています。

HKUDS/Vibe-Trading3.5万2026年10月12日 更新

A 股 ST/*ST 风险预测框架 — 基于最新中报/三季报或业绩预告/快报,预测下一财年是否会因营收、利润、净资产、分红不达标而被风险警示,并将新浪监管处罚记录作为独立证据面纳入风险等级。仅适用于 A 股,不预测财务造假。

日本語の概要は準備中です。原文の説明を表示しています。

HKUDS/Vibe-Trading3.5万2026年10月12日 更新

Asset allocation theory and optimizer usage — MPT / Black-Litterman / risk budgeting / all-weather strategy, including guides for 5 optimizers and rebalancing rules.

日本語の概要は準備中です。原文の説明を表示しています。

HKUDS/Vibe-Trading3.5万2026年10月12日 更新

Diagnose failed or underperforming backtests, locate the root cause, and fix the issue

日本語の概要は準備中です。原文の説明を表示しています。

HKUDS/Vibe-Trading3.5万2026年10月12日 更新

HKUDS のスキルをすべて見る

このスキルの問題を報告する