Several utility scripts are available, which run independently from R2 main application. The scripts read keys/secrets in config.json and call exchange API.
The source code is under tools directory.
npm run -s getBalance
Example:
Exchange, Currency, Type, Amount
bitFlyer, JPY, Cash, 300000
bitFlyer, BTC, Cash, 1.234
Coincheck, JPY, Cash, 300000
Coincheck, BTC, Cash, 0.123
Coincheck, JPY, Margin, 200000
Coincheck, JPY, Free Margin, 123456
Coincheck, BTC, Leverage Position, 3.456
Quoine, JPY, Margin, 300000
Quoine, JPY, Free Margin, 123456
Quoine, BTC, Leverage Position, 0.01
npm run closeCcPosition
npm run closeBfPosition
npm run closeQuPosition
npm run clearPairs
closeAll - execute the three close scripts above, execute clearPairs, then show balances by getBalance.
npm run closeAll