The earnest money is being held by the designated broker or title company, referred to in your purchase agreement. If you have cancelled your purchase, please work with your real estate agent to turn in your signed cancellation and request a refund of your earnest money.
Once the funds have been deposited in the trust account at that company, it is between them and your agent to get a refund issued to you. They may choose to write a paper check or have the funds deposited electronically back to your account via TrustFunds, but the broker or title company will be the one to initiate any refund needed. I would recommend reaching out to your agent and asking them to coordinate the refund for you.
If you have any questions, feel free to contact us at firstname.lastname@example.org.