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. 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 6d445c5c93b9a2f9352aa06482bcefbfdd58536de53621462d3924b3537e770a. 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.</strong> You can do that using this command:

torsocks python3 xm-cli.py --onion show-pgp-proof 32c56c08-4e3e-4df7-be4b-4858eeab141e

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.


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.

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 <b>uuid</b>