Giter Site home page Giter Site logo

manniru / demo-tradingplatform Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mohamadkhalaj/demo-tradingplatform

0.0 0.0 0.0 3.39 MB

Advanced cryptocurrencies demo trading platform.

Home Page: https://demo-trade.herokuapp.com/

License: GNU General Public License v3.0

Shell 0.02% JavaScript 45.89% Python 25.80% CSS 11.13% HTML 16.96% Dockerfile 0.15% Procfile 0.05%

demo-tradingplatform's Introduction

Demo Trading

Advanced cryptocurrencies demo trading platform.

Black code style .github/workflows/production.yml

Featuresโœจ

Market:

  • real-time price
  • search any cryptocurrency!

Trade:

  • spot trading
  • limit-order trading
  • recent trades(Live)
  • all trade histories
  • all open orders
  • cancel open orders

Portfolio:

  • account available margin
  • account total margin
  • PNL chart
  • asset allocation chart

Trade history

  • all trade histories

Open orders:

  • all open orders
  • cancel orders

Profile:

  • gravatar profile photo
  • edit name and last name
  • change password
  • view email and username

Tech

All used frameworks, technologies and libraries:

  • [Django] - We use django for our backend
  • [Redis] - Datebase memory caching and message broker
  • [PostgreSql] - Sql datebase
  • [JavaScript] - Our frontEnd made with pure js
  • [jQuery] - FrontEnd
  • [Twitter Bootstrap] - Great UI boilerplate for modern and responsive web apps
  • [Heroku] - Deployment
  • [Sentry] - Error tracking for both Django/JS
  • [Google analytics] - For users analysis
  • [Celery] - task schedule
  • [Docker] - container
  • [Django channels] - socket programming

Docker

$ docker-compose up --build

Setting Up Super User

  • To create a superuser account, use this command:

    $ python manage.py createsuperuser
    

Local running

First you should change directory to web:
$ cd web
$ cp .env-sample .env and paste variables with your own.
$ pip install -r requirements/local.txt
$ chmod +x ./release.sh && ./release.sh
$ python manage.py collectstatic
$ python -m celery -A config worker -l info -c 4
in another console run:
$ python manage.py runserver

Running in Production

Set this environment variables

KEY VALUE
DJANGO_SECRET_KEY $(openssl rand -base64 64)
WEB_CONCURRENCY 4
DJANGO_DEBUG False
DJANGO_SETTINGS_MODULE config.settings.production
PYTHONHASHSEED random
DJANGO_ALLOWED_HOSTS YOUR_DOMAIN
DJANGO_ADMIN_URL RANDOM_STRING/
CRYPTO_COMPARE_API Get it from here
EMAIL_HOST_USER Email username
EMAIL_HOST_PASSWORD Email password
SOCIAL_AUTH_GOOGLE_OAUTH2_KEY Get it from here
SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET Secret from above
HCAPTCHA_SITEKEY Login and create new site
HCAPTCHA_SECRET Copy secret from above url
SENTRY_DSN Follow this instruction
$ cd web
$ pip install -r requirements.txt
$ chmod +x ./release.sh && ./release.sh
$ python manage.py collectstatic
$ python -m celery -A config worker -l info -c 4
$ daphne -b 0.0.0.0 -p $PORT config.routing:application

Github workflows (CI/CD)

If you want to pass ci/cd and auto deploy after each commit, you should add below secrets to your github repo secret lists.

KEY VALUE
CRYPTO_COMPARE_API Get it from here
EMAIL_HOST_USER Email username
EMAIL_HOST_PASSWORD Email password
SOCIAL_AUTH_GOOGLE_OAUTH2_KEY Get it from here
SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET Secret from above
HCAPTCHA_SITEKEY Login and create new site
HCAPTCHA_SECRET Copy secret from above url
SENTRY_DSN Follow this instruction
HEROKU_API_KEY Your API key
HEROKU_APP_NAME Your app name to be deployed here
HEROKU_EMAIL Your email address related to your heroku account

Celery

$ cd web
$ python3 -m celery -A config worker -l info -c 4

License

GPL-3.0 license

Screenshots

Screenshot 2022-09-05 at 15-26-03 Exchange Wallet Screenshot 2022-09-05 at 15-21-11 Exchange Settings Screenshot 2022-09-05 at 15-20-21 Exchange Trade BTC Screenshot 2022-09-05 at 15-19-38 Exchange Trade BTC Screenshot 2022-09-05 at 15-18-40 Exchange Settings Screenshot 2022-09-05 at 15-18-08 Exchange profile Screenshot 2022-09-05 at 15-17-23 Exchange Home Screenshot 2022-09-05 at 15-16-32 Exchange Reset Password Screenshot 2022-09-05 at 15-16-23 Exchange Sign up Screenshot 2022-09-05 at 15-15-48 Exchange Login Screenshot 2022-09-05 at 15-15-28 Exchange Markets Info Screenshot 2022-09-05 at 15-14-38 Exchange Markets Info Screenshot 2022-09-05 at 15-14-05 Exchange Home

demo-tradingplatform's People

Contributors

alihasanzadeh80 avatar amirh-moosavi avatar dependabot[bot] avatar hadis-sweety-cake avatar mohamadkhalaj avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.