Skip to navigation
DigitalOcean Referral Badge

Get $200 credit on DigitalOcean

Hostinger logo

Hostinger: Lightning-fast hosting, unbeatable uptime, top-notch support!

Open extra topbar

Exchange extension

Bitcoin and Altcoin Wallets Exchange extension
Allows your users to enter market orders and exchange cryptocurrencies.

With this plugin extension to Bitcoin and Altcoin Wallets for WordPress, you can set up a full cryptocurrency exchange.

important disclaimers

no interconnection to other markets

The only liquidity available on your exchange is that which is created when you and your users place orders.

If you create a BTCUSD market, you will NOT get a chart of the actual price of Bitcoin against the US dollar. The price for this market will NOT be the commonly agreed price.

If your order book does not have any buy/sell orders, there is no price on that market. The price history is determined by trades on your site only. You or your users must place limit orders on the orderbook for the market to work.

There are no “solutions” or “workarounds” to this. If you do not undestand this, please ask me any questions you may have. You have been warned.

scalability and performance limitations

There are no guarantees that the extension can scale to the trading volumes of the big exchanges.

The aim og this extension is to enable small website owners to provide exchange functionality, with minimal effort, on top of WordPress. Your exchange’s ability to scale will likely depend on a number of factors, including the maximum size of your DB, and other server characteristics.

legal restrictions

IANAL: This plugin only gives you the technical functionality for running a crypto exchange. It is your responsibility to make sure that it is legal for you to run an exchange. I do not offer legal or financial advice.

screenshots

features

You can set up markets by choosing trading pairs between currencies that you have installed coin adapters for. The Exchange extension is particularly suitable for setting up small exchanges that carry lesser-known altcoins. This extension includes a FIFO matching engine and shortcodes/widgets to display candlestick charts, the order-book, order histories, etc.

Full description of features:

  • Admins can
    • Create markets
      • Choose base and quote currencies
      • Enable or disable
        • Buying
        • Selling
        • Cancelling limit orders
        • Using the current market price in the parent plugin, as exchange rate data
      • Edit the layout of a market page using shortcodes:
        • Display market statistics
          • For current market or all markets
          • Jump to another market page
            • Links in table of markets
              • Group markets tabs based on base currency
            • Dropdown of markets
        • Candlestick chart of past trades
        • Orderbook bids
        • Orderbook asks
        • Form for entering orders
          • Market
            • Bid
            • Ask
          • Limit
            • Bid
            • Ask
        • User orders
        • History of past user trades
        • History of past market trades
    • Choose the notation in which base and quote ticker symbols are displayed in market names
    • Limit the amount transacted per trade
      • Expressed in BTC value
      • Set a minimum limit
      • Set a maximum limit
      • Control market fees
        • Maker fee
        • Taker fee
    • Limit number of API operations to prevent DoS attacks
      • Data read requests
      • Requests that place/cancel orders
    • Control internal caching of data read API requests using transients (Memoize)
    • Control the maximum amount of data that data read API requests return
    • Display a form to easily exchange between arbitrary currencies
      • Using shortcode
      • Placing market orders
      • Do not allow user to trade if:
        • No market exists between the currencies
        • Not enough liquidity on orderbook
    • Use shortcode UIs outside of market page
      • Explicitly set the market via shortcode attributes
        • Can specify currencies
          • Via market_id (post_id of market post, e.g. market_id=123)
          • Via ticker symbols (backwards compatible, e.g. market="BTC_DOGE")
    • Control who can trade on the exchange using roles & capabilities
    • Visit the market pages easily, from the WordPress admin bar (Site name menu)
    • Style the candlestick chart using Customizer
      • Chart colors
        • Bids (green)
        • Asks (red)
        • Price axis
      • Crosshair
        • Width
        • Line style
        • Color
      • Text
        • Font size
        • Color
    • Comply with GDPR
      • Delete user data
      • Export user data
    • Programmatically access the exchange
      • Via PHP (PHP-API)
      • Via WP-REST API (new)
      • Via Legacy JSON-API (for backwards compatibility with previous versions)
    • Can enable cron tasks to clean up past data and save DB space
  • Users can
    • View
      • Markets
        • Candlestick chart of past trades
        • Last price
        • Minimum ask
        • Ask volume (expressed in quote currency)
        • Ask volume (expressed in base currency)
        • Max bid
        • Bid volume (expressed in quote currency)
        • Bid volume (expressed in base currency)
        • Volume of quote currency transacted in past 24 hours
        • Volume of base currency transacted in past 24 hours
    • Place orders
      • Limit orders
        • Can click a button to set the maximum transactable amount
        • Get a warning if price is too far away from current market price
        • View equivalent amounts in VS Currencies
        • Receive an email for every trade performed
      • Market orders
        • Can click a button to set the maximum transactable amount
        • Notified if insufficient liquidity
        • Get a warning if price is too far away from current market price
        • View equivalent amounts in VS Currencies
        • Receive an email for every trade performed
    • Cancel orders
    • View data, place or cancel orders via API

