module M

using Emporos 
using Emporos.IBKR
using MacroTools


function main()
    ib = IBKR.IB()
    as, ps = open(ib, clientId=3) do ib
        as = IBKR.accounts(ib)
        ps = map(a -> IBKR.positions(ib, a), as)
        as, ps
    end
    (;ib, as, ps) 
end

r = main()

end # module
