Bitcoin Forum
November 11, 2024, 03:04:42 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How crypto exchange works ?  (Read 236 times)
progweb (OP)
Newbie
*
Offline Offline

Activity: 107
Merit: 0


View Profile
June 23, 2019, 07:23:12 PM
 #1

Hi,

I want technical details about how a cryptocurrency exchanger works ?

To understand well my concern, let's point this technologies and get a schema about how everything is connected and what is the use of each one:

1- Apache Kafka -> I know it's used to produce and consume message between internal services
2- MySQL -> To store datas like new orders, trade history etc.
3- Redis -> As cache storage to handle quickly for example market details etc.

I want know one thing, do MySQL (INSERTs/UPDATEs) are queried directly to database or using KAFKA as medium for better performances ?

If anyone have enough experiences in exchange developpement let me know please or contact me in PM.

I will tip you 20$ in case i have good and useful infos other than the one i have now (A small diagram will be helpful).

Thank you
DaCryptoRaccoon
Hero Member
*****
Offline Offline

Activity: 1241
Merit: 623


OGRaccoon


View Profile
June 23, 2019, 07:35:27 PM
Merited by odolvlobo (1), malevolent (1)
 #2

If your looking for example of how exchanges work you could look at the following projects.

Please not DO NOT USE IN PRODUTION ENVIRO as the code bases may have backdoor's or other holes that may be security issues.

1. Peatio

Was released open source but is no longer being developed it is build on Ruby and Rails which is a change from the usual PHP exchanges out there.

https://github.com/peatio/peatio

Features :

  •    Designed as high performance crypto currency exchange.
        Built-in high performance matching-engine.
        Built-in Proof of Solvency Audit.
        Built-in ticket system for customer support.
        Usability and scalibility.
        Websocket API and high frequency trading support.
        Support multiple digital currencies (eg. Bitcoin, Litecoin, Dogecoin etc.).
        Easy customization of payment processing for both fiat and digital currencies.
        SMS and Google Two-Factor authenticaton.
        KYC Verification.
        Powerful admin dashboard and management tools.
        Highly configurable and extendable.
        Industry standard security out of box.
        Active community behind.
        Free and open-source.
        Created and maintained by Peatio open-source group.



2. RubyKube (Fork of Peatio)

RubyKube is a updated version of Peatio build again in the Ruby enviro it's worth a look at this version

https://github.com/rubykube
https://rubykube.io/

3.  Binance

Binance have most of there code available online for your to look over.

https://github.com/binance-exchange


4. CCXT

A PHP lib for around 110 crypto exchnages worth looking at.

https://github.com/kornrunner/ccxt


As for the DB I think a lot still use MYSQL db thought redis and postgres both are used in the wild.





┏━━━━━━━━━━━━━━━━━┓
┃     𝔱𝔥𝔬𝔲 𝔰𝔥𝔞𝔩𝔱 𝔴𝔬𝔯ⱪ 𝔣𝔬𝔯 𝔶𝔬𝔲𝔯 𝔟𝔞𝔤𝔰       ┃
┃                ➤21/M                      ┃
┃ ███▓▓  ███▓▓  ███▓▓  ███▓▓┃
progweb (OP)
Newbie
*
Offline Offline

Activity: 107
Merit: 0


View Profile
June 23, 2019, 07:39:47 PM
 #3

If your looking for example of how exchanges work you could look at the following projects.

Please not DO NOT USE IN PRODUTION ENVIRO as the code bases may have backdoor's or other holes that may be security issues.

1. Peatio

Was released open source but is no longer being developed it is build on Ruby and Rails which is a change from the usual PHP exchanges out there.

https://github.com/peatio/peatio

Features :

  •     Designed as high performance crypto currency exchange.
        Built-in high performance matching-engine.
        Built-in Proof of Solvency Audit.
        Built-in ticket system for customer support.
        Usability and scalibility.
        Websocket API and high frequency trading support.
        Support multiple digital currencies (eg. Bitcoin, Litecoin, Dogecoin etc.).
        Easy customization of payment processing for both fiat and digital currencies.
        SMS and Google Two-Factor authenticaton.
        KYC Verification.
        Powerful admin dashboard and management tools.
        Highly configurable and extendable.
        Industry standard security out of box.
        Active community behind.
        Free and open-source.
        Created and maintained by Peatio open-source group.



2. RubyKube (Fork of Peatio)

RubyKube is a updated version of Peatio build again in the Ruby enviro it's worth a look at this version

https://github.com/rubykube
https://rubykube.io/

3.  Binance

Binance have most of there code available online for your to look over.

https://github.com/binance-exchange


4. CCXT

A PHP lib for around 110 crypto exchnages worth looking at.

https://github.com/kornrunner/ccxt


As for the DB I think a lot still use MYSQL db thought redis and postgres both are used in the wild.






I already studied Peatio case, they are using Redis and MySQL, and no Apache Kafka Sad

Rubykube they forked Peatio and added some features aswell.

I am looking for a technical details on how the backend of exchange works.

Thank you for your time Smiley

DaCryptoRaccoon
Hero Member
*****
Offline Offline

Activity: 1241
Merit: 623


OGRaccoon


View Profile
June 23, 2019, 07:43:11 PM
 #4

I forgot to add this project

https://github.com/ajmssc/bitcoin-inspector

It uses Apache Kafka.

Regards.

Magic

┏━━━━━━━━━━━━━━━━━┓
┃     𝔱𝔥𝔬𝔲 𝔰𝔥𝔞𝔩𝔱 𝔴𝔬𝔯ⱪ 𝔣𝔬𝔯 𝔶𝔬𝔲𝔯 𝔟𝔞𝔤𝔰       ┃
┃                ➤21/M                      ┃
┃ ███▓▓  ███▓▓  ███▓▓  ███▓▓┃
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!