{"id":20733049,"url":"https://github.com/wholespace214/crash-game-backend","last_synced_at":"2025-04-23T22:54:51.413Z","repository":{"id":180019320,"uuid":"604239596","full_name":"wholespace214/crash-game-backend","owner":"wholespace214","description":"This is the backend code for Crash Game.","archived":false,"fork":false,"pushed_at":"2023-02-20T16:32:18.000Z","size":3643,"stargazers_count":19,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-23T22:54:40.977Z","etag":null,"topics":["aws","crash","express","game","mongodb","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wholespace214.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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":"2023-02-20T16:21:11.000Z","updated_at":"2024-11-10T09:47:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"6b2919b3-34bd-4ab8-8303-9f4c388450f7","html_url":"https://github.com/wholespace214/crash-game-backend","commit_stats":null,"previous_names":["wholespace214/crash-game-backend"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wholespace214%2Fcrash-game-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wholespace214%2Fcrash-game-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wholespace214%2Fcrash-game-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wholespace214%2Fcrash-game-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wholespace214","download_url":"https://codeload.github.com/wholespace214/crash-game-backend/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250528700,"owners_count":21445511,"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":["aws","crash","express","game","mongodb","nodejs"],"created_at":"2024-11-17T05:23:12.077Z","updated_at":"2025-04-23T22:54:51.397Z","avatar_url":"https://github.com/wholespace214.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Crash Game\n\nThis is the backend code for Crash Game.\n\n# Usage\n\nStep 1: Download repo and install modules\n\n```bash\ngit clone https://github.com/wholespace214/crash-game-backend\ncd crash-game-backend\nnpm install\n```\n\nStep 2: Start the docker containers needed\n\n```\ndocker-compose -f docker/docker-compose.yml up -d\n```\n\nStep 3: Configure the mongo container for replication\n\n```\ndocker exec -it mongodb-wall bash\n\nmongo -u wallfair -p wallfair admin\nuse wallfair\n\nrs.initiate( {\n   _id : \"rs0\",\n   members: [\n      { _id: 0, host: \"localhost:27017\" },\n   ]\n});\n```\n\nStep 4: Run the postgresql config\n\n```\ndocker exec -it docker_postgres_1 bash\npsql -U postgres testdb\n\nCREATE TABLE IF NOT EXISTS token_transactions (ID SERIAL PRIMARY KEY, sender varchar(255) not null, receiver varchar(255) not null, amount bigint not null, symbol varchar(255) not null, trx_timestamp timestamp not null);\nCREATE TABLE IF NOT EXISTS token_balances (owner varchar(255) not null, balance bigint not null, symbol varchar(255) not null, last_update timestamp not null, PRIMARY KEY(owner, symbol));\nCREATE TABLE IF NOT EXISTS bet_reports (bet_id varchar(255) not null PRIMARY KEY, reporter varchar(255) not null, outcome smallint not null, report_timestamp timestamp not null);\nCREATE TABLE IF NOT EXISTS amm_interactions (ID SERIAL PRIMARY KEY, buyer varchar(255) NOT NULL, bet varchar(255) NOT NULL, outcome smallint NOT NULL, direction varchar(10) NOT NULL, investmentAmount bigint NOT NULL, feeAmount bigint NOT NULL, outcomeTokensBought bigint NOT NULL, trx_timestamp timestamp NOT NULL);\nCREATE TABLE IF NOT EXISTS casino_trades (ID SERIAL PRIMARY KEY, userId varchar(255) NOT NULL, crashFactor decimal NOT NULL, stakedAmount bigint NOT NULL, state smallint NOT NULL, gameId varchar(255), created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP);\n```\n\nStep 5: Create a `.env` file (see `.env.example`) and start the server with:\n\n```\n# copy .env file from email\nnpm run start\n```\n\n# Api-Endpoints\n\n### Auth\n\nHeader:\n\"Authorization: Bearer jwtToken\"\n\n## User Endpoints\n### POST http://localhost:8000/api/user/login\n\nRequest:\n```json\n{\n  \"phone\": \"+49123123123\"\n}\n```\n\nSuccessful Result:\n```json\n{\n  \"phone\": \"+49123123123\",\n  \"smsStatus\": \"pending\"\n}\n```\n\n### POST http://localhost:8000/api/user/verifyLogin\n\nRequest:\n```json\n{\n  \"phone\": \"+49123123123\",\n  \"smsToken\": \"013416\"\n}\n```\n\nSuccessful Result:\n```json\n{\n  \"userId\": \"608ae87f8e78eb0224ad3e28\",\n  \"phone\": \"+49123123123\",\n  \"name*\": \"Max\",\n  \"email*\": \"max@max.de\",\n  \"session\": \"jwtToken\"\n}\n```\n\n*Optional only if provided\n\n\n### GET http://localhost:8000/api/user/:userId\n\nSuccessful Result:\n```json\n{\n  \"userId\": \"608ae87f8e78eb0224ad3e28\",\n  \"name*\": \"Max\",\n  \"profilePictureUrl*\": \"https://previewImageUrl.asd\",\n  \"balance\": 900\n}\n```\n\n### GET http://localhost:8000/api/user/history\n\nSuccessful Result:\n```json\n[\n    {\n        \"id\": 1,\n        \"buyer\": \"60cf4588bf102d5fc4c1b475\",\n        \"bet\": \"60cf46a61ef95168648364ab\",\n        \"outcome\": \"yes\",\n        \"direction\": \"BUY\",\n        \"investmentamount\": \"100000\",\n        \"feeamount\": \"1000\",\n        \"outcometokensbought\": \"197902\",\n        \"trx_timestamp\": \"2021-06-20T13:47:38.937Z\"\n    },\n    {\n        \"id\": 2,\n        \"buyer\": \"60cf4588bf102d5fc4c1b475\",\n        \"bet\": \"60cf46a61ef95168648364ab\",\n        \"outcome\": \"yes\",\n        \"direction\": \"SELL\",\n        \"investmentamount\": \"49541\",\n        \"feeamount\": \"1000\",\n        \"outcometokensbought\": \"100000\",\n        \"trx_timestamp\": \"2021-06-20T19:20:08.487Z\"\n    }\n]\n```\n\n\n### GET http://localhost:8000/api/user/refList\n\nSuccessful Result:\n```json\n{\n  \"userId\": \"60b50d820619b44617959d43\",\n  \"refList\": [\n    {\n      \"id\": \"60b50d820619b44617959d43\",\n      \"name\": \"Nicholas\",\n      \"email\": \"nicholas@wallfair.io\"\n    }\n  ]\n}\n```\n\n*Optional only if provided\n\n\n## Event Endpoints\n### GET http://localhost:8000/api/event/get/ID\n\nSuccessful Result:\n```json\n{\n  \"_id\": \"6091c24cae92745024088c74\",\n  \"title\": \"test\",\n  \"liveMode\": true,\n  \"liveStreamUrl\": \"https://www.google.de/\",\n  \"endDate\": \"1999-12-31T23:00:00.000Z\",\n  \"date\": \"2021-05-04T21:53:16.734Z\",\n  \"__v\": 0\n}\n```\n\n### GET http://localhost:8000/api/event/list\n\nSuccessful Result:\n```json\n[\n  {\n    \"bets\": [\n      {\n        \"_id\": \"60a7ff5364dee4f956660797\",\n        \"marketQuestion\": \"Wer gewinnt Redbull\",\n        \"hot\": true,\n        \"outcomes\": [\n          {\n            \"index\": 0,\n            \"name\": \"Jonas\"\n          },\n          {\n            \"index\": 0,\n            \"name\": \"Jörn\"\n          }\n        ],\n        \"event\": \"60a7f9bdc0a1a7f8913b4a23\",\n        \"creator\": \"60a35b31bbb1f700155f2066\",\n        \"date\": \"2021-05-21T18:43:31.908Z\",\n        \"__v\": 0\n      },\n      {\n        \"_id\": \"60a7ffb464dee4f956660799\",\n        \"marketQuestion\": \"Wer gewinnt Redbull2\",\n        \"hot\": true,\n        \"outcomes\": [\n          {\n            \"index\": 0,\n            \"name\": \"Jonas\"\n          },\n          {\n            \"index\": 0,\n            \"name\": \"Jörn\"\n          }\n        ],\n        \"event\": \"60a7f9bdc0a1a7f8913b4a23\",\n        \"creator\": \"60a35b31bbb1f700155f2066\",\n        \"date\": \"2021-05-21T18:45:08.324Z\",\n        \"__v\": 0\n      }\n    ],\n    \"_id\": \"60a7f9bdc0a1a7f8913b4a23\",\n    \"name\": \"Redbull\",\n    \"tags\": [\n      {\n        \"_id\": \"60a7f9bdc0a1a7f8913b4a24\",\n        \"name\": \"jo\"\n      },\n      {\n        \"_id\": \"60a7f9bdc0a1a7f8913b4a25\",\n        \"name\": \"joooo\"\n      }\n    ],\n    \"previewImageUrl\": \"https://previewImageUrl.asd\",\n    \"streamUrl\": \"https://google.com\",\n    \"date\": \"2021-05-21T18:19:41.671Z\",\n    \"__v\": 2\n  }\n]\n```\n\n### GET http://localhost:8000/api/event/list/:type/:category/:count/:page/:sortby/:searchQuery\n\n* :type can be 'all', 'streamed', 'non-streamed', 'game'\n* :category can be 'all', 'streamed-esports', 'streamed-shooter', 'streamed-mmorpg', 'streamed-other', 'sports', 'politics', 'crypto', 'celebrities', 'other'\n* :searchQuery is optional\n* :page is 1-based\n* :sortby is an Event property to be used in mongoose syntax (ex: name (asc), -name (desc))\n\nSuccessful Result:\n```json\n[\n    {\n        \"_id\": \"6107e58bf0a40958ecaab7f3\",\n        \"bets\": [\n            \"6107e5c9f0a40958ecaab932\",\n            \"6107e704f0a40958ecaac05a\"\n        ],\n        \"name\": \"FIFA Match CyrusTwo\",\n        \"streamUrl\": \"...\",\n        \"previewImageUrl\": \"...\",\n        \"tags\": [\n            {\n                \"_id\": \"6107e58bf0a40958ecaab7f4\",\n                \"name\": \"fifa\"\n            },\n            {\n                \"_id\": \"6107e58bf0a40958ecaab7f5\",\n                \"name\": \"soccer\"\n            }\n        ],\n        \"date\": \"2021-08-02T22:00:00.000Z\",\n        \"__v\": 2,\n        \"category\": \"Esports\",\n        \"type\": \"streamed\"\n    }\n]\n```\n\n### POST http://localhost:8000/api/event/create\n\nRequest:\n```json\n{\n  \"name\": \"Redbull\",\n  \"tags\": [\n    { \"name\": \"jo\" },\n    { \"name\": \"joooo\" }\n  ],\n  \"streamUrl\": \"https://google.com\",\n  \"previewImageUrl\": \"https://previewImageUrl.asd\"\n}\n```\n\nSuccessful Result:\n```json\n{\n  \"_id\": \"60a7f9bdc0a1a7f8913b4a23\",\n  \"name\": \"Redbull\",\n  \"tags\": [\n    {\n      \"_id\": \"60a7f9bdc0a1a7f8913b4a24\",\n      \"name\": \"jo\"\n    },\n    {\n      \"_id\": \"60a7f9bdc0a1a7f8913b4a25\",\n      \"name\": \"joooo\"\n    }\n  ],\n  \"previewImageUrl\": \"https://previewImageUrl.asd\",\n  \"streamUrl\": \"https://google.com\",\n  \"bets\": [],\n  \"date\": \"2021-05-21T18:19:41.671Z\",\n  \"__v\": 0\n}\n```\n\n## Bet Endpoints\n### POST http://localhost:8000/api/event/bet/create\n\nRequest:\n```json\n{\n  \"eventId\": \"60a7f9bdc0a1a7f8913b4a23\",\n  \"marketQuestion\": \"Wer gewinnt Redbull\",\n  \"hot\": true,\n  \"outcomes\": [\n    {\n      \"index\": 0,\n      \"name\": \"Jonas\"\n    },\n    {\n      \"index\": 0,\n      \"name\": \"Jörn\"\n    }\n  ],\n  \"endDate\": \"1621622318001\"\n}\n```\n\nSuccessful Result:\n```json\n{\n  \"bets\": [\n    {\n      \"_id\": \"60a7ff5364dee4f956660797\",\n      \"marketQuestion\": \"Wer gewinnt Redbull\",\n      \"hot\": true,\n      \"outcomes\": [\n        {\n          \"index\": 0,\n          \"name\": \"Jonas\"\n        },\n        {\n          \"index\": 0,\n          \"name\": \"Jörn\"\n        }\n      ],\n      \"event\": \"60a7f9bdc0a1a7f8913b4a23\",\n      \"creator\": \"60a35b31bbb1f700155f2066\",\n      \"date\": \"2021-05-21T18:43:31.908Z\",\n      \"__v\": 0\n    },\n    {\n      \"_id\": \"60a7ffb464dee4f956660799\",\n      \"marketQuestion\": \"Wer gewinnt Redbull2\",\n      \"hot\": true,\n      \"outcomes\": [\n        {\n          \"index\": 0,\n          \"name\": \"Jonas\"\n        },\n        {\n          \"index\": 0,\n          \"name\": \"Jörn\"\n        }\n      ],\n      \"event\": \"60a7f9bdc0a1a7f8913b4a23\",\n      \"creator\": \"60a35b31bbb1f700155f2066\",\n      \"date\": \"2021-05-21T18:45:08.324Z\",\n      \"__v\": 0\n    }\n  ],\n  \"_id\": \"60a7f9bdc0a1a7f8913b4a23\",\n  \"name\": \"Redbull\",\n  \"tags\": [\n    {\n      \"_id\": \"60a7f9bdc0a1a7f8913b4a24\",\n      \"name\": \"jo\"\n    },\n    {\n      \"_id\": \"60a7f9bdc0a1a7f8913b4a25\",\n      \"name\": \"joooo\"\n    }\n  ],\n  \"previewImageUrl\": \"https://previewImageUrl.asd\",\n  \"streamUrl\": \"https://google.com\",\n  \"date\": \"2021-05-21T18:19:41.671Z\",\n  \"__v\": 2\n}\n```\n\n### POST http://localhost:8000/api/event/bet/:id/place\nRequest:\n```json\n{\n  \"amount\": 10,\n  \"outcome\": 1,\n  \"minOutcomeTokens*\": 400\n}\n```\n\n*Optional\n\nSuccessful Result:\n```json\n{\n  \"_id\": \"60a7ff5364dee4f956660797\",\n  \"marketQuestion\": \"Wer gewinnt Redbull\",\n  \"hot\": true,\n  \"outcomes\": [\n    {\n      \"index\": 0,\n      \"name\": \"Jonas\"\n    },\n    {\n      \"index\": 0,\n      \"name\": \"Jörn\"\n    }\n  ],\n  \"event\": \"60a7f9bdc0a1a7f8913b4a23\",\n  \"creator\": \"60a35b31bbb1f700155f2066\",\n  \"date\": \"2021-05-21T18:43:31.908Z\",\n  \"__v\": 0\n}\n```\n\n### POST http://localhost:8000/api/event/bet/:id/pullout\nRequest:\n```json\n{\n  \"amount\": 10,\n  \"outcome\": 1,\n  \"minReturnAmount*\": 400\n}\n```\n\n*Optional\n\nSuccessful Result:\n```json\n{\n  \"_id\": \"60a7ff5364dee4f956660797\",\n  \"marketQuestion\": \"Wer gewinnt Redbull\",\n  \"hot\": true,\n  \"outcomes\": [\n    {\n      \"index\": 0,\n      \"name\": \"Jonas\"\n    },\n    {\n      \"index\": 0,\n      \"name\": \"Jörn\"\n    }\n  ],\n  \"event\": \"60a7f9bdc0a1a7f8913b4a23\",\n  \"creator\": \"60a35b31bbb1f700155f2066\",\n  \"date\": \"2021-05-21T18:43:31.908Z\",\n  \"__v\": 0\n}\n```\n\n### POST http://localhost:8000/api/event/bet/:id/outcomes/buy\nRequest:\n```json\n{\n  \"amount\": 10\n}\n```\nDer \"amount\" ist in WFAIR andgegeben\n\nSuccessful Result:\n```json\n[\n  {\n    \"index\": 0,\n    \"outcome\": 9.10\n  },\n  {\n    \"index\": 1,\n    \"outcome\": 9.21\n  }\n]\n```\n\n### POST http://localhost:8000/api/event/bet/:id/outcomes/sell\nRequest:\n```json\n{\n  \"amount\": 10\n}\n```\nDer \"amount\" ist in Outcome-Token (Potential Winnings) andgegeben\n\nSuccessful Result:\n```json\n[\n  {\n    \"index\": 0,\n    \"outcome\": 9.10\n  },\n  {\n    \"index\": 1,\n    \"outcome\": 9.21\n  }\n]\n```\n\n### GET http://localhost:8000/api/event/bet/:id/payout\n\nSuccessful Result:\n```json\n{\n  \"_id\": \"60a7ff5364dee4f956660797\",\n  \"marketQuestion\": \"Wer gewinnt Redbull\",\n  \"hot\": true,\n  \"outcomes\": [\n    {\n      \"index\": 0,\n      \"name\": \"Jonas\"\n    },\n    {\n      \"index\": 1,\n      \"name\": \"Jörn\"\n    }\n  ],\n  \"event\": \"60a7f9bdc0a1a7f8913b4a23\",\n  \"creator\": \"60a35b31bbb1f700155f2066\",\n  \"date\": \"2021-05-21T18:43:31.908Z\",\n  \"__v\": 0\n}\n```\n\n\n### GET http://localhost:8000/api/user/confirm-email/?userId=${userId}\u0026code=${code}\n\nSuccessful Result:\n```json\n{\"status\":\"OK\"}\n```\nError Results:\n```json\n{\n  \"errors\": [\n    {\n      \"msg\": \"Invalid value\",\n      \"param\": \"userId\",\n      \"location\": \"body\"\n    },\n    {\n      \"msg\": \"Invalid value\",\n      \"param\": \"code\",\n      \"location\": \"body\"\n    }\n  ]\n}\n```\n```json\n{\n  \"error\": \"EMAIL_ALREADY_CONFIRMED\",\n  \"message\": \"The email has already been confirmed!\"\n}\n```\n```json\n{\n  \"error\": \"INVALID_EMAIL_CODE\",\n  \"message\": \"The email code is invalid!\"\n}\n```\n### GET http://localhost:8000/api/user/resend-confirm/\nSuccessful Result:\n```json\n{\"status\":\"OK\"}\n```\n\n### POST http://localhost:8000/api/event/extract/twitch\n```json\n{\n    \"streamUrl\": \"https://www.twitch.tv/chess\"\n}\n```\n\nSuccessful Result:\n```json\n{\n    \"name\": \"Chess\",\n    \"previewImageUrl\": \"https://static-cdn.jtvnw.net/jtv_user_pictures/6eb1c704-e4b4-4269-9e26-ec762668fb79-channel_offline_image-1920x1080.png\",\n    \"streamUrl\": \"https://www.twitch.tv/chess\",\n    \"tags\": [\n        {\n            \"name\": \"Esports\"\n        },\n        {\n            \"name\": \"English\"\n        }\n    ],\n    \"date\": 1629448490358,\n    \"type\": \"streamed\",\n    \"category\": \"Chess\"\n}\n```\n\n### GET http://localhost:8000/api/rewards/questions\nSuccessful Result:\n```json\n[\n  {\n    \"closed\": false,\n    \"_id\": \"613efc97cbad81c04dbf7198\",\n    \"title\": \"Do you like wallfair?\",\n    \"questions\": [\n      {\n        \"index\": 0,\n        \"name\": \"Yes\",\n        \"imageUrl\": \"https://photostorage.mock/457y8hurbge8h79j2w8\"\n      },\n      {\n        \"index\": 1,\n        \"name\": \"No\",\n        \"imageUrl\": \"https://photostorage.mock/457f87h7n4789fh3nw8\"\n      }\n    ],\n    \"createdAt\": \"1631517847345\",\n    \"closedAt\": \"1631517847345\"\n  }\n]\n```\n\n### POST http://localhost:8000/api/rewards/answer\n```json\n{\n  \"answerId\": 1,\n  \"questionId\": \"613efc97cbad81c04dbf7198\",\n}\n```\n\nSuccessful Result: Lottery Ticket ID\n```json\n{\n  \"id\":\"613f0bc91612edc558d0e5c9\"\n}\n```\n\n### GET http://localhost:8000/api/bet-template\n\nSuccessful Result: Lottery Ticket ID\n```json\n[{\n  \"_id\": \"613f0bc91612edc558d0e5c9\",\n  \"marketQuestion\": \"Who will win?\",\n  \"name\": \"winner template\",\n  \"category\": \"counter-strike\",\n  \"outcomes\": [\n    {\n      \"index\": 0,\n      \"name\": \"Team A\",\n    },\n    {\n      \"index\": 1,\n      \"name\": \"Team B\",\n    }\n  ]\n}]\n```\n\n\n# Auth Endpoints\n### POST http://localhost:8000/api/auth/login\n```json\n{\n  \"username\": \"foo\",\n  \"password\": \"bar\",\n}\n```\nSuccessful Result:\n```json\n[\n  {\n    \"userId\": \"613efc97cbad81c04dbf7198\",\n    \"session\": \"\"\n  }\n]\n```\n### POST http://localhost:8000/api/auth/sign-up\n```json\n{\n  \"username\": \"foo\",\n  \"password\": \"bar\",\n  \"passwordConfirm\": \"bar\",\n}\n```\nSuccessful Result:\n```json\n[\n  {\n    \"userId\": \"613efc97cbad81c04dbf7198\",\n    \"email\": \"user@example.com\"\n  }\n]\n```\n### POST http://localhost:8000/api/auth/verify-email\n```json\n{\n  \"email\": \"user@example.com\"\n}\n```\n### POST http://localhost:8000/api/auth/reset-password\n```json\n{\n  \"email\": \"user@example.com\"\n}\n```\n### GET http://localhost:8000/api/user/:userId/stats\nExample response\n```json\n{\n  \"userId\": \"6167e53e758b98bbbccf11d3\",\n  \"username\": \"tester50\",\n  \"stats\": {\n    \"casinoGamePlayCount\": 0,\n    \"casinoGameCashoutCount\": 0,\n    \"casinoGamesAmountWon\": {\n      \"totalWon\": 0,\n      \"totalReward\": 0,\n      \"totalStaked\": 0\n    },\n    \"casinoGamesAmountLost\": 0,\n    \"userBetsAmount\": {\n      \"totalBettedAmount\": 20035,\n      \"totalBets\": 50,\n      \"totalOutcomeAmount\": 39575.6393\n    },\n    \"userBetsCashouts\": {\n      \"totalAmount\": 15300.8771,\n      \"totalCashouts\": 8\n    },\n    \"userBetsRewards\": {\n      \"totalWonAmount\": 0,\n      \"totalRewards\": 0\n    }\n  }\n}\n```\n\n## Example link with email confirmation:\n```txt\nhttp://localhost:8000/api/user/confirm-email/?userId=615c3d8d8b6d8bc4066046b1\u0026code=555555\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwholespace214%2Fcrash-game-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwholespace214%2Fcrash-game-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwholespace214%2Fcrash-game-backend/lists"}