overtime-live-trading-utils 1.1.36 → 1.1.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.circleci/config.yml +30 -30
- package/.prettierrc +9 -9
- package/codecov.yml +20 -20
- package/index.ts +16 -16
- package/jest.config.ts +16 -16
- package/main.js +1 -1
- package/package.json +29 -29
- package/src/constants/common.ts +10 -10
- package/src/constants/errors.ts +5 -5
- package/src/constants/sports.ts +2241 -2109
- package/src/enums/sports.ts +317 -306
- package/src/tests/mock/MockLeagueMap.ts +77 -77
- package/src/tests/mock/MockOpticSoccer.ts +9342 -9342
- package/src/tests/mock/MockSoccerRedis.ts +2309 -2309
- package/src/tests/unit/bookmakers.test.ts +77 -77
- package/src/tests/unit/markets.test.ts +133 -133
- package/src/tests/unit/odds.test.ts +92 -92
- package/src/tests/unit/sports.test.ts +47 -47
- package/src/tests/unit/spread.test.ts +131 -131
- package/src/types/odds.ts +50 -50
- package/src/types/sports.ts +18 -18
- package/src/utils/bookmakers.ts +153 -153
- package/src/utils/constraints.ts +186 -186
- package/src/utils/gameMatching.ts +88 -88
- package/src/utils/markets.ts +110 -110
- package/src/utils/odds.ts +470 -470
- package/src/utils/opticOdds.ts +102 -102
- package/src/utils/sports.ts +83 -83
- package/src/utils/spread.ts +92 -92
- package/tsconfig.json +12 -12
- package/webpack.config.js +24 -24
package/package.json
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "overtime-live-trading-utils",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"description": "",
|
|
5
|
-
"main": "main.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"pack": "webpack --mode production",
|
|
8
|
-
"prepublish": "npm run pack",
|
|
9
|
-
"test": "jest"
|
|
10
|
-
},
|
|
11
|
-
"author": "",
|
|
12
|
-
"license": "MIT",
|
|
13
|
-
"dependencies": {
|
|
14
|
-
"@types/node": "^20.8.10",
|
|
15
|
-
"bytes32": "^0.0.3",
|
|
16
|
-
"oddslib": "^2.1.1",
|
|
17
|
-
"react": "^17.0.1"
|
|
18
|
-
},
|
|
19
|
-
"devDependencies": {
|
|
20
|
-
"@types/jest": "^29.5.14",
|
|
21
|
-
"jest": "^29.7.0",
|
|
22
|
-
"ts-jest": "^29.2.5",
|
|
23
|
-
"ts-loader": "^9.5.0",
|
|
24
|
-
"ts-node": "^10.9.2",
|
|
25
|
-
"typescript": "^4.5.5",
|
|
26
|
-
"webpack": "^5.89.0",
|
|
27
|
-
"webpack-cli": "^5.1.4"
|
|
28
|
-
}
|
|
29
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "overtime-live-trading-utils",
|
|
3
|
+
"version": "1.1.38",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "main.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"pack": "webpack --mode production",
|
|
8
|
+
"prepublish": "npm run pack",
|
|
9
|
+
"test": "jest"
|
|
10
|
+
},
|
|
11
|
+
"author": "",
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"@types/node": "^20.8.10",
|
|
15
|
+
"bytes32": "^0.0.3",
|
|
16
|
+
"oddslib": "^2.1.1",
|
|
17
|
+
"react": "^17.0.1"
|
|
18
|
+
},
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@types/jest": "^29.5.14",
|
|
21
|
+
"jest": "^29.7.0",
|
|
22
|
+
"ts-jest": "^29.2.5",
|
|
23
|
+
"ts-loader": "^9.5.0",
|
|
24
|
+
"ts-node": "^10.9.2",
|
|
25
|
+
"typescript": "^4.5.5",
|
|
26
|
+
"webpack": "^5.89.0",
|
|
27
|
+
"webpack-cli": "^5.1.4"
|
|
28
|
+
}
|
|
29
|
+
}
|
package/src/constants/common.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export const ZERO = 0;
|
|
2
|
-
export const DRAW = 'Draw';
|
|
3
|
-
export const MONEYLINE_TYPE_ID = 0;
|
|
4
|
-
export const MIN_ODDS_FOR_DIFF_CHECKING = 0.2;
|
|
5
|
-
export const TAG_CHILD_SPREAD = 10001;
|
|
6
|
-
export const TAG_CHILD_TOTALS = 10002;
|
|
7
|
-
export const MULTIPLIER_100 = 100;
|
|
8
|
-
|
|
9
|
-
export const OPTIC_ODDS_ID_SEPARATOR = ':';
|
|
10
|
-
export const OVERTIME_ID_SEPARATOR = '_';
|
|
1
|
+
export const ZERO = 0;
|
|
2
|
+
export const DRAW = 'Draw';
|
|
3
|
+
export const MONEYLINE_TYPE_ID = 0;
|
|
4
|
+
export const MIN_ODDS_FOR_DIFF_CHECKING = 0.2;
|
|
5
|
+
export const TAG_CHILD_SPREAD = 10001;
|
|
6
|
+
export const TAG_CHILD_TOTALS = 10002;
|
|
7
|
+
export const MULTIPLIER_100 = 100;
|
|
8
|
+
|
|
9
|
+
export const OPTIC_ODDS_ID_SEPARATOR = ':';
|
|
10
|
+
export const OVERTIME_ID_SEPARATOR = '_';
|
package/src/constants/errors.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export const ZERO_ODDS_MESSAGE = 'Returning zero odds cause bookmakers have 0 or 1 odds';
|
|
2
|
-
export const DIFF_BETWEEN_BOOKMAKERS_MESSAGE = 'Returning zero odds due to percentage difference between bookmakers';
|
|
3
|
-
export const NO_MATCHING_BOOKMAKERS_MESSAGE = 'Returning zero odds cause no matching bookmakers have been found';
|
|
4
|
-
export const ZERO_ODDS_AFTER_SPREAD_ADJUSTMENT = 'Bad odds after spread adjustment';
|
|
5
|
-
export const NO_MARKETS_FOR_LEAGUE_ID = 'No child markets for leagueID: 9806';
|
|
1
|
+
export const ZERO_ODDS_MESSAGE = 'Returning zero odds cause bookmakers have 0 or 1 odds';
|
|
2
|
+
export const DIFF_BETWEEN_BOOKMAKERS_MESSAGE = 'Returning zero odds due to percentage difference between bookmakers';
|
|
3
|
+
export const NO_MATCHING_BOOKMAKERS_MESSAGE = 'Returning zero odds cause no matching bookmakers have been found';
|
|
4
|
+
export const ZERO_ODDS_AFTER_SPREAD_ADJUSTMENT = 'Bad odds after spread adjustment';
|
|
5
|
+
export const NO_MARKETS_FOR_LEAGUE_ID = 'No child markets for leagueID: 9806';
|