BBUTLER-MAC:xtrade bbutler$ node index.js
{ node: 'wss://bitshares.openledger.info/ws' } 'Failed to initialize with error' 'Invalid url'
(node:31221) UnhandledPromiseRejectionWarning: Error: Invalid url
const BitShares = require('btsdex')
KEY = 'redacted'
BitShares.init({node:'wss://bitshares.openledger.info/ws'})
async function startAfterConnected() {
let bot = new BitShares('billbutler-trade1',KEY)
let iam = await BitShares.accounts['billbutler-trade1'];
let orders = await BitShares.db.get_full_accounts([iam.id],false);
orders = orders[0][1].limit_orders;
let order = orders[0].sell_price;
console.log(order)
}
BitShares.subscribe('connected',startAfterConnected)
BitShares.connect()
I'm getting the following with your example:
I tried with a couple other URL's as well.