Binance
The robomotion binance CLI connects to the Binance exchange for cryptocurrency trading and market data. It supports placing limit, market, and stop-loss orders; checking balances and prices; downloading price history as CSV; and viewing deposits, withdrawals, and recent trades.
When to use
- Get current prices, 24h stats, or historical candlestick data for trading pairs
- Place limit, market, or stop-loss orders on Binance
- Check account balances, open orders, deposits, and withdrawals
- List all trading pairs or recent trades for a symbol
Prerequisites
robomotionCLI installed- Package installed:
robomotion install binance - Binance 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 binance - Connect with session:
robomotion binance binance_connect --session --output json # → {"outClientId":"<client-id>","session_id":"<session-id>"} - Use the returned
client-idandsession-idin all subsequent commands:robomotion binance binance_get_price --client-id "<client-id>" --bnbusdt --session-id "<session-id>" --output json - Disconnect when done:
robomotion binance binance_disconnect --client-id "<client-id>" --session-id "<session-id>" --output json
Always append --output json to get structured JSON results.
Commands Reference
robomotion binance binance_buy_order --client-id --bnbusdt --order-quantity --order-price --session-id "<session-id>" --output jsonPlace a limit buy order on Binancerobomotion binance binance_cancel_order --client-id --order-id --bnbusdt --session-id "<session-id>" --output jsonCancel an open order on Binancerobomotion binance binance_connect --session --output jsonConnect to Binance exchange using API credentialsrobomotion binance binance_disconnect --client-id --session-id "<session-id>" --output jsonDisconnect from Binance exchangerobomotion binance binance_get_balance --client-id --currency [--wallet-type] --session-id "<session-id>" --output jsonGet account balance for a specific currency or all currenciesrobomotion binance binance_get_coin_detail --client-id --bnb --session-id "<session-id>" --output jsonGet detailed information about a cryptocurrencyrobomotion binance binance_get_deposit_address --client-id --usdt --bsc --session-id "<session-id>" --output jsonGet deposit address for a cryptocurrency on a specific networkrobomotion binance binance_get_order --client-id --order-id --bnbusdt --session-id "<session-id>" --output jsonGet details of a specific order on Binancerobomotion binance binance_get_price --client-id --bnbusdt --session-id "<session-id>" --output jsonGet current average price for a trading pairrobomotion binance binance_get_price_change_info --client-id --btcusdt --session-id "<session-id>" --output jsonGet 24-hour price change statistics for a trading pairrobomotion binance binance_get_price_history --client-id --bnbusdt --10 --start-date --end-date --save-path --0-5 --custom-interval [--interval] --session-id "<session-id>" --output jsonGet historical price data (klines/candlesticks) for a trading pair and save to CSVrobomotion binance binance_list_deposits --client-id --5 --session-id "<session-id>" --output jsonList recent deposit history for the accountrobomotion binance binance_list_my_orders --client-id --session-id "<session-id>" --output jsonList all open orders for the accountrobomotion binance binance_list_orders --client-id --bnbusdt --10 [--order-type] --session-id "<session-id>" --output jsonList current order book (bids or asks) for a trading pairrobomotion binance binance_sell_order --client-id --currency-pair --order-quantity --order-price --session-id "<session-id>" --output jsonPlace a limit sell order on Binancerobomotion binance binance_stop_order --client-id --bnbusdt --order-quantity --stop-price --price --session-id "<session-id>" --output jsonPlace a stop-loss limit order on Binancerobomotion binance binance_list_withdraws --client-id --5 --session-id "<session-id>" --output jsonList recent withdrawal history for the accountrobomotion binance binance_list_recent_trades --client-id --bnbusdt --5 --session-id "<session-id>" --output jsonList recent trades for a trading pairrobomotion binance binance_market_order --client-id --bnbusdt --order-amount [--unit-type] [--order-type] --session-id "<session-id>" --output jsonPlace a market order (buy or sell) at current market pricerobomotion binance binance_list_all_pairs --client-id --session-id "<session-id>" --output jsonList all available trading pairs on Binance
Environment
- ROBOMOTION_API_TOKEN (if vault credentials are needed)