Bybit V5 Skill
Use this skill to run Bybit V5 market-data operations through uxc + OpenAPI.
Reuse the uxc skill for shared execution, auth, and error-handling guidance.
Prerequisites
- -
uxc is installed and available in PATH. - Network access to:
-
https://api.bybit.com
- optionally
https://api-testnet.bybit.com
- - Access to the curated OpenAPI schema URL:
- INLINECODE6
Scope
This skill covers a curated Bybit V5 public market surface for:
- - server time
- instruments metadata
- tickers
- order book snapshots
- kline reads
This skill does not cover:
- - private account endpoints in v1
- private order placement or cancellation in v1
- copy trading, earn, broker, or asset management product families
Authentication
Public market endpoints in this skill do not require credentials.
Bybit private APIs use provider-specific header signing that is not yet packaged as a generic uxc signer flow. Keep this v1 skill public-data-only until a reusable Bybit signer path exists.
Region Guardrail
Bybit's official docs note region and IP restrictions. If requests fail unexpectedly, verify that the current execution environment is permitted for Bybit API access before debugging the schema or parameters.
Core Workflow
- 1. Use the fixed link command by default:
-
command -v bybit-openapi-cli
- If missing, create it:
uxc link bybit-openapi-cli https://api.bybit.com --schema-url https://raw.githubusercontent.com/holon-run/uxc/main/skills/bybit-openapi-skill/references/bybit-v5.openapi.json
- INLINECODE10
- 2. Inspect operation help before execution:
-
bybit-openapi-cli get:/v5/market/time -h
-
bybit-openapi-cli get:/v5/market/instruments-info -h
- INLINECODE13
- 3. Prefer narrow spot reads first:
-
bybit-openapi-cli get:/v5/market/tickers category=spot symbol=BTCUSDT
- INLINECODE15
Operations
- - INLINECODE16
- INLINECODE17
- INLINECODE18
- INLINECODE19
- INLINECODE20
Guardrails
- - Keep automation on the JSON output envelope; do not use
--text. - Parse stable fields first:
ok, kind, protocol, data, error. - Treat this v1 skill as read-only.
- Use
category=spot unless the user explicitly needs another market family and has checked the symbol format. - INLINECODE28 is equivalent to
uxc https://api.bybit.com --schema-url <bybit_v5_openapi_schema> <operation> ....
References
- - Usage patterns: INLINECODE30
- Curated OpenAPI schema: INLINECODE31
- Official Bybit V5 docs: https://bybit-exchange.github.io/docs/v5/guide
Bybit V5 技能
使用此技能通过 uxc + OpenAPI 运行 Bybit V5 市场数据操作。
复用 uxc 技能以获取共享执行、认证和错误处理指导。
前提条件
- - uxc 已安装并位于 PATH 中。
- 网络可访问:
- https://api.bybit.com
- 可选 https://api-testnet.bybit.com
- https://raw.githubusercontent.com/holon-run/uxc/main/skills/bybit-openapi-skill/references/bybit-v5.openapi.json
范围
此技能涵盖精选的 Bybit V5 公共市场接口,用于:
- - 服务器时间
- 交易品种元数据
- 行情数据
- 订单簿快照
- K线数据读取
此技能不涵盖:
- - v1 中的私有账户端点
- v1 中的私有订单下达或取消
- 跟单、理财、经纪商或资产管理产品系列
认证
此技能中的公共市场端点无需凭据。
Bybit 私有 API 使用特定于提供商的标头签名,该功能尚未打包为通用的 uxc 签名器流程。在可复用的 Bybit 签名器路径出现之前,请保持此 v1 技能仅处理公共数据。
区域限制
Bybit 官方文档注明了区域和 IP 限制。如果请求意外失败,请在调试模式或参数之前,验证当前执行环境是否被允许访问 Bybit API。
核心工作流程
- 1. 默认使用固定链接命令:
- command -v bybit-openapi-cli
- 如果缺失,则创建:
uxc link bybit-openapi-cli https://api.bybit.com --schema-url https://raw.githubusercontent.com/holon-run/uxc/main/skills/bybit-openapi-skill/references/bybit-v5.openapi.json
- bybit-openapi-cli -h
- 2. 执行前检查操作帮助:
- bybit-openapi-cli get:/v5/market/time -h
- bybit-openapi-cli get:/v5/market/instruments-info -h
- bybit-openapi-cli get:/v5/market/tickers -h
- 3. 优先进行窄范围的现货读取:
- bybit-openapi-cli get:/v5/market/tickers category=spot symbol=BTCUSDT
- bybit-openapi-cli get:/v5/market/orderbook category=spot symbol=BTCUSDT limit=20
操作
- - get:/v5/market/time
- get:/v5/market/instruments-info
- get:/v5/market/tickers
- get:/v5/market/orderbook
- get:/v5/market/kline
限制规则
- - 保持自动化在 JSON 输出信封上;不要使用 --text。
- 首先解析稳定字段:ok、kind、protocol、data、error。
- 将此 v1 技能视为只读。
- 除非用户明确需要其他市场系列并已检查交易品种格式,否则使用 category=spot。
- bybit-openapi-cli <操作> ... 等同于 uxc https://api.bybit.com --schema-url v5openapi_schema> <操作> ...。
参考资料
- - 使用模式:references/usage-patterns.md
- 精选的 OpenAPI 模式:references/bybit-v5.openapi.json
- 官方 Bybit V5 文档:https://bybit-exchange.github.io/docs/v5/guide