User has several source cryptocurrencies available: BTC, XMR, DASH, ZEC, ETH, LTC, GRS, VIA, KMD. As a destination coin, there are nearly 200 coins available.
Why to use CLI while you have onion mirror?
How to use it?
First of all, download our Python script. You can download it from our site: here.
While the script is downloaded please verify it's hash. We hold our PGP key here.
Now open up the terminal, go the folder where you keep the script and run:
torsocks python3 xm-cli.py
If you will see a full welcome message from the script (beginning with
then your script is fully working and ready to use.
As you can see we have used torsocks command here. We strongly recommend using torsocks command along with --onion argument so you are sure that whole traffic gets routed through our onion mirror. Of course you are required to have Tor installed with one of above commands in your local system.
Xchange.me CLI does not come with the wizard, it means that you have to provide the details of an exchange in command line yourself.
Creating basic exchange
Before creating exchange, please check if you are happy with the rate. In this example we will check how much BTC we can get if we would like to sell 20 XMR:
torsocks python3 xm-cli.py --onion check-rate xmr btc --amount 20
The script will always give you two quotes - for the total amount you would like to exchange and the price for the one source coin:
1.0 xmr ~= 0.00788772 btc 20.0 xmr ~= 0.157754472673 btc
Analogically you can just reverse the above example to get the quote while trying to exchange BTC to XMR:
torsocks python3 xm-cli.py --onion check-rate btc xmr --amount 0.05 1.0 btc ~= 123.62812542 xmr 0.05 btc ~= 6.181406271443839 xmr
If you are happy with the rate, let's proceed to the exchange itself. We will exchange 1 XMR to BTC:
torsocks python3 xm-cli.py --onion create-exchange xmr btc --amount 1 1P4tUXW2THhs8apiacuwNh1juBCDMdogdS
Output from this command will look like:
New exchange has been created. Please pay 1 xmr to 8APEwa1x7cYeijPfnKaDt7SwR1ctYzTRh48iffU32Uqo6drvbtr6jAR8L3ZBEGftXs17E6TQGFRMoc2ZYNpGviyXK3ajWx2 We will be waiting for your payment for the next 5 hours. You may check your exchange status by visiting http://localhost:8000/e6a156c1-3c36-41ad-8879-ffe53e758658 or calling xm-cli.py check-status e6a156c1-3c36-41ad-8879-ffe53e758658 PGP proof is available on http://localhost:8000/e6a156c1-3c36-41ad-8879-ffe53e758658/proof
From now on you have five hours to send the coins to the address. If we will
detect funds on the address during that time, exchange will get deleted and you will have to create
another one to get another, fresh receiving address.
Before you send any funds, we urge you to verify receiving address.</strong> You can do that using this command:
torsocks python3 xm-cli.py --onion show-pgp-proof 32c56c08-4e3e-4df7-be4b-4858eeab141e -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Address 8APEwa1x7cYeijPfnKaDt7SwR1ctYzTRh48iffU32Uqo6drvbtr6jAR8L3ZBEGftXs17E6TQGFRMoc2ZYNpGviyXK3ajWx2 has been generated on Xchange.me. It will serve to exchange XMR to BTC. Coins after exchange will be delivered to address 1P4tUXW2THhs8apiacuwNh1juBCDMdogdS. Requested exchange amount is 1 XMR. Payment has to be done before 2020-04-21 16:58:03 UTC. You can validate this proof using PGP. -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE+4P/aRCl5lJ/3ZkPFaCMnKV/PMAFAl6e38sACgkQFaCMnKV/ PMB4xRAA1rOWeDkTbz501kOPBf5IT+qLX0K/+ObVF36/RUyXsweUFn3Cj8Dp7rtc donz1PYPTB0KZ7JPUJNK9xiS+jXTo5HhXRQFbbbZKmlUHE/lqVNlismM6B+3A8P8 wBNn8N1nf7vNV4xkZ6wqVSv0OoGSpBfcsHIXXS2qyzVaCknw6e+frEtptCFp1iwW 08QMRUG/t3e/HQ41+WQvAEdDzANo/8ONw4n8UCa3p8BHZFzs7ykK6P+R5Pv6XJmz 5/iypANMWpZfaE7UtbqdcULTNX2bBn6qvSMrK9dpbhZRt3SfgfsX242kColZTMoU oUk1gEVSD/5J8abTVh1UN5Kq0W+6smDPd4YJrQsiWlDTcibLlkoAGoylh61VrjRm KgwA1N7ye1D3IdFx6r0kFIP2Qu6vRMATc8QWZ/fQUZQm1qvxlzhi0Vyr0YFnwRl6 tF2uXu2j2MyFOGXZOqGTw6YrqQtobrahxDEQsJnoyB4mnzSl+WJtujzEXLXrurgn fvVJ51g4D3l2zaR6MNvWkZGEsdlIcy6cYPZW689ziSG7+guCdQ9yUrTxQphVqkOe CbaZ7AiPhzY10HN9QDnUUF0TMe+3LGAX5vhOQH/J2CDXrUP2jfrs6wKQD/3MW7eK xP2nlgcq6slFdkI+g5L4denxX2UCmESuy1bkfTiWIZnZ/gHkqrI= =Dpqe -----END PGP SIGNATURE-----
Checking exchange status
You can check your exchange status at any time with:
The output above will change, depending on which stage your exchange is.
Post order process
When you create an exchange and pay for it, that's the last step we require from you. Your exchange will take from 30 minutes to a few hours, this times are random to enhance your security. If your exchange isn't finished after about 6 hours, please send us an email with your exchange ID and tell us if you want to get it refunded or you want to put the exchange through. We will do our best to answer every query up to 12h, including weekends.
Below you can find the description of all available options in Xchange.me CLI.
torsocks python3 xm-cli.py -h - show help
torsocks python3 xm-cli.py --onion - routes the exchange traffic through our onion
torsocks python3 xm-cli.py --skip-onion-os-check - with this option enabled, the script
will not check automatically if it's running on Tails or Whonix Workstation.
torsocks python3 xm-cli.py check-rate from_currency to_currency --amount
amount_in_first_currency. Show the exchange rate of from_currency to
to_currency. It will also display how much to_currency you will receive from the
torsocks python3 xm-cli.py list-destinations - show all currencies which can be
torsocks python3 xm-cli.py create-exchange from_currency to_currency receive_address -
creates an exchange from from_currency to to_currency. Exchanged funds will be send
create-exchange command has several more possible arguments:
create-exchange --extra-id extra_id - set extra id field for the coins that supports
it (for example XML's Memo).
create-exchange --withdraw-to coin - select destination chain for coins that
exists on multiple chains. For now we only support withdrawing USDT on ETH, OMNI and TRX chains
where default chain is ETH.
create-exchange --z-address - gives you z-address for receive_address while using
ZEC as a
from_to coin. By default we provide t-address.
create-exchange --amount amount - amount you want to exchange, it's used only for
estimation and validation. We will proceed with the exchange as long as it's above the required
create-exchange --show-pgp-proof - display PGP proof of address while creating an
create-exchange --refund-address - We will send the funds back to this address if the
exchange will not be performed for 6h since we receive the funds with required confirmations. Also
funds will arrive later than required 5 hours, we will send it to this address. Giving refund
address is optional but strongly recommended.
torsocks python3 xm-cli.py check-status uuid - show status of an exchange with given