import { loadConfig } from '../core/config.js'
import { BybitRestClient } from '../lib/bybit/rest.js'

async function main(): Promise<void> {
  const config = loadConfig()
  const client = new BybitRestClient({ recvWindow: config.recvWindow })

  for (const category of config.publicCategories) {
    const symbols = await client.getBtcInstruments(category, config.symbolPrefix)
    console.log(`\n${category.toUpperCase()} (${symbols.length})`)
    for (const instrument of symbols) {
      console.log(`- ${instrument.symbol}`)
    }
  }
}

main().catch(error => {
  console.error(error)
  process.exit(1)
})
