lib/market.ts