Are you using Bittrex's API to do it? Because Cryptopia has public and private API as well.
So it should be possible to do it like how you're doing with Bittrex.
There is this framework on GitHub to connect to different websites
CryptoFyer 0.5 (never tested so no idea) Perhaps it can help you directly or indirectly with the code and giving you a hint.