fix get market data function