installation

NOTE: You should first install and configure the parent plugin, Bitcoin and Altcoin Wallets.

  • If you are migrating from the Exchange extension 1.x, see Migrating from 1.x.
  • If you are performing a new installation, continue reading here:

Install the plugin

1 Log in to dashed-slug.net using your premium account.

2 Go to http://www.dashed-slug.net/bitcoin-altcoin-wallets-wordpress-plugin/exchange-extension

3 Download the latest version of this app extension.

4 Login to your WordPress installation as an admin.

5 Go to Plugins.

6 Click on Add New.

7 Click on Upload Plugin.

8 Click on Choose file.

9 Select the zip file that you downloaded.

10 Click on Activate plugin.

11 Go to: SettingsBitcoin and Altcoin WalletsExchange: Settings.

12 Review the settings that control market behavior, then hit the Save Changes button.

That’s it! The plugin is now installed.

13 Next, you will want to create one or more markets. To learn more about markets, see The Market Post Type in the online documentation.

14 Finally, to act as a marketmaker, you will want to add liquidity on your markets. Add a few limit buy/sell orders around the price you think your currency pair is or should be trading.

Migrating from 1.x {#migrating}

1 Log in to dashed-slug.net using your premium account.

2 Go to http://www.dashed-slug.net/bitcoin-altcoin-wallets-wordpress-plugin/exchange-extension

3 Download the latest version of this app extension.

4 Login to your WordPress installation as an admin.

5 Go to Plugins.

6 Click on Add New.

7 Click on Upload Plugin.

8 Click on Choose file.

9 Select the zip file that you downloaded.

10 Click on Activate plugin.

11 Go to: SettingsBitcoin and Altcoin WalletsExchange: Settings.

12 Review the settings that control market behavior, then hit the Save Changes button.

13 In the meantime, the plugin will attempt to migrate your markets into the new Market post type in the online documentation. All admins will be notified by email once the migration task finishes.

14 After receiving the migration email, you should review the markets. Go to: MarketsMarkets and see if the markets have been migrated correctly. If any markets are missing, recreate them.

15 Review the frontend.

This is the main difference of version 2.0.0 and previous versions: With previous versions, you had separate pages for the shortcodes. With 2.0.0 you should be using the Exchange UI shortcodes on the market page itself. e.g.: [wallets_exchange_bids] without attributes.

You can continue to use the shortcodes on other pages besides market pages, like before. In that case you must specify the market with the market_id or market attributes e.g. [wallets_exchange_bids market="BTC_DOGE"]

See the Market post type and Frontend in the online documentation for details.

downloads

This is a premium plugin available to paying members only.

documentation

As of Bitcoin & Altcoin Wallets version 6.0.0, the documentation can be accessed from the WordPress admin screens. Look for Wallets Admin Docs in the Admin menu.

Note that the documentation is only shown to administrators (users with the manage_wallets capability).

Previous versions of the plugin and its extensions had documentation in the form of an accompanying PDF file. This has now been replaced with markdown files placed in the source code directories of each component.

support

Please use the appropriate support forum:

You are welcome to send in any problems, questions, suggestions, thoughts, etc.

For all other communication, such as questions and issues regarding membership, you can email me.

Exchange extension

Updated on 2024-01-12T06:57:56+00:00, by alexg.