Chuyển đến nội dung
Skillpedia
Phân tích và bảng tính37k · #7535

okx-market

Skill này làm gì

Skill này lấy giá crypto và thông tin thị trường từ sàn OKX. Skill dành cho bất kỳ ai muốn dữ liệu crypto hiện tại hoặc quá khứ mà không cần thiết lập tài khoản.

Khi nào nên dùng

  • ✓Khi bạn muốn biết giá mới nhất hoặc biến động 24 giờ của một coin trên OKX.
  • ✓Khi bạn cần lịch sử nến cho thị trường giao ngay, hoán đổi hoặc hợp đồng tương lai.
  • ✓Khi bạn muốn kiểm tra lãi suất funding hoặc open interest của một hợp đồng crypto.

Liên kết skill

https://github.com/HKUDS/Vibe-Trading/blob/main/agent/src/skills/okx-market/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/HKUDS/Vibe-Trading/blob/main/agent/src/skills/okx-market/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Giá hiện tại và biến động 24 giờ của ETH trên OKX là bao nhiêu?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Skill gửi yêu cầu đến API dữ liệu thị trường công khai của OKX, không cần đăng nhập. Sau đó nó chuyển phản hồi thành các bảng dễ đọc hoặc dễ phân tích.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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

ID Endpoint Path Title (Detailed Documentation) Category Description
1 /market/ticker Single Ticker Spot Market Retrieve the latest market data for a single trading instrument, including last price, bid/ask, 24h volume, and more
2 /market/tickers Batch Tickers Spot Market Retrieve all market data for a given instrument class (SPOT/SWAP/FUTURES/OPTION) in batch
3 /market/candles Candlestick Data Spot Market Retrieve candlestick (OHLCV) data with multiple supported intervals
4 /market/trades Recent Trades Spot Market Retrieve recent trade-level details
5 /public/instruments Instrument List Spot Market Retrieve metadata for all tradable instruments, including minimum order size and price precision
6 /market/books Order Book Depth Spot Market Retrieve bid/ask order book depth data
7 /public/funding-rate Funding Rate Derivatives Market Retrieve current and historical funding rates for perpetual contracts
8 /public/funding-rate-history Historical Funding Rate Derivatives Market Retrieve historical funding-rate data for perpetual contracts
9 /public/mark-price Mark Price Derivatives Market Retrieve mark prices for derivatives, used for PnL and liquidation calculations
10 /public/open-interest Open Interest Derivatives Market Retrieve open-interest data for derivatives
11 /public/price-limit Price Limit Derivatives Market Retrieve the curre
Câu hỏi thường gặp

Tôi có cần tài khoản OKX không?

Không. Các điểm truy cập dữ liệu thị trường là công khai, nên không cần tài khoản hay token.

Tôi đặt tên cặp giao dịch thế nào?

Dùng định dạng BTC-USDT cho giao ngay, BTC-USDT-SWAP cho hợp đồng vĩnh viễn, và các mã tương tự cho hợp đồng tương lai và quyền chọn.

Skill có cần gói Python đặc biệt không?

Cần requests và pandas, là các thư viện Python phổ biến.

Chi tiết

Mô tả gốc của tác giả

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.

repo: HKUDS/Vibe-Trading

Độ phổ biến

Sao GitHub
37k
Vị trí xếp hạng
#7535
Giấy phép
MIT
Cập nhật
1/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự