Metadata-Version: 2.1
Name: chives-exchange
Version: 0.1.0
Summary: Stock exchange with a matching engine and webserver
Home-page: https://github.com/xuganyu96/chives-exchange
Author: Ganyu "Bruce" Xu
Author-email: xuganyu96@gmail.com
License: UNKNOWN
Platform: UNKNOWN
Description-Content-Type: text/markdown
Requires-Dist: Flask (==1.1.2)
Requires-Dist: flask-login (==0.5.0)
Requires-Dist: flask-wtf (==0.14.3)
Requires-Dist: pytest (==6.1.2)
Requires-Dist: pika (==1.1.0)
Requires-Dist: requests (==2.24.0)
Requires-Dist: SQLAlchemy (==1.3.20)

# chives-exchange
Simulated stock exchange

## Run RabbitMQ with a single MatchingEngine
First, run the RabbitMQ container:

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

Second, initialize database structure and run matching engine：

```bash
python -m chives initdb
python -m chives start_engine
```

Finally, run the test script to see if the system works:

```bash
python scratch.py
```

## Run the flask application:
```bash
python -m chives webserver
```

