bybit-openapi-skill

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Bybit V5 Skill

Bybit V5 技能

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.
使用本技能可通过
uxc
+ OpenAPI执行Bybit V5市场数据操作。
复用
uxc
技能以获取共享的执行、认证和错误处理指引。

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:
    • https://raw.githubusercontent.com/holon-run/uxc/main/skills/bybit-openapi-skill/references/bybit-v5.openapi.json
  • 已安装
    uxc
    且其可在
    PATH
    中访问。
  • 具备以下网络访问权限:
    • https://api.bybit.com
    • 可选:
      https://api-testnet.bybit.com
  • 可访问经过筛选的OpenAPI schema地址:
    • https://raw.githubusercontent.com/holon-run/uxc/main/skills/bybit-openapi-skill/references/bybit-v5.openapi.json

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
本技能涵盖经过筛选的Bybit V5公开市场操作,包括:
  • 服务器时间
  • 合约标的元数据
  • 行情报价
  • 订单簿快照
  • K线数据读取
本技能涵盖:
  • v1版本的私有账户端点
  • v1版本的私有订单下单或取消操作
  • 跟单交易、理财、经纪商或资产管理产品线

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.
本技能中的公开市场端点无需凭证。
Bybit私有API使用特定于服务商的头部签名机制,该机制尚未打包为通用的
uxc
签名流程。在可复用的Bybit签名流程推出前,本v1版本技能仅支持公开数据操作。

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.
Bybit官方文档提及区域和IP限制。若请求意外失败,请先验证当前执行环境是否被允许访问Bybit API,再调试schema或参数。

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
    • bybit-openapi-cli -h
  2. Inspect operation help before execution:
    • 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. Prefer narrow spot reads first:
    • bybit-openapi-cli get:/v5/market/tickers category=spot symbol=BTCUSDT
    • bybit-openapi-cli get:/v5/market/orderbook category=spot symbol=BTCUSDT limit=20
  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

Operations

操作列表

  • get:/v5/market/time
  • get:/v5/market/instruments-info
  • get:/v5/market/tickers
  • get:/v5/market/orderbook
  • get:/v5/market/kline
  • get:/v5/market/time
  • get:/v5/market/instruments-info
  • get:/v5/market/tickers
  • get:/v5/market/orderbook
  • get:/v5/market/kline

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.
  • bybit-openapi-cli <operation> ...
    is equivalent to
    uxc https://api.bybit.com --schema-url <bybit_v5_openapi_schema> <operation> ...
    .
  • 自动化操作请基于JSON输出格式,不要使用
    --text
    参数。
  • 优先解析稳定字段:
    ok
    kind
    protocol
    data
    error
  • 将本v1版本技能视为只读工具。
  • 除非用户明确需要其他市场类型并已确认标的格式,否则使用
    category=spot
    参数。
  • bybit-openapi-cli <operation> ...
    等同于
    uxc https://api.bybit.com --schema-url <bybit_v5_openapi_schema> <operation> ...

References

参考资料