@bitgen/sdk 1.0.8 → 1.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.
- package/CHANGELOG.md +13 -0
- package/README.md +3 -1
- package/dist/cjs/client.d.ts +4 -0
- package/dist/cjs/client.d.ts.map +1 -1
- package/dist/cjs/client.js +6 -0
- package/dist/cjs/client.js.map +1 -1
- package/dist/cjs/constants.d.ts +118 -0
- package/dist/cjs/constants.d.ts.map +1 -1
- package/dist/cjs/constants.js +93 -1
- package/dist/cjs/constants.js.map +1 -1
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +14 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/resources/autotrading.d.ts +44 -0
- package/dist/cjs/resources/autotrading.d.ts.map +1 -0
- package/dist/cjs/resources/autotrading.js +116 -0
- package/dist/cjs/resources/autotrading.js.map +1 -0
- package/dist/cjs/resources/bot.d.ts +31 -0
- package/dist/cjs/resources/bot.d.ts.map +1 -0
- package/dist/cjs/resources/bot.js +54 -0
- package/dist/cjs/resources/bot.js.map +1 -0
- package/dist/cjs/types/autotrading.d.ts +196 -0
- package/dist/cjs/types/autotrading.d.ts.map +1 -0
- package/dist/cjs/types/autotrading.js +3 -0
- package/dist/cjs/types/autotrading.js.map +1 -0
- package/dist/cjs/types/bot.d.ts +45 -0
- package/dist/cjs/types/bot.d.ts.map +1 -0
- package/dist/cjs/types/bot.js +3 -0
- package/dist/cjs/types/bot.js.map +1 -0
- package/dist/cjs/types/index.d.ts +13 -3
- package/dist/cjs/types/index.d.ts.map +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/client.d.ts +4 -0
- package/dist/esm/client.d.ts.map +1 -1
- package/dist/esm/client.js +6 -0
- package/dist/esm/client.js.map +1 -1
- package/dist/esm/constants.d.ts +118 -0
- package/dist/esm/constants.d.ts.map +1 -1
- package/dist/esm/constants.js +92 -0
- package/dist/esm/constants.js.map +1 -1
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/resources/autotrading.d.ts +44 -0
- package/dist/esm/resources/autotrading.d.ts.map +1 -0
- package/dist/esm/resources/autotrading.js +112 -0
- package/dist/esm/resources/autotrading.js.map +1 -0
- package/dist/esm/resources/bot.d.ts +31 -0
- package/dist/esm/resources/bot.d.ts.map +1 -0
- package/dist/esm/resources/bot.js +50 -0
- package/dist/esm/resources/bot.js.map +1 -0
- package/dist/esm/types/autotrading.d.ts +196 -0
- package/dist/esm/types/autotrading.d.ts.map +1 -0
- package/dist/esm/types/autotrading.js +2 -0
- package/dist/esm/types/autotrading.js.map +1 -0
- package/dist/esm/types/bot.d.ts +45 -0
- package/dist/esm/types/bot.d.ts.map +1 -0
- package/dist/esm/types/bot.js +2 -0
- package/dist/esm/types/bot.js.map +1 -0
- package/dist/esm/types/index.d.ts +13 -3
- package/dist/esm/types/index.d.ts.map +1 -1
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/package.json +1 -1
- package/readme/concepts.md +3 -3
- package/readme/errors.md +1 -1
- package/readme/resource/autotrading.md +304 -0
- package/readme/resource/bot.md +207 -0
- package/readme/resource/customer.md +1 -1
- package/readme/resource/transaction.md +1 -1
- package/readme/resource/webhooks.md +2 -0
- package/src/client.ts +6 -0
- package/src/constants.ts +131 -0
- package/src/index.ts +28 -0
- package/src/resources/autotrading.ts +132 -0
- package/src/resources/bot.ts +58 -0
- package/src/types/autotrading.ts +218 -0
- package/src/types/bot.ts +48 -0
- package/src/types/index.ts +45 -3
- package/src/version.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
## [1.1.0] - 2026-11-28
|
|
2
|
+
|
|
3
|
+
### Added
|
|
4
|
+
- `client.autotrading` — a new resource: the module an organization installs to invest for its own account, driven by strategies. `create()` and `update()` carry the whole frame (`update` replaces it field for field), `list()` and `get()` read the strategies, `pause()` / `resume()` / `close()` drive them, `history()` answers the curve, the performance and the same window on BTC, `journal()` what the strategy did — inside a window of ten thousand lines — and `portfolio()` aggregates the live ones. The bot assigned to the module holds the funds; the guard rails of a strategy (stop loss, take profit, trailing stop, purchase bounds, automatic pause) are applied by the platform without ever asking the engine, and `capital` is a ceiling it never goes past. **Every EUR amount of this resource is a string**, in and out — a number passed on a write is converted to a decimal string. An `assets` that is not an array is refused before any request — a string, iterated, would otherwise reach the API as one asset per letter. Types `Strategy`, `StrategyGuards`, `StrategyInput`, `StrategyListParams`, `StrategyHistory`, `StrategyRatios`, `StrategyJournalEntry`, `AutotradingPortfolio`, `StrategyRef`, and the constants `StrategyState`, `StrategyRisk`, `StrategyFrequency`, `StrategyAllocation`, `StrategyClosing`, `StrategyNotifyMode`, `StrategyJournalEvent`, `StrategyExitReason`, `StrategyIdleReason`
|
|
5
|
+
- `WebhookEventName` carries the two events of the resource, `aitrading.setup` and `aitrading.action` — the trading events stay silent for the orders of a bot
|
|
6
|
+
- `client.bot` — a new resource: the technical customers an organization runs for its own account. `create()` takes nothing and answers the bot, `list()` and `get()` read the bots with the modules they serve, `assign()` and `detach()` attach a module, `modules()` lists them, `close()` closes the bot. Both reads answer the identity of a bot and its modules, and nothing more: the details of the account behind it are read through `client.customer`. Types `Bot`, `BotApplication`, `BotExtension`, `BotListParams`, `BotRef`, `BotModuleRef`, and the constants `BotState`, `BotApplicationState`, `ExtensionState`, `ExtensionCategory`. Two calls create two bots: the route carries no idempotency key, so a replay after a timeout creates a duplicate. Both the customer quota and the bot quota are counted over the scope of the subscription — the organization, or the hub it belongs to when the subscription is taken there — while the list only ever answers the bots of the organization itself.
|
|
7
|
+
|
|
8
|
+
### Changed
|
|
9
|
+
- `client.bot` — `detach()` and `close()` now answer `412 bot_has_strategies` and `412 unable_to_delete_has_strategy` while a strategy of the automated trading module is not `CLOSED`
|
|
10
|
+
- The pages of `client.customer` and `client.transaction` say that the **bots** of an organization are left out of them, and point to the Bots page
|
|
11
|
+
- [Concepts](readme/concepts.md) — `bot.list` is listed among the boolean filters and `bot.modules` among the lists that are not paginated, and **Amounts** says that every EUR amount of `client.autotrading` is a string
|
|
12
|
+
- Documentation: a `500` is no longer the API's answer to a request it does not recognize — an unknown URL answers `404 not_found`, and a method the API does not allow `405 method_not_allowed`
|
|
13
|
+
|
|
1
14
|
## [1.0.8] - 2026-10-09
|
|
2
15
|
|
|
3
16
|
### Changed
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @bitgen/sdk — v1.0
|
|
1
|
+
# @bitgen/sdk — v1.1.0
|
|
2
2
|
|
|
3
3
|
Official Node.js SDK for the BITGEN API v4 — server-side, TypeScript, ESM and CommonJS, no runtime dependency.
|
|
4
4
|
Install it with `npm install @bitgen/sdk` (Node.js 20 or later).
|
|
@@ -33,6 +33,8 @@ Resources, in the order of an integration:
|
|
|
33
33
|
- [Connectors](readme/resource/core.md) — `client.core`
|
|
34
34
|
- [Webhooks](readme/resource/webhooks.md) — `client.webhooks`
|
|
35
35
|
- [API keys](readme/resource/apikeys.md) — `client.apikeys`
|
|
36
|
+
- [Bots](readme/resource/bot.md) — `client.bot`
|
|
37
|
+
- [Automated trading](readme/resource/autotrading.md) — `client.autotrading`
|
|
36
38
|
- [Assets](readme/resource/asset.md) — `client.asset`
|
|
37
39
|
|
|
38
40
|
## License
|
package/dist/cjs/client.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { HttpClient } from './http.js';
|
|
2
2
|
import { ApikeysResource } from './resources/apikeys.js';
|
|
3
3
|
import { AssetResource } from './resources/asset.js';
|
|
4
|
+
import { AutotradingResource } from './resources/autotrading.js';
|
|
4
5
|
import { BankResource } from './resources/bank.js';
|
|
6
|
+
import { BotResource } from './resources/bot.js';
|
|
5
7
|
import { CoreResource } from './resources/core.js';
|
|
6
8
|
import { CustodyResource } from './resources/custody.js';
|
|
7
9
|
import { CustomerResource } from './resources/customer.js';
|
|
@@ -26,6 +28,8 @@ export declare class BitgenClient {
|
|
|
26
28
|
readonly staking: StakingResource;
|
|
27
29
|
readonly webhooks: WebhooksResource;
|
|
28
30
|
readonly apikeys: ApikeysResource;
|
|
31
|
+
readonly bot: BotResource;
|
|
32
|
+
readonly autotrading: AutotradingResource;
|
|
29
33
|
constructor(config: BitgenConfig);
|
|
30
34
|
}
|
|
31
35
|
//# sourceMappingURL=client.d.ts.map
|
package/dist/cjs/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAEpD;;;GAGG;AACH,qBAAa,YAAY;IACvB,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAA;IAEnC,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAA;IAC7B,QAAQ,CAAC,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QAAQ,CAAC,IAAI,EAAE,UAAU,CAAA;IAEnC,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAA;IAC7B,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAAA;IACnC,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAA;IAC3B,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAA;IACjC,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAA;IACjC,QAAQ,CAAC,WAAW,EAAE,mBAAmB,CAAA;IACzC,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAA;IAC3B,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAA;IACjC,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAAA;IACnC,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAA;IACjC,QAAQ,CAAC,GAAG,EAAE,WAAW,CAAA;IACzB,QAAQ,CAAC,WAAW,EAAE,mBAAmB,CAAA;gBAE7B,MAAM,EAAE,YAAY;CAgBjC"}
|
package/dist/cjs/client.js
CHANGED
|
@@ -4,7 +4,9 @@ exports.BitgenClient = void 0;
|
|
|
4
4
|
const http_js_1 = require("./http.js");
|
|
5
5
|
const apikeys_js_1 = require("./resources/apikeys.js");
|
|
6
6
|
const asset_js_1 = require("./resources/asset.js");
|
|
7
|
+
const autotrading_js_1 = require("./resources/autotrading.js");
|
|
7
8
|
const bank_js_1 = require("./resources/bank.js");
|
|
9
|
+
const bot_js_1 = require("./resources/bot.js");
|
|
8
10
|
const core_js_1 = require("./resources/core.js");
|
|
9
11
|
const custody_js_1 = require("./resources/custody.js");
|
|
10
12
|
const customer_js_1 = require("./resources/customer.js");
|
|
@@ -28,6 +30,8 @@ class BitgenClient {
|
|
|
28
30
|
staking;
|
|
29
31
|
webhooks;
|
|
30
32
|
apikeys;
|
|
33
|
+
bot;
|
|
34
|
+
autotrading;
|
|
31
35
|
constructor(config) {
|
|
32
36
|
this.http = new http_js_1.HttpClient(config);
|
|
33
37
|
this.asset = new asset_js_1.AssetResource(this.http);
|
|
@@ -40,6 +44,8 @@ class BitgenClient {
|
|
|
40
44
|
this.staking = new staking_js_1.StakingResource(this.http, this.core);
|
|
41
45
|
this.webhooks = new webhooks_js_1.WebhooksResource(this.http);
|
|
42
46
|
this.apikeys = new apikeys_js_1.ApikeysResource(this.http);
|
|
47
|
+
this.bot = new bot_js_1.BotResource(this.http);
|
|
48
|
+
this.autotrading = new autotrading_js_1.AutotradingResource(this.http);
|
|
43
49
|
}
|
|
44
50
|
}
|
|
45
51
|
exports.BitgenClient = BitgenClient;
|
package/dist/cjs/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":";;;AAAA,uCAAsC;AACtC,uDAAwD;AACxD,mDAAoD;AACpD,iDAAkD;AAClD,iDAAkD;AAClD,uDAAwD;AACxD,yDAA0D;AAC1D,uDAAwD;AACxD,uDAAwD;AACxD,+DAAgE;AAChE,yDAA0D;AAG1D;;;GAGG;AACH,MAAa,YAAY;IACJ,IAAI,CAAY;IAE1B,KAAK,CAAe;IACpB,QAAQ,CAAkB;IAC1B,IAAI,CAAc;IAClB,OAAO,CAAiB;IACxB,OAAO,CAAiB;IACxB,WAAW,CAAqB;IAChC,IAAI,CAAc;IAClB,OAAO,CAAiB;IACxB,QAAQ,CAAkB;IAC1B,OAAO,CAAiB;
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":";;;AAAA,uCAAsC;AACtC,uDAAwD;AACxD,mDAAoD;AACpD,+DAAgE;AAChE,iDAAkD;AAClD,+CAAgD;AAChD,iDAAkD;AAClD,uDAAwD;AACxD,yDAA0D;AAC1D,uDAAwD;AACxD,uDAAwD;AACxD,+DAAgE;AAChE,yDAA0D;AAG1D;;;GAGG;AACH,MAAa,YAAY;IACJ,IAAI,CAAY;IAE1B,KAAK,CAAe;IACpB,QAAQ,CAAkB;IAC1B,IAAI,C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,CAAC,IAAI,CAAC,CAAA;IACvD,CAAC;CACF;AAhCD,oCAgCC"}
|
package/dist/cjs/constants.d.ts
CHANGED
|
@@ -43,6 +43,22 @@ export declare const BankDirection: Readonly<{
|
|
|
43
43
|
}>;
|
|
44
44
|
/** The values of `BankDirection` */
|
|
45
45
|
export type BankDirection = (typeof BankDirection)[keyof typeof BankDirection];
|
|
46
|
+
/** States of a module a bot serves — `BotApplication.state` */
|
|
47
|
+
export declare const BotApplicationState: Readonly<{
|
|
48
|
+
readonly ENABLED: "ENABLED";
|
|
49
|
+
readonly PENDING: "PENDING";
|
|
50
|
+
readonly SUSPENDED: "SUSPENDED";
|
|
51
|
+
}>;
|
|
52
|
+
/** The values of `BotApplicationState` */
|
|
53
|
+
export type BotApplicationState = (typeof BotApplicationState)[keyof typeof BotApplicationState];
|
|
54
|
+
/** States of a bot — `Bot.state`, compare it with `BotState.ENABLED` */
|
|
55
|
+
export declare const BotState: Readonly<{
|
|
56
|
+
readonly ENABLED: "ENABLED";
|
|
57
|
+
readonly CLOSED: "CLOSED";
|
|
58
|
+
readonly FROZEN: "FROZEN";
|
|
59
|
+
}>;
|
|
60
|
+
/** The values of `BotState` */
|
|
61
|
+
export type BotState = (typeof BotState)[keyof typeof BotState];
|
|
46
62
|
/** States of a connector — `Core.state`; also the `state` filter of `client.core.list` */
|
|
47
63
|
export declare const CoreState: Readonly<{
|
|
48
64
|
readonly ENABLED: "ENABLED";
|
|
@@ -76,6 +92,21 @@ export declare const CustomerState: Readonly<{
|
|
|
76
92
|
}>;
|
|
77
93
|
/** The values of `CustomerState` */
|
|
78
94
|
export type CustomerState = (typeof CustomerState)[keyof typeof CustomerState];
|
|
95
|
+
/** Categories of an extension — `BotExtension.category` */
|
|
96
|
+
export declare const ExtensionCategory: Readonly<{
|
|
97
|
+
readonly AI: "AI";
|
|
98
|
+
readonly CGP: "CGP";
|
|
99
|
+
readonly MISC: "MISC";
|
|
100
|
+
}>;
|
|
101
|
+
/** The values of `ExtensionCategory` */
|
|
102
|
+
export type ExtensionCategory = (typeof ExtensionCategory)[keyof typeof ExtensionCategory];
|
|
103
|
+
/** States of an extension — `BotExtension.state` */
|
|
104
|
+
export declare const ExtensionState: Readonly<{
|
|
105
|
+
readonly ENABLED: "ENABLED";
|
|
106
|
+
readonly DISABLED: "DISABLED";
|
|
107
|
+
}>;
|
|
108
|
+
/** The values of `ExtensionState` */
|
|
109
|
+
export type ExtensionState = (typeof ExtensionState)[keyof typeof ExtensionState];
|
|
79
110
|
/** `KYC` (a person) or `KYB` (a business) — `Identity.mode` */
|
|
80
111
|
export declare const IdentityMode: Readonly<{
|
|
81
112
|
readonly KYC: "KYC";
|
|
@@ -161,6 +192,91 @@ export declare const StakingPositionState: Readonly<{
|
|
|
161
192
|
}>;
|
|
162
193
|
/** The values of `StakingPositionState` */
|
|
163
194
|
export type StakingPositionState = (typeof StakingPositionState)[keyof typeof StakingPositionState];
|
|
195
|
+
/** States of an automated-trading strategy — `Strategy.state` */
|
|
196
|
+
export declare const StrategyState: Readonly<{
|
|
197
|
+
readonly RUNNING: "RUNNING";
|
|
198
|
+
readonly PAUSED: "PAUSED";
|
|
199
|
+
readonly CLOSING: "CLOSING";
|
|
200
|
+
readonly CLOSED: "CLOSED";
|
|
201
|
+
}>;
|
|
202
|
+
/** The values of `StrategyState` */
|
|
203
|
+
export type StrategyState = (typeof StrategyState)[keyof typeof StrategyState];
|
|
204
|
+
/** Risk profile of a strategy — the four first buy and sell in real time, `DCA` buys at every due date and holds */
|
|
205
|
+
export declare const StrategyRisk: Readonly<{
|
|
206
|
+
readonly PRUDENT: "PRUDENT";
|
|
207
|
+
readonly BALANCED: "BALANCED";
|
|
208
|
+
readonly DYNAMIC: "DYNAMIC";
|
|
209
|
+
readonly OFFENSIVE: "OFFENSIVE";
|
|
210
|
+
readonly DCA: "DCA";
|
|
211
|
+
}>;
|
|
212
|
+
/** The values of `StrategyRisk` */
|
|
213
|
+
export type StrategyRisk = (typeof StrategyRisk)[keyof typeof StrategyRisk];
|
|
214
|
+
/** Pace of a strategy — `AUTO` is real time; a `DCA` takes a dated pace */
|
|
215
|
+
export declare const StrategyFrequency: Readonly<{
|
|
216
|
+
readonly AUTO: "AUTO";
|
|
217
|
+
readonly DAILY: "DAILY";
|
|
218
|
+
readonly WEEKLY: "WEEKLY";
|
|
219
|
+
readonly MONTHLY: "MONTHLY";
|
|
220
|
+
}>;
|
|
221
|
+
/** The values of `StrategyFrequency` */
|
|
222
|
+
export type StrategyFrequency = (typeof StrategyFrequency)[keyof typeof StrategyFrequency];
|
|
223
|
+
/** Who spreads the capital over the universe — only `AUTO` is accepted on a write */
|
|
224
|
+
export declare const StrategyAllocation: Readonly<{
|
|
225
|
+
readonly AUTO: "AUTO";
|
|
226
|
+
readonly MANUAL: "MANUAL";
|
|
227
|
+
}>;
|
|
228
|
+
/** The values of `StrategyAllocation` */
|
|
229
|
+
export type StrategyAllocation = (typeof StrategyAllocation)[keyof typeof StrategyAllocation];
|
|
230
|
+
/** What a closing does with the positions — `KEEP` delivers them to the custody wallets of the bot */
|
|
231
|
+
export declare const StrategyClosing: Readonly<{
|
|
232
|
+
readonly SELL_ALL: "SELL_ALL";
|
|
233
|
+
readonly KEEP: "KEEP";
|
|
234
|
+
}>;
|
|
235
|
+
/** The values of `StrategyClosing` */
|
|
236
|
+
export type StrategyClosing = (typeof StrategyClosing)[keyof typeof StrategyClosing];
|
|
237
|
+
/** Which emails the supervisor of the bot receives — a strategy stuck for want of funds is reported whatever this says */
|
|
238
|
+
export declare const StrategyNotifyMode: Readonly<{
|
|
239
|
+
readonly EVERY_ORDER: "EVERY_ORDER";
|
|
240
|
+
readonly THRESHOLDS: "THRESHOLDS";
|
|
241
|
+
readonly DAILY: "DAILY";
|
|
242
|
+
readonly NEVER: "NEVER";
|
|
243
|
+
}>;
|
|
244
|
+
/** The values of `StrategyNotifyMode` */
|
|
245
|
+
export type StrategyNotifyMode = (typeof StrategyNotifyMode)[keyof typeof StrategyNotifyMode];
|
|
246
|
+
/** What a line of the journal of a strategy is — `StrategyJournalEntry.event` */
|
|
247
|
+
export declare const StrategyJournalEvent: Readonly<{
|
|
248
|
+
readonly BUY: "buy";
|
|
249
|
+
readonly SELL: "sell";
|
|
250
|
+
readonly GUARD: "guard";
|
|
251
|
+
readonly PAUSED: "paused";
|
|
252
|
+
readonly CLOSING: "closing";
|
|
253
|
+
readonly CLOSED: "closed";
|
|
254
|
+
readonly IDLE: "idle";
|
|
255
|
+
readonly RESUMED: "resumed";
|
|
256
|
+
readonly DELIVERING: "delivering";
|
|
257
|
+
readonly DELIVERED: "delivered";
|
|
258
|
+
readonly DUST: "dust";
|
|
259
|
+
readonly FAILED: "failed";
|
|
260
|
+
}>;
|
|
261
|
+
/** The values of `StrategyJournalEvent` */
|
|
262
|
+
export type StrategyJournalEvent = (typeof StrategyJournalEvent)[keyof typeof StrategyJournalEvent];
|
|
263
|
+
/** Why a guard rail or a closing placed an order — the `reason` of an `aitrading.action` delivery, `null` when the engine decided */
|
|
264
|
+
export declare const StrategyExitReason: Readonly<{
|
|
265
|
+
readonly STOP_LOSS: "stop_loss";
|
|
266
|
+
readonly TAKE_PROFIT: "take_profit";
|
|
267
|
+
readonly TRAILING_STOP: "trailing_stop";
|
|
268
|
+
readonly CLOSED: "closed";
|
|
269
|
+
}>;
|
|
270
|
+
/** The values of `StrategyExitReason` */
|
|
271
|
+
export type StrategyExitReason = (typeof StrategyExitReason)[keyof typeof StrategyExitReason];
|
|
272
|
+
/** Why a strategy is resting — `Strategy.idleReason`, `null` when it runs normally */
|
|
273
|
+
export declare const StrategyIdleReason: Readonly<{
|
|
274
|
+
readonly ORGANIZATION_DISABLED: "organization_disabled";
|
|
275
|
+
readonly EXTENSION_UNAVAILABLE: "extension_unavailable";
|
|
276
|
+
readonly BOT_UNAVAILABLE: "bot_unavailable";
|
|
277
|
+
}>;
|
|
278
|
+
/** The values of `StrategyIdleReason` */
|
|
279
|
+
export type StrategyIdleReason = (typeof StrategyIdleReason)[keyof typeof StrategyIdleReason];
|
|
164
280
|
/** States of a webhook subscription (`Subscriber.state`) and of an event of the catalogue (`WebhookType.state`) — `ARCHIVED` ones are left out of `client.webhooks.list` unless `includeArchived` */
|
|
165
281
|
export declare const SubscriberState: Readonly<{
|
|
166
282
|
readonly ENABLED: "ENABLED";
|
|
@@ -250,6 +366,8 @@ export declare const WebhookEventName: Readonly<{
|
|
|
250
366
|
readonly STAKING_CLAIMED: "staking.claimed";
|
|
251
367
|
readonly ALERT_OPENED: "alert.opened";
|
|
252
368
|
readonly ALERT_STATUS: "alert.status";
|
|
369
|
+
readonly AITRADING_SETUP: "aitrading.setup";
|
|
370
|
+
readonly AITRADING_ACTION: "aitrading.action";
|
|
253
371
|
}>;
|
|
254
372
|
/** Known event names — the catalogue may grow: any string is accepted */
|
|
255
373
|
export type WebhookEventName = (typeof WebhookEventName)[keyof typeof WebhookEventName] | (string & {});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,eAAO,MAAM,GAAG;;;;;EAKL,CAAA;AAEX;;;;GAIG;AACH,eAAO,MAAM,KAAK;;;;;;EAMP,CAAA;AAIX,yHAAyH;AACzH,eAAO,MAAM,WAAW;;;EAGb,CAAA;AACX,kCAAkC;AAClC,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAA;AAExE,6FAA6F;AAC7F,eAAO,MAAM,UAAU;;;;;EAKZ,CAAA;AACX,iCAAiC;AACjC,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,OAAO,UAAU,CAAC,CAAA;AAErE,6FAA6F;AAC7F,eAAO,MAAM,aAAa;;;;;;EAMf,CAAA;AACX,oCAAoC;AACpC,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,C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AAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,OAAO,oBAAoB,CAAC,CAAA;AAEnG,kKAAkK;AAClK,eAAO,MAAM,iBAAiB;;;EAGnB,CAAA;AACX,wCAAwC;AACxC,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAA;AAE1F,iJAAiJ;AACjJ,eAAO,MAAM,gBAAgB;;;;;;;;EAQlB,CAAA;AACX,uCAAuC;AACvC,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAA;AAEvF,0CAA0C;AAC1C,eAAO,MAAM,WAAW;;;EAGb,CAAA;AACX,kCAAkC;AAClC,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAA;AAExE,oHAAoH;AACpH,eAAO,MAAM,UAAU;;;EAGZ,CAAA;AACX,iCAAiC;AACjC,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,OAAO,UAAU,CAAC,CAAA;AAErE,qOAAqO;AACrO,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoClB,CAAA;AACX,yEAAyE;AACzE,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA"}
|
package/dist/cjs/constants.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WebhookEventName = exports.WalletType = exports.WalletState = exports.TransactionState = exports.TransactionSource = exports.TransactionDirection = exports.TradingDirection = exports.SubscriberState = exports.StakingPositionState = exports.StakingMovementState = exports.StakingMovementKind = exports.OrganizationCategory = exports.OrderState = exports.OrderSide = exports.Locale = exports.IdentityState = exports.IdentityMode = exports.CustomerState = exports.CoreType = exports.CoreState = exports.BankDirection = exports.AssetState = exports.ApikeyState = exports.Asset = exports.Env = void 0;
|
|
3
|
+
exports.WebhookEventName = exports.WalletType = exports.WalletState = exports.TransactionState = exports.TransactionSource = exports.TransactionDirection = exports.TradingDirection = exports.SubscriberState = exports.StrategyIdleReason = exports.StrategyExitReason = exports.StrategyJournalEvent = exports.StrategyNotifyMode = exports.StrategyClosing = exports.StrategyAllocation = exports.StrategyFrequency = exports.StrategyRisk = exports.StrategyState = exports.StakingPositionState = exports.StakingMovementState = exports.StakingMovementKind = exports.OrganizationCategory = exports.OrderState = exports.OrderSide = exports.Locale = exports.IdentityState = exports.IdentityMode = exports.ExtensionState = exports.ExtensionCategory = exports.CustomerState = exports.CoreType = exports.CoreState = exports.BotState = exports.BotApplicationState = exports.BankDirection = exports.AssetState = exports.ApikeyState = exports.Asset = exports.Env = void 0;
|
|
4
4
|
/** Target environment — value goes in `BitgenConfig.env` (`env: Env.PRODUCTION`) */
|
|
5
5
|
exports.Env = Object.freeze({
|
|
6
6
|
PRODUCTION: 'production',
|
|
@@ -41,6 +41,18 @@ exports.BankDirection = Object.freeze({
|
|
|
41
41
|
PURCHASE: 'PURCHASE',
|
|
42
42
|
SELL: 'SELL',
|
|
43
43
|
});
|
|
44
|
+
/** States of a module a bot serves — `BotApplication.state` */
|
|
45
|
+
exports.BotApplicationState = Object.freeze({
|
|
46
|
+
ENABLED: 'ENABLED',
|
|
47
|
+
PENDING: 'PENDING',
|
|
48
|
+
SUSPENDED: 'SUSPENDED',
|
|
49
|
+
});
|
|
50
|
+
/** States of a bot — `Bot.state`, compare it with `BotState.ENABLED` */
|
|
51
|
+
exports.BotState = Object.freeze({
|
|
52
|
+
ENABLED: 'ENABLED',
|
|
53
|
+
CLOSED: 'CLOSED',
|
|
54
|
+
FROZEN: 'FROZEN',
|
|
55
|
+
});
|
|
44
56
|
/** States of a connector — `Core.state`; also the `state` filter of `client.core.list` */
|
|
45
57
|
exports.CoreState = Object.freeze({
|
|
46
58
|
ENABLED: 'ENABLED',
|
|
@@ -68,6 +80,17 @@ exports.CustomerState = Object.freeze({
|
|
|
68
80
|
CLOSED: 'CLOSED',
|
|
69
81
|
FROZEN: 'FROZEN',
|
|
70
82
|
});
|
|
83
|
+
/** Categories of an extension — `BotExtension.category` */
|
|
84
|
+
exports.ExtensionCategory = Object.freeze({
|
|
85
|
+
AI: 'AI',
|
|
86
|
+
CGP: 'CGP',
|
|
87
|
+
MISC: 'MISC',
|
|
88
|
+
});
|
|
89
|
+
/** States of an extension — `BotExtension.state` */
|
|
90
|
+
exports.ExtensionState = Object.freeze({
|
|
91
|
+
ENABLED: 'ENABLED',
|
|
92
|
+
DISABLED: 'DISABLED',
|
|
93
|
+
});
|
|
71
94
|
/** `KYC` (a person) or `KYB` (a business) — `Identity.mode` */
|
|
72
95
|
exports.IdentityMode = Object.freeze({
|
|
73
96
|
KYC: 'KYC',
|
|
@@ -135,6 +158,73 @@ exports.StakingPositionState = Object.freeze({
|
|
|
135
158
|
CLOSED: 'CLOSED',
|
|
136
159
|
FAILED: 'FAILED',
|
|
137
160
|
});
|
|
161
|
+
/** States of an automated-trading strategy — `Strategy.state` */
|
|
162
|
+
exports.StrategyState = Object.freeze({
|
|
163
|
+
RUNNING: 'RUNNING',
|
|
164
|
+
PAUSED: 'PAUSED',
|
|
165
|
+
CLOSING: 'CLOSING',
|
|
166
|
+
CLOSED: 'CLOSED',
|
|
167
|
+
});
|
|
168
|
+
/** Risk profile of a strategy — the four first buy and sell in real time, `DCA` buys at every due date and holds */
|
|
169
|
+
exports.StrategyRisk = Object.freeze({
|
|
170
|
+
PRUDENT: 'PRUDENT',
|
|
171
|
+
BALANCED: 'BALANCED',
|
|
172
|
+
DYNAMIC: 'DYNAMIC',
|
|
173
|
+
OFFENSIVE: 'OFFENSIVE',
|
|
174
|
+
DCA: 'DCA',
|
|
175
|
+
});
|
|
176
|
+
/** Pace of a strategy — `AUTO` is real time; a `DCA` takes a dated pace */
|
|
177
|
+
exports.StrategyFrequency = Object.freeze({
|
|
178
|
+
AUTO: 'AUTO',
|
|
179
|
+
DAILY: 'DAILY',
|
|
180
|
+
WEEKLY: 'WEEKLY',
|
|
181
|
+
MONTHLY: 'MONTHLY',
|
|
182
|
+
});
|
|
183
|
+
/** Who spreads the capital over the universe — only `AUTO` is accepted on a write */
|
|
184
|
+
exports.StrategyAllocation = Object.freeze({
|
|
185
|
+
AUTO: 'AUTO',
|
|
186
|
+
MANUAL: 'MANUAL',
|
|
187
|
+
});
|
|
188
|
+
/** What a closing does with the positions — `KEEP` delivers them to the custody wallets of the bot */
|
|
189
|
+
exports.StrategyClosing = Object.freeze({
|
|
190
|
+
SELL_ALL: 'SELL_ALL',
|
|
191
|
+
KEEP: 'KEEP',
|
|
192
|
+
});
|
|
193
|
+
/** Which emails the supervisor of the bot receives — a strategy stuck for want of funds is reported whatever this says */
|
|
194
|
+
exports.StrategyNotifyMode = Object.freeze({
|
|
195
|
+
EVERY_ORDER: 'EVERY_ORDER',
|
|
196
|
+
THRESHOLDS: 'THRESHOLDS',
|
|
197
|
+
DAILY: 'DAILY',
|
|
198
|
+
NEVER: 'NEVER',
|
|
199
|
+
});
|
|
200
|
+
/** What a line of the journal of a strategy is — `StrategyJournalEntry.event` */
|
|
201
|
+
exports.StrategyJournalEvent = Object.freeze({
|
|
202
|
+
BUY: 'buy',
|
|
203
|
+
SELL: 'sell',
|
|
204
|
+
GUARD: 'guard',
|
|
205
|
+
PAUSED: 'paused',
|
|
206
|
+
CLOSING: 'closing',
|
|
207
|
+
CLOSED: 'closed',
|
|
208
|
+
IDLE: 'idle',
|
|
209
|
+
RESUMED: 'resumed',
|
|
210
|
+
DELIVERING: 'delivering',
|
|
211
|
+
DELIVERED: 'delivered',
|
|
212
|
+
DUST: 'dust',
|
|
213
|
+
FAILED: 'failed',
|
|
214
|
+
});
|
|
215
|
+
/** Why a guard rail or a closing placed an order — the `reason` of an `aitrading.action` delivery, `null` when the engine decided */
|
|
216
|
+
exports.StrategyExitReason = Object.freeze({
|
|
217
|
+
STOP_LOSS: 'stop_loss',
|
|
218
|
+
TAKE_PROFIT: 'take_profit',
|
|
219
|
+
TRAILING_STOP: 'trailing_stop',
|
|
220
|
+
CLOSED: 'closed',
|
|
221
|
+
});
|
|
222
|
+
/** Why a strategy is resting — `Strategy.idleReason`, `null` when it runs normally */
|
|
223
|
+
exports.StrategyIdleReason = Object.freeze({
|
|
224
|
+
ORGANIZATION_DISABLED: 'organization_disabled',
|
|
225
|
+
EXTENSION_UNAVAILABLE: 'extension_unavailable',
|
|
226
|
+
BOT_UNAVAILABLE: 'bot_unavailable',
|
|
227
|
+
});
|
|
138
228
|
/** States of a webhook subscription (`Subscriber.state`) and of an event of the catalogue (`WebhookType.state`) — `ARCHIVED` ones are left out of `client.webhooks.list` unless `includeArchived` */
|
|
139
229
|
exports.SubscriberState = Object.freeze({
|
|
140
230
|
ENABLED: 'ENABLED',
|
|
@@ -210,5 +300,7 @@ exports.WebhookEventName = Object.freeze({
|
|
|
210
300
|
STAKING_CLAIMED: 'staking.claimed',
|
|
211
301
|
ALERT_OPENED: 'alert.opened',
|
|
212
302
|
ALERT_STATUS: 'alert.status',
|
|
303
|
+
AITRADING_SETUP: 'aitrading.setup',
|
|
304
|
+
AITRADING_ACTION: 'aitrading.action',
|
|
213
305
|
});
|
|
214
306
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":";;;AAAA,oFAAoF;AACvE,QAAA,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC;IAC/B,UAAU,EAAE,YAAY;IACxB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,WAAW;CACd,CAAC,CAAA;AAEX;;;;GAIG;AACU,QAAA,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AA+B;IAC9D,aAAa,EAAE,eAAe;IAC9B,YAAY,EAAE,cAAc;IAC5B,gBAAgB,EAAE,kBAAkB;IACpC,mBAAmB,EAAE,qBAAqB;IAC1C,sBAAsB,EAAE,wBAAwB;IAChD,YAAY,EAAE,cAAc;IAC5B,gBAAgB,EAAE,kBAAkB;IACpC,WAAW,EAAE,aAAa;IAC1B,YAAY,EAAE,cAAc;IAC5B,iBAAiB,EAAE,mBAAmB;IACtC,cAAc,EAAE,gBAAgB;IAChC,eAAe,EAAE,iBAAiB;IAClC,eAAe,EAAE,iBAAiB;IAClC,YAAY,EAAE,cAAc;IAC5B,YAAY,EAAE,cAAc;IAC5B,eAAe,EAAE,iBAAiB;IAClC,gBAAgB,EAAE,kBAAkB;CAC5B,CAAC,CAAA"}
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { Asset as AssetType } from './types/index.js';
|
|
|
3
3
|
export { BitgenClient } from './client.js';
|
|
4
4
|
export { BitgenError } from './error.js';
|
|
5
5
|
export { Env };
|
|
6
|
-
export { ApikeyState, AssetState, BankDirection, CoreState, CoreType, CustomerState, IdentityMode, IdentityState, Locale, OrderSide, OrderState, OrganizationCategory, StakingMovementKind, StakingMovementState, StakingPositionState, SubscriberState, TradingDirection, TransactionDirection, TransactionSource, TransactionState, WalletState, WalletType, WebhookEventName, } from './constants.js';
|
|
6
|
+
export { ApikeyState, AssetState, BankDirection, BotApplicationState, BotState, CoreState, CoreType, CustomerState, ExtensionCategory, ExtensionState, IdentityMode, IdentityState, Locale, OrderSide, OrderState, OrganizationCategory, StakingMovementKind, StakingMovementState, StakingPositionState, StrategyAllocation, StrategyClosing, StrategyExitReason, StrategyFrequency, StrategyIdleReason, StrategyJournalEvent, StrategyNotifyMode, StrategyRisk, StrategyState, SubscriberState, TradingDirection, TransactionDirection, TransactionSource, TransactionState, WalletState, WalletType, WebhookEventName, } from './constants.js';
|
|
7
7
|
/** Asset ISO codes (`Asset.ETH`) — `Asset` is also the type of an asset returned by `client.asset` */
|
|
8
8
|
export declare const Asset: Readonly<{
|
|
9
9
|
readonly BTC: "btc";
|
|
@@ -13,5 +13,5 @@ export declare const Asset: Readonly<{
|
|
|
13
13
|
readonly SOL: "sol";
|
|
14
14
|
}>;
|
|
15
15
|
export type Asset = AssetType;
|
|
16
|
-
export type { BitgenConfig, BitgenEnv, UserRef, Amount, PageParams, Page, BitgenErrorBody, History, Created, AssetRef, AssetInput, UserSummary, OrganizationHub, OrganizationSummary, AssetTicker, AssetFees, AssetNetwork, AssetNetworkType, KycIdentity, KybIdentity, Identity, CustomerAccount, CustomerClient, CustomerSetup, CollaboratorLink, ManagerLink, CustomerAlert, CustomerBusiness, Customer, AccountAddress, Account, CreateCustomerParams, CustomerListParams, UpdateCustomerParams, BankAccount, BankOperation, BankOperationsParams, BankWithdrawParams, BankCreditParams, Wallet, CustodyPortfolio, TravelRule, CustodyWithdrawParams, OrderUser, OrderOrganization, Order, TradingOrderParams, TradingListParams, TransactionAlert, Transaction, TransactionListParams, CoreConfigField, Core, CoreListParams, CoreRef, StakingPosition, StakingMovement, StakingOperation, StakingPortfolio, StakeParams, StakingListParams, StakingAmountParams, WebhookType, Subscriber, WebhookSubscriptions, DeliveryLog, WebhookEvent, VerifyInput, Apikey, ApikeyLog, ApikeyListParams, } from './types/index.js';
|
|
16
|
+
export type { BitgenConfig, BitgenEnv, UserRef, Amount, PageParams, Page, BitgenErrorBody, History, Created, AssetRef, AssetInput, UserSummary, OrganizationHub, OrganizationSummary, AssetTicker, AssetFees, AssetNetwork, AssetNetworkType, KycIdentity, KybIdentity, Identity, CustomerAccount, CustomerClient, CustomerSetup, CollaboratorLink, ManagerLink, CustomerAlert, CustomerBusiness, Customer, AccountAddress, Account, CreateCustomerParams, CustomerListParams, UpdateCustomerParams, BankAccount, BankOperation, BankOperationsParams, BankWithdrawParams, BankCreditParams, Wallet, CustodyPortfolio, TravelRule, CustodyWithdrawParams, OrderUser, OrderOrganization, Order, TradingOrderParams, TradingListParams, TransactionAlert, Transaction, TransactionListParams, CoreConfigField, Core, CoreListParams, CoreRef, StakingPosition, StakingMovement, StakingOperation, StakingPortfolio, StakeParams, StakingListParams, StakingAmountParams, WebhookType, Subscriber, WebhookSubscriptions, DeliveryLog, WebhookEvent, VerifyInput, Apikey, ApikeyLog, ApikeyListParams, BotExtension, BotApplication, Bot, BotRef, BotModuleRef, BotListParams, StrategyGuards, Strategy, StrategyInput, StrategyListParams, StrategyRatios, StrategyHistory, StrategyJournalEntry, AutotradingPortfolio, StrategyRef, } from './types/index.js';
|
|
17
17
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/cjs/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAuB,MAAM,gBAAgB,CAAA;AACzD,OAAO,KAAK,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAE1D,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,EAAE,GAAG,EAAE,CAAA;AAGd,OAAO,EACL,WAAW,EACX,UAAU,EACV,aAAa,EACb,SAAS,EACT,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,aAAa,EACb,MAAM,EACN,SAAS,EACT,UAAU,EACV,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EACX,UAAU,EACV,gBAAgB,GACjB,MAAM,gBAAgB,CAAA;AAEvB,sGAAsG;AACtG,eAAO,MAAM,KAAK;;;;;;EAAa,CAAA;AAC/B,MAAM,MAAM,KAAK,GAAG,SAAS,CAAA;AAE7B,YAAY,EACV,YAAY,EACZ,SAAS,EACT,OAAO,EACP,MAAM,EACN,UAAU,EACV,IAAI,EACJ,eAAe,EACf,OAAO,EACP,OAAO,EACP,QAAQ,EACR,UAAU,EACV,WAAW,EACX,eAAe,EACf,mBAAmB,EACnB,WAAW,EACX,SAAS,EACT,YAAY,EACZ,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,QAAQ,EACR,eAAe,EACf,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,QAAQ,EACR,cAAc,EACd,OAAO,EACP,oBAAoB,EACpB,kBAAkB,EAClB,oBAAoB,EACpB,WAAW,EACX,aAAa,EACb,oBAAoB,EACpB,kBAAkB,EAClB,gBAAgB,EAChB,MAAM,EACN,gBAAgB,EAChB,UAAU,EACV,qBAAqB,EACrB,SAAS,EACT,iBAAiB,EACjB,KAAK,EACL,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EACX,qBAAqB,EACrB,eAAe,EACf,IAAI,EACJ,cAAc,EACd,OAAO,EACP,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,WAAW,EACX,iBAAiB,EACjB,mBAAmB,EACnB,WAAW,EACX,UAAU,EACV,oBAAoB,EACpB,WAAW,EACX,YAAY,EACZ,WAAW,EACX,MAAM,EACN,SAAS,EACT,gBAAgB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAuB,MAAM,gBAAgB,CAAA;AACzD,OAAO,KAAK,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAE1D,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,EAAE,GAAG,EAAE,CAAA;AAGd,OAAO,EACL,WAAW,EACX,UAAU,EACV,aAAa,EACb,mBAAmB,EACnB,QAAQ,EACR,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EAChB,gBAAgB,EAChB,WAAW,EACX,iBAAiB,EACjB,mBAAmB,EACnB,WAAW,EACX,UAAU,EACV,oBAAoB,EACpB,WAAW,EACX,YAAY,EACZ,WAAW,EACX,MAAM,EACN,SAAS,EACT,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,GAAG,EACH,MAAM,EACN,YAAY,EACZ,aAAa,EACb,cAAc,EACd,QAAQ,EACR,aAAa,EACb,kBAAkB,EAClB,cAAc,EACd,eAAe,EACf,oBAAoB,EACpB,oBAAoB,EACpB,WAAW,GACZ,MAAM,kBAAkB,CAAA"}
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Asset = exports.WebhookEventName = exports.WalletType = exports.WalletState = exports.TransactionState = exports.TransactionSource = exports.TransactionDirection = exports.TradingDirection = exports.SubscriberState = exports.StakingPositionState = exports.StakingMovementState = exports.StakingMovementKind = exports.OrganizationCategory = exports.OrderState = exports.OrderSide = exports.Locale = exports.IdentityState = exports.IdentityMode = exports.CustomerState = exports.CoreType = exports.CoreState = exports.BankDirection = exports.AssetState = exports.ApikeyState = exports.Env = exports.BitgenError = exports.BitgenClient = void 0;
|
|
3
|
+
exports.Asset = exports.WebhookEventName = exports.WalletType = exports.WalletState = exports.TransactionState = exports.TransactionSource = exports.TransactionDirection = exports.TradingDirection = exports.SubscriberState = exports.StrategyState = exports.StrategyRisk = exports.StrategyNotifyMode = exports.StrategyJournalEvent = exports.StrategyIdleReason = exports.StrategyFrequency = exports.StrategyExitReason = exports.StrategyClosing = exports.StrategyAllocation = exports.StakingPositionState = exports.StakingMovementState = exports.StakingMovementKind = exports.OrganizationCategory = exports.OrderState = exports.OrderSide = exports.Locale = exports.IdentityState = exports.IdentityMode = exports.ExtensionState = exports.ExtensionCategory = exports.CustomerState = exports.CoreType = exports.CoreState = exports.BotState = exports.BotApplicationState = exports.BankDirection = exports.AssetState = exports.ApikeyState = exports.Env = exports.BitgenError = exports.BitgenClient = void 0;
|
|
4
4
|
const constants_js_1 = require("./constants.js");
|
|
5
5
|
Object.defineProperty(exports, "Env", { enumerable: true, get: function () { return constants_js_1.Env; } });
|
|
6
6
|
var client_js_1 = require("./client.js");
|
|
@@ -12,9 +12,13 @@ var constants_js_2 = require("./constants.js");
|
|
|
12
12
|
Object.defineProperty(exports, "ApikeyState", { enumerable: true, get: function () { return constants_js_2.ApikeyState; } });
|
|
13
13
|
Object.defineProperty(exports, "AssetState", { enumerable: true, get: function () { return constants_js_2.AssetState; } });
|
|
14
14
|
Object.defineProperty(exports, "BankDirection", { enumerable: true, get: function () { return constants_js_2.BankDirection; } });
|
|
15
|
+
Object.defineProperty(exports, "BotApplicationState", { enumerable: true, get: function () { return constants_js_2.BotApplicationState; } });
|
|
16
|
+
Object.defineProperty(exports, "BotState", { enumerable: true, get: function () { return constants_js_2.BotState; } });
|
|
15
17
|
Object.defineProperty(exports, "CoreState", { enumerable: true, get: function () { return constants_js_2.CoreState; } });
|
|
16
18
|
Object.defineProperty(exports, "CoreType", { enumerable: true, get: function () { return constants_js_2.CoreType; } });
|
|
17
19
|
Object.defineProperty(exports, "CustomerState", { enumerable: true, get: function () { return constants_js_2.CustomerState; } });
|
|
20
|
+
Object.defineProperty(exports, "ExtensionCategory", { enumerable: true, get: function () { return constants_js_2.ExtensionCategory; } });
|
|
21
|
+
Object.defineProperty(exports, "ExtensionState", { enumerable: true, get: function () { return constants_js_2.ExtensionState; } });
|
|
18
22
|
Object.defineProperty(exports, "IdentityMode", { enumerable: true, get: function () { return constants_js_2.IdentityMode; } });
|
|
19
23
|
Object.defineProperty(exports, "IdentityState", { enumerable: true, get: function () { return constants_js_2.IdentityState; } });
|
|
20
24
|
Object.defineProperty(exports, "Locale", { enumerable: true, get: function () { return constants_js_2.Locale; } });
|
|
@@ -24,6 +28,15 @@ Object.defineProperty(exports, "OrganizationCategory", { enumerable: true, get:
|
|
|
24
28
|
Object.defineProperty(exports, "StakingMovementKind", { enumerable: true, get: function () { return constants_js_2.StakingMovementKind; } });
|
|
25
29
|
Object.defineProperty(exports, "StakingMovementState", { enumerable: true, get: function () { return constants_js_2.StakingMovementState; } });
|
|
26
30
|
Object.defineProperty(exports, "StakingPositionState", { enumerable: true, get: function () { return constants_js_2.StakingPositionState; } });
|
|
31
|
+
Object.defineProperty(exports, "StrategyAllocation", { enumerable: true, get: function () { return constants_js_2.StrategyAllocation; } });
|
|
32
|
+
Object.defineProperty(exports, "StrategyClosing", { enumerable: true, get: function () { return constants_js_2.StrategyClosing; } });
|
|
33
|
+
Object.defineProperty(exports, "StrategyExitReason", { enumerable: true, get: function () { return constants_js_2.StrategyExitReason; } });
|
|
34
|
+
Object.defineProperty(exports, "StrategyFrequency", { enumerable: true, get: function () { return constants_js_2.StrategyFrequency; } });
|
|
35
|
+
Object.defineProperty(exports, "StrategyIdleReason", { enumerable: true, get: function () { return constants_js_2.StrategyIdleReason; } });
|
|
36
|
+
Object.defineProperty(exports, "StrategyJournalEvent", { enumerable: true, get: function () { return constants_js_2.StrategyJournalEvent; } });
|
|
37
|
+
Object.defineProperty(exports, "StrategyNotifyMode", { enumerable: true, get: function () { return constants_js_2.StrategyNotifyMode; } });
|
|
38
|
+
Object.defineProperty(exports, "StrategyRisk", { enumerable: true, get: function () { return constants_js_2.StrategyRisk; } });
|
|
39
|
+
Object.defineProperty(exports, "StrategyState", { enumerable: true, get: function () { return constants_js_2.StrategyState; } });
|
|
27
40
|
Object.defineProperty(exports, "SubscriberState", { enumerable: true, get: function () { return constants_js_2.SubscriberState; } });
|
|
28
41
|
Object.defineProperty(exports, "TradingDirection", { enumerable: true, get: function () { return constants_js_2.TradingDirection; } });
|
|
29
42
|
Object.defineProperty(exports, "TransactionDirection", { enumerable: true, get: function () { return constants_js_2.TransactionDirection; } });
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,iDAAyD;AAKhD,oFALA,kBAAG,OAKA;AAFZ,yCAA0C;AAAjC,yGAAA,YAAY,OAAA;AACrB,uCAAwC;AAA/B,uGAAA,WAAW,OAAA;AAGpB,uHAAuH;AACvH,+
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,iDAAyD;AAKhD,oFALA,kBAAG,OAKA;AAFZ,yCAA0C;AAAjC,yGAAA,YAAY,OAAA;AACrB,uCAAwC;AAA/B,uGAAA,WAAW,OAAA;AAGpB,uHAAuH;AACvH,+CAqCuB;AApCrB,2GAAA,WAAW,OAAA;AACX,0GAAA,UAAU,OAAA;AACV,6GAAA,aAAa,OAAA;AACb,mHAAA,mBAAmB,OAAA;AACnB,wGAAA,QAAQ,OAAA;AACR,yGAAA,SAAS,OAAA;AACT,wGAAA,QAAQ,OAAA;AACR,6GAAA,aAAa,OAAA;AACb,iHAAA,iBAAiB,OAAA;AACjB,8GAAA,cAAc,OAAA;AACd,4GAAA,YAAY,OAAA;AACZ,6GAAA,aAAa,OAAA;AACb,sGAAA,MAAM,OAAA;AACN,yGAAA,SAAS,OAAA;AACT,0GAAA,UAAU,OAAA;AACV,oHAAA,oBAAoB,OAAA;AACpB,mHAAA,mBAAmB,OAAA;AACnB,oHAAA,oBAAoB,OAAA;AACpB,oHAAA,oBAAoB,OAAA;AACpB,kHAAA,kBAAkB,OAAA;AAClB,+GAAA,eAAe,OAAA;AACf,kHAAA,kBAAkB,OAAA;AAClB,iHAAA,iBAAiB,OAAA;AACjB,kHAAA,kBAAkB,OAAA;AAClB,oHAAA,oBAAoB,OAAA;AACpB,kHAAA,kBAAkB,OAAA;AAClB,4GAAA,YAAY,OAAA;AACZ,6GAAA,aAAa,OAAA;AACb,+GAAA,eAAe,OAAA;AACf,gHAAA,gBAAgB,OAAA;AAChB,oHAAA,oBAAoB,OAAA;AACpB,iHAAA,iBAAiB,OAAA;AACjB,gHAAA,gBAAgB,OAAA;AAChB,2GAAA,WAAW,OAAA;AACX,0GAAA,UAAU,OAAA;AACV,gHAAA,gBAAgB,OAAA;AAGlB,sGAAsG;AACzF,QAAA,KAAK,GAAG,oBAAU,CAAA"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { HttpClient } from '../http.js';
|
|
2
|
+
import type { AutotradingPortfolio, Created, Page, PageParams, Strategy, StrategyHistory, StrategyInput, StrategyJournalEntry, StrategyListParams, StrategyRef } from '../types/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* The automated-trading module: the organization sets a frame — a strategy — and the engine decides on
|
|
5
|
+
* its own when to buy and when to sell. The decision itself stays closed: no signal and no rationale is
|
|
6
|
+
* exposed. The bot assigned to the module holds the funds, its EUR account pays for the purchases
|
|
7
|
+
* (`client.bot`, `client.bank`).
|
|
8
|
+
*
|
|
9
|
+
* `create` and `update` need the module installed, enabled and served by a bot; the reads and
|
|
10
|
+
* `pause` / `resume` / `close` answer whatever the state of the module, so a strategy can always be read
|
|
11
|
+
* and closed.
|
|
12
|
+
*
|
|
13
|
+
* **Every EUR amount of this resource is a string**, in and out — `capital`, `installment`, the guard
|
|
14
|
+
* rail values, `value`, `engaged`, `unrealised`, `realisedGains`, the `amount` and `cash` of a journal
|
|
15
|
+
* line. The numbers are the points of a curve, `performance`, `benchmark`, `percent`, `trades`,
|
|
16
|
+
* `losingStreak` and `strategies`.
|
|
17
|
+
*/
|
|
18
|
+
export declare class AutotradingResource {
|
|
19
|
+
private readonly http;
|
|
20
|
+
constructor(http: HttpClient);
|
|
21
|
+
/** Creates a `RUNNING` strategy, due for its first pass straight away */
|
|
22
|
+
create(params: StrategyInput): Promise<Created>;
|
|
23
|
+
/** Strategies of the organization, the most recent first — closed ones with `includeClosed` */
|
|
24
|
+
list(params?: StrategyListParams): Promise<Page<Strategy>>;
|
|
25
|
+
/** One strategy by uuid, or by model */
|
|
26
|
+
get(strategy: StrategyRef): Promise<Strategy>;
|
|
27
|
+
/** Replaces the frame of the strategy, field for field: send the whole frame every time */
|
|
28
|
+
update(strategy: StrategyRef, params: StrategyInput): Promise<void>;
|
|
29
|
+
/** Stops the passes and leaves the positions as they are — the state it already has is a no-op */
|
|
30
|
+
pause(strategy: StrategyRef): Promise<void>;
|
|
31
|
+
/** Starts the passes again and clears what had paused the strategy: its losing run and its mark of the day */
|
|
32
|
+
resume(strategy: StrategyRef): Promise<void>;
|
|
33
|
+
/** Closes the strategy: it settles position by position, following `closing`, then reaches `CLOSED` on its own */
|
|
34
|
+
close(strategy: StrategyRef): Promise<void>;
|
|
35
|
+
/** Curve of the strategy, its performance, the same window on BTC, and the figures of the moment */
|
|
36
|
+
history(strategy: StrategyRef): Promise<StrategyHistory>;
|
|
37
|
+
/** What the strategy did, the most recent first — paginated inside a window of ten thousand lines */
|
|
38
|
+
journal(strategy: StrategyRef, params?: PageParams): Promise<Page<StrategyJournalEntry>>;
|
|
39
|
+
/** Every strategy of the organization that is not `CLOSED`, as one position: the same curves, and the totals */
|
|
40
|
+
portfolio(): Promise<AutotradingPortfolio>;
|
|
41
|
+
private transition;
|
|
42
|
+
private segment;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=autotrading.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autotrading.d.ts","sourceRoot":"","sources":["../../../src/resources/autotrading.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAC5C,OAAO,KAAK,EACV,oBAAoB,EACpB,OAAO,EACP,IAAI,EACJ,UAAU,EACV,QAAQ,EACR,eAAe,EACf,aAAa,EACb,oBAAoB,EACpB,kBAAkB,EAClB,WAAW,EACZ,MAAM,mBAAmB,CAAA;AAG1B;;;;;;;;;;;;;;GAcG;AACH,qBAAa,mBAAmB;IAClB,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAE7C,yEA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