ctrader-ts 0.1.0

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.
Files changed (68) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +301 -0
  3. package/assets/banner.png +0 -0
  4. package/dist/bin/auth.d.ts +3 -0
  5. package/dist/bin/auth.d.ts.map +1 -0
  6. package/dist/bin/auth.js +193 -0
  7. package/dist/bin/auth.js.map +1 -0
  8. package/dist/cli/index.d.ts +3 -0
  9. package/dist/cli/index.d.ts.map +1 -0
  10. package/dist/cli/index.js +359 -0
  11. package/dist/cli/index.js.map +1 -0
  12. package/dist/src/client.d.ts +310 -0
  13. package/dist/src/client.d.ts.map +1 -0
  14. package/dist/src/client.js +507 -0
  15. package/dist/src/client.js.map +1 -0
  16. package/dist/src/config.d.ts +18 -0
  17. package/dist/src/config.d.ts.map +1 -0
  18. package/dist/src/config.js +70 -0
  19. package/dist/src/config.js.map +1 -0
  20. package/dist/src/connect.d.ts +20 -0
  21. package/dist/src/connect.d.ts.map +1 -0
  22. package/dist/src/connect.js +36 -0
  23. package/dist/src/connect.js.map +1 -0
  24. package/dist/src/connection.d.ts +51 -0
  25. package/dist/src/connection.d.ts.map +1 -0
  26. package/dist/src/connection.js +292 -0
  27. package/dist/src/connection.js.map +1 -0
  28. package/dist/src/enums.d.ts +341 -0
  29. package/dist/src/enums.d.ts.map +1 -0
  30. package/dist/src/enums.js +369 -0
  31. package/dist/src/enums.js.map +1 -0
  32. package/dist/src/errors.d.ts +24 -0
  33. package/dist/src/errors.d.ts.map +1 -0
  34. package/dist/src/errors.js +47 -0
  35. package/dist/src/errors.js.map +1 -0
  36. package/dist/src/helpers.d.ts +28 -0
  37. package/dist/src/helpers.d.ts.map +1 -0
  38. package/dist/src/helpers.js +113 -0
  39. package/dist/src/helpers.js.map +1 -0
  40. package/dist/src/index.d.ts +12 -0
  41. package/dist/src/index.d.ts.map +1 -0
  42. package/dist/src/index.js +11 -0
  43. package/dist/src/index.js.map +1 -0
  44. package/dist/src/modules/account.d.ts +67 -0
  45. package/dist/src/modules/account.d.ts.map +1 -0
  46. package/dist/src/modules/account.js +168 -0
  47. package/dist/src/modules/account.js.map +1 -0
  48. package/dist/src/modules/auth.d.ts +20 -0
  49. package/dist/src/modules/auth.d.ts.map +1 -0
  50. package/dist/src/modules/auth.js +43 -0
  51. package/dist/src/modules/auth.js.map +1 -0
  52. package/dist/src/modules/market.d.ts +53 -0
  53. package/dist/src/modules/market.d.ts.map +1 -0
  54. package/dist/src/modules/market.js +192 -0
  55. package/dist/src/modules/market.js.map +1 -0
  56. package/dist/src/modules/trading.d.ts +80 -0
  57. package/dist/src/modules/trading.d.ts.map +1 -0
  58. package/dist/src/modules/trading.js +150 -0
  59. package/dist/src/modules/trading.js.map +1 -0
  60. package/dist/src/symbol-cache.d.ts +14 -0
  61. package/dist/src/symbol-cache.d.ts.map +1 -0
  62. package/dist/src/symbol-cache.js +41 -0
  63. package/dist/src/symbol-cache.js.map +1 -0
  64. package/dist/src/types.d.ts +413 -0
  65. package/dist/src/types.d.ts.map +1 -0
  66. package/dist/src/types.js +2 -0
  67. package/dist/src/types.js.map +1 -0
  68. package/package.json +61 -0
