mirror of
https://github.com/discountry/ritmex-bot.git
synced 2026-09-09 08:18:07 +00:00
commit
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import ccxt from '../../js/ccxt.js';
|
||||
|
||||
// AUTO-TRANSPILE //
|
||||
|
||||
async function example () {
|
||||
const exchange = new ccxt.binance ({
|
||||
'apiKey': 'MY_API_KEY',
|
||||
'secret': 'MY_SECRET',
|
||||
});
|
||||
exchange.setSandboxMode (true);
|
||||
await exchange.loadMarkets ();
|
||||
exchange.verbose = true; // uncomment for debugging purposes if necessary
|
||||
const orders = await exchange.createOrders (
|
||||
[
|
||||
{ 'symbol': 'LTC/USDT:USDT', 'type': 'limit', 'side': 'buy', 'amount': 10, 'price': 55 },
|
||||
{ 'symbol': 'ETH/USDT:USDT', 'type': 'market', 'side': 'buy', 'amount': 0.5 },
|
||||
]
|
||||
);
|
||||
console.log (orders);
|
||||
}
|
||||
await example ();
|
||||
Reference in New Issue
Block a user