Several API services exist to facilitate quick and easy integration with the Dash network for services including:
- Transaction broadcasting
- Exchange rates
- Currency conversion
- Invoice generation
This documentation is also available as a PDF.
API Services are typically leveraged to eliminate that requirement of running your own infrastructure to support blockchain interactions. This includes mechanisms such as:
- Forming and Broadcasting a Transaction to the network.
- Address generation using HD Wallets.
- Payment Processing using WebHooks.
There are a variety of options for supporting these methods, with the key differentiator being the pricing model included and supported features. The following list of API Providers attempts to outline these key features/differentiators and also includes a link to related documentation.
The open-source Insight REST API provides you with a convenient, powerful and simple way to read data from the Dash network and build your own services with it.
- Features: Transaction Broadcast, WebSocket Notifications.
- Pricing Model: Free / Open Source
- Documentation: https://github.com/dashevo/insight-api
BlockCypher is a simple, mostly RESTful JSON API for interacting with blockchains, accessed over HTTP or HTTPS from the api.blockcypher.com domain.
- Features: Transaction Broadcast, HD Wallet / Address Generation, WebSocket and WebHook Callbacks as well as Payment Forwarding. BlockCypher does not handle Private Keys.
- Pricing Model: Per API Call, 5000 Requests -> $85.00 per month (https://accounts.blockcypher.com/plans)
- Documentation: https://www.blockcypher.com/dev/dash/
ChainRider is a cloud service providing a set of REST APIs for digital currency management and exploration.
- Features: Blockchain queries, Event Notifications, Transaction Broadcast, Payment Processing, etc.
- Pricing Model: Free trial, pay per API call
- Documentation: https://www.chainrider.io/docs/dash
The GoCoin platform makes taking Dash as easy as installing a plugin. Payment processing is already implemented for every major shopping platform. GoCoin is focused on helping merchants in privacy-related niches and specific industries, and handles all transaction risk for all payments from your customers.
- Features: Invoicing, Exchange Rates, WebHook Callbacks. GoCoin holds Private Keys on their server allowing the merchant to withdraw funds in Cryptocurrency or convert to Fiat.
- Integrations: WooCommerce, Magento, Prestashop, VirtueMart, ZenCart, OpenCart, OSCommerce, UberCart, nopCommerce, WHMCS, NATS4, Shopify.
- Pricing Model: 1% Processing Fee (https://gocoin.com/fees)
- Documentation: https://gocoin.com/docs
CoinPayments is an integrated payment gateway for cryptocurrencies such as Dash. Shopping cart plugins are available for all popular webcarts used today. CoinPayments can help you set up a new checkout, or integrate with your pre-existing checkout.
- Features: Invoicing, Exchange Rates, WebHook Callbacks. CoinPayments holds Private Keys on their server allowing merchant to withdraw funds in Cryptocurrency or convert to Fiat.
- Integrations: aMember Pro, Arastta, Blesta, BoxBilling, Drupal, Ecwid, Hikashop, Magento, OpenCart, OSCommerce, PrestaShop, Tomato Cart, WooCommerce, Ubercart, XCart, ZenCart
- Pricing Model: 0.5% Processing Fee (https://www.coinpayments.net/help-fees)
- Documentation: https://www.coinpayments.net/apidoc
This documentation is also available as a PDF.
SDKs (Software Development Kits) are used to accelerate the design and development of a product for the Dash Network. These resources can either be used to interface with an API provider or for the creation of standalone applications.
Dash Developer Guide¶
The Dash Developer Guide aims to provide the information you need to understand Dash and start building Dash-based applications. To make the best use of this documentation, you may want to install the current version of Dash Core, either from source or from a pre-compiled executable.
- Documentation: https://dash-docs.github.io/en/developer-guide
Dashcore is a fork of Bitcore and operates as a full Dash node — your apps run directly on the peer-to-peer network. For wallet application development, additional indexes have been added into Dash for querying address balances, transaction history, and unspent outputs.
NBitcoin is the most complete Bitcoin library for the .NET platform, and has been patched to include support for Dash. It implements all most relevant Bitcoin Improvement Proposals (BIPs) and Dash Improvement Proposals (DIPs). It also provides low level access to Dash primitives so you can easily build your application on top of it.
- Platform: .NET
- Documentation: https://programmingblockchain.gitbooks.io/programmingblockchain/content/
- Repository: https://github.com/MetacoSA/NBitcoin
BlockCypher also offers client SDKs.
- Platform: Ruby, Python, Java, PHP, Go, NodeJS
- Repositories: https://www.blockcypher.com/dev/dash/#blockcypher-supported-language-sdks
This documentation is also available as a PDF.
InstantSend is a feature provided by the Dash network that allows for 0-confirmation transactions to be safely accepted by Merchants and other service providers. Secured by the Masternode Network, this mechanism eliminates the risk of a “Double Spend” by locking transaction inputs for a given transaction at a protocol level.
InstantSend Transactions vs. Standard Transactions¶
From an integration perspective there are only minor differences between an InstantSend Transaction and a Standard Transaction. Both transaction types are formed in the same way and are signed using the same process; the key difference is the fee structure and input requirements for InstantSend.
- Fee Structure: InstantSend utilizes a “per-input” fee of 0.0001 DASH per Input.
- Input Requirements: All inputs for an InstantSend transaction must have at least 6 confirmations.
In the event that a given transaction does not meet both criteria it will revert to a standard transaction.
Receiving InstantSend Transactions¶
InstantSend transactions are handled in the same way as a Standard Transaction, typically through JSON-RPC, Insight API, or an internal notification script / service that is configured at a server level.
JSON-RPC: The following RPC commands will include InstantSend-related information. Within the response you’ll find an “InstantLock” field the status of a given Transaction. This true/false (boolean) value will indicate whether an InstantSend has been observed.
- GetTransaction: https://dash-docs.github.io/en/developer-reference#gettransaction
- ListTransactions: https://dash-docs.github.io/en/developer-reference#listtransactions
- ListSinceBlock: https://dash-docs.github.io/en/developer-reference#listsinceblock
Insight API: Insight API can be used to detect InstantSend transactions and to push notifications to clients using WebSockets. The API can also be manually polled to retrieve Transaction information including InstantSend status.
Script Notify: The Dash Core Daemon can be configured to execute an external script whenever an InstantSend transaction relating to that wallet is observed. This is configured by adding the following line to the dash.conf file:
Note that only addresses imported to the wallet will be monitored for InstantSend Transactions.
Broadcasting InstantSend Transactions¶
InstantSend Transactions can be constructed and broadcast using an approach similar to Standard Transactions. Provided the InstantSend Fee Structure and Input Requirements are met, an InstantSend can be broadcast using JSON-RPC or Insight API as a Raw Transaction.
JSON-RPC: The “SendRawTransaction” RPC command can be utilized to broadcast a raw transaction using InstantSend. When utilizing this command be sure to set both optional parameters as “true”
sendrawtransaction "hexstring" ( allowhighfees instantsend )
sendrawtransaction "hexstring" true true
More Information: https://dash-docs.github.io/en/developer-reference#sendrawtransaction
Insight API: Raw Transactions can also be broadcast as an InstantSend using Insight API. In this case all that is required is to POST the raw transaction using the
More Information: https://github.com/dashevo/insight-api#instantsend-transaction
The following resources provide additional information about InstantSend and are intended to help provide a more complete understanding of the underlying technologies.
Community member moocowmoo has released code to help merchants build their own vending machine and set it up to receive Dash InstantSend payments. The Dashvend software can also be used to create any sort of payment system, including point-of-sale systems, that can accept InstantSend payments.
You can add a simple price ticket widget to your website using the simple code snippet generator from CoinGecko.
Many wallets are capable of generating QR codes which can be scanned to simplify entry of the Dash address. Printing these codes or posting the on your website makes it easy to receive payment and tips in Dash, both online and offline.
- In Dash Core, go to the Receive tab, generate an address if necessary, and double-click it to display a QR code. Right click on the QR code and select Save Image to save a PNG file.
- In Dash for Android, tap Request Coins and then tap the QR code to display a larger image. You can screenshot this to save an image.
- In Dash for iOS, swipe to the left to display the Receive Dash screen. A QR code and address will appear. You can screenshot this to save an image.
- To generate a QR code from any Dash address, visit CWA QR Code Generator and simply paste your Dash address to generate an image.