@@ -0,0 +1,310 @@
1
+ import { CTraderConnection } from "./connection.js";
2
+ import { CTraderAuth } from "./modules/auth.js";
3
+ import { CTraderTrading, type AmendOrderParams } from "./modules/trading.js";
4
+ import { CTraderAccount } from "./modules/account.js";
5
+ import { CTraderMarket, type GetTickDataParams, type GetTrendbarsParams } from "./modules/market.js";
6
+ import { TradeSide } from "./enums.js";
7
+ import type { AccountState, ConnectionState, Deal, DealOffset, DepositWithdraw, DepthEvent, DynamicLeverage, ExecutionEvent, ExpectedMargin, FullSymbol, LightSymbol, MarginCall, MarginCallEvent, MarginChangedEvent, Order, OrderErrorEvent, Position, PositionUnrealizedPnL, SlTpSpec, SymbolChangedEvent, TickData, Trader, TraderUpdatedEvent, TrailingSLChangedEvent, Trendbar, TokenInvalidatedEvent, ClientDisconnectEvent, AccountDisconnectEvent } from "./types.js";
8
+ export interface CTraderClientConfig {
9
+ /** WebSocket endpoint — use DEMO_ENDPOINT or LIVE_ENDPOINT */
10
+ endpoint: string;
11
+ /** Numeric cTID trader account ID */
12
+ accountId: number;
13
+ /** Max reconnect attempts before giving up. Default: unlimited */
14
+ maxReconnectAttempts?: number;
15
+ /** Per-request timeout in ms. Default: 15000 */
16
+ requestTimeoutMs?: number;
17
+ /** Called after WebSocket reconnects (not initial connect). Use for re-auth + subscription restore. */
18
+ onReconnect?: () => Promise<void>;
19
+ }
20
+ /** Volume in lots, e.g. 0.01, 0.1, 1.0 */
21
+ export type Lots = number;
22
+ /** Symbol name ("EURUSD") or numeric symbol ID */
23
+ export type Symbol = string | number;
24
+ export interface MarketOrderOptions {
25
+ /** Volume in lots (1 lot = 100,000 units). Min is broker-dependent, typically 0.01 */
26
+ lots: Lots;
27
+ /** Stop loss — specify in pips, dollars, or equity fraction */
28
+ sl?: SlTpSpec;
29
+ /** Take profit — specify in pips, dollars, or equity fraction */
30
+ tp?: SlTpSpec;
31
+ /** Enable trailing stop loss */
32
+ trailingStopLoss?: boolean;
33
+ /** Guaranteed stop loss (for accounts that support it) */
34
+ guaranteedStopLoss?: boolean;
35
+ /** Arbitrary label for identifying bot orders */
36
+ label?: string;
37
+ /** Arbitrary comment visible in trade history */
38
+ comment?: string;
39
+ /** Your own order ID for deduplication or tracking */
40
+ clientOrderId?: string;
41
+ }
42
+ export interface LimitOrderOptions extends MarketOrderOptions {
43
+ /** Limit price — order fills only at this price or better */
44
+ limitPrice: number;
45
+ /** Order expiry as Unix timestamp in ms. Required for GTD orders */
46
+ expirationTimestamp?: number;
47
+ }
48
+ export interface StopOrderOptions extends MarketOrderOptions {
49
+ /** Stop trigger price */
50
+ stopPrice: number;
51
+ /** Order expiry as Unix timestamp in ms */
52
+ expirationTimestamp?: number;
53
+ }
54
+ export interface StopLimitOptions extends MarketOrderOptions {
55
+ /** Stop trigger price — when hit, a limit order is placed */
56
+ stopPrice: number;
57
+ /** Max slippage from the stop price for the resulting limit order, in points */
58
+ slippageInPoints: number;
59
+ /** Order expiry as Unix timestamp in ms */
60
+ expirationTimestamp?: number;
61
+ }
62
+ export interface ModifyOptions {
63
+ /** New stop loss — specify in pips, dollars, or equity fraction */
64
+ sl?: SlTpSpec;
65
+ /** New take profit — specify in pips, dollars, or equity fraction */
66
+ tp?: SlTpSpec;
67
+ }
68
+ export interface SpotPrice {
69
+ /** Symbol name */
70
+ symbol: string;
71
+ /** Symbol numeric ID */
72
+ symbolId: number;
73
+ /** Raw bid (divide by 100000 for decimal) */
74
+ bid?: number;
75
+ /** Raw ask (divide by 100000 for decimal) */
76
+ ask?: number;
77
+ /** Bid as decimal price */
78
+ bidDecimal?: number;
79
+ /** Ask as decimal price */
80
+ askDecimal?: number;
81
+ /** Unix timestamp in ms */
82
+ timestamp?: number;
83
+ }
84
+ export declare class CTrader {
85
+ /** Low-level WebSocket connection — use for raw events and advanced control */
86
+ readonly connection: CTraderConnection;
87
+ /** Raw protocol modules — full access to every API parameter */
88
+ readonly raw: {
89
+ auth: CTraderAuth;
90
+ trading: CTraderTrading;
91
+ account: CTraderAccount;
92
+ market: CTraderMarket;
93
+ };
94
+ private readonly symbols;
95
+ constructor(config: CTraderClientConfig);
96
+ /** "connected" | "connecting" | "reconnecting" | "disconnected" */
97
+ get state(): ConnectionState;
98
+ /** True when the WebSocket is open and ready */
99
+ get isConnected(): boolean;
100
+ /**
101
+ * Switch to a different account without reconnecting.
102
+ * If the account needs separate auth call raw.auth.authenticateAccount() first.
103
+ */
104
+ setAccount(accountId: number): void;
105
+ /** Disconnect the WebSocket and stop reconnecting */
106
+ disconnect(): void;
107
+ /**
108
+ * All available symbols for the account. Result is cached.
109
+ * @param includeArchived - Include archived/delisted symbols. Default: false
110
+ */
111
+ getSymbols(includeArchived?: boolean): Promise<LightSymbol[]>;
112
+ /**
113
+ * Full symbol details: spread, commission, swap rates, lot size, trading hours.
114
+ * @param symbolsOrIds - Symbol names ("EURUSD") or numeric IDs, or a mix
115
+ */
116
+ getSymbolDetails(symbolsOrIds: Symbol[]): Promise<FullSymbol[]>;
117
+ /** Force-refresh the symbol name→ID cache. Call if the broker adds new symbols. */
118
+ refreshSymbols(): Promise<void>;
119
+ /** Trader profile: balance, equity, margin, account type, access rights */
120
+ getTrader(): Promise<Trader>;
121
+ /**
122
+ * All open positions and pending orders.
123
+ * @param returnProtectionOrders - Also return SL/TP as separate order objects
124
+ */
125
+ getPositions(returnProtectionOrders?: boolean): Promise<{
126
+ positions: Position[];
127
+ orders: Order[];
128
+ }>;
129
+ /**
130
+ * Call this first to understand the current account situation before making any trading decisions.
131
+ * Returns a complete snapshot: balance, equity, margin, P&L, all positions and orders.
132
+ */
133
+ getState(): Promise<AccountState>;
134
+ /**
135
+ * Deal (execution) history.
136
+ * @param from - Start Unix timestamp in ms
137
+ * @param to - End Unix timestamp in ms
138
+ * @param maxRows - Limit results (API max ~5000)
139
+ */
140
+ getDeals(from?: number, to?: number, maxRows?: number): Promise<{
141
+ deals: Deal[];
142
+ hasMore: boolean;
143
+ }>;
144
+ /** Deal history for a specific position */
145
+ getDealsByPosition(positionId: number, from?: number, to?: number): Promise<Deal[]>;
146
+ /** Which deals closed (offsetBy) and were closed by (offsetting) a given deal */
147
+ getDealOffsets(dealId: number): Promise<{
148
+ offsetBy: DealOffset[];
149
+ offsetting: DealOffset[];
150
+ }>;
151
+ /** Order history */
152
+ getOrders(from?: number, to?: number): Promise<{
153
+ orders: Order[];
154
+ hasMore: boolean;
155
+ }>;
156
+ /** Deposit/withdrawal history. Max range: 7 days */
157
+ getCashFlow(from: number, to: number): Promise<DepositWithdraw[]>;
158
+ /**
159
+ * Estimate required margin before placing an order.
160
+ * @param symbol - Symbol name or ID
161
+ * @param volumesInLots - One or more volumes to estimate (e.g. [0.1, 0.5, 1.0])
162
+ */
163
+ getExpectedMargin(symbol: Symbol, volumesInLots: Lots[]): Promise<{
164
+ margins: ExpectedMargin[];
165
+ moneyDigits?: number;
166
+ }>;
167
+ /** Unrealised P&L for all open positions */
168
+ getUnrealizedPnl(): Promise<{
169
+ pnls: PositionUnrealizedPnL[];
170
+ moneyDigits: number;
171
+ }>;
172
+ /** Dynamic leverage tiers for a leverage profile (leverageId comes from symbol details) */
173
+ getDynamicLeverage(leverageId: number): Promise<DynamicLeverage>;
174
+ /** Margin call threshold levels (up to 3) */
175
+ getMarginCalls(): Promise<MarginCall[]>;
176
+ /** Update a margin call threshold level */
177
+ updateMarginCall(marginCall: MarginCall): Promise<void>;
178
+ /**
179
+ * Market BUY — executes immediately at best available price.
180
+ * Returns the opened Position directly (extracted from ExecutionEvent).
181
+ * SL/TP can be specified in pips, dollars, or equity fraction.
182
+ * @param symbol - "EURUSD", "XAUUSD", or numeric symbol ID
183
+ * @param opts - lots, sl?, tp?, label?, etc.
184
+ */
185
+ buy(symbol: Symbol, opts: MarketOrderOptions): Promise<Position>;
186
+ /**
187
+ * Market SELL — executes immediately at best available price.
188
+ * Returns the opened Position directly (extracted from ExecutionEvent).
189
+ * SL/TP can be specified in pips, dollars, or equity fraction.
190
+ * @param symbol - "EURUSD", "XAUUSD", or numeric symbol ID
191
+ * @param opts - lots, sl?, tp?, label?, etc.
192
+ */
193
+ sell(symbol: Symbol, opts: MarketOrderOptions): Promise<Position>;
194
+ /**
195
+ * Limit BUY — fills only when price drops to limitPrice or lower.
196
+ * @param symbol - Symbol name or ID
197
+ * @param opts - Must include limitPrice
198
+ */
199
+ buyLimit(symbol: Symbol, opts: LimitOrderOptions): Promise<ExecutionEvent>;
200
+ /**
201
+ * Limit SELL — fills only when price rises to limitPrice or higher.
202
+ * @param symbol - Symbol name or ID
203
+ * @param opts - Must include limitPrice
204
+ */
205
+ sellLimit(symbol: Symbol, opts: LimitOrderOptions): Promise<ExecutionEvent>;
206
+ /**
207
+ * Stop BUY — triggers when price rises to stopPrice (breakout entry).
208
+ * @param symbol - Symbol name or ID
209
+ * @param opts - Must include stopPrice
210
+ */
211
+ buyStop(symbol: Symbol, opts: StopOrderOptions): Promise<ExecutionEvent>;
212
+ /**
213
+ * Stop SELL — triggers when price drops to stopPrice (breakout entry).
214
+ * @param symbol - Symbol name or ID
215
+ * @param opts - Must include stopPrice
216
+ */
217
+ sellStop(symbol: Symbol, opts: StopOrderOptions): Promise<ExecutionEvent>;
218
+ /**
219
+ * Stop-limit order: when price hits stopPrice, a limit order is placed within slippageInPoints.
220
+ * @param symbol - Symbol name or ID
221
+ * @param tradeSide - TradeSide.BUY or TradeSide.SELL
222
+ * @param opts - Must include stopPrice and slippageInPoints
223
+ */
224
+ stopLimit(symbol: Symbol, tradeSide: TradeSide, opts: StopLimitOptions): Promise<ExecutionEvent>;
225
+ /**
226
+ * Modify SL/TP on an open position using human-friendly specs (pips, dollars, equity).
227
+ * @param positionId - The cTrader position ID
228
+ * @param opts - New sl and/or tp
229
+ */
230
+ modify(positionId: number, opts: ModifyOptions): Promise<void>;
231
+ /**
232
+ * Close a position by ID. Full close by default, or partial if lots is specified.
233
+ * @param positionId - The cTrader position ID
234
+ * @param opts - Optional: specify lots for partial close
235
+ */
236
+ close(positionId: number, opts?: {
237
+ lots?: number;
238
+ }): Promise<ExecutionEvent>;
239
+ /**
240
+ * Close all positions on a specific symbol.
241
+ * @param symbol - Symbol name ("EURUSD") or numeric ID
242
+ */
243
+ closeSymbol(symbol: Symbol): Promise<ExecutionEvent[]>;
244
+ /** Close every open position on the account */
245
+ closeAll(): Promise<ExecutionEvent[]>;
246
+ /**
247
+ * Modify a pending order (limit/stop/stop-limit).
248
+ * Pass only the fields you want to change.
249
+ */
250
+ modifyOrder(orderId: number, params: AmendOrderParams): Promise<void>;
251
+ /** Cancel a pending order. No-op if already filled or expired. */
252
+ cancelOrder(orderId: number): Promise<void>;
253
+ /**
254
+ * Stream live bid/ask prices. Returns an async unsubscribe function.
255
+ * @example
256
+ * const stop = await client.watchSpots(["EURUSD"], (p) => console.log(p.bidDecimal, p.askDecimal));
257
+ * // later: await stop();
258
+ */
259
+ watchSpots(symbolsOrIds: Symbol[], handler: (price: SpotPrice) => void): Promise<() => Promise<void>>;
260
+ /**
261
+ * Historical OHLCV candlestick bars.
262
+ * @param symbol - Symbol name or ID
263
+ * @param params - TrendbarPeriod (M1, H1, D1…), fromTimestamp, toTimestamp, count
264
+ */
265
+ getTrendbars(symbol: Symbol, params: Omit<GetTrendbarsParams, "symbolId">): Promise<{
266
+ trendbars: Trendbar[];
267
+ hasMore: boolean;
268
+ }>;
269
+ /**
270
+ * Historical tick data (raw bid/ask ticks).
271
+ * @param symbol - Symbol name or ID
272
+ * @param params - QuoteType (BID or ASK), fromTimestamp, toTimestamp
273
+ */
274
+ getTickData(symbol: Symbol, params: Omit<GetTickDataParams, "symbolId">): Promise<{
275
+ ticks: TickData[];
276
+ hasMore: boolean;
277
+ }>;
278
+ /** Fires on every order fill, cancel, or modification. Returns unsubscribe fn */
279
+ onExecution(handler: (event: ExecutionEvent) => void): () => void;
280
+ /** Fires on order errors (rejected, insufficient margin). Returns unsubscribe fn */
281
+ onOrderError(handler: (event: OrderErrorEvent) => void): () => void;
282
+ /** Fires when trailing stop price moves. Returns unsubscribe fn */
283
+ onTrailingSLChanged(handler: (event: TrailingSLChangedEvent) => void): () => void;
284
+ /** Fires on balance/equity/settings changes. Returns unsubscribe fn */
285
+ onTraderUpdated(handler: (event: TraderUpdatedEvent) => void): () => void;
286
+ /** Fires when used margin changes on a position. Returns unsubscribe fn */
287
+ onMarginChanged(handler: (event: MarginChangedEvent) => void): () => void;
288
+ /** Fires when margin level crosses a margin call threshold. Returns unsubscribe fn */
289
+ onMarginCallTrigger(handler: (event: MarginCallEvent) => void): () => void;
290
+ /** Fires when broker updates symbol metadata. Returns unsubscribe fn */
291
+ onSymbolChanged(handler: (event: SymbolChangedEvent) => void): () => void;
292
+ /** Fires on depth-of-market (order book) changes. Returns unsubscribe fn */
293
+ onDepth(handler: (event: DepthEvent) => void): () => void;
294
+ /** Fires when the server disconnects this client (e.g. duplicate connection). Returns unsubscribe fn */
295
+ onClientDisconnect(handler: (event: ClientDisconnectEvent) => void): () => void;
296
+ /** Fires when the access token is invalidated for one or more accounts. Returns unsubscribe fn */
297
+ onTokenInvalidated(handler: (event: TokenInvalidatedEvent) => void): () => void;
298
+ /** Fires when a specific account is disconnected by the server. Returns unsubscribe fn */
299
+ onAccountDisconnect(handler: (event: AccountDisconnectEvent) => void): () => void;
300
+ watchDepth(symbolsOrIds: Symbol[], handler: (event: DepthEvent) => void): Promise<() => Promise<void>>;
301
+ private executeMarketOrder;
302
+ private executeLimitOrder;
303
+ private executeStopOrder;
304
+ }
305
+ /** Convert lots (0.01, 0.1, 1.0) to protocol units (1000, 10000, 100000) */
306
+ export declare function lotsToUnits(lots: Lots): number;
307
+ /** Convert protocol units back to lots */
308
+ export declare function unitsToLots(units: number): Lots;
309
+ export { pipsToRelative } from "./helpers.js";
310
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAgC,MAAM,iBAAiB,CAAC;AAClF,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EACN,cAAc,EACd,KAAK,gBAAgB,EAKrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,KAAK,iBAAiB,EAAE,KAAK,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAErG,OAAO,EAAe,SAAS,EAAE,MAAM,YAAY,CAAC;AAEpD,OAAO,KAAK,EACX,YAAY,EACZ,eAAe,EACf,IAAI,EACJ,UAAU,EACV,eAAe,EACf,UAAU,EACV,eAAe,EACf,cAAc,EACd,cAAc,EACd,UAAU,EACV,WAAW,EACX,UAAU,EACV,eAAe,EACf,kBAAkB,EAClB,KAAK,EACL,eAAe,EACf,QAAQ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