What is your controller? And what kind of encoder are you needing?
I went through a bit of a process getting an encoder for my lathe. I originally bought this one off amazon:
https://www.amazon.com/gp/product/B07SGCT8SX/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1
But then realized that it was the wrong "type" of encoder, so I ended up buying this one:
https://www.amazon.com/gp/product/B01EWLCM1C/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1
And it worked perfect for my purposes. I don't remember the exact differences, but the wiring is different.
With that being said. I still have the first one and I have zero use for it. If you find it would work for your needs I am happy to give you the encoder.