Pionex Earn Arbitrage Skill
Arbitrage (InstFund) products on Pionex: browse products, query user balances, stake into a product, and unstake from a product via pionex-trade-cli. Read operations require Enable reading permission; write operations require Earn permission.
Invite Only: The Earn Arbitrage API is currently invite-only and only available to onboarded institutional users. Contact your BD representative or open@pionex.com to request access.
Skill Routing
- Arbitrage products, balances, stake, unstake → pionex-earn-arbitrage (this skill)
- Dual Investment products, prices, invest, revoke, collect → pionex-earn-dual
- 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
- Install CLI:
npm install -g @pionex/pionex-ai-kit - Configure credentials:
Ensure your API key has the required permissions:pionex-ai-kit onboard- Enable reading — for
fetchProducts,fetchUserBalances - Earn — for
stake,unStake
- Enable reading — for
API Endpoints
| # | Method | Path | Permission | Description |
|---|---|---|---|---|
| 1 | GET | /api/v1/earn/arbitrage/fetchProducts |
Enable reading | List available arbitrage products |
| 2 | GET | /api/v1/earn/arbitrage/fetchUserBalances |
Enable reading | Query user arbitrage balances |
| 3 | POST | /api/v1/earn/arbitrage/stake |
Earn | Stake (invest) into an arbitrage product |
| 4 | POST | /api/v1/earn/arbitrage/unStake |
Earn | Unstake (withdraw) from an arbitrage product |
Command Index
Public-with-auth Commands (Enable reading permission)
| # | Command | Flags | Type |
|---|---|---|---|
| 1 | pionex-trade-cli earn arbitrage fetchProducts |
[--coin <currency>] [--visibility <v>] |
READ |
| 2 | pionex-trade-cli earn arbitrage fetchUserBalances |
[--business-type <n>] |
READ |
Private Commands — Earn permission
| # | Command | Flags | Type |
|---|---|---|---|
| 3 | pionex-trade-cli earn arbitrage stake |
--amount <n> --coin <c> --product-id <id> [--unique-id <id>] |
WRITE |
| 4 | pionex-trade-cli earn arbitrage unStake |
--amount <n> --coin <c> --product-id <id> [--unique-id <id>] [--unstake-id <id>] |
WRITE |
Safety Rules
- Dry-run first, confirm before real execution — For
stakeandunStake, always run with--dry-run, show output to user, then confirm before running without it. - Never infer
--product-id— Must come from the API (fetchProducts), never assumed. - Never infer
--unique-id— Propose one and get user confirmation. It acts as an idempotency key. - Check balance before unstaking — Use
fetchUserBalancesto verify the position exists before callingunStake.
Stake Workflow (Mandatory 2-Step Process)
Step 1: Get available products
# List all available arbitrage products
pionex-trade-cli earn arbitrage fetchProducts
# Filter by coin
pionex-trade-cli earn arbitrage fetchProducts --coin USDT
Choose a productId from the response.
Step 2: Dry-run, confirm, then submit
# Dry-run first — shows the request payload without executing
pionex-trade-cli earn arbitrage stake \
--coin USDT \
--product-id <productId> \
--amount 100 \
--unique-id my-stake-001 \
--dry-run
# After user confirmation, submit (same command without --dry-run)
pionex-trade-cli earn arbitrage stake \
--coin USDT \
--product-id <productId> \
--amount 100 \
--unique-id my-stake-001
Examples
Browse products
# All available arbitrage products
pionex-trade-cli earn arbitrage fetchProducts
# Filter by coin
pionex-trade-cli earn arbitrage fetchProducts --coin USDT
Query user balances
# All arbitrage balances
pionex-trade-cli earn arbitrage fetchUserBalances
Stake
# 1. Get products
pionex-trade-cli earn arbitrage fetchProducts --coin USDT
# 2. Dry-run stake
pionex-trade-cli earn arbitrage stake \
--coin USDT \
--product-id <productId> \
--amount 100 \
--unique-id my-stake-001 \
--dry-run
# 3. Execute after user confirmation
pionex-trade-cli earn arbitrage stake \
--coin USDT \
--product-id <productId> \
--amount 100 \
--unique-id my-stake-001
Unstake
# 1. Verify balance exists
pionex-trade-cli earn arbitrage fetchUserBalances
# 2. Dry-run unstake
pionex-trade-cli earn arbitrage unStake \
--coin USDT \
--product-id <productId> \
--amount 100 \
--unique-id my-stake-001 \
--dry-run
# 3. Execute after user confirmation
pionex-trade-cli earn arbitrage unStake \
--coin USDT \
--product-id <productId> \
--amount 100 \
--unique-id my-stake-001