It's recommended to book your flight 25 days in advance of the flight but you can book it even sooner but you should not book it any longer than 150 days in advance.
Booking your flight 25 days in advance is enough to get you a great deal on an airline ticket.