A fun CLI that makes (some) regular binance API operations very easy to execute. For example --cancel-open-orders
, --swap-all-to-usd
, and --buy ETH --amount 10
. USDC
is the base USD currency.
Make sure you either privide --binance-secret-key x --binance-api-key y
as CLI parameters, or env variables BINANCE_API_KEY
and BINANCE_SECRET_KEY
. Make sure your IP is whitelisted as well in the security settings.
node kiwi --binance-secret-key x --binance-api-key y ...rest of CLI parameters
BINANCE_API_KEY=y BINANCE_SECRET_KEY=x node kiwi ...rest of CLI parameters
--balances
or just -b
.
# All non-zero balances and their approx value in USDC
node kiwi --balances
# Same with JSON output
node kiwi --balances --json
# Only ETH and SOL
node kiwi -b ETH,SOL
# Same with JSON output
node kiwi -b ETH,SOL --json
node kiwi --cancel-open-orders
node kiwi -c
Will swap every available asset (only >5USD balances) to master USD (right now USDC). Will use market limit order.
node kiwi --swap-all-usd
# swap 100% of available USDC to ETH
node kiwi --swap "USDC->ETH"
# swap 100% of available DOGE to USDC
node kiwi -s "DOGE->USDC"
# swap 20 USDC to ETH, skip security question
node kiwi --swap "USDC->ETH" --amount 20 -y
# swap 20% of available USDC to ETH, skip security question
node kiwi --swap "USDC->ETH" --amount "20%" --yes
yarn
yarn build