@mobula_labs/types 0.1.5 → 0.1.7
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/dist/cjs/index.cjs +3490 -3168
- package/dist/cjs/index.cjs.map +29 -25
- package/dist/esm/index.js +3488 -3166
- package/dist/esm/index.js.map +29 -25
- package/dist/index.d.ts +8 -2
- package/dist/misc/ApiKeysQueries.d.ts +1 -1
- package/dist/utils/schemas/BaseMessage.d.ts +6 -0
- package/dist/utils/schemas/PlatformMetadataOutput.d.ts +19 -0
- package/dist/utils/schemas/TokenMetadataMinimal.d.ts +25 -0
- package/dist/utils/schemas/WalletDeployerSchema.d.ts +333 -0
- package/dist/utils/schemas/WalletMetadataOutput.d.ts +19 -0
- package/dist/v1/market/FundingRateSchema.d.ts +33 -0
- package/dist/v1/market/MarketHistoryPairSchema.d.ts +3 -3
- package/dist/v1/market/MarketTradesPairSchema.d.ts +35 -2
- package/dist/v1/search/SearchSchema.d.ts +19 -2
- package/dist/v1/wallet/DeployerSchema.d.ts +157 -0
- package/dist/v1/wallet/WalletLabelSchema.d.ts +4 -4
- package/dist/v1/wallet/WalletTradesSchema.d.ts +86 -0
- package/dist/v2/swap/SwapQuotingBatchOutput.d.ts +48 -48
- package/dist/v2/swap/SwapQuotingOutput.d.ts +32 -32
- package/dist/v2/token/TokenAthSchema.d.ts +233 -0
- package/dist/v2/token/TokenPositionsSchema.d.ts +277 -42
- package/dist/v2/token/TokenTradesSchema.d.ts +1465 -11697
- package/dist/v2/wallet/WalleAnalysisQuerySchema.d.ts +134 -0
- package/dist/v2/wallet/WalletActivityV2Schema.d.ts +275 -3
- package/dist/v2/wallet/WalletAnalysisQuerySchema.d.ts +1658 -0
- package/dist/v2/wallet/WalletDefiPositionsSchema.d.ts +1 -0
- package/dist/v2/wallet/WalletDeployerSchema.d.ts +157 -0
- package/dist/v2/wallet/WalletFundingQuerySchema.d.ts +57 -0
- package/dist/v2/wallet/WalletPositionsSchema.d.ts +449 -6
- package/dist/wss/BalancePayloadSchema.d.ts +1 -0
- package/dist/wss/OhlcvPayloadSchema.d.ts +2 -2
- package/dist/wss/PairsPayloadSchema.d.ts +2 -2
- package/dist/wss/PositionPayloadSchema.d.ts +19 -0
- package/package.json +2 -2
- package/dist/v2/explorer/BlockDataQuerySchema.d.ts +0 -33
- package/dist/v2/explorer/ContractVerifyQuerySchema.ts +0 -27
|
@@ -1,60 +1,125 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { tokenPositionSchema } from '../../utils/schemas/WalletDeployerSchema.ts';
|
|
3
|
+
/**
|
|
4
|
+
* Sort options for wallet positions (camelCase API values)
|
|
5
|
+
* - lastActivity: Sort by last trade date (default)
|
|
6
|
+
* - realizedPnl: Sort by realized PnL USD
|
|
7
|
+
*
|
|
8
|
+
* Internally mapped to snake_case for SQL queries:
|
|
9
|
+
* - lastActivity → last_activity
|
|
10
|
+
* - realizedPnl → realized_pnl
|
|
11
|
+
*/
|
|
12
|
+
export declare const PositionSortBySchema: z.ZodDefault<z.ZodEnum<["lastActivity", "realizedPnl"]>>;
|
|
13
|
+
export type PositionSortBy = z.infer<typeof PositionSortBySchema>;
|
|
14
|
+
/**
|
|
15
|
+
* Map camelCase sortBy values to internal snake_case values for SQL queries
|
|
16
|
+
*/
|
|
17
|
+
export declare const positionSortByToInternal: (sortBy: PositionSortBy) => "last_activity" | "realized_pnl";
|
|
3
18
|
export declare const WalletPositionsParamsSchema: z.ZodObject<{
|
|
4
19
|
wallet: z.ZodString;
|
|
5
20
|
blockchain: z.ZodOptional<z.ZodString>;
|
|
6
|
-
|
|
7
|
-
|
|
21
|
+
limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
22
|
+
offset: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
23
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
24
|
+
cursorDirection: z.ZodDefault<z.ZodOptional<z.ZodEnum<["before", "after"]>>>;
|
|
25
|
+
sortBy: z.ZodOptional<z.ZodDefault<z.ZodEnum<["lastActivity", "realizedPnl"]>>>;
|
|
26
|
+
order: z.ZodDefault<z.ZodOptional<z.ZodEnum<["asc", "desc"]>>>;
|
|
27
|
+
_backfillPositions: z.ZodEffects<z.ZodDefault<z.ZodUnion<[z.ZodBoolean, z.ZodString]>>, boolean, string | boolean | undefined>;
|
|
28
|
+
_backfillSwapsAndPositions: z.ZodEffects<z.ZodDefault<z.ZodUnion<[z.ZodBoolean, z.ZodString]>>, boolean, string | boolean | undefined>;
|
|
29
|
+
/** Include fees in PnL calculation (deduct total_fees_paid_usd from PnL) */
|
|
30
|
+
includeFees: z.ZodEffects<z.ZodDefault<z.ZodUnion<[z.ZodBoolean, z.ZodString]>>, boolean, string | boolean | undefined>;
|
|
31
|
+
/** Use swap recipient mode (query wallet_positions_recipients table instead of wallet_positions) */
|
|
32
|
+
useSwapRecipient: z.ZodEffects<z.ZodDefault<z.ZodUnion<[z.ZodBoolean, z.ZodString]>>, boolean, string | boolean | undefined>;
|
|
8
33
|
}, "strip", z.ZodTypeAny, {
|
|
34
|
+
limit: number;
|
|
35
|
+
offset: number;
|
|
9
36
|
wallet: string;
|
|
10
|
-
|
|
11
|
-
|
|
37
|
+
order: "asc" | "desc";
|
|
38
|
+
useSwapRecipient: boolean;
|
|
39
|
+
cursorDirection: "before" | "after";
|
|
40
|
+
_backfillPositions: boolean;
|
|
41
|
+
_backfillSwapsAndPositions: boolean;
|
|
42
|
+
includeFees: boolean;
|
|
12
43
|
blockchain?: string | undefined;
|
|
44
|
+
sortBy?: "lastActivity" | "realizedPnl" | undefined;
|
|
45
|
+
cursor?: string | undefined;
|
|
13
46
|
}, {
|
|
14
47
|
wallet: string;
|
|
15
48
|
blockchain?: string | undefined;
|
|
16
|
-
|
|
17
|
-
|
|
49
|
+
limit?: number | undefined;
|
|
50
|
+
offset?: number | undefined;
|
|
51
|
+
sortBy?: "lastActivity" | "realizedPnl" | undefined;
|
|
52
|
+
order?: "asc" | "desc" | undefined;
|
|
53
|
+
useSwapRecipient?: string | boolean | undefined;
|
|
54
|
+
cursorDirection?: "before" | "after" | undefined;
|
|
55
|
+
cursor?: string | undefined;
|
|
56
|
+
_backfillPositions?: string | boolean | undefined;
|
|
57
|
+
_backfillSwapsAndPositions?: string | boolean | undefined;
|
|
58
|
+
includeFees?: string | boolean | undefined;
|
|
18
59
|
}>;
|
|
19
60
|
export type WalletPositionsParams = z.input<typeof WalletPositionsParamsSchema>;
|
|
20
61
|
export declare const SinglePositionQuery: z.ZodObject<{
|
|
21
62
|
wallet: z.ZodString;
|
|
22
63
|
asset: z.ZodString;
|
|
23
64
|
blockchain: z.ZodString;
|
|
65
|
+
/** Include fees in PnL calculation (deduct total_fees_paid_usd from PnL) */
|
|
66
|
+
includeFees: z.ZodEffects<z.ZodDefault<z.ZodUnion<[z.ZodBoolean, z.ZodString]>>, boolean, string | boolean | undefined>;
|
|
67
|
+
/** Use swap recipient mode (query wallet_positions_recipients table instead of wallet_positions) */
|
|
68
|
+
useSwapRecipient: z.ZodEffects<z.ZodDefault<z.ZodUnion<[z.ZodBoolean, z.ZodString]>>, boolean, string | boolean | undefined>;
|
|
24
69
|
}, "strip", z.ZodTypeAny, {
|
|
25
70
|
blockchain: string;
|
|
26
71
|
asset: string;
|
|
27
72
|
wallet: string;
|
|
73
|
+
useSwapRecipient: boolean;
|
|
74
|
+
includeFees: boolean;
|
|
28
75
|
}, {
|
|
29
76
|
blockchain: string;
|
|
30
77
|
asset: string;
|
|
31
78
|
wallet: string;
|
|
79
|
+
useSwapRecipient?: string | boolean | undefined;
|
|
80
|
+
includeFees?: string | boolean | undefined;
|
|
32
81
|
}>;
|
|
33
82
|
export declare const SinglePositionBatchParamsSchema: z.ZodUnion<[z.ZodArray<z.ZodObject<{
|
|
34
83
|
wallet: z.ZodString;
|
|
35
84
|
asset: z.ZodString;
|
|
36
85
|
blockchain: z.ZodString;
|
|
86
|
+
/** Include fees in PnL calculation (deduct total_fees_paid_usd from PnL) */
|
|
87
|
+
includeFees: z.ZodEffects<z.ZodDefault<z.ZodUnion<[z.ZodBoolean, z.ZodString]>>, boolean, string | boolean | undefined>;
|
|
88
|
+
/** Use swap recipient mode (query wallet_positions_recipients table instead of wallet_positions) */
|
|
89
|
+
useSwapRecipient: z.ZodEffects<z.ZodDefault<z.ZodUnion<[z.ZodBoolean, z.ZodString]>>, boolean, string | boolean | undefined>;
|
|
37
90
|
}, "strip", z.ZodTypeAny, {
|
|
38
91
|
blockchain: string;
|
|
39
92
|
asset: string;
|
|
40
93
|
wallet: string;
|
|
94
|
+
useSwapRecipient: boolean;
|
|
95
|
+
includeFees: boolean;
|
|
41
96
|
}, {
|
|
42
97
|
blockchain: string;
|
|
43
98
|
asset: string;
|
|
44
99
|
wallet: string;
|
|
100
|
+
useSwapRecipient?: string | boolean | undefined;
|
|
101
|
+
includeFees?: string | boolean | undefined;
|
|
45
102
|
}>, "many">, z.ZodObject<{
|
|
46
103
|
items: z.ZodArray<z.ZodObject<{
|
|
47
104
|
wallet: z.ZodString;
|
|
48
105
|
asset: z.ZodString;
|
|
49
106
|
blockchain: z.ZodString;
|
|
107
|
+
/** Include fees in PnL calculation (deduct total_fees_paid_usd from PnL) */
|
|
108
|
+
includeFees: z.ZodEffects<z.ZodDefault<z.ZodUnion<[z.ZodBoolean, z.ZodString]>>, boolean, string | boolean | undefined>;
|
|
109
|
+
/** Use swap recipient mode (query wallet_positions_recipients table instead of wallet_positions) */
|
|
110
|
+
useSwapRecipient: z.ZodEffects<z.ZodDefault<z.ZodUnion<[z.ZodBoolean, z.ZodString]>>, boolean, string | boolean | undefined>;
|
|
50
111
|
}, "strip", z.ZodTypeAny, {
|
|
51
112
|
blockchain: string;
|
|
52
113
|
asset: string;
|
|
53
114
|
wallet: string;
|
|
115
|
+
useSwapRecipient: boolean;
|
|
116
|
+
includeFees: boolean;
|
|
54
117
|
}, {
|
|
55
118
|
blockchain: string;
|
|
56
119
|
asset: string;
|
|
57
120
|
wallet: string;
|
|
121
|
+
useSwapRecipient?: string | boolean | undefined;
|
|
122
|
+
includeFees?: string | boolean | undefined;
|
|
58
123
|
}>, "many">;
|
|
59
124
|
instanceTracking: z.ZodEffects<z.ZodOptional<z.ZodBoolean>, boolean | undefined, unknown>;
|
|
60
125
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -62,6 +127,8 @@ export declare const SinglePositionBatchParamsSchema: z.ZodUnion<[z.ZodArray<z.Z
|
|
|
62
127
|
blockchain: string;
|
|
63
128
|
asset: string;
|
|
64
129
|
wallet: string;
|
|
130
|
+
useSwapRecipient: boolean;
|
|
131
|
+
includeFees: boolean;
|
|
65
132
|
}[];
|
|
66
133
|
instanceTracking?: boolean | undefined;
|
|
67
134
|
}, {
|
|
@@ -69,11 +136,29 @@ export declare const SinglePositionBatchParamsSchema: z.ZodUnion<[z.ZodArray<z.Z
|
|
|
69
136
|
blockchain: string;
|
|
70
137
|
asset: string;
|
|
71
138
|
wallet: string;
|
|
139
|
+
useSwapRecipient?: string | boolean | undefined;
|
|
140
|
+
includeFees?: string | boolean | undefined;
|
|
72
141
|
}[];
|
|
73
142
|
instanceTracking?: unknown;
|
|
74
143
|
}>]>;
|
|
75
144
|
export type SinglePositionBatchParams = z.input<typeof SinglePositionBatchParamsSchema>;
|
|
76
145
|
export type TokenPositionType = z.infer<typeof tokenPositionSchema>;
|
|
146
|
+
export declare const WalletPositionsPaginationSchema: z.ZodObject<{
|
|
147
|
+
page: z.ZodNumber;
|
|
148
|
+
offset: z.ZodNumber;
|
|
149
|
+
limit: z.ZodNumber;
|
|
150
|
+
pageEntries: z.ZodNumber;
|
|
151
|
+
}, "strip", z.ZodTypeAny, {
|
|
152
|
+
limit: number;
|
|
153
|
+
offset: number;
|
|
154
|
+
page: number;
|
|
155
|
+
pageEntries: number;
|
|
156
|
+
}, {
|
|
157
|
+
limit: number;
|
|
158
|
+
offset: number;
|
|
159
|
+
page: number;
|
|
160
|
+
pageEntries: number;
|
|
161
|
+
}>;
|
|
77
162
|
export declare const WalletPositionsResponseSchema: z.ZodObject<{
|
|
78
163
|
data: z.ZodArray<z.ZodObject<{
|
|
79
164
|
token: z.ZodObject<{
|
|
@@ -1005,8 +1090,10 @@ export declare const WalletPositionsResponseSchema: z.ZodObject<{
|
|
|
1005
1090
|
realizedPnlUSD: z.ZodNumber;
|
|
1006
1091
|
unrealizedPnlUSD: z.ZodNumber;
|
|
1007
1092
|
totalPnlUSD: z.ZodNumber;
|
|
1093
|
+
totalFeesPaidUSD: z.ZodOptional<z.ZodNumber>;
|
|
1008
1094
|
firstDate: z.ZodNullable<z.ZodDate>;
|
|
1009
1095
|
lastDate: z.ZodNullable<z.ZodDate>;
|
|
1096
|
+
labels: z.ZodDefault<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
1010
1097
|
}, "strip", z.ZodTypeAny, {
|
|
1011
1098
|
balance: number;
|
|
1012
1099
|
realizedPnlUSD: number;
|
|
@@ -1297,6 +1384,7 @@ export declare const WalletPositionsResponseSchema: z.ZodObject<{
|
|
|
1297
1384
|
tokenType?: "2020" | "2022" | null | undefined;
|
|
1298
1385
|
originLogoUrl?: string | null | undefined;
|
|
1299
1386
|
};
|
|
1387
|
+
labels: string[] | null;
|
|
1300
1388
|
rawBalance: string;
|
|
1301
1389
|
buys: number;
|
|
1302
1390
|
sells: number;
|
|
@@ -1309,6 +1397,7 @@ export declare const WalletPositionsResponseSchema: z.ZodObject<{
|
|
|
1309
1397
|
totalPnlUSD: number;
|
|
1310
1398
|
firstDate: Date | null;
|
|
1311
1399
|
lastDate: Date | null;
|
|
1400
|
+
totalFeesPaidUSD?: number | undefined;
|
|
1312
1401
|
}, {
|
|
1313
1402
|
balance: number;
|
|
1314
1403
|
realizedPnlUSD: number;
|
|
@@ -1611,7 +1700,130 @@ export declare const WalletPositionsResponseSchema: z.ZodObject<{
|
|
|
1611
1700
|
totalPnlUSD: number;
|
|
1612
1701
|
firstDate: Date | null;
|
|
1613
1702
|
lastDate: Date | null;
|
|
1703
|
+
totalFeesPaidUSD?: number | undefined;
|
|
1704
|
+
labels?: string[] | null | undefined;
|
|
1614
1705
|
}>, "many">;
|
|
1706
|
+
wallet: z.ZodOptional<z.ZodObject<{
|
|
1707
|
+
fundingInfo: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
1708
|
+
from: z.ZodNullable<z.ZodString>;
|
|
1709
|
+
date: z.ZodNullable<z.ZodDate>;
|
|
1710
|
+
chainId: z.ZodNullable<z.ZodString>;
|
|
1711
|
+
txHash: z.ZodNullable<z.ZodString>;
|
|
1712
|
+
amount: z.ZodNullable<z.ZodString>;
|
|
1713
|
+
formattedAmount: z.ZodNullable<z.ZodNumber>;
|
|
1714
|
+
currency: z.ZodNullable<z.ZodObject<{
|
|
1715
|
+
name: z.ZodString;
|
|
1716
|
+
symbol: z.ZodString;
|
|
1717
|
+
logo: z.ZodNullable<z.ZodString>;
|
|
1718
|
+
decimals: z.ZodNumber;
|
|
1719
|
+
address: z.ZodString;
|
|
1720
|
+
}, "strip", z.ZodTypeAny, {
|
|
1721
|
+
symbol: string;
|
|
1722
|
+
name: string;
|
|
1723
|
+
address: string;
|
|
1724
|
+
decimals: number;
|
|
1725
|
+
logo: string | null;
|
|
1726
|
+
}, {
|
|
1727
|
+
symbol: string;
|
|
1728
|
+
name: string;
|
|
1729
|
+
address: string;
|
|
1730
|
+
decimals: number;
|
|
1731
|
+
logo: string | null;
|
|
1732
|
+
}>>;
|
|
1733
|
+
fromWalletLogo: z.ZodNullable<z.ZodString>;
|
|
1734
|
+
fromWalletTag: z.ZodNullable<z.ZodString>;
|
|
1735
|
+
}, "strip", z.ZodTypeAny, {
|
|
1736
|
+
date: Date | null;
|
|
1737
|
+
chainId: string | null;
|
|
1738
|
+
amount: string | null;
|
|
1739
|
+
from: string | null;
|
|
1740
|
+
txHash: string | null;
|
|
1741
|
+
formattedAmount: number | null;
|
|
1742
|
+
currency: {
|
|
1743
|
+
symbol: string;
|
|
1744
|
+
name: string;
|
|
1745
|
+
address: string;
|
|
1746
|
+
decimals: number;
|
|
1747
|
+
logo: string | null;
|
|
1748
|
+
} | null;
|
|
1749
|
+
fromWalletLogo: string | null;
|
|
1750
|
+
fromWalletTag: string | null;
|
|
1751
|
+
}, {
|
|
1752
|
+
date: Date | null;
|
|
1753
|
+
chainId: string | null;
|
|
1754
|
+
amount: string | null;
|
|
1755
|
+
from: string | null;
|
|
1756
|
+
txHash: string | null;
|
|
1757
|
+
formattedAmount: number | null;
|
|
1758
|
+
currency: {
|
|
1759
|
+
symbol: string;
|
|
1760
|
+
name: string;
|
|
1761
|
+
address: string;
|
|
1762
|
+
decimals: number;
|
|
1763
|
+
logo: string | null;
|
|
1764
|
+
} | null;
|
|
1765
|
+
fromWalletLogo: string | null;
|
|
1766
|
+
fromWalletTag: string | null;
|
|
1767
|
+
}>>>;
|
|
1768
|
+
entity: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1769
|
+
labels: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1770
|
+
}, "strip", z.ZodTypeAny, {
|
|
1771
|
+
fundingInfo: {
|
|
1772
|
+
date: Date | null;
|
|
1773
|
+
chainId: string | null;
|
|
1774
|
+
amount: string | null;
|
|
1775
|
+
from: string | null;
|
|
1776
|
+
txHash: string | null;
|
|
1777
|
+
formattedAmount: number | null;
|
|
1778
|
+
currency: {
|
|
1779
|
+
symbol: string;
|
|
1780
|
+
name: string;
|
|
1781
|
+
address: string;
|
|
1782
|
+
decimals: number;
|
|
1783
|
+
logo: string | null;
|
|
1784
|
+
} | null;
|
|
1785
|
+
fromWalletLogo: string | null;
|
|
1786
|
+
fromWalletTag: string | null;
|
|
1787
|
+
} | null;
|
|
1788
|
+
entity: string | null;
|
|
1789
|
+
labels: string[];
|
|
1790
|
+
}, {
|
|
1791
|
+
fundingInfo?: {
|
|
1792
|
+
date: Date | null;
|
|
1793
|
+
chainId: string | null;
|
|
1794
|
+
amount: string | null;
|
|
1795
|
+
from: string | null;
|
|
1796
|
+
txHash: string | null;
|
|
1797
|
+
formattedAmount: number | null;
|
|
1798
|
+
currency: {
|
|
1799
|
+
symbol: string;
|
|
1800
|
+
name: string;
|
|
1801
|
+
address: string;
|
|
1802
|
+
decimals: number;
|
|
1803
|
+
logo: string | null;
|
|
1804
|
+
} | null;
|
|
1805
|
+
fromWalletLogo: string | null;
|
|
1806
|
+
fromWalletTag: string | null;
|
|
1807
|
+
} | null | undefined;
|
|
1808
|
+
entity?: string | null | undefined;
|
|
1809
|
+
labels?: string[] | undefined;
|
|
1810
|
+
}>>;
|
|
1811
|
+
pagination: z.ZodOptional<z.ZodObject<{
|
|
1812
|
+
page: z.ZodNumber;
|
|
1813
|
+
offset: z.ZodNumber;
|
|
1814
|
+
limit: z.ZodNumber;
|
|
1815
|
+
pageEntries: z.ZodNumber;
|
|
1816
|
+
}, "strip", z.ZodTypeAny, {
|
|
1817
|
+
limit: number;
|
|
1818
|
+
offset: number;
|
|
1819
|
+
page: number;
|
|
1820
|
+
pageEntries: number;
|
|
1821
|
+
}, {
|
|
1822
|
+
limit: number;
|
|
1823
|
+
offset: number;
|
|
1824
|
+
page: number;
|
|
1825
|
+
pageEntries: number;
|
|
1826
|
+
}>>;
|
|
1615
1827
|
}, "strip", z.ZodTypeAny, {
|
|
1616
1828
|
data: {
|
|
1617
1829
|
balance: number;
|
|
@@ -1903,6 +2115,7 @@ export declare const WalletPositionsResponseSchema: z.ZodObject<{
|
|
|
1903
2115
|
tokenType?: "2020" | "2022" | null | undefined;
|
|
1904
2116
|
originLogoUrl?: string | null | undefined;
|
|
1905
2117
|
};
|
|
2118
|
+
labels: string[] | null;
|
|
1906
2119
|
rawBalance: string;
|
|
1907
2120
|
buys: number;
|
|
1908
2121
|
sells: number;
|
|
@@ -1915,7 +2128,35 @@ export declare const WalletPositionsResponseSchema: z.ZodObject<{
|
|
|
1915
2128
|
totalPnlUSD: number;
|
|
1916
2129
|
firstDate: Date | null;
|
|
1917
2130
|
lastDate: Date | null;
|
|
2131
|
+
totalFeesPaidUSD?: number | undefined;
|
|
1918
2132
|
}[];
|
|
2133
|
+
wallet?: {
|
|
2134
|
+
fundingInfo: {
|
|
2135
|
+
date: Date | null;
|
|
2136
|
+
chainId: string | null;
|
|
2137
|
+
amount: string | null;
|
|
2138
|
+
from: string | null;
|
|
2139
|
+
txHash: string | null;
|
|
2140
|
+
formattedAmount: number | null;
|
|
2141
|
+
currency: {
|
|
2142
|
+
symbol: string;
|
|
2143
|
+
name: string;
|
|
2144
|
+
address: string;
|
|
2145
|
+
decimals: number;
|
|
2146
|
+
logo: string | null;
|
|
2147
|
+
} | null;
|
|
2148
|
+
fromWalletLogo: string | null;
|
|
2149
|
+
fromWalletTag: string | null;
|
|
2150
|
+
} | null;
|
|
2151
|
+
entity: string | null;
|
|
2152
|
+
labels: string[];
|
|
2153
|
+
} | undefined;
|
|
2154
|
+
pagination?: {
|
|
2155
|
+
limit: number;
|
|
2156
|
+
offset: number;
|
|
2157
|
+
page: number;
|
|
2158
|
+
pageEntries: number;
|
|
2159
|
+
} | undefined;
|
|
1919
2160
|
}, {
|
|
1920
2161
|
data: {
|
|
1921
2162
|
balance: number;
|
|
@@ -2219,7 +2460,36 @@ export declare const WalletPositionsResponseSchema: z.ZodObject<{
|
|
|
2219
2460
|
totalPnlUSD: number;
|
|
2220
2461
|
firstDate: Date | null;
|
|
2221
2462
|
lastDate: Date | null;
|
|
2463
|
+
totalFeesPaidUSD?: number | undefined;
|
|
2464
|
+
labels?: string[] | null | undefined;
|
|
2222
2465
|
}[];
|
|
2466
|
+
wallet?: {
|
|
2467
|
+
fundingInfo?: {
|
|
2468
|
+
date: Date | null;
|
|
2469
|
+
chainId: string | null;
|
|
2470
|
+
amount: string | null;
|
|
2471
|
+
from: string | null;
|
|
2472
|
+
txHash: string | null;
|
|
2473
|
+
formattedAmount: number | null;
|
|
2474
|
+
currency: {
|
|
2475
|
+
symbol: string;
|
|
2476
|
+
name: string;
|
|
2477
|
+
address: string;
|
|
2478
|
+
decimals: number;
|
|
2479
|
+
logo: string | null;
|
|
2480
|
+
} | null;
|
|
2481
|
+
fromWalletLogo: string | null;
|
|
2482
|
+
fromWalletTag: string | null;
|
|
2483
|
+
} | null | undefined;
|
|
2484
|
+
entity?: string | null | undefined;
|
|
2485
|
+
labels?: string[] | undefined;
|
|
2486
|
+
} | undefined;
|
|
2487
|
+
pagination?: {
|
|
2488
|
+
limit: number;
|
|
2489
|
+
offset: number;
|
|
2490
|
+
page: number;
|
|
2491
|
+
pageEntries: number;
|
|
2492
|
+
} | undefined;
|
|
2223
2493
|
}>;
|
|
2224
2494
|
export type WalletPositionsResponse = z.infer<typeof WalletPositionsResponseSchema>;
|
|
2225
2495
|
export declare const singlePositionOutputSchema: z.ZodObject<{
|
|
@@ -3153,8 +3423,10 @@ export declare const singlePositionOutputSchema: z.ZodObject<{
|
|
|
3153
3423
|
realizedPnlUSD: z.ZodNumber;
|
|
3154
3424
|
unrealizedPnlUSD: z.ZodNumber;
|
|
3155
3425
|
totalPnlUSD: z.ZodNumber;
|
|
3426
|
+
totalFeesPaidUSD: z.ZodOptional<z.ZodNumber>;
|
|
3156
3427
|
firstDate: z.ZodNullable<z.ZodDate>;
|
|
3157
3428
|
lastDate: z.ZodNullable<z.ZodDate>;
|
|
3429
|
+
labels: z.ZodDefault<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
3158
3430
|
}, "strip", z.ZodTypeAny, {
|
|
3159
3431
|
balance: number;
|
|
3160
3432
|
realizedPnlUSD: number;
|
|
@@ -3445,6 +3717,7 @@ export declare const singlePositionOutputSchema: z.ZodObject<{
|
|
|
3445
3717
|
tokenType?: "2020" | "2022" | null | undefined;
|
|
3446
3718
|
originLogoUrl?: string | null | undefined;
|
|
3447
3719
|
};
|
|
3720
|
+
labels: string[] | null;
|
|
3448
3721
|
rawBalance: string;
|
|
3449
3722
|
buys: number;
|
|
3450
3723
|
sells: number;
|
|
@@ -3457,6 +3730,7 @@ export declare const singlePositionOutputSchema: z.ZodObject<{
|
|
|
3457
3730
|
totalPnlUSD: number;
|
|
3458
3731
|
firstDate: Date | null;
|
|
3459
3732
|
lastDate: Date | null;
|
|
3733
|
+
totalFeesPaidUSD?: number | undefined;
|
|
3460
3734
|
}, {
|
|
3461
3735
|
balance: number;
|
|
3462
3736
|
realizedPnlUSD: number;
|
|
@@ -3759,7 +4033,114 @@ export declare const singlePositionOutputSchema: z.ZodObject<{
|
|
|
3759
4033
|
totalPnlUSD: number;
|
|
3760
4034
|
firstDate: Date | null;
|
|
3761
4035
|
lastDate: Date | null;
|
|
4036
|
+
totalFeesPaidUSD?: number | undefined;
|
|
4037
|
+
labels?: string[] | null | undefined;
|
|
3762
4038
|
}>;
|
|
4039
|
+
wallet: z.ZodOptional<z.ZodObject<{
|
|
4040
|
+
fundingInfo: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
4041
|
+
from: z.ZodNullable<z.ZodString>;
|
|
4042
|
+
date: z.ZodNullable<z.ZodDate>;
|
|
4043
|
+
chainId: z.ZodNullable<z.ZodString>;
|
|
4044
|
+
txHash: z.ZodNullable<z.ZodString>;
|
|
4045
|
+
amount: z.ZodNullable<z.ZodString>;
|
|
4046
|
+
formattedAmount: z.ZodNullable<z.ZodNumber>;
|
|
4047
|
+
currency: z.ZodNullable<z.ZodObject<{
|
|
4048
|
+
name: z.ZodString;
|
|
4049
|
+
symbol: z.ZodString;
|
|
4050
|
+
logo: z.ZodNullable<z.ZodString>;
|
|
4051
|
+
decimals: z.ZodNumber;
|
|
4052
|
+
address: z.ZodString;
|
|
4053
|
+
}, "strip", z.ZodTypeAny, {
|
|
4054
|
+
symbol: string;
|
|
4055
|
+
name: string;
|
|
4056
|
+
address: string;
|
|
4057
|
+
decimals: number;
|
|
4058
|
+
logo: string | null;
|
|
4059
|
+
}, {
|
|
4060
|
+
symbol: string;
|
|
4061
|
+
name: string;
|
|
4062
|
+
address: string;
|
|
4063
|
+
decimals: number;
|
|
4064
|
+
logo: string | null;
|
|
4065
|
+
}>>;
|
|
4066
|
+
fromWalletLogo: z.ZodNullable<z.ZodString>;
|
|
4067
|
+
fromWalletTag: z.ZodNullable<z.ZodString>;
|
|
4068
|
+
}, "strip", z.ZodTypeAny, {
|
|
4069
|
+
date: Date | null;
|
|
4070
|
+
chainId: string | null;
|
|
4071
|
+
amount: string | null;
|
|
4072
|
+
from: string | null;
|
|
4073
|
+
txHash: string | null;
|
|
4074
|
+
formattedAmount: number | null;
|
|
4075
|
+
currency: {
|
|
4076
|
+
symbol: string;
|
|
4077
|
+
name: string;
|
|
4078
|
+
address: string;
|
|
4079
|
+
decimals: number;
|
|
4080
|
+
logo: string | null;
|
|
4081
|
+
} | null;
|
|
4082
|
+
fromWalletLogo: string | null;
|
|
4083
|
+
fromWalletTag: string | null;
|
|
4084
|
+
}, {
|
|
4085
|
+
date: Date | null;
|
|
4086
|
+
chainId: string | null;
|
|
4087
|
+
amount: string | null;
|
|
4088
|
+
from: string | null;
|
|
4089
|
+
txHash: string | null;
|
|
4090
|
+
formattedAmount: number | null;
|
|
4091
|
+
currency: {
|
|
4092
|
+
symbol: string;
|
|
4093
|
+
name: string;
|
|
4094
|
+
address: string;
|
|
4095
|
+
decimals: number;
|
|
4096
|
+
logo: string | null;
|
|
4097
|
+
} | null;
|
|
4098
|
+
fromWalletLogo: string | null;
|
|
4099
|
+
fromWalletTag: string | null;
|
|
4100
|
+
}>>>;
|
|
4101
|
+
entity: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
4102
|
+
labels: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
4103
|
+
}, "strip", z.ZodTypeAny, {
|
|
4104
|
+
fundingInfo: {
|
|
4105
|
+
date: Date | null;
|
|
4106
|
+
chainId: string | null;
|
|
4107
|
+
amount: string | null;
|
|
4108
|
+
from: string | null;
|
|
4109
|
+
txHash: string | null;
|
|
4110
|
+
formattedAmount: number | null;
|
|
4111
|
+
currency: {
|
|
4112
|
+
symbol: string;
|
|
4113
|
+
name: string;
|
|
4114
|
+
address: string;
|
|
4115
|
+
decimals: number;
|
|
4116
|
+
logo: string | null;
|
|
4117
|
+
} | null;
|
|
4118
|
+
fromWalletLogo: string | null;
|
|
4119
|
+
fromWalletTag: string | null;
|
|
4120
|
+
} | null;
|
|
4121
|
+
entity: string | null;
|
|
4122
|
+
labels: string[];
|
|
4123
|
+
}, {
|
|
4124
|
+
fundingInfo?: {
|
|
4125
|
+
date: Date | null;
|
|
4126
|
+
chainId: string | null;
|
|
4127
|
+
amount: string | null;
|
|
4128
|
+
from: string | null;
|
|
4129
|
+
txHash: string | null;
|
|
4130
|
+
formattedAmount: number | null;
|
|
4131
|
+
currency: {
|
|
4132
|
+
symbol: string;
|
|
4133
|
+
name: string;
|
|
4134
|
+
address: string;
|
|
4135
|
+
decimals: number;
|
|
4136
|
+
logo: string | null;
|
|
4137
|
+
} | null;
|
|
4138
|
+
fromWalletLogo: string | null;
|
|
4139
|
+
fromWalletTag: string | null;
|
|
4140
|
+
} | null | undefined;
|
|
4141
|
+
entity?: string | null | undefined;
|
|
4142
|
+
labels?: string[] | undefined;
|
|
4143
|
+
}>>;
|
|
3763
4144
|
}, "strip", z.ZodTypeAny, {
|
|
3764
4145
|
data: {
|
|
3765
4146
|
balance: number;
|
|
@@ -4051,6 +4432,7 @@ export declare const singlePositionOutputSchema: z.ZodObject<{
|
|
|
4051
4432
|
tokenType?: "2020" | "2022" | null | undefined;
|
|
4052
4433
|
originLogoUrl?: string | null | undefined;
|
|
4053
4434
|
};
|
|
4435
|
+
labels: string[] | null;
|
|
4054
4436
|
rawBalance: string;
|
|
4055
4437
|
buys: number;
|
|
4056
4438
|
sells: number;
|
|
@@ -4063,7 +4445,29 @@ export declare const singlePositionOutputSchema: z.ZodObject<{
|
|
|
4063
4445
|
totalPnlUSD: number;
|
|
4064
4446
|
firstDate: Date | null;
|
|
4065
4447
|
lastDate: Date | null;
|
|
4448
|
+
totalFeesPaidUSD?: number | undefined;
|
|
4066
4449
|
};
|
|
4450
|
+
wallet?: {
|
|
4451
|
+
fundingInfo: {
|
|
4452
|
+
date: Date | null;
|
|
4453
|
+
chainId: string | null;
|
|
4454
|
+
amount: string | null;
|
|
4455
|
+
from: string | null;
|
|
4456
|
+
txHash: string | null;
|
|
4457
|
+
formattedAmount: number | null;
|
|
4458
|
+
currency: {
|
|
4459
|
+
symbol: string;
|
|
4460
|
+
name: string;
|
|
4461
|
+
address: string;
|
|
4462
|
+
decimals: number;
|
|
4463
|
+
logo: string | null;
|
|
4464
|
+
} | null;
|
|
4465
|
+
fromWalletLogo: string | null;
|
|
4466
|
+
fromWalletTag: string | null;
|
|
4467
|
+
} | null;
|
|
4468
|
+
entity: string | null;
|
|
4469
|
+
labels: string[];
|
|
4470
|
+
} | undefined;
|
|
4067
4471
|
}, {
|
|
4068
4472
|
data: {
|
|
4069
4473
|
balance: number;
|
|
@@ -4367,7 +4771,30 @@ export declare const singlePositionOutputSchema: z.ZodObject<{
|
|
|
4367
4771
|
totalPnlUSD: number;
|
|
4368
4772
|
firstDate: Date | null;
|
|
4369
4773
|
lastDate: Date | null;
|
|
4774
|
+
totalFeesPaidUSD?: number | undefined;
|
|
4775
|
+
labels?: string[] | null | undefined;
|
|
4370
4776
|
};
|
|
4777
|
+
wallet?: {
|
|
4778
|
+
fundingInfo?: {
|
|
4779
|
+
date: Date | null;
|
|
4780
|
+
chainId: string | null;
|
|
4781
|
+
amount: string | null;
|
|
4782
|
+
from: string | null;
|
|
4783
|
+
txHash: string | null;
|
|
4784
|
+
formattedAmount: number | null;
|
|
4785
|
+
currency: {
|
|
4786
|
+
symbol: string;
|
|
4787
|
+
name: string;
|
|
4788
|
+
address: string;
|
|
4789
|
+
decimals: number;
|
|
4790
|
+
logo: string | null;
|
|
4791
|
+
} | null;
|
|
4792
|
+
fromWalletLogo: string | null;
|
|
4793
|
+
fromWalletTag: string | null;
|
|
4794
|
+
} | null | undefined;
|
|
4795
|
+
entity?: string | null | undefined;
|
|
4796
|
+
labels?: string[] | undefined;
|
|
4797
|
+
} | undefined;
|
|
4371
4798
|
}>;
|
|
4372
4799
|
export declare const batchPositionItemSchema: z.ZodObject<{
|
|
4373
4800
|
token: z.ZodObject<{
|
|
@@ -5299,8 +5726,10 @@ export declare const batchPositionItemSchema: z.ZodObject<{
|
|
|
5299
5726
|
realizedPnlUSD: z.ZodNumber;
|
|
5300
5727
|
unrealizedPnlUSD: z.ZodNumber;
|
|
5301
5728
|
totalPnlUSD: z.ZodNumber;
|
|
5729
|
+
totalFeesPaidUSD: z.ZodOptional<z.ZodNumber>;
|
|
5302
5730
|
firstDate: z.ZodNullable<z.ZodDate>;
|
|
5303
5731
|
lastDate: z.ZodNullable<z.ZodDate>;
|
|
5732
|
+
labels: z.ZodDefault<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
5304
5733
|
} & {
|
|
5305
5734
|
wallet: z.ZodString;
|
|
5306
5735
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -5594,6 +6023,7 @@ export declare const batchPositionItemSchema: z.ZodObject<{
|
|
|
5594
6023
|
tokenType?: "2020" | "2022" | null | undefined;
|
|
5595
6024
|
originLogoUrl?: string | null | undefined;
|
|
5596
6025
|
};
|
|
6026
|
+
labels: string[] | null;
|
|
5597
6027
|
rawBalance: string;
|
|
5598
6028
|
buys: number;
|
|
5599
6029
|
sells: number;
|
|
@@ -5606,6 +6036,7 @@ export declare const batchPositionItemSchema: z.ZodObject<{
|
|
|
5606
6036
|
totalPnlUSD: number;
|
|
5607
6037
|
firstDate: Date | null;
|
|
5608
6038
|
lastDate: Date | null;
|
|
6039
|
+
totalFeesPaidUSD?: number | undefined;
|
|
5609
6040
|
}, {
|
|
5610
6041
|
balance: number;
|
|
5611
6042
|
realizedPnlUSD: number;
|
|
@@ -5909,6 +6340,8 @@ export declare const batchPositionItemSchema: z.ZodObject<{
|
|
|
5909
6340
|
totalPnlUSD: number;
|
|
5910
6341
|
firstDate: Date | null;
|
|
5911
6342
|
lastDate: Date | null;
|
|
6343
|
+
totalFeesPaidUSD?: number | undefined;
|
|
6344
|
+
labels?: string[] | null | undefined;
|
|
5912
6345
|
}>;
|
|
5913
6346
|
export declare const SinglePositionBatchResponseSchema: z.ZodObject<{
|
|
5914
6347
|
payload: z.ZodArray<z.ZodNullable<z.ZodUnion<[z.ZodObject<{
|
|
@@ -6841,8 +7274,10 @@ export declare const SinglePositionBatchResponseSchema: z.ZodObject<{
|
|
|
6841
7274
|
realizedPnlUSD: z.ZodNumber;
|
|
6842
7275
|
unrealizedPnlUSD: z.ZodNumber;
|
|
6843
7276
|
totalPnlUSD: z.ZodNumber;
|
|
7277
|
+
totalFeesPaidUSD: z.ZodOptional<z.ZodNumber>;
|
|
6844
7278
|
firstDate: z.ZodNullable<z.ZodDate>;
|
|
6845
7279
|
lastDate: z.ZodNullable<z.ZodDate>;
|
|
7280
|
+
labels: z.ZodDefault<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
6846
7281
|
} & {
|
|
6847
7282
|
wallet: z.ZodString;
|
|
6848
7283
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -7136,6 +7571,7 @@ export declare const SinglePositionBatchResponseSchema: z.ZodObject<{
|
|
|
7136
7571
|
tokenType?: "2020" | "2022" | null | undefined;
|
|
7137
7572
|
originLogoUrl?: string | null | undefined;
|
|
7138
7573
|
};
|
|
7574
|
+
labels: string[] | null;
|
|
7139
7575
|
rawBalance: string;
|
|
7140
7576
|
buys: number;
|
|
7141
7577
|
sells: number;
|
|
@@ -7148,6 +7584,7 @@ export declare const SinglePositionBatchResponseSchema: z.ZodObject<{
|
|
|
7148
7584
|
totalPnlUSD: number;
|
|
7149
7585
|
firstDate: Date | null;
|
|
7150
7586
|
lastDate: Date | null;
|
|
7587
|
+
totalFeesPaidUSD?: number | undefined;
|
|
7151
7588
|
}, {
|
|
7152
7589
|
balance: number;
|
|
7153
7590
|
realizedPnlUSD: number;
|
|
@@ -7451,6 +7888,8 @@ export declare const SinglePositionBatchResponseSchema: z.ZodObject<{
|
|
|
7451
7888
|
totalPnlUSD: number;
|
|
7452
7889
|
firstDate: Date | null;
|
|
7453
7890
|
lastDate: Date | null;
|
|
7891
|
+
totalFeesPaidUSD?: number | undefined;
|
|
7892
|
+
labels?: string[] | null | undefined;
|
|
7454
7893
|
}>, z.ZodObject<{
|
|
7455
7894
|
error: z.ZodOptional<z.ZodString>;
|
|
7456
7895
|
wallet: z.ZodOptional<z.ZodString>;
|
|
@@ -7754,6 +8193,7 @@ export declare const SinglePositionBatchResponseSchema: z.ZodObject<{
|
|
|
7754
8193
|
tokenType?: "2020" | "2022" | null | undefined;
|
|
7755
8194
|
originLogoUrl?: string | null | undefined;
|
|
7756
8195
|
};
|
|
8196
|
+
labels: string[] | null;
|
|
7757
8197
|
rawBalance: string;
|
|
7758
8198
|
buys: number;
|
|
7759
8199
|
sells: number;
|
|
@@ -7766,6 +8206,7 @@ export declare const SinglePositionBatchResponseSchema: z.ZodObject<{
|
|
|
7766
8206
|
totalPnlUSD: number;
|
|
7767
8207
|
firstDate: Date | null;
|
|
7768
8208
|
lastDate: Date | null;
|
|
8209
|
+
totalFeesPaidUSD?: number | undefined;
|
|
7769
8210
|
} | {
|
|
7770
8211
|
wallet?: string | undefined;
|
|
7771
8212
|
error?: string | undefined;
|
|
@@ -8075,6 +8516,8 @@ export declare const SinglePositionBatchResponseSchema: z.ZodObject<{
|
|
|
8075
8516
|
totalPnlUSD: number;
|
|
8076
8517
|
firstDate: Date | null;
|
|
8077
8518
|
lastDate: Date | null;
|
|
8519
|
+
totalFeesPaidUSD?: number | undefined;
|
|
8520
|
+
labels?: string[] | null | undefined;
|
|
8078
8521
|
} | {
|
|
8079
8522
|
wallet?: string | undefined;
|
|
8080
8523
|
error?: string | undefined;
|