### Wallet balance_full usage examples Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides/cli-guides-wallet.md Examples showing the command with and without language configuration flags. ```bash pionex-trade-cli wallet balance_full pionex-trade-cli wallet balance_full --app-lang en ``` -------------------------------- ### Dual Investment Workflow Example Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides/cli-guides-earn Example workflow showing how to fetch prices, preview an order with dry-run, and submit the final investment. ```bash # Step 1: Get current prices pionex-trade-cli earn dual prices \ --base BTC \ --quote USDXO \ --product-ids BTC-USDXO-260402-68000-P-USDT # Step 2: Preview 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 # Step 3: Submit 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 ``` -------------------------------- ### Install Pionex Skills Source: https://www.pionex.com/docs/ai-kit-docs/skills/skills-guides/skills-guides-earn.md Install the official Pionex skills repository using npx. ```bash npx skills add pionex-official/pionex-skills ``` -------------------------------- ### Install and Configure Pionex AI Kit Source: https://www.pionex.com/docs/ai-kit-docs/skills/skills-guides.md Commands to install the CLI, configure API credentials, and add official skills. ```bash # Install CLI npm install -g @pionex/pionex-ai-kit # Configure credentials (create API Key at https://www.pionex.com/my-account/api) pionex-ai-kit onboard # Install Skills npx skills add pionex-official/pionex-skills ``` -------------------------------- ### Smart Copy Bot Operational Examples Source: https://www.pionex.com/docs/ai-kit-docs/skills/skills-guides/skills-guides-bot.md Practical examples for checking balances, validating parameters, dry-running, creating, and managing smart copy bots. ```bash # Check balance pionex-trade-cli account balance # Validate parameters (get allowed range) pionex-trade-cli bot smart_copy check_params --base BTC --quote USDT \ --leverage 2 --quote-investment 0 --signal-type # Dry-run before creating pionex-trade-cli bot smart_copy create --base BTC --quote USDT \ --bu-order-data-json '{"quote_total_investment":"100","portfolio":[{"base":"BTC","signal_type":"","leverage":2,"percent":"1"}]}' \ --dry-run # Create the bot (after confirmation) pionex-trade-cli bot smart_copy create --base BTC --quote USDT \ --bu-order-data-json '{"quote_total_investment":"100","portfolio":[{"base":"BTC","signal_type":"","leverage":2,"percent":"1"}]}' # Get bot status pionex-trade-cli bot smart_copy get --bu-order-id 123456 # Cancel bot pionex-trade-cli bot smart_copy cancel --bu-order-id 123456 ``` -------------------------------- ### Install Pionex AI Kit CLI Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides.md Installs the CLI package globally via npm. ```bash npm install -g @pionex/pionex-ai-kit ``` -------------------------------- ### Query documentation via HTTP GET Source: https://www.pionex.com/docs/ai-kit-docs Perform an HTTP GET request to the documentation index using the ask and goal parameters to retrieve answers. ```http GET https://www.pionex.com/docs/readme.md?ask=&goal= ``` -------------------------------- ### Example JSON Output Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides.md Demonstrates the standard JSON output format for market data commands. ```bash $ pionex-trade-cli market tickers --symbol BTC_USDT { "tickers": [ { "symbol": "BTC_USDT", "open": "67000.00", "close": "67500.00", "high": "68000.00", "low": "66500.00", "volume": "1234.56" } ] } ``` -------------------------------- ### Verify Installation Source: https://www.pionex.com/docs/ai-kit-docs/skills/skills-quickstart.md Tests market data retrieval and account balance queries to ensure the CLI is functioning correctly. ```bash # Test market data (no API key needed) pionex-trade-cli market tickers --symbol BTC_USDT # Test account query (API key required) pionex-trade-cli account balance ``` -------------------------------- ### Market and Order Examples Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-quickstart.md Common commands for retrieving market data and executing dry-run orders. ```bash # Order book depth pionex-trade-cli market depth BTC_USDT --limit 5 # Recent trades pionex-trade-cli market trades BTC_USDT --limit 10 # Place a market buy order (dry-run) pionex-trade-cli orders new --symbol BTC_USDT --side BUY --type MARKET --amount 100 --dry-run ``` -------------------------------- ### List bot orders via CLI Source: https://www.pionex.com/docs/ai-kit-docs/skills/skills-guides/skills-guides-bot.md Examples of using the pionex-trade-cli to list, filter, and paginate through bot orders. ```bash # List all running bot orders pionex-trade-cli bot order_list # List only spot_grid orders pionex-trade-cli bot order_list --bu-order-types spot_grid # List finished BTC orders across all bot types pionex-trade-cli bot order_list --status finished --base BTC # Filter by multiple bot types pionex-trade-cli bot order_list --bu-order-types futures_grid,spot_grid # Paginate to next page pionex-trade-cli bot order_list --page-token ``` -------------------------------- ### Execute Spot Trading Commands Source: https://www.pionex.com/docs/ai-kit-docs/skills/skills-guides/skills-guides-trade.md Examples of common CLI commands for placing market and limit orders, as well as canceling orders. ```bash # Market buy: spend 100 USDT to buy BTC pionex-trade-cli orders new --symbol BTC_USDT --side BUY --type MARKET --amount 100 # Market sell: sell 0.01 BTC pionex-trade-cli orders new --symbol BTC_USDT --side SELL --type MARKET --size 0.01 # Limit buy pionex-trade-cli orders new --symbol BTC_USDT --side BUY --type LIMIT --price 50000 --size 0.01 # Cancel an order pionex-trade-cli orders cancel --symbol BTC_USDT --order-id 123456 # Cancel all open orders for a symbol pionex-trade-cli orders cancel_all --symbol BTC_USDT ``` -------------------------------- ### Example Prompts for Earn Arbitrage Tools Source: https://www.pionex.com/docs/ai-kit-docs/mcp/mcp-guides/mcp-guides-earn-arbitrage.md Natural language prompts demonstrating how to interact with the Earn Arbitrage MCP tools. ```text "Use the Pionex tools to list all available Earn Arbitrage products." "Use the Pionex tools to show my Earn Arbitrage balances." "Use the Pionex tools to stake 100 USDT into arbitrage product 400." "Use the Pionex tools to unstake 100 USDT from arbitrage product 400." ``` -------------------------------- ### Example Prompts for Pionex Earn Tools Source: https://www.pionex.com/docs/ai-kit-docs/mcp/mcp-guides/mcp-guides-earn.md Natural language prompts demonstrating how to interact with the Pionex Earn MCP tools for various operations. ```text "Use the Pionex tools to list all open BTC dual investment products for DUAL_BASE direction." "Use the Pionex tools to get the current yield rate for BTC/USDXO dual investment product BTC-USDXO-260410-70000-C-USDT." "Use the Pionex tools to show the real-time BTC/USDXO index price for dual investment." "Use the Pionex tools to check my dual investment balance." "Use the Pionex tools to invest 100 USDT in product BTC-USDXO-260402-68000-P-USDT with the current profit rate." "Use the Pionex tools to revoke my pending dual investment order my-order-001." "Use the Pionex tools to collect my settled dual investment earnings." "Use the Pionex tools to show my dual investment history for BTC." ``` -------------------------------- ### Register MCP Server with setup Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides.md Configures the MCP server for a specific AI client. No API keys are stored in the client configuration. ```bash pionex-ai-kit setup --mcp=pionex-trade-mcp --client ``` -------------------------------- ### Get AI Strategy Parameters Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides/cli-guides-bot Fetch AI-recommended grid parameters for a specific trading pair. ```bash pionex-trade-cli bot spot_grid get_ai_strategy --base --quote ``` ```bash pionex-trade-cli bot spot_grid get_ai_strategy --base BTC --quote USDT ``` -------------------------------- ### Push Trading Signals via CLI Source: https://www.pionex.com/docs/ai-kit-docs/skills/skills-guides/skills-guides-bot.md Examples for pushing buy and sell signals to the platform using the signal listener command. ```bash # Push a buy signal pionex-trade-cli bot signal listener --signal-type --signal-param '{}' \ --base BTC --quote USDT --time 2024-01-01T12:00:00Z --price 85000 \ --action buy --position-size 1 --contracts 1 # Push a sell signal pionex-trade-cli bot signal listener --signal-type --signal-param '{}' \ --base BTC --quote USDT --time 2024-01-01T13:00:00Z --price 86000 \ --action sell --position-size 0 --contracts 0 ``` -------------------------------- ### Get Account Balance Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides/cli-guides-trade Retrieves all spot account balances in JSON format. ```bash pionex-trade-cli account balance ``` -------------------------------- ### Execute Market Data Commands Source: https://www.pionex.com/docs/ai-kit-docs/skills/skills-guides/skills-guides-trade.md Examples of retrieving market depth, recent trades, symbol metadata, tickers, and klines using the CLI. ```bash # Order book depth (5 levels) pionex-trade-cli market depth BTC_USDT --limit 5 # Last 10 trades pionex-trade-cli market trades BTC_USDT --limit 10 # Symbol precision and minimum order size pionex-trade-cli market symbols --symbols BTC_USDT # 24h ticker pionex-trade-cli market tickers --symbol BTC_USDT # 4-hour klines (last 24 candles) pionex-trade-cli market klines BTC_USDT 4H --limit 24 ``` -------------------------------- ### Manual MCP Server Configuration Source: https://www.pionex.com/docs/ai-kit-docs/mcp/mcp-guides.md Example configuration for adding the Pionex Trade MCP server to a client's JSON configuration file. ```json { "mcpServers": { "pionex-trade-mcp": { "command": "npx", "args": ["-y", "@pionex/pionex-trade-mcp"] } } } ``` -------------------------------- ### Bot order_list usage examples Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides/cli-guides-bot Common patterns for listing bot orders, including filtering by status, type, currency, and pagination. ```bash # List all running bot orders pionex-trade-cli bot order_list # List only futures_grid orders pionex-trade-cli bot order_list --bu-order-types futures_grid # List finished BTC spot_grid orders pionex-trade-cli bot order_list --status finished --base BTC --bu-order-types spot_grid # Paginate to next page pionex-trade-cli bot order_list --page-token ``` -------------------------------- ### Get Dual Investment balances Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides/cli-guides-earn Retrieve account balances for Dual Investment, requiring read permissions. ```bash pionex-trade-cli earn dual balances [--merge] ``` -------------------------------- ### Get Order by ID Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides/cli-guides-trade Retrieves details for a specific order using its ID. ```bash pionex-trade-cli orders get --symbol --order-id ``` -------------------------------- ### Get Symbol Metadata Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides/cli-guides-trade Retrieves metadata such as precision and step size for symbols. ```bash pionex-trade-cli market symbols [--symbols ] [--type SPOT|PERP] ``` ```bash pionex-trade-cli market symbols --symbols BTC_USDT,ETH_USDT pionex-trade-cli market symbols --type SPOT ``` -------------------------------- ### Get Best Bid/Ask Ticker Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides/cli-guides-trade Retrieves the best bid and ask prices for a symbol. ```bash pionex-trade-cli market book_tickers [--symbol ] [--type SPOT|PERP] ``` ```bash pionex-trade-cli market book_tickers --symbol BTC_USDT pionex-trade-cli market book_tickers --type SPOT ``` -------------------------------- ### Get Dual Investment prices Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides/cli-guides-earn Fetch yield rates and investability status for specific product IDs. Always call this before placing an order. ```bash pionex-trade-cli earn dual prices --base --quote --product-ids ``` ```bash # BTC/USDXO pair pionex-trade-cli earn dual prices --base BTC --quote USDXO --product-ids BTC-USDXO-260402-68000-P-USDT # Multiple product IDs (comma-separated) pionex-trade-cli earn dual prices --base ETH --quote USDXO --product-ids ETH-USDXO-260410-3000-C-USDT,ETH-USDXO-260410-2900-C-USDT # Other base (USDT pair) pionex-trade-cli earn dual prices --base LRC --quote USDT --product-ids LRC-USDT-260410-0.03-C-USDT,LRC-USDT-260410-0.02-C-USDT ``` -------------------------------- ### Futures Grid Bot Trading Flow Source: https://www.pionex.com/docs/ai-kit-docs/skills/skills-guides/skills-guides-bot.md Example sequence of commands for an agent to execute a user request to create a futures grid bot. ```bash 1. Check balance: pionex-trade-cli account balance -> verify available USDT 2. Get symbol info: pionex-trade-cli market symbols --symbols BTC_USDT --type PERP 3. Get current price: pionex-trade-cli market tickers --symbol BTC_USDT --type PERP 4. Ask user for grid range, number of grids, and leverage (if not specified) 5. Validate parameters: pionex-trade-cli bot futures_grid check_params --base BTC --quote USDT --bu-order-data-json '...' — if FailedWithData, show valid range and ask user to adjust 6. Dry-run preview: pionex-trade-cli bot futures_grid create --base BTC --quote USDT --bu-order-data-json '...' --dry-run 7. After user confirms, execute the actual create (remove --dry-run) ``` -------------------------------- ### GET https://www.pionex.com/docs/readme.md Source: https://www.pionex.com/docs/ai-kit-docs Performs a query against the documentation index to retrieve answers and relevant sources based on a user's question. ```APIDOC ## GET https://www.pionex.com/docs/readme.md ### Description Perform an HTTP GET request on the documentation index to retrieve a direct answer to a specific question, along with relevant excerpts and sources from the documentation. ### Method GET ### Endpoint https://www.pionex.com/docs/readme.md ### Parameters #### Query Parameters - **ask** (string) - Required - The immediate, specific, and self-contained question to ask. - **goal** (string) - Optional - Describes the broader end goal to help tailor the response. ### Response - The response contains a direct answer to the question and relevant excerpts and sources from the documentation. ``` -------------------------------- ### Get Dual Investment delivery prices Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides/cli-guides-earn Retrieve historical settlement delivery prices for a base currency. ```bash pionex-trade-cli earn dual delivery_prices --base [--quote ] [--start-time ] [--end-time ] ``` ```bash # BTC/USDXO pionex-trade-cli earn dual delivery_prices --base BTC --quote USDXO # Other base pionex-trade-cli earn dual delivery_prices --base XRP --quote USDT ``` -------------------------------- ### Get Dual Investment index price Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides/cli-guides-earn Retrieve the real-time index price for an underlying asset. ```bash pionex-trade-cli earn dual index --base --quote ``` ```bash # BTC/USDXO pionex-trade-cli earn dual index --base BTC --quote USDXO # Other base pionex-trade-cli earn dual index --base LRC --quote USDT ``` -------------------------------- ### Get Dual Investment records Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides/cli-guides-earn Query historical investment records for a specific base currency. ```bash pionex-trade-cli earn dual records --base --end-time [--quote ] [--currency ] [--limit ] [--start-time ] ``` ```bash pionex-trade-cli earn dual records --base BTC --quote USDXO --end-time 1775027817297 --limit 20 ``` -------------------------------- ### pionex-trade-cli bot smart_copy get Source: https://www.pionex.com/docs/ai-kit-docs/skills/skills-guides/skills-guides-bot.md Retrieves the details of a specific smart copy bot order by its ID. ```APIDOC ## pionex-trade-cli bot smart_copy get ### Description Retrieves a smart copy bot order by its unique identifier. ### Parameters - **--bu-order-id** (string) - Required - The ID of the smart copy bot order. ``` -------------------------------- ### Get Spot Grid Bot Order Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides/cli-guides-bot Retrieve details for a specific spot grid bot order by its ID. ```bash pionex-trade-cli bot spot_grid get --bu-order-id ``` ```bash pionex-trade-cli bot spot_grid get --bu-order-id 123456 ``` -------------------------------- ### Display Help for pionex-ai-kit Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides.md Shows help information for the configuration CLI. ```bash pionex-ai-kit help ``` -------------------------------- ### pionex_earn_dual_records Source: https://www.pionex.com/docs/ai-kit-docs/mcp/mcp-guides/mcp-guides-earn.md Get paginated investment history. ```APIDOC ## pionex_earn_dual_records ### Description Get paginated investment history. base and endTime are required. ### Parameters - **base** (string) - Required - Base currency - **endTime** (integer) - Required - End timestamp in milliseconds - **quote** (string) - Optional - Quote currency filter - **currency** (string) - Optional - Investment currency filter - **filter** (string) - Optional - Status filter - **startTime** (integer) - Optional - Start timestamp in milliseconds - **limit** (integer) - Optional - Max records per page ``` -------------------------------- ### earn dual records Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides/cli-guides-earn Get your Dual Investment history. ```APIDOC ## earn dual records ### Description Get your Dual Investment history. Requires Enable reading permission. ### Parameters #### Query Parameters - **--base** (string) - Required - Base currency - **--end-time** (number) - Required - End time in ms - **--quote** (string) - Optional - Quote currency - **--currency** (string) - Optional - Investment currency - **--limit** (number) - Optional - Limit number of records - **--start-time** (number) - Optional - Start time in ms ``` -------------------------------- ### Configure Credentials with onboard Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides.md Launches an interactive wizard to configure Pionex API credentials in the default profile. ```bash pionex-ai-kit onboard ``` -------------------------------- ### earn dual balances Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides/cli-guides-earn Get your Dual Investment account balances. ```APIDOC ## earn dual balances ### Description Get your Dual Investment account balances. Requires Enable reading permission. ### Parameters #### Query Parameters - **--merge** (boolean) - Optional - When set, merges balances with the same coin across different base currencies. ``` -------------------------------- ### Execute Wallet Balance Query Source: https://www.pionex.com/docs/ai-kit-docs/skills/skills-guides/skills-guides-wallet.md Commands to retrieve a full account overview, optionally specifying language preferences. ```bash # Full account overview pionex-trade-cli wallet balance_full # With language preference pionex-trade-cli wallet balance_full --app-lang en ``` -------------------------------- ### earn dual delivery_prices Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides/cli-guides-earn Get historical settlement delivery prices. ```APIDOC ## earn dual delivery_prices ### Description Get historical settlement delivery prices. ### Parameters #### Query Parameters - **--base** (string) - Required - Base currency - **--quote** (string) - Optional - Quote currency - **--start-time** (number) - Optional - Start time in ms - **--end-time** (number) - Optional - End time in ms ``` -------------------------------- ### earn dual index Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides/cli-guides-earn Get real-time index price for an underlying asset. ```APIDOC ## earn dual index ### Description Get real-time index price for an underlying asset. ### Parameters #### Query Parameters - **--base** (string) - Required - Base currency - **--quote** (string) - Required - Quote currency ``` -------------------------------- ### earn dual prices Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides/cli-guides-earn Get latest yield rates and investability status. ```APIDOC ## earn dual prices ### Description Get latest yield rates and investability status. Always call this before placing an order. ### Parameters #### Query Parameters - **--base** (string) - Required - Base currency - **--quote** (string) - Required - Quote currency - **--product-ids** (string) - Required - Comma-separated list of product IDs ``` -------------------------------- ### Get Market Trades Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides/cli-guides-trade Retrieves recent public trades for a specific symbol. ```bash pionex-trade-cli market trades [--limit ] ``` ```bash pionex-trade-cli market trades ETH_USDT --limit 20 ``` -------------------------------- ### Get Market Depth Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides/cli-guides-trade Retrieves the order book depth for a specific symbol. ```bash pionex-trade-cli market depth [--limit ] ``` ```bash pionex-trade-cli market depth BTC_USDT --limit 10 ``` -------------------------------- ### pionex_earn_arbitrage_fetch_user_balances Source: https://www.pionex.com/docs/ai-kit-docs/mcp/mcp-guides/mcp-guides-earn-arbitrage.md Get the authenticated user's Earn Arbitrage account balances. ```APIDOC ## pionex_earn_arbitrage_fetch_user_balances ### Description Get the authenticated user's Earn Arbitrage account balances. ### Parameters - **businessType** (string) - Optional - Business type filter. ``` -------------------------------- ### bot futures_grid get Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides/cli-guides-bot Retrieves a specific futures grid bot order by its ID. ```APIDOC ## bot futures_grid get ### Description Retrieves a futures grid bot order by its unique ID. ### Command `pionex-trade-cli bot futures_grid get --bu-order-id [--lang ]` ``` -------------------------------- ### Stake into a product Source: https://www.pionex.com/docs/ai-kit-docs/skills/skills-guides/skills-guides-earn-arbitrage.md Perform a dry-run to preview the stake operation before executing the final transaction. ```bash # Preview pionex-trade-cli earn arbitrage stake \ --coin USDT \ --product-id 400 \ --amount 100 \ --unique-id my-stake-001 \ --dry-run # Execute pionex-trade-cli earn arbitrage stake \ --coin USDT \ --product-id 400 \ --amount 100 \ --unique-id my-stake-001 ``` -------------------------------- ### Wallet balance_full command syntax Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides/cli-guides-wallet.md The base command structure for retrieving a full account balance overview. ```bash pionex-trade-cli wallet balance_full [--app-lang ] [--sys-lang ] ``` -------------------------------- ### Collect Dual Investment Earnings Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides/cli-guides-earn Syntax and example for collecting settled earnings into a spot account. ```bash pionex-trade-cli earn dual collect \ --base \ --client-dual-id \ --product-id \ [--dry-run] ``` ```bash pionex-trade-cli earn dual collect \ --base BTC \ --client-dual-id my-order-001 \ --product-id BTC-USDXO-260402-68000-P-USDT ``` -------------------------------- ### Revoke Dual Investment Order Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides/cli-guides-earn Syntax and example for revoking a pending investment order before it is matched. ```bash pionex-trade-cli earn dual revoke_invest \ --base \ --product-id \ --client-dual-id \ [--dry-run] ``` ```bash pionex-trade-cli earn dual revoke_invest \ --base BTC \ --product-id BTC-USDXO-260402-68000-P-USDT \ --client-dual-id my-order-001 ``` -------------------------------- ### Spot Grid Trading Flow Commands Source: https://www.pionex.com/docs/ai-kit-docs/skills/skills-guides/skills-guides-bot.md Sequence of CLI commands to initialize and execute a spot grid trading bot. ```bash pionex-trade-cli account balance ``` ```bash pionex-trade-cli bot spot_grid get_ai_strategy --base BTC --quote USDT ``` ```bash pionex-trade-cli market tickers --symbol BTC_USDT ``` ```bash pionex-trade-cli bot spot_grid check_params --base BTC --quote USDT --bu-order-data-json '...' ``` ```bash pionex-trade-cli bot spot_grid create --base BTC --quote USDT --bu-order-data-json '...' --dry-run ``` -------------------------------- ### Execute Cross-Skill Trading Workflow Source: https://www.pionex.com/docs/ai-kit-docs/skills/skills-guides.md A sequence of commands demonstrating how to check market data, verify symbol rules, confirm balance, and place a limit order. ```bash # 1. Check current price and 24h range (pionex-market) pionex-trade-cli market tickers --symbol BTC_USDT # 2. Check symbol rules: min order size, precision (pionex-market) pionex-trade-cli market symbols --symbols BTC_USDT # 3. Check available balance (pionex-portfolio) pionex-trade-cli account balance # 4. Place the order (pionex-trade) pionex-trade-cli orders new --symbol BTC_USDT --side BUY --type LIMIT --price 50000 --size 0.01 ``` -------------------------------- ### Create Dual Investment Order Syntax Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides/cli-guides-earn General syntax for creating a new Dual Investment order. Requires either base-amount or currency-amount. ```bash pionex-trade-cli earn dual invest \ --base \ --product-id \ [--client-dual-id ] \ (--base-amount | --currency-amount ) \ --profit \ [--dry-run] ``` -------------------------------- ### bot smart_copy get Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides/cli-guides-bot Retrieves details of a specific smart copy bot order by its ID. ```APIDOC ## bot smart_copy get ### Description Retrieves a smart copy bot order by its unique identifier. ### Usage `pionex-trade-cli bot smart_copy get --bu-order-id ` ### Parameters - **--bu-order-id** (string) - Required - The unique ID of the smart copy bot order. ``` -------------------------------- ### List open Dual Investment products Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides/cli-guides-earn Query currently open products for a specific pair and investment type. ```bash pionex-trade-cli earn dual open_products --base --quote --type [--currency ] ``` ```bash # BTC/ETH: use quote=USDXO pionex-trade-cli earn dual open_products --base BTC --quote USDXO --type DUAL_BASE --currency USDT # Other bases (XRP, etc.): use quote=USDT pionex-trade-cli earn dual open_products --base XRP --quote USDT --type DUAL_BASE --currency USDT ``` -------------------------------- ### bot spot_grid get Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides/cli-guides-bot Retrieves details of a specific spot grid bot order by its ID. ```APIDOC ## bot spot_grid get ### Description Get a spot grid bot order by ID. ### Command `pionex-trade-cli bot spot_grid get --bu-order-id ` ### Parameters - **bu-order-id** (string) - Required - The unique identifier of the spot grid bot order. ``` -------------------------------- ### Create Spot Grid Bot Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides/cli-guides-bot Create a new spot grid bot order with specified parameters. Requires a JSON string for order data. ```bash pionex-trade-cli bot spot_grid create --base --quote --bu-order-data-json '' [--note ] [--dry-run] ``` ```bash # Create a BTC/USDT spot grid pionex-trade-cli bot spot_grid create --base BTC --quote USDT --bu-order-data-json '{ "top": "110000", "bottom": "90000", "row": 50, "gridType": "arithmetic", "quoteTotalInvestment": "100" }' # Dry-run (preview only) pionex-trade-cli bot spot_grid create --base BTC --quote USDT --bu-order-data-json '{"top":"110000","bottom":"90000","row":50,"gridType":"arithmetic","quoteTotalInvestment":"100"}' --dry-run ``` -------------------------------- ### Get OHLCV Candlestick Data Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides/cli-guides-trade Retrieves candlestick data for a symbol based on a specified interval. ```bash pionex-trade-cli market klines [--endTime ] [--limit ] ``` ```bash pionex-trade-cli market klines BTC_USDT 60M --limit 24 pionex-trade-cli market klines BTC_USDT 1D ``` -------------------------------- ### General Usage Pattern for pionex-trade-cli Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides.md The standard syntax for executing trade-related commands. ```bash pionex-trade-cli [args] [--flags] ``` -------------------------------- ### Discover Dual Investment Products Source: https://www.pionex.com/docs/ai-kit-docs/skills/skills-guides/skills-guides-earn.md Query available trading pairs and open products for a specific base currency. ```bash # What pairs are available? pionex-trade-cli earn dual symbols --base BTC # What DUAL_BASE products are open for BTC? (BTC/ETH use USDXO; others use USDT) pionex-trade-cli earn dual open_products --base BTC --quote USDXO --type DUAL_BASE --currency USDT ``` -------------------------------- ### Create New Order Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides/cli-guides-trade Executes a new market or limit order. ```bash pionex-trade-cli orders new --symbol --side BUY|SELL --type MARKET|LIMIT [options] ``` ```bash # Market buy: spend 100 USDT to buy BTC pionex-trade-cli orders new --symbol BTC_USDT --side BUY --type MARKET --amount 100 # Market sell: sell 0.01 BTC pionex-trade-cli orders new --symbol BTC_USDT --side SELL --type MARKET --size 0.01 # Limit buy pionex-trade-cli orders new --symbol BTC_USDT --side BUY --type LIMIT --price 50000 --size 0.01 # Dry-run (preview only) pionex-trade-cli orders new --symbol BTC_USDT --side BUY --type MARKET --amount 100 --dry-run ``` -------------------------------- ### Unstake from a product Source: https://www.pionex.com/docs/ai-kit-docs/skills/skills-guides/skills-guides-earn-arbitrage.md Perform a dry-run to preview the unstake operation before executing the final transaction. ```bash # Preview pionex-trade-cli earn arbitrage unStake \ --coin USDT \ --product-id 400 \ --amount 100 \ --unique-id my-stake-001 \ --dry-run # Execute pionex-trade-cli earn arbitrage unStake \ --coin USDT \ --product-id 400 \ --amount 100 \ --unique-id my-stake-001 ``` -------------------------------- ### Create Smart Copy Bot Order Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides/cli-guides-bot Create a new smart copy bot order with specified base, quote, and portfolio configuration. ```bash pionex-trade-cli bot smart_copy create --base --quote --bu-order-data-json '' [--copy-from ] [--note ] [--dry-run] ``` ```bash # Create a smart copy bot (dry-run first) pionex-trade-cli bot smart_copy create --base BTC --quote USDT \ --bu-order-data-json '{"quote_total_investment":"100","portfolio":[{"base":"BTC","signal_type":"","leverage":2,"percent":"1"}]}' \ --dry-run # Create the bot (after confirmation) pionex-trade-cli bot smart_copy create --base BTC --quote USDT \ --bu-order-data-json '{"quote_total_investment":"100","portfolio":[{"base":"BTC","signal_type":"","leverage":2,"percent":"1"}]}' ``` -------------------------------- ### Create Futures Grid Bot Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides/cli-guides-bot Create a new futures grid bot order with specified base, quote, and configuration parameters. ```bash pionex-trade-cli bot futures_grid create --base --quote --bu-order-data-json '' [--dry-run] ``` ```bash # Create a long futures grid bot for BTC_USDT pionex-trade-cli bot futures_grid create --base BTC --quote USDT --bu-order-data-json '{ "top": "80000", "bottom": "60000", "row": 50, "grid_type": "arithmetic", "trend": "long", "leverage": 5, "quoteInvestment": "1000" }' # Dry-run (preview only) pionex-trade-cli bot futures_grid create --base BTC --quote USDT --bu-order-data-json '{"top":"80000","bottom":"60000","row":50,"grid_type":"arithmetic","trend":"long","leverage":5,"quoteInvestment":"1000"}' --dry-run ``` -------------------------------- ### Get Smart Copy Bot Order Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides/cli-guides-bot Retrieve details of a specific smart copy bot order by its ID. ```bash pionex-trade-cli bot smart_copy get --bu-order-id ``` ```bash pionex-trade-cli bot smart_copy get --bu-order-id 123456 ``` -------------------------------- ### Discover arbitrage products Source: https://www.pionex.com/docs/ai-kit-docs/skills/skills-guides/skills-guides-earn-arbitrage.md List available products or filter them by a specific coin. ```bash # List all available arbitrage products pionex-trade-cli earn arbitrage fetchProducts # Filter by coin pionex-trade-cli earn arbitrage fetchProducts --coin USDT ``` -------------------------------- ### Manage Futures Grid Bots via CLI Source: https://www.pionex.com/docs/ai-kit-docs/skills/skills-guides/skills-guides-bot.md Common commands for creating, monitoring, and adjusting futures grid bots. ```bash # Create a long futures grid bot pionex-trade-cli bot futures_grid create --base BTC --quote USDT --bu-order-data-json '{ "top": "80000", "bottom": "60000", "row": 50, "grid_type": "arithmetic", "trend": "long", "leverage": 5, "quoteInvestment": "1000" }' # Get bot status pionex-trade-cli bot futures_grid get --bu-order-id 123456 # Add margin pionex-trade-cli bot futures_grid adjust_params --body-json '{ "buOrderId": "123456", "type": "invest_in", "extraMargin": true, "quoteInvestment": 500 }' # Reduce positions pionex-trade-cli bot futures_grid reduce --body-json '{"buOrderId": "123456", "reduceNum": 10}' # Cancel bot pionex-trade-cli bot futures_grid cancel --bu-order-id 123456 ``` -------------------------------- ### pionex_earn_dual_open_products Source: https://www.pionex.com/docs/ai-kit-docs/mcp/mcp-guides/mcp-guides-earn.md List currently open products for a specific pair and direction. ```APIDOC ## pionex_earn_dual_open_products ### Description List currently open products for a specific pair and direction. ### Parameters #### Query Parameters - **base** (string) - Required - Base currency (e.g. BTC) - **quote** (string) - Required - Quote currency. For BTC/ETH use USDXO; for others use USDT. - **type** (string) - Required - DUAL_BASE (invest in base currency) or DUAL_CURRENCY (invest in investment currency) - **currency** (string) - Optional - Investment currency filter. For BTC/ETH: USDT or USDC. For others: USDT. ``` -------------------------------- ### Get Futures Grid Bot Order Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides/cli-guides-bot Retrieve details of a specific futures grid bot order by its ID. ```bash pionex-trade-cli bot futures_grid get --bu-order-id [--lang ] ``` ```bash pionex-trade-cli bot futures_grid get --bu-order-id 123456 ``` -------------------------------- ### Add Signal Listener Command Syntax Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides/cli-guides-bot The base command structure for pushing a trading signal to the Pionex platform. ```bash pionex-trade-cli bot signal listener --signal-type --signal-param \ --base --quote --time --price \ --action --position-size --contracts ``` -------------------------------- ### pionex-trade-cli wallet balance_full Source: https://www.pionex.com/docs/ai-kit-docs/skills/skills-guides/skills-guides-wallet.md Retrieves a full account overview including spot and futures balances, per-coin prices, and total valuations. ```APIDOC ## pionex-trade-cli wallet balance_full ### Description Retrieves a full account overview, including spot and futures balances, per-coin prices, and USDT/BTC totals. This command is read-only and requires API credentials. ### Options - **--app-lang** (string) - Optional - App language, e.g. 'en' or 'zh' (overrides --sys-lang). - **--sys-lang** (string) - Optional - System language fallback. ### Request Example ```bash pionex-trade-cli wallet balance_full --app-lang en ``` ### Response - **Spot (Bot Account)**: Balances by category. - **Futures (Trader Account)**: Balances, open positions, and risk state. - **Per-coin info**: USD/BTC price, 24h change, full coin name. - **Totals**: Aggregate USDT and BTC valuations across all accounts. ``` -------------------------------- ### Get 24h Ticker Data Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides/cli-guides-trade Retrieves 24-hour ticker statistics including open, close, high, low, and volume. ```bash pionex-trade-cli market tickers [--symbol ] [--type SPOT|PERP] ``` ```bash pionex-trade-cli market tickers --symbol BTC_USDT pionex-trade-cli market tickers --type SPOT ``` -------------------------------- ### bot spot_grid create Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides/cli-guides-bot Creates a new spot grid bot order with specified parameters. ```APIDOC ## bot spot_grid create ### Description Create a spot grid bot order. ### Command `pionex-trade-cli bot spot_grid create --base --quote --bu-order-data-json '' [--note ] [--dry-run]` ### Parameters - **base** (string) - Required - Base currency. - **quote** (string) - Required - Quote currency. - **bu-order-data-json** (string) - Required - JSON string containing grid order parameters (top, bottom, row, gridType, quoteTotalInvestment). - **note** (string) - Optional - Text note for the order. - **dry-run** (boolean) - Optional - Preview the order without executing. ``` -------------------------------- ### pionex-trade-cli account balance Source: https://www.pionex.com/docs/ai-kit-docs/skills/skills-guides/skills-guides-trade.md Queries spot account balances. ```APIDOC ## pionex-trade-cli account balance ### Description Queries all spot account balances. Returns the data in JSON format. Requires API credentials. ``` -------------------------------- ### Bot order_list command syntax Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides/cli-guides-bot The base command structure for listing bot orders with optional filtering and pagination flags. ```bash pionex-trade-cli bot order_list [--status running|finished] [--base ] [--quote ] [--page-token ] [--bu-order-types ] ``` -------------------------------- ### Check Available Balance Source: https://www.pionex.com/docs/ai-kit-docs/skills/skills-guides/skills-guides-earn.md Retrieve current account balances for Dual Investment. ```bash pionex-trade-cli earn dual balances ``` -------------------------------- ### Check Yield Rates and Index Price Source: https://www.pionex.com/docs/ai-kit-docs/skills/skills-guides/skills-guides-earn.md Retrieve current yield rates for specific product IDs and check the real-time index price. ```bash # Check yield for specific product IDs (--product-ids is required) pionex-trade-cli earn dual prices --base BTC --quote USDXO --product-ids BTC-USDXO-260402-70000-C-USDT # Check the real-time BTC index price (BTC/ETH use USDXO) pionex-trade-cli earn dual index --base BTC --quote USDXO ``` -------------------------------- ### Execute Dual Investment Source: https://www.pionex.com/docs/ai-kit-docs/skills/skills-guides/skills-guides-earn.md Perform a dry-run preview followed by an actual investment execution. ```bash # Preview pionex-trade-cli earn dual invest \ --base BTC \ --product-id BTC-USDXO-260402-70000-C-USDT \ --client-dual-id my-order-001 \ --currency-amount 100 \ --profit 0.0215 \ --dry-run # Execute pionex-trade-cli earn dual invest \ --base BTC \ --product-id BTC-USDXO-260402-70000-C-USDT \ --client-dual-id my-order-001 \ --currency-amount 100 \ --profit 0.0215 ``` -------------------------------- ### Validate Smart Copy Parameters Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides/cli-guides-bot Check investment ranges and leverage limits before creating an order. Use --quote-investment 0 to retrieve allowed ranges. ```bash pionex-trade-cli bot smart_copy check_params --base --quote --leverage --quote-investment [--signal-type ] ``` ```bash # Get allowed range only pionex-trade-cli bot smart_copy check_params --base BTC --quote USDT --leverage 2 --quote-investment 0 # Validate specific investment with signal type pionex-trade-cli bot smart_copy check_params --base BTC --quote USDT --leverage 5 \ --quote-investment 100 --signal-type ``` -------------------------------- ### List Open Orders Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides/cli-guides-trade Lists all currently open orders for a specific symbol. ```bash pionex-trade-cli orders open --symbol ``` -------------------------------- ### pionex-trade-cli bot smart_copy create Source: https://www.pionex.com/docs/ai-kit-docs/skills/skills-guides/skills-guides-bot.md Creates a new smart copy bot order using the specified base and quote currencies and configuration JSON. ```APIDOC ## pionex-trade-cli bot smart_copy create ### Description Creates a smart copy bot order to replicate a signal provider's trades. ### Parameters - **--base** (string) - Required - Base currency (e.g., BTC). - **--quote** (string) - Required - Quote currency (e.g., USDT). - **--bu-order-data-json** (string) - Required - JSON string containing investment details and portfolio configuration. - **--dry-run** (flag) - Optional - Performs a validation check without executing the actual creation. ``` -------------------------------- ### pionex_earn_arbitrage_fetch_products Source: https://www.pionex.com/docs/ai-kit-docs/mcp/mcp-guides/mcp-guides-earn-arbitrage.md List available Earn Arbitrage (InstFund) products. ```APIDOC ## pionex_earn_arbitrage_fetch_products ### Description List available Earn Arbitrage (InstFund) products. ### Parameters - **coin** (string) - Optional - Filter by coin (e.g. USDT). Omit to return all products. - **visibility** (string) - Optional - Visibility filter. ``` -------------------------------- ### Fetch Earn Arbitrage Products Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides/cli-guides-earn-arbitrage.md Retrieve a list of available arbitrage products, optionally filtered by coin or visibility. ```bash pionex-trade-cli earn arbitrage fetchProducts [--coin ] [--visibility ] ``` ```bash # All products pionex-trade-cli earn arbitrage fetchProducts # Filter by coin pionex-trade-cli earn arbitrage fetchProducts --coin USDT ``` -------------------------------- ### pionex-trade-cli bot order_list Source: https://www.pionex.com/docs/ai-kit-docs/skills/skills-guides/skills-guides-bot.md CLI command to list bot orders across all types with optional filters and pagination. ```APIDOC ## pionex-trade-cli bot order_list ### Description List bot orders across all types with optional filters and pagination. ### Parameters - **--status** (string) - Optional - Filter by status: 'running' (default) or 'finished'. - **--base** (string) - Optional - Base currency filter (e.g. 'BTC'). - **--quote** (string) - Optional - Quote currency filter (e.g. 'USDT'). - **--page-token** (string) - Optional - Pagination token from a previous response. - **--bu-order-types** (string) - Optional - Comma-separated bot types: 'futures_grid', 'spot_grid', 'smart_copy'. ``` -------------------------------- ### Smart Copy Bot Management Commands Source: https://www.pionex.com/docs/ai-kit-docs/skills/skills-guides/skills-guides-bot.md Reference commands for interacting with the smart copy bot API. ```bash pionex-trade-cli bot smart_copy get --bu-order-id ``` ```bash pionex-trade-cli bot smart_copy create --base --quote --bu-order-data-json '' ``` ```bash pionex-trade-cli bot smart_copy check_params --base --quote --leverage --quote-investment [--signal-type ] ``` ```bash pionex-trade-cli bot smart_copy cancel --bu-order-id ``` -------------------------------- ### earn dual open_products Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides/cli-guides-earn List currently open Dual Investment products for a specific pair and direction. ```APIDOC ## earn dual open_products ### Description List currently open Dual Investment products for a specific pair and direction. ### Parameters #### Query Parameters - **--base** (string) - Required - Base currency (e.g., BTC) - **--quote** (string) - Required - Quote currency. For BTC/ETH use USDXO; for others use USDT. - **--type** (string) - Required - DUAL_BASE (invest in base currency) or DUAL_CURRENCY (invest in investment currency) - **--currency** (string) - Optional - Investment currency filter. ``` -------------------------------- ### bot smart_copy create Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides/cli-guides-bot Creates a new smart copy bot order with specified base, quote, and portfolio configuration. ```APIDOC ## bot smart_copy create ### Description Creates a new smart copy bot order. Requires a JSON string containing investment details and portfolio configuration. ### Usage `pionex-trade-cli bot smart_copy create --base --quote --bu-order-data-json '' [--copy-from ] [--note ] [--dry-run]` ### Parameters - **--base** (string) - Required - Base currency (e.g., BTC). - **--quote** (string) - Required - Quote currency (e.g., USDT). - **--bu-order-data-json** (string) - Required - JSON string containing `quote_total_investment` and `portfolio` array. - **--copy-from** (string) - Optional - Source bot order ID to copy settings from. - **--note** (string) - Optional - A note for the order. - **--dry-run** (flag) - Optional - Perform a validation run without creating the order. ``` -------------------------------- ### Upgrade CLI and MCP Source: https://www.pionex.com/docs/ai-kit-docs/skills/skills-quickstart.md Updates the global packages for the Pionex AI Kit and trade MCP. ```bash npm update -g @pionex/pionex-ai-kit @pionex/pionex-trade-mcp ``` -------------------------------- ### bot spot_grid get_ai_strategy Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides/cli-guides-bot Fetches AI-recommended grid parameters for a specified trading pair. ```APIDOC ## bot spot_grid get_ai_strategy ### Description Get AI-recommended grid parameters for a trading pair. ### Command `pionex-trade-cli bot spot_grid get_ai_strategy --base --quote ` ### Parameters - **base** (string) - Required - Base currency (e.g., BTC). - **quote** (string) - Required - Quote currency (e.g., USDT). ``` -------------------------------- ### Add Investment to Spot Grid Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides/cli-guides-bot Increase the quote currency investment for a running spot grid bot. ```bash pionex-trade-cli bot spot_grid invest_in --bu-order-id --quote-invest ``` ```bash pionex-trade-cli bot spot_grid invest_in --bu-order-id 123456 --quote-invest 100 ``` -------------------------------- ### Query Fill Details Source: https://www.pionex.com/docs/ai-kit-docs/cli/cli-guides/cli-guides-trade Retrieves execution details for orders within a specified time range. ```bash pionex-trade-cli orders fills --symbol [--startTime ] [--endTime ] ```