This guide will explain how you can integrate NuBits and NuShares into your exchange.
From NuBits.com/download you can find a package containing the daemon for your environment. The daemon will be called nud or nud.exe depending on your platform.
Before running the daemon you will need to create a nu.conf file. Follow our creating a nu.conf file guide to learn how to create the file. Place the following into your file:
You must add avatar=0 if you’re using NuShares
If you are configuring NuShares you MUST add avatar=0
to your conf file:
rpcuser=anyusername
rpcpassword=anypassword
server=1
avatar=0
Run the daemon using the –daemon parameter (eg. ./nud --daemon
).
This will start the daemon in the background and begin syncing the blockchain. Run ./nud getinfo
to verify you can communicate with the daemon through RPC.
Nu uses different port numbers for different units. The only units in the software right now are NuBits and NuShares, but this may change in the future. Use the following guide below to select the port number for the unit you’re configuring.
Have your software point to the correct port number to interface with the unit you’re configuring. For example this is how we would communicate with the NuBits unit in the Peatio exchange software
As described in the Nu white paper, if you plan to put your fund into reserves to buy or sell NuBits for your business, you could be approved to become a Liquidity Providing Custodian (LPC) and receive LPC fees from the NuShare holders. An LPC is required to set a tight buy/sell spread (typically 0.2%) between buy and sell prices, and will report liquidity (it’s automatic) to NuNet.
To become an LPC you need to submit a custodial grant proposal. A template is available to get you started. It can be helpful to read past proposals in the Motions area of the discussion board.
If you are not an LPC you are free to set any buy/sell prices of NuBits.