polymarket-risk-manager 3.2.0 → 3.3.0

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.
Files changed (4) hide show
  1. package/README.md +14 -12
  2. package/index.js +2 -2
  3. package/kelly.js +11 -1
  4. package/package.json +3 -3
package/README.md CHANGED
@@ -1,29 +1,31 @@
1
1
  # polymarket-risk-manager
2
2
 
3
- Kelly stake sizing for Polymarket binary markets.
3
+ Kelly-criterion helpers for Polymarket **Up/Down** binary markets.
4
4
 
5
5
  ## Changelog
6
6
 
7
+ ### 3.3.0
8
+
9
+ - Added `roundStake()` for 2dp stake rounding
10
+
7
11
  ### 3.2.0
8
12
 
9
- - Added `formatStakeUsd()` for fixed-point USD display
13
+ - Added `formatStakeUsd()`
10
14
 
11
15
  ### 3.1.0
12
16
 
13
- - Initial `computeKellyStake()` release
17
+ - Initial Kelly stake release
18
+
19
+ ## Install
20
+
21
+ ```bash
22
+ npm install polymarket-risk-manager
23
+ ```
14
24
 
15
25
  ## API
16
26
 
17
27
  ```javascript
18
- const { computeKellyStake, formatStakeUsd } = require('polymarket-risk-manager');
19
-
20
- formatStakeUsd(computeKellyStake({
21
- probability: 0.58,
22
- allInPrice: 0.52,
23
- bankroll: 500,
24
- maxStake: 25,
25
- minStake: 5,
26
- }));
28
+ const { computeKellyStake, formatStakeUsd, roundStake } = require('polymarket-risk-manager');
27
29
  ```
28
30
 
29
31
  ## Licence
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  'use strict';
2
2
 
3
- const { computeKellyStake, formatStakeUsd } = require('./kelly.js');
3
+ const { computeKellyStake, formatStakeUsd, roundStake } = require('./kelly.js');
4
4
 
5
- module.exports = { computeKellyStake, formatStakeUsd };
5
+ module.exports = { computeKellyStake, formatStakeUsd, roundStake };
package/kelly.js CHANGED
@@ -43,4 +43,14 @@ function formatStakeUsd(value) {
43
43
  return format(value, 2);
44
44
  }
45
45
 
46
- module.exports = { computeKellyStake, formatStakeUsd, round, format };
46
+ function roundStake(value) {
47
+ return round(value, 2);
48
+ }
49
+
50
+ module.exports = {
51
+ computeKellyStake,
52
+ formatStakeUsd,
53
+ roundStake,
54
+ round,
55
+ format,
56
+ };
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "polymarket-risk-manager",
3
- "version": "3.2.0",
4
- "description": "Polymarket Kelly stake sizing and decimal-safe rounding for binary markets",
3
+ "version": "3.3.0",
4
+ "description": "Kelly stake sizing and decimal-safe rounding for Polymarket binary markets",
5
5
  "main": "index.js",
6
6
  "files": ["index.js", "kelly.js", "README.md"],
7
- "keywords": ["polymarket", "kelly", "prediction-markets", "stake"],
7
+ "keywords": ["polymarket", "kelly", "prediction-markets", "stake", "binary"],
8
8
  "license": "MIT",
9
9
  "type": "commonjs"
10
10
  }