You can use get_stock_balance function, to get stock qty on any date for a specific warehouse and item.
get_stock_balance