Optical tracking has become the most commonly used virtual reality (VR) tracking technology because of its high precision and non-contact characteristics. The optical tracking system represented by HTC VIVE has the problem that signals of base stations interfere with each other, and the number of base stations cannot be extended by cascades, thereby limiting the scope of its work. In this paper, an extensible optical tracking system is proposed, which can distinguish the signals from different base stations and support the simultaneous operation of multiple base stations. Furthermore, we designed an encoding scheme to generate independent code for up to 32 base stations and proposed a highspeed decoding method. Experiments demonstrate that the system has high tracking accuracy and low system latency. Users can adjust the number and layout of base stations according to the actual demand, which greatly improves the flexibility of the system, and benefits promoting the development of large scale optical tracking equipment with low cost and high precision.