Wiki

Clone wiki

BCExchange / Exchange Integration

Exchange Integration

This guide will explain how you can integrate Blockshares (BKS) into your exchange.

1. Download the daemon

From https://bitbucket.org/JordanLeePeershares/bcexchange/downloads you can find the latest package containing the daemon for your environment. The daemon will be called bcexchanged or bcexchanged.exe depending on your platform.

2. Create a bcexchange.conf file

Before running the daemon you will need to create a bcexchange.conf file. Place the following into your file:

#!c

rpcuser=anyusername
rpcpassword=anypassword
server=1
avatar=0

Note: If you are configuring Blockshares (BKS) you MUST add avatar=0 to your conf file.

3. Start the daemon

Run the daemon using the –daemon parameter (eg. ./bcexchanged --daemon).

This will start the daemon in the background and begin syncing the blockchain. Run ./bcexchanged getinfo to verify you can communicate with the daemon through RPC.

4. Point your exchange software to the correct daemon unit

#!c

// B&C Exchange protocol port. 2239 stands for BCEX on a telephone keypad
#define PROTOCOL_PORT     2239
// Base RPC port used by the BlockShare RPC server. BlockCredit RPC server listen ons RPC_PORT+1.
#define RPC_PORT          2240

// The same rules apply to testnet, but on different ports
#define TESTNET_PORT      12239
#define TESTNET_RPC_PORT  12240

Have your software point to the correct port number to interface with Blockshares. For example this is how we would communicate with the Blockshares unit in Peatio exchange software

#!c


rpc: http://BCEx:123exch@127.0.0.1:2240

Updated