{"id":15013803,"url":"https://github.com/felipewind/fix-trading-simulator","last_synced_at":"2025-10-07T17:09:54.869Z","repository":{"id":44248483,"uuid":"311175967","full_name":"felipewind/fix-trading-simulator","owner":"felipewind","description":"A trading simulator between a Broker and a Stock Exchange using the Financial Information eXchange (FIX) Protocol. It's a study project using QuickFIX/J, Quarkus, Angular, Docker, Docker Compose and PostgreSQL.","archived":false,"fork":false,"pushed_at":"2024-09-09T22:26:37.000Z","size":1773,"stargazers_count":69,"open_issues_count":0,"forks_count":31,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-02-28T04:45:56.037Z","etag":null,"topics":["angular","docker","docker-compose","fixprotocol","postgresql","quarkus","quickfixj"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/felipewind.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-08T23:32:39.000Z","updated_at":"2025-01-22T00:37:32.000Z","dependencies_parsed_at":"2024-09-16T01:01:08.564Z","dependency_job_id":"b5d09b85-ac84-4efb-9f20-039751398822","html_url":"https://github.com/felipewind/fix-trading-simulator","commit_stats":{"total_commits":12,"total_committers":2,"mean_commits":6.0,"dds":0.08333333333333337,"last_synced_commit":"722b0f8679cf2227c4d957762791b2ae977335db"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipewind%2Ffix-trading-simulator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipewind%2Ffix-trading-simulator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipewind%2Ffix-trading-simulator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipewind%2Ffix-trading-simulator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/felipewind","download_url":"https://codeload.github.com/felipewind/fix-trading-simulator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243738985,"owners_count":20340002,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","docker","docker-compose","fixprotocol","postgresql","quarkus","quickfixj"],"created_at":"2024-09-24T19:44:48.014Z","updated_at":"2025-10-07T17:09:49.816Z","avatar_url":"https://github.com/felipewind.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fix Trading Simulator\n\n- [Overview](#overview)\n- [System Architecture](#system-architecture)\n- [Project Structure](#project-structure)\n- [Features](#features)\n- [Running the project](#running-the-project)\n- [Images](#images)\n- [Help Queries](#help-queries)\n\n\n# Overview\n\nA trading simulator between a Broker and a Stock Exchange using the [Financial Information eXchange (FIX) Protocol](https://www.fixtrading.org/). It's a study project using [QuickFIX/J](https://www.quickfixj.org/), [Quarkus](https://quarkus.io/), [Angular](https://angular.io/), Docker, Docker Compose and [PostgreSQL](https://www.postgresql.org/).\n\nIf you want to participate on this project, just open an issue and we can talk about!\n\nBoth Broker and Exchange systems were built with Quarkus on the back-end and Angular on the front-end. \n\nThe back-ends communicate each other with QuickFIX/J and each has a schema into the PostgreSQL.\n\nEach Angular front-end communicates with the Quarkus back-end using REST and Websockets.\n\n# System Architecture\n\n![image](./documentation/design/fix-trading-simulator-design.png)\n\n# Project Structure\n\n[Broker back-end](./broker-back-end/README.md)\n\n[Broker front-end](./broker-front-end/README.md)\n\n[Exchange back-end](./exchange-back-end/README.md)\n\n[Exchange front-end](./exchange-front-end/README.md)\n\n[Documentation](./documentation/README.md)\n\n# Features\n\n## Orders\n\nYou can submit, negotiate, cancel and list your orders.\n\nIt's possible to set the Exchange to automatically negotiate the orders.\n\nEvery change in the orders are broadcasted using websockets and are imeaditelly updated on the front-end.\n\n## Session\n\nMake logon and logout.\n\nView the session status and storage.\n\nView the session configuration.\n\nList the messages sent from the session.\n\n## Logs\n\nList the FIX events.\n\nList the messages received and sent.\n\n\n# Running the project\n\n## With docker-compose\n\nAfter start, access project at:\n- Broker Front end\n  - http://localhost/\n- Broker Back end swagger: \n  - http://localhost:8080/q/swagger-ui/\n- Exchange Front end\n  - http://localhost:90/\n- Exchange Back end swagger: \n  - http://localhost:8090/q/swagger-ui/\n- PostgreSQL:\n  - jdbc:postgresql://localhost:5432/postgres\n  - user: postgres\n  - password: postgres\n\nThe containers should be running like this:\n```\ndocker ps\nCONTAINER ID        IMAGE                               COMMAND                  CREATED             STATUS              PORTS                    NAMES\n8191a0fcde2f        felipewind/exchange-front-end:1.0   \"/docker-entrypoint.…\"   16 minutes ago      Up 16 minutes       0.0.0.0:90-\u003e80/tcp       exchange-front-end\n1178d4e1c02f        felipewind/broker-front-end:1.0     \"/docker-entrypoint.…\"   16 minutes ago      Up 16 minutes       0.0.0.0:80-\u003e80/tcp       broker-front-end\n2370c47d0a2d        felipewind/broker-back-end:1.0      \"/deployments/run-ja…\"   16 minutes ago      Up 16 minutes       0.0.0.0:8080-\u003e8080/tcp   broker-back-end\n8106b9a48217        felipewind/exchange-back-end:1.0    \"/deployments/run-ja…\"   16 minutes ago      Up 16 minutes       0.0.0.0:8090-\u003e8090/tcp   exchange-back-end\n6b53a07b72ac        postgres                            \"docker-entrypoint.s…\"   16 minutes ago      Up 16 minutes       0.0.0.0:5432-\u003e5432/tcp   fix-trading-simulator_postgresql-qfj_1\n```\n\n### Using the Docker Hub Images\n\nInside the root folder of the project, execute:\n```\n$ chmod +x ./run-from-docker-hub.sh\n$ ./run-from-docker-hub.sh\n```\n\nDocker Hub images:\n- [exchange-back-end](https://hub.docker.com/repository/docker/felipewind/exchange-back-end)\n- [exchange-front-end](https://hub.docker.com/repository/docker/felipewind/exchange-front-end)\n- [broker-back-end](https://hub.docker.com/repository/docker/felipewind/broker-back-end)\n- [broker-front-end](https://hub.docker.com/repository/docker/felipewind/broker-front-end)\n\n### Building the Docker images locally\n\nInside the root folder of the project, execute:\n```\n$ chmod +x ./run-with-local-build.sh\n$ ./run-with-local-build.sh\n```\n\nAfter the first build, you can use the `run-after-local-build` script.\n\n\n\n## Without docker-compose \n\nThe default version of the development back-end projects is using H2 data base (in memory).\n\nIt's possible to change the `application.properties` and set them to run with PostgreSQL, in this case you should start a PostgreSQL container:\n```\ndocker run -d --name postgres-qfj -p 5432:5432 -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=postgres postgres\n```\n\n\n### Enter inside the `exchange-back-end` folder and type:\n```\n$ ./mvnw compile quarkus:dev -Ddebug=5006\n```\n\nAccess http://localhost:8090/q/swagger-ui/\n\n### Enter inside the `broker-back-end` folder and type:\n```\n$ ./mvnw compile quarkus:dev\n```\n\nAccess http://localhost:8080/q/swagger-ui/\n\n\n### Enter inside the `exchange-front-end` folder and type:\n```\n$ npm install\n$ ng serve\n```\n\nAccess http://localhost:4300\n\n\n### Enter inside the `broker-front-end` folder and type:\n```\n$ npm install\n$ ng serve\n```\n\nAccess http://localhost:4200\n\n\n# Images\n\n## Session Control\n\n![image](./documentation/images/broker-session-control.png)\n\n## Session Properties\n\n![image](./documentation/images/broker-session-properties.png)\n\n## Session Messages\n\n![image](./documentation/images/broker-session-messages.png)\n\n## Orders list\n\n### Broker\n\n![image](./documentation/images/broker-orders-list.png)\n\n### Exchange\n\n![image](./documentation/images/exchange-orders-list.png)\n\n## Logs - FIX Events\n\n![image](./documentation/images/broker-logs-events.png)\n\n## Logs - Messages incoming\n\n![image](./documentation/images/broker-logs-incoming-messages.png)\n\n## Broker - Swagger\n\n![image](./documentation/images/broker-swagger.png)\n\n## Exchange - Swagger\n\n![image](./documentation/images/exchange-swagger.png)\n\n\n\n# Help Queries\n\n\n```sql\nselect * from broker.sessions;\nselect * from broker.messages;\nselect * from broker.event_log  order by id desc;\nselect * from broker.messages_log_incoming order by id desc;\nselect * from broker.messages_log_outgoing order by id desc;\n\nselect * from exchange.sessions;\nselect * from exchange.messages;\nselect * from exchange.event_log  order by id desc;\nselect * from exchange.messages_log_incoming order by id desc;\nselect * from exchange.messages_log_outgoing order by id desc;\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelipewind%2Ffix-trading-simulator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffelipewind%2Ffix-trading-simulator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelipewind%2Ffix-trading-simulator/lists"}