We introduce a model that extends the concept of air traffic flow management slot to the concept of time window, allowing to effectively deal with a network of interacting regulations. The model aims at minimising the total cost of delay of a time window allocation to flights and is based on an integer programming problem. It consists in a market-based mechanism between flights and a central authority to trade time windows, which fulfils the properties of individual rationality (every participating airline has a non-negative profit from the mechanism) and weak budget-balance (the mechanism requires no external subsidisation). Equity is assumed to be respected because the First Planned First Served allocation is an endowment guaranteed to all flights and allocated for free. The proposed market mechanism can be implemented in a distributed manner preventing the disclosure of confidential information by airlines, and is based on the Lagrangian relaxation of the integer optimisation problem, solved through the subgradient algorithm. We present some computational experiments conducted to test the model on some real instances of air traffic data.