Buying and Selling XCP and Tokens on the DEx

Since all tokens can be traded against any token, there are a significant amount of market pairs on the Counterparty Decentralized Exchange. It's best to understand how to correctly read the data, place orders and cancel orders before jumping in and initiating functions. After reading the Understanding Exchange Pairs and picking your desired market pair you wish to trade, make sure you understand all the functions, buttons and data of the order pair shown in Freewallet below.

Above we have for example the exchange pair PEPECASH/XCP. This data is all taken from the public trading information of this pair taken from all Counterparty orders. There are a few modules included showing various data points of the price, a customizable graph, modules to buy and sell this token pair, as well as a list of active orders below.

On the upper left, there is a customizable graph that is by default set to "All History" of token and on the “Candlestick” setting for viewing the data

When the time setting in the graph is set to “All” you can also use the slider at the bottom to view more specific timeframes

On the right hand side there are some rudimentary information about each token in the pair to the right as well as links to more information about each token. When clocking the "More Information" buttons, these links will take you to each asset’s xchain page to review more public information about each token not shown here.

Below that is some small icons for your customizable ‘tabbed markets’ mentioned before on the main Exchange page in the Decentralized Counterparty (DEx) section.

Next is the order book. The left panel indicates the place to Buy PEPECASH and the right side to Sell PEPECASH.

  • The Balance input is automatically filled with the balance of each Token you hold on the address you are selected on at the moment.

  • The Price is auto filled to the lowest price possible (market price), but this can be changed if you would like to set a limit order up to be filled later when a buyer/seller fills it

  • The Amount is how many you would like to buy/sell

  • Total is the amount this order will cost

If at first the numbers don’t make sense or confuse you (order numbers may be shown in extensive decimal numbers) it may be helpful to “switch” the pair to view it in the opposite manner.

To do this first navigate to the top left where the exchange pair is listed. Then click the two parallel arrows pointing away from eachother

Doing so will now switch to XCP/PEPECASH, in which the orderbook will now show things “denominated” in XCP instead:

Now on the left side is Buy XCP and the right is Sell XCP and as you can see the order books ‘flipped.’ Also notice how the Balance’s for each remained the same, but the Price changed.

Let flip it back to PEPECASH/XCP and put an order to buy some PEPECASH with XCP.

In this example we have 0.25 XCP and if we wished to just buy 0.25 XCP’s worth at the current market price I would simply change the Total input to 0.25 XCP

Freewallet will now automatically fill the “Amount” to be exactly how much you could buy at the market price, which in the example happens to be 0.00175 XCP as shown in the Sell Orders below this module. If we sent this order through Freewallet will automatically match any orders at the price and leave any remainder as an open order in the orderbook.

In this example if we sent this order through you can see in the order book there is only 69666 Pepecash available at this market price so the remaining 69,523.14285714 PEPECASH would remain up for sale at this price. In the event you bought more than the 69666 pepecash at this price (which would be ALOT more XCP!), any amount higher than 69666 pepecash would be its own limit order and would remain on the order book for another user to fill.

Let’s say we would like to set a lower price than the market and would like to set up a custom Limit order and wait for someone else to match it in the future. Since any user with this asset may fill this order, it is common for users to list ask's below the market price.

Here we now want to set the price of our XCP at 0.00155 per PEPECASH. But let’s say in this example we have decided we only want to buy 100 total PEPECASH at this price

Freewallet will now auto fill the Total input with exactly how much XCP you would need at this custom price to get 100 PEPECASH in a potential match.

The Sell side of things on the right works much the same way, and if you get confused, always remember instead of “selling PEPECASH” you can just ‘flip’ the chart using the icon in the upper right. So instead of buying PEPECASH you can just denote things by selling XCP. How you would like to denote your order is user preference, just make sure you understand the order book thoroughly before making a trade.

Under the order book is Market Depth of the pair selected. This can give you some much needed information about where to place custom market or limit orders as some pairs are more liquid than others.

Below Market Depth is the Trade History of the market. Each transaction can be viewed in greater detail by clicking the link on the date of the transaction on the left side which will take you to each specific transaction hash on xchain.

You can also click the My Trades button to see just your specific trade history in this market.

On the right side of that, if you had any open orders in the market they will appear here.

When you are ready to place an order and it all looks correct, simply click the “Buy” or “Sell” buttons and a confirmation pop up will appear

This will show a “Confirm Buy Order?” or a “Confirm Sell Order?” pop up message which you can verify if the details on this order look correct.

The "Expires" input is how many Bitcoin blocks this order will stay active. The default setting (8064 blocks) is also the max amount of blocks a Counterparty Order will stay active.

The last step is to select your fee you wish to use when creating this order. If you have questions about this, check out the What BTC fee Should I Use?.

If your order does not fill or fills partially and is not filled entirely when it is due to expire, the funds will be automatically refunded to your wallet.

To cancel an exchange order please reference Cancelling Exchange Orders in the Freewallet Functions section.

Last updated