Skip to main content

Stock exchange with a matching engine and webserver

Project description

chives-exchange

Implementation of a stock exchange with matching engine and a web UI powered by Flask.

Getting started

The webserver communicates to the matching engine through RabbitMQ, which can be most easily run using docker:

docker run -d --rm \
    --name "rabbitmq" \
    -p 5672:5672 \
    -p 15672:15672 \
    rabbitmq:3-management

Both the webserver and the matching engine reads from and writes to a SQL database, which by default is a SQLite located in /tmp/chives.sqlite. To initialize the database schema:

python -m chives initdb

Run the webserver and matching engine in two separate processes. Make sure that the matching engine is not erroring out because of failure to connect to RabbitMQ.

python -m chives start_engine
python -m chives webserver

You can now follow the demo here to try it out.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chives-exchange-0.1.1.tar.gz (27.7 kB view hashes)

Uploaded Source

Built Distribution

chives_exchange-0.1.1-py3-none-any.whl (38.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page