Xchange.me CLI

Xchange.me CLI is a Python script (it requires version 3), which allows you to create and proceed with an exchange without JavaScript and a web browser. The script will work just fine on Tails or Whonix Workstation to provide you full anonymity of an exchange.

User has several source cryptocurrencies available: BTC, XMR, DASH, ZEC, ETH, LTC, GRS, VIA, KMD and USDT (only Omni chain). As a destination coin, there are nearly 200 coins available.

Why to use CLI while you have onion mirror?

Our onion website is JavaScript free so you can securely use it for cryptocurrency exchange. We design this script for users which prefers to use console than web browser.

How to use it?

First of all, download our Python script. You can download it from our site: here.

SHA256 hash for the script is a1f85cb1642d882e4fd25ee111a60d51e8605cea364a7a06e5c5508d36f6d521. You can download hash of the script here, and script's detached signature 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 usage: xm-cli.py [-h] [--onion] [--skip-onion-os-check] 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 not 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. You can do that using this command:

torsocks python3 xm-cli.py --onion show-pgp-proof e6a156c1-3c36-41ad-8879-ffe53e758658

-----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:

torsocks python3 xm-cli.py --onion check-status 32c56c08-4e3e-4df7-be4b-4858eeab141e

We are looking on blockchain for your payment.
If you did not pay yet, please make a payment to the address 8APEwa1x7cYeijPfnKaDt7SwR1ctYzTRh48iffU32Uqo6drvbtr6jAR8L3ZBEGftXs17E6TQGFRMoc2ZYNpGviyXK3ajWx2.
If you already paid, please wait for the required number of confirmations before proceeding.
We will be waiting for your payment until 2020-04-21 18:58:02.598393 UTC.
More details are available on www (JavaScript NOT required), please visit http://localhost:8000/e6a156c1-3c36-41ad-8879-ffe53e758658
If you have any problem with your exchange or any questions, send us an email at [email protected] or [email protected]
                

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.

Advanced usage

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 mirror.

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 amount_in_first_currency.

torsocks python3 xm-cli.py list-destinations - show all currencies which can be purchased (exchanged to).

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 to receive_address.

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. We accept only USDT on OMNI chain for exchanging.

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 minimum.

create-exchange --show-pgp-proof - display PGP proof of address while creating an exchange

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 if 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 uuid