Create Your Own Bitcoin (BTC) Exchange in 1 Hour!

Table of Contents
create bitcoin exchange
Table of Contents

Does bitcoin exchange creation sound interesting to you? Sometimes the process of bitcoin exchange creation can be lengthy and confusing, so we decided to make it easier for you! In this video, we will show you how easy and fun it is to create your own Bitcoin exchange! We will take you through all the steps that need to be taken in order to create your own Bitcoin exchange, so if this sounds like something you have contemplated doing, then fret no more and get right on it with us! To find out more, take a look at our video or read the article below!

Hi guys, this is Karolis Ramanauskas, I am a software engineer at, for those who are not familiar with us, we are a fairly new Crypto Currency exchange, we hold zero balance, we have really strong values of transparency and openness, as a result we, you might already know, we decided to make our front-end, open source and our back-end open for anybody to use. So, you can find our front-end here, on Github, just paste this URL, I will also put it in the description, as you can see it’s written in React, but if you don’t know React, don’t worry, for the basic changes, for your own exchange, you don’t really have to know React, you can just change, it’s like changing an HTML, but if you want to do any more complicated modifications, you might want to take a course in React and learn how Redux and React work in general, so, yeah, we also have an open back-end API, which you can find if you go to our website and click on API docks, it will get you to our documentation, it’s an apiary, you can see all the end points here, so let’s see this one, it allows you to get all the currencies which we exchange, or the get latest ticker shows you the latest price of a given pair.  

So, let’s see if you trade Bitcoin to Litecoin, it will show you what each Bitcoin is worth in Litecoins. Probably the most interesting end-point for you is gonna be this referrals end-point, which allows you to set your own referrals fee and get your own referral code. I will show you how it works later, but, now that we have our front-end open sourced and ready and we have a back-end where you can set your own referrals, you can set up your own exchange in less than one hour, I hope, and I will show you how to do it in this tutorial. So let’s get started.

So, we will start setting up the exchange by cloning our front-end repository. You can find the link for our Github repository in the description and I also assume that you know what git and what cloning means and if you do, let’s copy the URL and clone the project. Just like that. So, while it downloads let me quickly show you what the, what the basic structure of our project, so we have this config directory, it’s, it just contains the basic configuration files for web pack, for web pack, for testing, just basic configuration, for public it contains all the publicly accessible assets, like favicons, index HTML file. In the scripts we just have three files, test, build and, I forgot, and start. 

So, these are just NPM scripts, which you type in your terminal, like NPM start, and it will start the project, so you are not going to have to change that at all, and then we have this source directory, which is where you’re gonna spend the most of your time, most likely, we have these actions and reducers folders, which are logic for the Redux stuff, then we have this components directory for the React components, we have this CSS, which has a lot of files, split, based on the component and it’s written in SCSS, but you can always change that, and then we have fonts, images, and we have this JavaScript folder, which contains the libraries, on which, some of the libraries, on which the project depends, which are not installed as NPM modules. So, that’s kind of it, let’s see if the project has been downloaded. Yes, it has, so the next step is to download to, no the next step is to go into our repository and install all the dependencies on which the project depends on. It doesn’t have that many, it’s just basically Babel for transpilation, Axios for http transmission, like making http requests, JQuery, Lodash, Moment for dealing with dates, just the basic stuff, and the Redux of course. So, it will take some time to install, so let me get back to you once that’s done. 

Okay, so all the NPM modules have been installed, here we can see this node modules directory, so now what we can do, is actually start our project and see how it works. So, it’s still loading, why is it still loading? Okay, here we are, so it’s basically what you should see is almost the same as on what you can see if you go to, because it’s basically, we, it’s, it’s the same. 

So, you probably want to delete all this and change about us, you might want to change your background picture, change the description, the logo, you might wanna change your FAQ, so, let me show you how to do that. So, in order to change the content like the about section or images and stuff like that, we need to open the code for our repository, so let’s navigate there, okay, here we go, and as I mentioned previously all the React components are located in the source and then at the components folder, and as you can see there are a lot of them, and I tried to name them as descriptive as possible, so let’s say the about, for the se, about the section the component is called about, and you can see right here the content for, we don’t have any sophisticated CMS at the moment, content management system, we just hard code our content like that, and this is what you can do as well. So let’s say instead of Nextchange you can put Funchange or something like that. 

And then you can obviously delete all these team members because we are not going to be a part of your team, but you can always change the name, like the title, the country, and add their social links. But for now, I’m just going to delete them, and that’s it. Let’s see how that looks. Yeah, so, the same for every queue section, let’s see, here we go, there’s a lot of questions and answers here, you can delete any of them which you don’t need, and you can add any of them which you think would be useful. 

So this is how it goes. For a background picture, you can go to the hero.js, which is the component that contains this entire section and the hero image, let’s say you can inspect, you can inspect where the image is set, it’s set in the hashtag hero, and that’s gonna be contained in the hero.scss file, and then you can change the background picture here, which is located in the images directory. So, obviously, you’re gonna need some CSS, some HTML skills but this is nothing extraordinary, nothing that you cannot figure out, especially if you have some background in programming. So, I think this is all, I’m going to show you in terms of the front end. Now, let’s get started with the back-end. 

So, in regards to back-end, the main thing we want to discuss is how to obtain your own referral token and how to use that in your own exchange. So the way we have done it, for now, is that you have to make an order of any size, so I’m buying some Ether with Bitcoin, I execute that order, and then if you scroll down, you can see this referral link, you can send this link to your friends, and if they use it and make an order later, you will get a commission fee. But, you can also copy this part, so basically, anything after ref equals, and then if you search for file config.js you will see this referral code key, and at the moment it’s null, but you can set it to your own referral code, so now any time back-end makes a call, like if you, if the front end makes a call to the back-end, it will also always add this referral code, and then our back-end can check if the referral code is set, and if it is, it can accumulate your commission. To see how that works let’s go to referrals.js and here, in this part we are checking if config.referral code is set. And if it is, we use it, we set the header to x referral token, and then we execute our ajax request. You don’t have to understand how it works, but to put it short, if you set the referral code in your configuration file any time the front end makes an HTTP request, it will attach this referral token header.  

Now, let’s discuss shortly how the commissions work. For September, since we are newly opened, any time, anybody, new user makes a transaction you’re gonna get a commission of five dollars, but after that, you will be able to set your own fees, on top of our base fees, and the plan base fees at the moment are 0.5% so you can add anything on top of that and then you will get paid. And you will get paid to whatever wallet you set as a withdrawal address in your transaction, so let’s say if our transaction was this, and you set, and you got the referral token from here, and you set the destination address as this, then any time we’re gonna pay out the commission we will send it to this address in Ether. 

So, if you want to get paid in bitcoin, you should buy some bitcoin from us, so that the receive address is bitcoin address. I hope that’s clear, and if you have any questions let me know in the comments. If this tutorial gets more popular we will make a new version perhaps more, more like advanced, more comprehensive, we will go through perhaps more detail and how everything works, now the only step left for you to have your own exchange is to set it up, to set up the domain, so all you need to do is set up this entire repository somewhere on the server, what you will have to do is run NPM run build and copy-paste the files and that’s it. It’s really, really simple. So, I hope you like it and I’ll see you next time.