← 返回
未分类 Key 中文

pionex-earn-dual

Use when the user asks about Pionex Dual Investment (earn dual): listing supported pairs or products, checking yield rates or index prices, querying balances...
当用户询问Pionex双向投资(赚取双向收益)时使用:列出支持的交易对或产品、查询收益率或指数价格、查询余额等。
pibrandon pibrandon 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 306
下载
💾 0
安装
1
版本
#latest

概述

Pionex Earn Dual Investment Skill

Dual Investment products on Pionex: browse products, check yields, invest, revoke, and collect settled earnings via pionex-trade-cli. Public queries require no credentials; write operations require API credentials with Earn permission.

> Beta notice: The Dual Investment API is currently in Beta. Contact open@pionex.com to request access.

Product ID format: {BASE}-{QUOTE}-{YYMMDD}-{STRIKE}-{C|P}-{CURRENCY}, where C = DUAL_BASE and P = DUAL_CURRENCY.

Skill Routing

  • Dual Investment products, prices, invest, revoke, collect → pionex-earn-dual (this skill)
  • Spot market data (depth, tickers, klines) → pionex-market
  • Spot account balance → pionex-portfolio
  • Spot order placement/cancellation → pionex-trade
  • Futures Grid Bot lifecycle → pionex-bot

Prerequisites

  1. Install CLI:

```bash

npm install -g @pionex/pionex-ai-kit

```

  1. For private commands (balances, invest, revoke_invest, collect), configure credentials:

```bash

pionex-ai-kit onboard

```

Ensure your API key has the required permissions:

  • View — for balances, get_invests, records
  • Earn — for invest, revoke_invest, collect
  1. Verify (public, no auth needed):

```bash

pionex-trade-cli earn dual symbols

```


Command Index

Public Commands (no authentication required)

#CommandFlagsType
-------------------------
1pionex-trade-cli earn dual symbols[--base ]READ
2pionex-trade-cli earn dual open_products`--base --quote --type DUAL_BASE\DUAL_CURRENCY [--currency ]`READ
3pionex-trade-cli earn dual prices--base --quote --product-ids READ
4pionex-trade-cli earn dual index--base --quote READ
5pionex-trade-cli earn dual delivery_prices--base [--quote ] [--start-time ] [--end-time ]READ

Private Commands — View permission

#CommandFlagsType
-------------------------
6pionex-trade-cli earn dual balances[--merge]READ
7pionex-trade-cli earn dual get_invests[--base ] --client-dual-ids READ
8pionex-trade-cli earn dual records--base --end-time [--quote ] [--currency ] [--start-time ] [--limit ]READ

Private Commands — Earn permission

#CommandFlagsType
-------------------------
9pionex-trade-cli earn dual invest`--base --product-id --profit (--base-amount \--currency-amount ) [--client-dual-id ] [--dry-run]`WRITE
10pionex-trade-cli earn dual revoke_invest--base --product-id --client-dual-id [--dry-run]WRITE
11pionex-trade-cli earn dual collect--base --client-dual-id --product-id [--dry-run]WRITE

quote and currency Rules

The correct --quote value depends on the base currency:

Base currency--quote--currency options
----------------------------------------------
BTC, ETHUSDXOUSDT or USDC
All other bases (XRP, SOL, LRC, etc.)USDTUSDT

Incorrect --quote will return DUAL_PARAMETER_ERROR: invalid base quote.


Product Type Semantics

TypeInvest inStrike hit at expiryStrike NOT hit
-------------------------------------------------------
DUAL_BASE (C in product ID)Base currency (e.g. BTC)Converted to investment currency + yieldReturned in base + yield
DUAL_CURRENCY (P in product ID)Investment currency (e.g. USDT)Converted to base currency + yieldReturned in investment currency + yield

Safety Rules

  1. Never use a stale profit value — Always call earn dual prices immediately before earn dual invest. The API rejects mismatched profit values. Steps 2 and 3 of the invest workflow must be consecutive.
  2. --profit is required for invest — There is no default; the exact value returned by prices must be passed.
  3. Never provide both --base-amount and --currency-amount — They are mutually exclusive; use one or the other.
  4. Dry-run first, confirm before real execution — For invest, revoke_invest, and collect, always run with --dry-run, show output to user, then confirm before running without it.
  5. Never infer --client-dual-id — Require the user to provide it, or propose one and get confirmation. It acts as an idempotency key.
  6. Check order state before revoke/collect — Use earn dual get_invests to verify state first: revoke_invest only works on pending orders; collect only works on settled orders.
  7. Never infer --product-id, strike, or expiry — These must come from the API (open_products or get_invests), never assumed.

Invest Workflow (Mandatory 3-Step Process)

Step 1: Get available products

# DUAL_BASE: invest in BTC, payout converted if price rises above strike
pionex-trade-cli earn dual open_products \
  --base BTC \
  --quote USDXO \
  --type DUAL_BASE \
  --currency USDT

