Gate.io
The robomotion gateio CLI connects to the Gate.io exchange for cryptocurrency trading and market data. It supports checking spot prices and 24h tickers, viewing orderbooks, placing market and limit orders, and managing account balances.
When to use
- Get current prices and 24h ticker statistics for trading pairs
- View orderbook depth for any trading pair
- Place limit or market buy/sell orders on Gate.io
- Check account balances and list available trading pairs
Prerequisites
robomotionCLI installed- Package installed:
robomotion install gateio - Gate.io API key and secret configured via Robomotion vault
IMPORTANT: Session Mode Required for Multi-Step Operations
Each CLI command runs as a separate process — connection IDs from connect do NOT persist across calls.
You MUST use --session on connect and pass --session-id to all subsequent commands.
Workflow
- Install (once):
robomotion install gateio - Connect with session:
robomotion gateio gateio_connect --session --output json # → {"outClientId":"<client-id>","session_id":"<session-id>"} - Use the returned
client-idandsession-idin all subsequent commands:robomotion gateio gateio_get_spot_price --client-id "<client-id>" --btc_usdt --session-id "<session-id>" --output json - Disconnect when done:
robomotion gateio gateio_disconnect --client-id "<client-id>" --session-id "<session-id>" --output json
Always append --output json to get structured JSON results.
Commands Reference
robomotion gateio gateio_buy_order --client-id --currency-pair --order-amount --order-price --base-url --session-id "<session-id>" --output jsonPlace a buy order on Gate.io exchangerobomotion gateio gateio_cancel_order --client-id --order-id --currency-pair --base-url --session-id "<session-id>" --output jsonCancel an existing order on Gate.iorobomotion gateio gateio_connect --base-url --session --output jsonConnect to Gate.io exchange using API credentialsrobomotion gateio gateio_disconnect --client-id --session-id "<session-id>" --output jsonDisconnect from Gate.io and release resourcesrobomotion gateio gateio_get_balance --client-id --currency --base-url --session-id "<session-id>" --output jsonGet account balance for a specific currency on Gate.iorobomotion gateio gateio_get_price --client-id --btc-usdt --base-url --session-id "<session-id>" --output jsonGet current price for a currency pair on Gate.iorobomotion gateio gateio_list_my_orders --client-id --base-url --session-id "<session-id>" --output jsonList all open orders on Gate.iorobomotion gateio gateio_list_orders --btc-usdt --10 [--order-type] --output jsonList order book (buy/sell orders) for a currency pairrobomotion gateio gateio_list_pairs --output jsonList all available currency pairs on Gate.iorobomotion gateio gateio_sell_order --client-id --currency-pair --order-amount --order-price --base-url --session-id "<session-id>" --output jsonPlace a sell order on Gate.io exchangerobomotion gateio gateio_get_fee --client-id --btc-usdt --base-url --session-id "<session-id>" --output jsonGet trading fee for a currency pair on Gate.iorobomotion gateio gateio_get_order --client-id --order-id --currency-pair --base-url --session-id "<session-id>" --output jsonGet details of a specific order on Gate.iorobomotion gateio gateio_get_deposit_address --client-id --usdt --base-url --session-id "<session-id>" --output jsonGet deposit address for a specific currency on Gate.io
Environment
- ROBOMOTION_API_TOKEN (if vault credentials are needed)