Formal exchanges require the involvement of an intermediary to execute transactions within their systems. Therefore, it is not possible to buy stocks online by yourself or directly with the exchange.