# DUAL_CURRENCY: invest in USDT, buy BTC if price drops below strike
pionex-trade-cli earn dual open_products \
  --base BTC \
  --quote USDXO \
  --type DUAL_CURRENCY \
  --currency USDT

Choose a productId from the response (e.g. BTC-USDXO-260402-68000-P-USDT).

Step 2: Get current yield rate (must be done immediately before Step 3)

pionex-trade-cli earn dual prices \
  --base BTC \
  --quote USDXO \
  --product-ids BTC-USDXO-260402-68000-P-USDT

Check canInvest: true and record the profit value exactly as returned (e.g. "0.0039").

Step 3: Dry-run, confirm, then submit

# Dry-run first — shows the request payload without executing
pionex-trade-cli earn dual invest \
  --base BTC \
  --product-id BTC-USDXO-260402-68000-P-USDT \
  --client-dual-id my-order-001 \
  --currency-amount 100 \
  --profit 0.0039 \
  --dry-run

# After user confirmation, submit (same command without --dry-run)
pionex-trade-cli earn dual invest \
  --base BTC \
  --product-id BTC-USDXO-260402-68000-P-USDT \
  --client-dual-id my-order-001 \
  --currency-amount 100 \
  --profit 0.0039

> Do not call other commands between Steps 2 and 3. The profit value has a short validity window.


Examples

Browse products

# All supported pairs
pionex-trade-cli earn dual symbols

# BTC pairs only
pionex-trade-cli earn dual symbols --base BTC

# Open DUAL_BASE products for ETH (invest ETH, convert to USDT if price rises)
pionex-trade-cli earn dual open_products \
  --base ETH --quote USDXO --type DUAL_BASE --currency USDT

# Open products for XRP (non-BTC/ETH — use USDT quote)
pionex-trade-cli earn dual open_products \
  --base XRP --quote USDT --type DUAL_BASE

Check prices and index

# Current yield for a specific product
pionex-trade-cli earn dual prices \
  --base BTC --quote USDXO \
  --product-ids BTC-USDXO-260402-68000-P-USDT

# Multiple product IDs (comma-separated, no spaces)
pionex-trade-cli earn dual prices \
  --base ETH --quote USDXO \
  --product-ids ETH-USDXO-260410-3000-C-USDT,ETH-USDXO-260410-2900-C-USDT

# Real-time index price
pionex-trade-cli earn dual index --base BTC --quote USDXO

# Historical delivery prices
pionex-trade-cli earn dual delivery_prices --base BTC --quote USDXO

Account and history

# Balances
pionex-trade-cli earn dual balances

# Merged balances (same coin across different bases)
pionex-trade-cli earn dual balances --merge

# Batch query by client order IDs (comma-separated)
pionex-trade-cli earn dual get_invests \
  --base BTC \
  --client-dual-ids my-order-001,my-order-002

# Investment history (--base and --end-time required)
pionex-trade-cli earn dual records \
  --base BTC \
  --quote USDXO \
  --end-time 1775027817297 \
  --limit 20

Revoke a pending order

# 1. Verify order is still pending
pionex-trade-cli earn dual get_invests --base BTC --client-dual-ids my-order-001

# 2. Dry-run
pionex-trade-cli earn dual revoke_invest \
  --base BTC \
  --product-id BTC-USDXO-260402-68000-P-USDT \
  --client-dual-id my-order-001 \
  --dry-run

# 3. Execute after user confirmation
pionex-trade-cli earn dual revoke_invest \
  --base BTC \
  --product-id BTC-USDXO-260402-68000-P-USDT \
  --client-dual-id my-order-001

Collect settled earnings

# 1. Verify order is settled
pionex-trade-cli earn dual get_invests --base BTC --client-dual-ids my-order-001

# 2. Dry-run
pionex-trade-cli earn dual collect \
  --base BTC \
  --client-dual-id my-order-001 \
  --product-id BTC-USDXO-260402-68000-P-USDT \
  --dry-run

# 3. Execute after user confirmation
pionex-trade-cli earn dual collect \
  --base BTC \
  --client-dual-id my-order-001 \
  --product-id BTC-USDXO-260402-68000-P-USDT

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-07 21:41 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

professional

A股量化 AkShare

mbpz
A股量化数据分析工具,基于AkShare库获取A股行情、财务数据、板块信息等。用于回答关于A股股票查询、行情数据、财务分析、选股等问题。
★ 205 📥 64,874
data-analysis

pionex-market

pibrandon
Use when the user asks for Pionex market data: price, ticker, order book depth, recent trades, symbol info (precision/mi
★ 0 📥 375
professional

All-Market Financial Data Hub

financial-ai-analyst
基于东方财富数据库,支持自然语言查询金融数据,覆盖A股、港股、美股、基金、债券等资产,提供实时行情、公司信息、估值、财务报表等,适用于投资研究、交易复盘、市场监控、行业分析、信用研究、财报审计、资产配置等场景,满足机构与个人需求。返回结果为
★ 135 📥 43,435