forked from webclinic017/passiv-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
groupInfo.ts
128 lines (111 loc) · 2.3 KB
/
groupInfo.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
import { Currency } from './currency';
import { Account } from './account';
// export type Account = {
// id: string;
// number: string;
// };
export type Brokerage = {
id: string;
name: string;
url: string;
};
export type BrokerageAuthorization = {
id: string;
created_date: string;
brokerage: Brokerage;
name: string;
type: string;
};
export type Symbol = {
id: string;
symbol: string;
description: string;
security_type?: string;
currency: Currency;
};
export type Balance = {
currency: Currency;
cash: number;
};
export type Position = {
symbol: Symbol;
price: number;
units: number;
excluded: boolean;
quotable: boolean;
uniformEquity: number;
actualPercentage: number;
};
export type TargetPosition = {
id: string;
symbol: string;
percent: number;
meta: object;
fullSymbol: Symbol | undefined;
actualPercentage: number;
is_excluded: boolean;
is_supported: boolean;
};
export type IdealPosition = {
symbol: string;
units: number;
};
export type ExcludedPosition = {
symbol: string;
};
export type Trade = {
action: string;
skip_trade: boolean;
symbol_in_target: boolean;
universal_symbol: Symbol;
};
export type CalculatedTrades = {
id: string;
trades: Trade[];
};
export type Settings = {
prevent_currency_conversion: boolean;
hard_currency_separation: boolean;
buy_only: boolean;
cash_optimizer: boolean;
notify_frequency: string;
drift_threshold: number;
preferred_currency: string;
target_initialized: boolean;
order_targets_by: number;
rebalance_by_asset_class: boolean;
};
export type Error = {
code: string;
meta?: {
symbols: any[];
};
};
export type AssetClass = {
id: string;
name: string;
percent: number;
exclude_asset_class: boolean;
};
export type AssetClassSymbol = {
symbol: string;
accounts: string[];
};
export type AssetClassesDetails = {
asset_class: AssetClass;
symbols: AssetClassSymbol[];
asset_class_in_targets: boolean;
};
export type GroupInfoData = {
asset_classes_details: AssetClassesDetails[];
accounts: Account[];
brokerage_authorizations: BrokerageAuthorization[];
symbols: Symbol[];
quotable_symbols: Symbol[];
balances: Balance[];
positions: Position[];
calculated_trades: CalculatedTrades;
accuracy: number;
settings: Settings;
error: Error;
};