-
Notifications
You must be signed in to change notification settings - Fork 7
/
mod.ts
255 lines (251 loc) · 5.98 KB
/
mod.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
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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
// If `APCA_DEBUG` false, console.debug() should not log anything.
if (JSON.parse(Deno.env.get("APCA_DEBUG") || "false")) {
console.debug = () => {};
} else {
// Prefix all debug logs with "@alpacahq/typescript-sdk" to make it easier to
// for users to filter out debug logs from this SDK.
console.debug = (...args) =>
console.log("@alpacahq/typescript-sdk:debug", ...args);
}
export {
type CashDividend,
type CashMerger,
type CorporateActions,
type CryptoBar,
type CryptoBars,
type CryptoBarsLatest,
type CryptoOrderbook,
type CryptoOrderbookEntry,
type CryptoOrderbooksLatest,
type CryptoQuote,
type CryptoQuotes,
type CryptoQuotesLatest,
type CryptoSnapshots,
type CryptoTrade,
type CryptoTrades,
type CryptoTradesLatest,
type ForexRate,
type ForexRates,
type ForexRatesLatest,
type ForwardSplit,
getCryptoBars,
type GetCryptoBarsLatestOptions,
type GetCryptoBarsOptions,
type GetCryptoOrderbooksLatestOptions,
getCryptoQuotes,
getCryptoQuotesLatest,
type GetCryptoQuotesLatestOptions,
type GetCryptoQuotesOptions,
getCryptoSnapshots,
type GetCryptoSnapshotsOptions,
getCryptoTrades,
getCryptoTradesLatest,
type GetCryptoTradesLatestOptions,
type GetCryptoTradesOptions,
getForexRates,
type GetForexRatesLatestOptions,
type GetForexRatesOptions,
getLatestCryptoBars,
getLatestCryptoOrderbooks,
getLatestForexRates,
getLogo,
type GetLogoOptions,
getNews,
type GetNewsOptions,
getOptionsBars,
type GetOptionsBarsOptions,
getOptionsExchanges,
getOptionsSnapshots,
type GetOptionsSnapshotsOptions,
getOptionsTrades,
getOptionsTradesLatest,
type GetOptionsTradesLatestOptions,
type GetOptionsTradesOptions,
getStocksAuctions,
type GetStocksAuctionsOptions,
getStocksBars,
getStocksBarsLatest,
type GetStocksBarsLatestOptions,
type GetStocksBarsOptions,
getStocksConditions,
type GetStocksConditionsOptions,
getStocksCorporateActions,
type GetStocksCorporateActionsOptions,
getStocksExchangeCodes,
getStocksMarketMovers,
type GetStocksMarketMoversOptions,
getStocksMostActives,
type GetStocksMostActivesOptions,
getStocksQuotes,
getStocksQuotesLatest,
type GetStocksQuotesLatestOptions,
type GetStocksQuotesOptions,
getStocksSnapshots,
type GetStocksSnapshotsOptions,
getStocksTrades,
getStocksTradesLatest,
type GetStocksTradesLatestOptions,
type GetStocksTradesOptions,
type Logo,
type MarketMover,
type MarketMovers,
type MostActive,
type MostActives,
type NameChange,
type OptionBar,
type OptionsBars,
type OptionsExchanges,
type OptionsSnapshots,
type OptionsSnapshotsQuote,
type OptionsSnapshotsTrade,
type OptionsTrades,
type OptionsTradesLatest,
type Redemption,
type ReverseSplit,
type Sort,
type SpinOff,
type StockAndCashMerger,
type StockBar,
type StockDividend,
type StockMerger,
type StockQuote,
type StocksAuction,
type StocksAuctionPrice,
type StocksAuctions,
type StocksBar,
type StocksBars,
type StocksBarsLatest,
type StocksConditions,
type StocksExchangeCodes,
type StockSnapshots,
type StocksQuotes,
type StocksQuotesLatest,
type StocksTrades,
type StocksTradesLatest,
type StockTrade,
type UnitSplit,
type WorthlessRemoval,
} from "./api/marketData.ts";
export {
type Account,
type AccountStatus,
type Activity,
type Asset,
type BaseOrder,
type Calendar,
cancelOrder,
type CancelOrderOptions,
cancelOrders,
type Clock,
closePosition,
type ClosePositionOptions,
closePositions,
type Configurations,
type CorporateAction,
createCryptoTransfer,
type CreateCryptoTransferOptions,
createOrder,
type CreateOrderOptions,
createWatchlist,
type CreateWatchlistOptions,
type CryptoFee,
type CryptoOrder,
type CryptoTransfer,
type CryptoTransferResponse,
type CryptoWallet,
deleteWatchlist,
type DeleteWatchlistOptions,
type Direction,
type EquityOrder,
type ExerciseOption,
exerciseOption,
getAccount,
getActivities,
getActivity,
type GetActivityOptions,
getAsset,
type GetAssetOptions,
getAssets,
type GetAssetsOptions,
getCalendar,
type GetCalendarOptions,
getClock,
getConfigurations,
getCorporateAction,
type GetCorporateActionOptions,
getCorporateActions,
type GetCorporateActionsOptions,
type GetCryptoFeeEstimateOptions,
getCryptoTransfer,
type GetCryptoTransferOptions,
getCryptoTransfers,
type GetCryptoTransfersOptions,
getCryptoWallet,
getCryptoWallets,
getCryptoWhitelistedAddress,
getCryptoWhitelistedAddresses,
type GetCryptoWhitelistedAddressOptions,
getFeeEstimate,
getOptionsContract,
type GetOptionsContractOptions,
getOptionsContracts,
type GetOptionsContractsOptions,
getOrder,
type GetOrderOptions,
getOrders,
type GetOrdersOptions,
getPortfolioHistory,
type GetPortfolioHistoryOptions,
getPosition,
type GetPositionOptions,
getPositions,
type GetWalletOptions,
getWatchlist,
type GetWatchlistOptions,
getWatchlists,
type NonTradeActivity,
type OptionsApprovedLevel,
type OptionsContract,
type OptionsOrder,
type OptionsTradingLevel,
type Order,
type OrderClass,
type PortfolioHistory,
type PositionIntent,
removeCryptoWhitelistedAddress,
type RemoveCryptoWhitelistedAddressOptions,
replaceOrder,
type ReplaceOrderOptions,
requestCryptoWhitelistedAddress,
type RequestCryptoWhitelistedAddressOptions,
type Side,
type StopLoss,
type TakeProfit,
type TimeInForce,
type TradingActivity,
type Type,
type UnstableNumber,
updateConfigurations,
type UpdateConfigurationsOptions,
updateWatchlist,
type UpdateWatchlistOptions,
type Watchlist,
type WhitelistedAddress,
} from "./api/trade.ts";
export {
baseURLs,
type Client,
type ClientContext,
createClient,
type CreateClientOptions,
type RequestOptions,
} from "./factory/createClient.ts";
export {
createTokenBucket,
type TokenBucketOptions,
} from "./factory/createTokenBucket.ts";
export {
type MockFetch,
mockFetch,
type MockResponse,
} from "./util/mockFetch.ts";