const { getHourlyPrices, Statistics } = require('osbuddy-api')
const stats = new Statistics()
stats.onlineUsers().then(stats => {
console.log('online user statistics:', stats)
})
getHourlyPrices(1050)
.then(({ itemId, interval, records }) => {
console.log(`${records.length} prices for ${itemId}`)
records.forEach(({ timestamp, price, volume }) => {
console.log(`${new Date(timestamp)} - price: ${price.overall} (total: ${volume.overall})`)
})
})