This repository has been archived by the owner on May 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 42
/
params.d.cts
177 lines (177 loc) · 3.97 KB
/
params.d.cts
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
import { OrderSide, OrderType, OrderTimeInForce, DataSource } from './entities.cjs';
export interface AddToWatchList {
uuid: string;
symbol: string;
}
export interface CancelOrder {
order_id: string;
}
export interface ClosePosition {
symbol: string;
qty?: number;
percentage?: number;
}
export interface ClosePositions {
cancel_orders?: boolean;
}
export interface CreateWatchList {
name: string;
symbols?: string[];
}
export interface DeleteWatchList {
uuid: string;
}
export interface GetAccountActivities {
activity_type?: string;
activity_types?: string | string[];
date?: string;
until?: string;
after?: string;
direction?: 'asc' | 'desc';
page_size?: number;
page_token?: string;
}
export interface GetAsset {
asset_id_or_symbol: string;
}
export interface GetAssets {
status?: 'active' | 'inactive';
asset_class?: string;
}
export interface GetCalendar {
start?: Date;
end?: Date;
}
export interface GetTrades {
symbol: string;
start: Date;
end: Date;
limit?: number;
page_token?: string;
}
export interface GetQuotes {
symbol: string;
start: Date;
end: Date;
limit?: number;
page_token?: string;
}
export interface GetSnapshot {
symbol: string;
}
export interface GetSnapshots {
symbols: string[];
}
export interface GetBars {
symbol: string;
start: Date;
end: Date;
limit?: number;
page_token?: string;
timeframe: BarsTimeframe;
adjustment?: 'all' | 'dividend' | 'raw' | 'split';
}
export interface GetBars_v1 {
timeframe: BarsV1Timeframe;
symbols: string[];
limit?: number;
start?: Date;
end?: Date;
after?: Date;
until?: Date;
}
export interface GetLastQuote_v1 {
symbol: string;
}
export interface GetLastTrade_v1 {
symbol: string;
}
export interface GetOrder {
order_id?: string;
client_order_id?: string;
nested?: boolean;
}
export interface GetOrders {
status?: 'open' | 'closed' | 'all';
limit?: number;
after?: Date;
until?: Date;
direction?: 'asc' | 'desc';
nested?: boolean;
symbols?: string[];
}
export interface GetPortfolioHistory {
period?: string;
timeframe?: string;
date_end?: Date;
extended_hours?: boolean;
}
export interface GetPosition {
symbol: string;
}
export interface GetWatchList {
uuid: string;
}
export interface PlaceOrder {
symbol: string;
side: OrderSide;
type: OrderType;
time_in_force: OrderTimeInForce;
qty?: number;
notional?: number;
limit_price?: number;
stop_price?: number;
extended_hours?: boolean;
client_order_id?: string;
trail_price?: number;
trail_percent?: number;
order_class?: 'simple' | 'bracket' | 'oco' | 'oto';
take_profit?: {
limit_price: number;
};
stop_loss?: {
stop_price: number;
limit_price?: number;
};
}
export interface RemoveFromWatchList {
uuid: string;
symbol: string;
}
export interface ReplaceOrder {
order_id: string;
qty?: number;
time_in_force?: OrderTimeInForce;
limit_price?: number;
stop_price?: number;
client_order_id?: string;
}
export declare type BarsV1Timeframe = '1Min' | '5Min' | '15Min' | '1Day';
/** Also supports arbitrary minute, hour, and day values. E.g., '37Min', '6Hour', '3Day' */
export declare type BarsTimeframe = BarsV1Timeframe | '30Min' | '1Hour' | '2Hour' | '4Hour';
export interface UpdateAccountConfigurations {
dtbp_check?: string;
no_shorting?: boolean;
suspend_trade?: boolean;
trade_confirm_email?: string;
}
export interface GetLatestTrade {
symbol: string;
feed?: DataSource;
limit?: number;
}
export interface UpdateWatchList {
uuid: string;
name?: string;
symbols?: string[];
}
export interface GetNews {
symbols?: string[] | string;
start?: Date;
end?: Date;
limit?: number;
sort?: 'ASC' | 'DESC';
include_content?: boolean;
exclude_contentless?: boolean;
page_token?: string;
}