@anrmk/str-package 0.1.6 → 0.1.9

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.
@@ -21,22 +21,6 @@ type TChallengeClosedPnl = {
21
21
  updatedTime: string;
22
22
  updatedAt: string;
23
23
  };
24
- type TChallengeClosedPnlStatistics = {
25
- totalClosedTradesCount: number;
26
- totalClosedTrades: number;
27
- totalLongTrades: number;
28
- totalLongTradesCount: number;
29
- totalLongWins: number;
30
- totalShortTrades: number;
31
- totalShortTradesCount: number;
32
- totalShortWins: number;
33
- totalWins: number;
34
- totalLosses: number;
35
- winRate: number;
36
- loosesRate: number;
37
- totalCumEntryValue: number;
38
- totalCumExitValue: number;
39
- };
40
24
 
41
25
  type TChallengeWalletBalance = {
42
26
  challengeId: string;
@@ -75,4 +59,4 @@ type TChallengeProgress = {
75
59
  dailyMinUpdatedAt: string;
76
60
  };
77
61
 
78
- export type { TChallengeClosedPnl as T, TChallengeClosedPnlStatistics as a, TChallengeProgress as b, TChallengeWalletBalance as c };
62
+ export type { TChallengeClosedPnl as T, TChallengeProgress as a, TChallengeWalletBalance as b };
@@ -21,22 +21,6 @@ type TChallengeClosedPnl = {
21
21
  updatedTime: string;
22
22
  updatedAt: string;
23
23
  };
24
- type TChallengeClosedPnlStatistics = {
25
- totalClosedTradesCount: number;
26
- totalClosedTrades: number;
27
- totalLongTrades: number;
28
- totalLongTradesCount: number;
29
- totalLongWins: number;
30
- totalShortTrades: number;
31
- totalShortTradesCount: number;
32
- totalShortWins: number;
33
- totalWins: number;
34
- totalLosses: number;
35
- winRate: number;
36
- loosesRate: number;
37
- totalCumEntryValue: number;
38
- totalCumExitValue: number;
39
- };
40
24
 
41
25
  type TChallengeWalletBalance = {
42
26
  challengeId: string;
@@ -75,4 +59,4 @@ type TChallengeProgress = {
75
59
  dailyMinUpdatedAt: string;
76
60
  };
77
61
 
78
- export type { TChallengeClosedPnl as T, TChallengeClosedPnlStatistics as a, TChallengeProgress as b, TChallengeWalletBalance as c };
62
+ export type { TChallengeClosedPnl as T, TChallengeProgress as a, TChallengeWalletBalance as b };
package/dist/index.d.cts CHANGED
@@ -4,6 +4,6 @@ export { createDefaultProgress, createDefaultWallet, currentDailyEquity, trading
4
4
  export { isSameUtcDay, parseNumber, toIsoDate } from './utils/helper.cjs';
5
5
  export { TSyncResponse } from './types/index.cjs';
6
6
  export { IBybitAccountInfo, IBybitApiKeyInfo, IBybitApiResponse, IBybitApiResponseList, IBybitClosedPnl, IBybitClosedPnlRequest, IBybitClosedPnlResponse, IBybitCoinBalance, IBybitCredentials, IBybitDemoApplyMoneyItem, IBybitDemoApplyMoneyPayload, IBybitDemoApplyMoneyRequest, IBybitDemoApplyMoneyResponse, IBybitPositionInfo, IBybitWalletAccount, IBybitWalletResponse } from './types/bybit/index.cjs';
7
- export { TChallengeAccountInfo, TChallengeApiKeyInfo, TChallengeCapital, TChallengeItem, TChallengeListItem, TChallengeMode, TChallengePositionInfo, TChallengeProvider, TChallengeRule, TChallengeStatistics, TChallengeType, TDrawdownType, TTradingType } from './types/challenge/index.cjs';
8
- export { T as TChallengeClosedPnl, a as TChallengeClosedPnlStatistics, b as TChallengeProgress, c as TChallengeWalletBalance } from './TChallengeProgress-hdTUsqAj.cjs';
7
+ export { TChallengeAccountInfo, TChallengeApiKeyInfo, TChallengeCapital, TChallengeItem, TChallengeListItem, TChallengeMode, TChallengePositionInfo, TChallengeProvider, TChallengeRule, TChallengeStatistics, TChallengeStatus, TChallengeType, TDrawdownType, TTradingType } from './types/challenge/index.cjs';
8
+ export { T as TChallengeClosedPnl, a as TChallengeProgress, b as TChallengeWalletBalance } from './TChallengeProgress-C_DBsbUa.cjs';
9
9
  export { I as IBybitAccountType, a as IBybitApiKeyVipLevel, b as IBybitCoinType } from './enums--bdw39rp.cjs';
package/dist/index.d.ts CHANGED
@@ -4,6 +4,6 @@ export { createDefaultProgress, createDefaultWallet, currentDailyEquity, trading
4
4
  export { isSameUtcDay, parseNumber, toIsoDate } from './utils/helper.js';
5
5
  export { TSyncResponse } from './types/index.js';
6
6
  export { IBybitAccountInfo, IBybitApiKeyInfo, IBybitApiResponse, IBybitApiResponseList, IBybitClosedPnl, IBybitClosedPnlRequest, IBybitClosedPnlResponse, IBybitCoinBalance, IBybitCredentials, IBybitDemoApplyMoneyItem, IBybitDemoApplyMoneyPayload, IBybitDemoApplyMoneyRequest, IBybitDemoApplyMoneyResponse, IBybitPositionInfo, IBybitWalletAccount, IBybitWalletResponse } from './types/bybit/index.js';
7
- export { TChallengeAccountInfo, TChallengeApiKeyInfo, TChallengeCapital, TChallengeItem, TChallengeListItem, TChallengeMode, TChallengePositionInfo, TChallengeProvider, TChallengeRule, TChallengeStatistics, TChallengeType, TDrawdownType, TTradingType } from './types/challenge/index.js';
8
- export { T as TChallengeClosedPnl, a as TChallengeClosedPnlStatistics, b as TChallengeProgress, c as TChallengeWalletBalance } from './TChallengeProgress-CFlK7XnZ.js';
7
+ export { TChallengeAccountInfo, TChallengeApiKeyInfo, TChallengeCapital, TChallengeItem, TChallengeListItem, TChallengeMode, TChallengePositionInfo, TChallengeProvider, TChallengeRule, TChallengeStatistics, TChallengeStatus, TChallengeType, TDrawdownType, TTradingType } from './types/challenge/index.js';
8
+ export { T as TChallengeClosedPnl, a as TChallengeProgress, b as TChallengeWalletBalance } from './TChallengeProgress-UmIOnrHy.js';
9
9
  export { I as IBybitAccountType, a as IBybitApiKeyVipLevel, b as IBybitCoinType } from './enums--bdw39rp.js';
@@ -1,6 +1,6 @@
1
1
  import { a as IBybitApiKeyVipLevel } from '../../enums--bdw39rp.cjs';
2
- import { b as TChallengeProgress, c as TChallengeWalletBalance } from '../../TChallengeProgress-hdTUsqAj.cjs';
3
- export { T as TChallengeClosedPnl, a as TChallengeClosedPnlStatistics } from '../../TChallengeProgress-hdTUsqAj.cjs';
2
+ import { a as TChallengeProgress, b as TChallengeWalletBalance } from '../../TChallengeProgress-C_DBsbUa.cjs';
3
+ export { T as TChallengeClosedPnl } from '../../TChallengeProgress-C_DBsbUa.cjs';
4
4
  export { TSyncResponse } from '../index.cjs';
5
5
 
6
6
  type TChallengeType = "ONE_STEP" | "TWO_STEPS";
@@ -9,6 +9,7 @@ type TTradingType = "Futures" | "Spot" | "Margin" | "Options";
9
9
  type TDrawdownType = "Trailing" | "Fixed";
10
10
  type TChallengeCapital = 5000 | 10000 | 25000 | 50000 | 100000 | 200000;
11
11
  type TChallengeProvider = "BYBIT" | "CLEO";
12
+ type TChallengeStatus = "ACTIVE" | "EXPIRED" | "COMPLETED" | "FAILED";
12
13
  type TChallengeRule = {
13
14
  name: string;
14
15
  type: TChallengeType;
@@ -93,7 +94,8 @@ type TChallengeItem = {
93
94
  currency: string;
94
95
  ttype: TTradingType;
95
96
  ddtype: TDrawdownType;
96
- status: string;
97
+ readonly status: TChallengeStatus;
98
+ readonly statusDescription: string;
97
99
  provider: string;
98
100
  startDate: string;
99
101
  endDate: string;
@@ -104,7 +106,7 @@ type TChallengeItem = {
104
106
  hasCredentials: boolean;
105
107
  apiKeyHint?: string;
106
108
  apiKeyInfo?: TChallengeApiKeyInfo;
107
- stats?: TChallengeStatistics;
109
+ statistics?: TChallengeStatistics;
108
110
  progress?: TChallengeProgress;
109
111
  rule?: TChallengeRule;
110
112
  wallet?: TChallengeWalletBalance;
@@ -115,7 +117,8 @@ type TChallengeListItem = {
115
117
  currency: string | null;
116
118
  ttype: TTradingType | null;
117
119
  ddtype: TDrawdownType | null;
118
- status: string;
120
+ readonly status: TChallengeStatus;
121
+ readonly statusDescription: string;
119
122
  provider: string;
120
123
  startDate: string;
121
124
  endDate: string | null;
@@ -123,18 +126,30 @@ type TChallengeListItem = {
123
126
  daysRemaining: number | null;
124
127
  apiKeyHint?: string;
125
128
  hasCredentials: boolean;
126
- stats?: TChallengeStatistics | null;
129
+ statistics?: TChallengeStatistics | null;
127
130
  progress?: TChallengeProgress | null;
128
131
  rule?: TChallengeRule | null;
129
132
  wallet?: TChallengeWalletBalance | null;
130
133
  };
131
134
 
132
135
  type TChallengeStatistics = {
133
- equity: number;
134
- balance: number;
135
- dailyDrawdown: number;
136
- maxDrawdown: number;
137
- currency?: string;
136
+ readonly id: string | null;
137
+ readonly challengeId: string;
138
+ totalClosedTradesCount: number;
139
+ totalClosedTrades: number;
140
+ totalLongTradesCount: number;
141
+ totalShortTradesCount: number;
142
+ totalWins: number;
143
+ totalLosses: number;
144
+ winRate: number;
145
+ totalLongTrades: number;
146
+ totalLongWins: number;
147
+ totalShortTrades: number;
148
+ totalShortWins: number;
149
+ readonly updatedAt: string;
150
+ loosesRate?: number;
151
+ totalCumEntryValue?: number;
152
+ totalCumExitValue?: number;
138
153
  };
139
154
 
140
- export { type TChallengeAccountInfo, type TChallengeApiKeyInfo, type TChallengeCapital, type TChallengeItem, type TChallengeListItem, type TChallengeMode, type TChallengePositionInfo, TChallengeProgress, type TChallengeProvider, type TChallengeRule, type TChallengeStatistics, type TChallengeType, TChallengeWalletBalance, type TDrawdownType, type TTradingType };
155
+ export { type TChallengeAccountInfo, type TChallengeApiKeyInfo, type TChallengeCapital, type TChallengeItem, type TChallengeListItem, type TChallengeMode, type TChallengePositionInfo, TChallengeProgress, type TChallengeProvider, type TChallengeRule, type TChallengeStatistics, type TChallengeStatus, type TChallengeType, TChallengeWalletBalance, type TDrawdownType, type TTradingType };
@@ -1,6 +1,6 @@
1
1
  import { a as IBybitApiKeyVipLevel } from '../../enums--bdw39rp.js';
2
- import { b as TChallengeProgress, c as TChallengeWalletBalance } from '../../TChallengeProgress-CFlK7XnZ.js';
3
- export { T as TChallengeClosedPnl, a as TChallengeClosedPnlStatistics } from '../../TChallengeProgress-CFlK7XnZ.js';
2
+ import { a as TChallengeProgress, b as TChallengeWalletBalance } from '../../TChallengeProgress-UmIOnrHy.js';
3
+ export { T as TChallengeClosedPnl } from '../../TChallengeProgress-UmIOnrHy.js';
4
4
  export { TSyncResponse } from '../index.js';
5
5
 
6
6
  type TChallengeType = "ONE_STEP" | "TWO_STEPS";
@@ -9,6 +9,7 @@ type TTradingType = "Futures" | "Spot" | "Margin" | "Options";
9
9
  type TDrawdownType = "Trailing" | "Fixed";
10
10
  type TChallengeCapital = 5000 | 10000 | 25000 | 50000 | 100000 | 200000;
11
11
  type TChallengeProvider = "BYBIT" | "CLEO";
12
+ type TChallengeStatus = "ACTIVE" | "EXPIRED" | "COMPLETED" | "FAILED";
12
13
  type TChallengeRule = {
13
14
  name: string;
14
15
  type: TChallengeType;
@@ -93,7 +94,8 @@ type TChallengeItem = {
93
94
  currency: string;
94
95
  ttype: TTradingType;
95
96
  ddtype: TDrawdownType;
96
- status: string;
97
+ readonly status: TChallengeStatus;
98
+ readonly statusDescription: string;
97
99
  provider: string;
98
100
  startDate: string;
99
101
  endDate: string;
@@ -104,7 +106,7 @@ type TChallengeItem = {
104
106
  hasCredentials: boolean;
105
107
  apiKeyHint?: string;
106
108
  apiKeyInfo?: TChallengeApiKeyInfo;
107
- stats?: TChallengeStatistics;
109
+ statistics?: TChallengeStatistics;
108
110
  progress?: TChallengeProgress;
109
111
  rule?: TChallengeRule;
110
112
  wallet?: TChallengeWalletBalance;
@@ -115,7 +117,8 @@ type TChallengeListItem = {
115
117
  currency: string | null;
116
118
  ttype: TTradingType | null;
117
119
  ddtype: TDrawdownType | null;
118
- status: string;
120
+ readonly status: TChallengeStatus;
121
+ readonly statusDescription: string;
119
122
  provider: string;
120
123
  startDate: string;
121
124
  endDate: string | null;
@@ -123,18 +126,30 @@ type TChallengeListItem = {
123
126
  daysRemaining: number | null;
124
127
  apiKeyHint?: string;
125
128
  hasCredentials: boolean;
126
- stats?: TChallengeStatistics | null;
129
+ statistics?: TChallengeStatistics | null;
127
130
  progress?: TChallengeProgress | null;
128
131
  rule?: TChallengeRule | null;
129
132
  wallet?: TChallengeWalletBalance | null;
130
133
  };
131
134
 
132
135
  type TChallengeStatistics = {
133
- equity: number;
134
- balance: number;
135
- dailyDrawdown: number;
136
- maxDrawdown: number;
137
- currency?: string;
136
+ readonly id: string | null;
137
+ readonly challengeId: string;
138
+ totalClosedTradesCount: number;
139
+ totalClosedTrades: number;
140
+ totalLongTradesCount: number;
141
+ totalShortTradesCount: number;
142
+ totalWins: number;
143
+ totalLosses: number;
144
+ winRate: number;
145
+ totalLongTrades: number;
146
+ totalLongWins: number;
147
+ totalShortTrades: number;
148
+ totalShortWins: number;
149
+ readonly updatedAt: string;
150
+ loosesRate?: number;
151
+ totalCumEntryValue?: number;
152
+ totalCumExitValue?: number;
138
153
  };
139
154
 
140
- export { type TChallengeAccountInfo, type TChallengeApiKeyInfo, type TChallengeCapital, type TChallengeItem, type TChallengeListItem, type TChallengeMode, type TChallengePositionInfo, TChallengeProgress, type TChallengeProvider, type TChallengeRule, type TChallengeStatistics, type TChallengeType, TChallengeWalletBalance, type TDrawdownType, type TTradingType };
155
+ export { type TChallengeAccountInfo, type TChallengeApiKeyInfo, type TChallengeCapital, type TChallengeItem, type TChallengeListItem, type TChallengeMode, type TChallengePositionInfo, TChallengeProgress, type TChallengeProvider, type TChallengeRule, type TChallengeStatistics, type TChallengeStatus, type TChallengeType, TChallengeWalletBalance, type TDrawdownType, type TTradingType };
@@ -1,4 +1,4 @@
1
- import { b as TChallengeProgress, c as TChallengeWalletBalance, T as TChallengeClosedPnl } from '../TChallengeProgress-hdTUsqAj.cjs';
1
+ import { a as TChallengeProgress, b as TChallengeWalletBalance, T as TChallengeClosedPnl } from '../TChallengeProgress-C_DBsbUa.cjs';
2
2
  import '../enums--bdw39rp.cjs';
3
3
 
4
4
  declare const createDefaultWallet: (challengeId?: string, capital?: number) => TChallengeWalletBalance;
@@ -1,4 +1,4 @@
1
- import { b as TChallengeProgress, c as TChallengeWalletBalance, T as TChallengeClosedPnl } from '../TChallengeProgress-CFlK7XnZ.js';
1
+ import { a as TChallengeProgress, b as TChallengeWalletBalance, T as TChallengeClosedPnl } from '../TChallengeProgress-UmIOnrHy.js';
2
2
  import '../enums--bdw39rp.js';
3
3
 
4
4
  declare const createDefaultWallet: (challengeId?: string, capital?: number) => TChallengeWalletBalance;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anrmk/str-package",
3
- "version": "0.1.6",
3
+ "version": "0.1.9",
4
4
  "description": "Shared providers, types, and utils for STR services",
5
5
  "license": "MIT",
6
6
  "type": "module",