There are two separate items here, and they work differently.
Horn of Plenty — obtain one first so it's sitting in your inventory, then buy it at the Secret Market. You need a stable to do this.
Horn of Ambrosia — you can either earn one through the Horn of Plenty, or buy it directly for 1 pass at the Black Market. No stable required for this one.
So if you're short on passes, the inventory-then-Secret-Market route is the way to go, provided you have the stable.