The Harmonics  is probably earlier than the Tetrabiblos. Although Ptolemy is well known for his astronomy and astrology, he was also one of the ancient sources for theories of harmony.
The work studies this universal field of knowledge for which music and geometry are considered subsets. Much of the material in Harmonics is exclusively concerned with music, including setting up exact number ratios for the different modes.
The Harmonics Book III applies his previous exposition of intervals, scales, and ratios to ethics and psychology, and to astronomy and astrology. Unfortunately, some of Book III has been lost to us. In Chapter 9 of Book III, Ptolemy presents the astrological aspects and their ratios to one another. Curiously, in this presentation Ptolemy does not use degree numbers for the aspects. Instead, he considers the twelve zoidia as discrete units and the whole number relationships between them that yield moriai and epimoriai. This discussion might have fit better into the Tetrabiblos Book I, within his treatment of the qualities and relationships between whole zoidia.