@drakkar.software/octobot-client 0.4.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/README.md +140 -0
- package/dist/client/adapters/accounts.d.ts +66 -0
- package/dist/client/adapters/accounts.d.ts.map +1 -0
- package/dist/client/adapters/accounts.js +214 -0
- package/dist/client/adapters/accounts.js.map +1 -0
- package/dist/client/adapters/actionHandle.d.ts +29 -0
- package/dist/client/adapters/actionHandle.d.ts.map +1 -0
- package/dist/client/adapters/actionHandle.js +34 -0
- package/dist/client/adapters/actionHandle.js.map +1 -0
- package/dist/client/adapters/automations.d.ts +31 -0
- package/dist/client/adapters/automations.d.ts.map +1 -0
- package/dist/client/adapters/automations.js +79 -0
- package/dist/client/adapters/automations.js.map +1 -0
- package/dist/client/adapters/documents.d.ts +55 -0
- package/dist/client/adapters/documents.d.ts.map +1 -0
- package/dist/client/adapters/documents.js +66 -0
- package/dist/client/adapters/documents.js.map +1 -0
- package/dist/client/adapters/nodeApi.d.ts +25 -0
- package/dist/client/adapters/nodeApi.d.ts.map +1 -0
- package/dist/client/adapters/nodeApi.js +81 -0
- package/dist/client/adapters/nodeApi.js.map +1 -0
- package/dist/client/adapters/settings.d.ts +16 -0
- package/dist/client/adapters/settings.d.ts.map +1 -0
- package/dist/client/adapters/settings.js +43 -0
- package/dist/client/adapters/settings.js.map +1 -0
- package/dist/client/adapters/strategies.d.ts +17 -0
- package/dist/client/adapters/strategies.d.ts.map +1 -0
- package/dist/client/adapters/strategies.js +75 -0
- package/dist/client/adapters/strategies.js.map +1 -0
- package/dist/client/connect/connect.d.ts +40 -0
- package/dist/client/connect/connect.d.ts.map +1 -0
- package/dist/client/connect/connect.js +133 -0
- package/dist/client/connect/connect.js.map +1 -0
- package/dist/client/connect/readOnly.d.ts +97 -0
- package/dist/client/connect/readOnly.d.ts.map +1 -0
- package/dist/client/connect/readOnly.js +167 -0
- package/dist/client/connect/readOnly.js.map +1 -0
- package/dist/client/core/errors.d.ts +80 -0
- package/dist/client/core/errors.d.ts.map +1 -0
- package/dist/client/core/errors.js +154 -0
- package/dist/client/core/errors.js.map +1 -0
- package/dist/client/core/options.d.ts +44 -0
- package/dist/client/core/options.d.ts.map +1 -0
- package/dist/client/core/options.js +2 -0
- package/dist/client/core/options.js.map +1 -0
- package/dist/client/core/session.d.ts +90 -0
- package/dist/client/core/session.d.ts.map +1 -0
- package/dist/client/core/session.js +72 -0
- package/dist/client/core/session.js.map +1 -0
- package/dist/client/core/views.d.ts +40 -0
- package/dist/client/core/views.d.ts.map +1 -0
- package/dist/client/core/views.js +32 -0
- package/dist/client/core/views.js.map +1 -0
- package/dist/client/index.d.ts +16 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +9 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/mirror/collections.d.ts +125 -0
- package/dist/client/mirror/collections.d.ts.map +1 -0
- package/dist/client/mirror/collections.js +118 -0
- package/dist/client/mirror/collections.js.map +1 -0
- package/dist/client/mirror/index.d.ts +4 -0
- package/dist/client/mirror/index.d.ts.map +1 -0
- package/dist/client/mirror/index.js +4 -0
- package/dist/client/mirror/index.js.map +1 -0
- package/dist/client/mirror/writer.d.ts +39 -0
- package/dist/client/mirror/writer.d.ts.map +1 -0
- package/dist/client/mirror/writer.js +50 -0
- package/dist/client/mirror/writer.js.map +1 -0
- package/dist/client/pairing/mirrorGrant.d.ts +91 -0
- package/dist/client/pairing/mirrorGrant.d.ts.map +1 -0
- package/dist/client/pairing/mirrorGrant.js +99 -0
- package/dist/client/pairing/mirrorGrant.js.map +1 -0
- package/dist/client/pairing/mirrorReader.d.ts +99 -0
- package/dist/client/pairing/mirrorReader.d.ts.map +1 -0
- package/dist/client/pairing/mirrorReader.js +117 -0
- package/dist/client/pairing/mirrorReader.js.map +1 -0
- package/dist/client/pairing/pairingGrantExchange.d.ts +135 -0
- package/dist/client/pairing/pairingGrantExchange.d.ts.map +1 -0
- package/dist/client/pairing/pairingGrantExchange.js +186 -0
- package/dist/client/pairing/pairingGrantExchange.js.map +1 -0
- package/dist/client/pairing/pairingRequest.d.ts +82 -0
- package/dist/client/pairing/pairingRequest.d.ts.map +1 -0
- package/dist/client/pairing/pairingRequest.js +120 -0
- package/dist/client/pairing/pairingRequest.js.map +1 -0
- package/dist/client/strategy.d.ts +36 -0
- package/dist/client/strategy.d.ts.map +1 -0
- package/dist/client/strategy.js +26 -0
- package/dist/client/strategy.js.map +1 -0
- package/dist/collections/index.d.ts +3 -0
- package/dist/collections/index.d.ts.map +1 -0
- package/dist/collections/index.js +3 -0
- package/dist/collections/index.js.map +1 -0
- package/dist/collections/nodeCollections.d.ts +57 -0
- package/dist/collections/nodeCollections.d.ts.map +1 -0
- package/dist/collections/nodeCollections.js +40 -0
- package/dist/collections/nodeCollections.js.map +1 -0
- package/dist/collections/paths.d.ts +7 -0
- package/dist/collections/paths.d.ts.map +1 -0
- package/dist/collections/paths.js +13 -0
- package/dist/collections/paths.js.map +1 -0
- package/dist/crypto/collectionKeys.d.ts +28 -0
- package/dist/crypto/collectionKeys.d.ts.map +1 -0
- package/dist/crypto/collectionKeys.js +53 -0
- package/dist/crypto/collectionKeys.js.map +1 -0
- package/dist/crypto/hkdf.d.ts +14 -0
- package/dist/crypto/hkdf.d.ts.map +1 -0
- package/dist/crypto/hkdf.js +19 -0
- package/dist/crypto/hkdf.js.map +1 -0
- package/dist/crypto/index.d.ts +5 -0
- package/dist/crypto/index.d.ts.map +1 -0
- package/dist/crypto/index.js +5 -0
- package/dist/crypto/index.js.map +1 -0
- package/dist/crypto/secretEncryptor.d.ts +20 -0
- package/dist/crypto/secretEncryptor.d.ts.map +1 -0
- package/dist/crypto/secretEncryptor.js +82 -0
- package/dist/crypto/secretEncryptor.js.map +1 -0
- package/dist/crypto/wireConstants.d.ts +14 -0
- package/dist/crypto/wireConstants.d.ts.map +1 -0
- package/dist/crypto/wireConstants.js +17 -0
- package/dist/crypto/wireConstants.js.map +1 -0
- package/dist/identity/address.d.ts +3 -0
- package/dist/identity/address.d.ts.map +1 -0
- package/dist/identity/address.js +17 -0
- package/dist/identity/address.js.map +1 -0
- package/dist/identity/bip39-wordlist.d.ts +2 -0
- package/dist/identity/bip39-wordlist.d.ts.map +1 -0
- package/dist/identity/bip39-wordlist.js +2051 -0
- package/dist/identity/bip39-wordlist.js.map +1 -0
- package/dist/identity/capProvider.d.ts +45 -0
- package/dist/identity/capProvider.d.ts.map +1 -0
- package/dist/identity/capProvider.js +80 -0
- package/dist/identity/capProvider.js.map +1 -0
- package/dist/identity/derivationSchemes.d.ts +25 -0
- package/dist/identity/derivationSchemes.d.ts.map +1 -0
- package/dist/identity/derivationSchemes.js +34 -0
- package/dist/identity/derivationSchemes.js.map +1 -0
- package/dist/identity/evm.d.ts +8 -0
- package/dist/identity/evm.d.ts.map +1 -0
- package/dist/identity/evm.js +78 -0
- package/dist/identity/evm.js.map +1 -0
- package/dist/identity/index.d.ts +10 -0
- package/dist/identity/index.d.ts.map +1 -0
- package/dist/identity/index.js +10 -0
- package/dist/identity/index.js.map +1 -0
- package/dist/identity/keys.d.ts +17 -0
- package/dist/identity/keys.d.ts.map +1 -0
- package/dist/identity/keys.js +36 -0
- package/dist/identity/keys.js.map +1 -0
- package/dist/identity/mnemonic.d.ts +4 -0
- package/dist/identity/mnemonic.d.ts.map +1 -0
- package/dist/identity/mnemonic.js +93 -0
- package/dist/identity/mnemonic.js.map +1 -0
- package/dist/identity/pairing.d.ts +45 -0
- package/dist/identity/pairing.d.ts.map +1 -0
- package/dist/identity/pairing.js +91 -0
- package/dist/identity/pairing.js.map +1 -0
- package/dist/identity/pairingRequest.d.ts +99 -0
- package/dist/identity/pairingRequest.d.ts.map +1 -0
- package/dist/identity/pairingRequest.js +217 -0
- package/dist/identity/pairingRequest.js.map +1 -0
- package/dist/identity/secret.d.ts +32 -0
- package/dist/identity/secret.d.ts.map +1 -0
- package/dist/identity/secret.js +54 -0
- package/dist/identity/secret.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/dist/internal/bytes.d.ts +11 -0
- package/dist/internal/bytes.d.ts.map +1 -0
- package/dist/internal/bytes.js +38 -0
- package/dist/internal/bytes.js.map +1 -0
- package/dist/node-api/dexPair.d.ts +24 -0
- package/dist/node-api/dexPair.d.ts.map +1 -0
- package/dist/node-api/dexPair.js +39 -0
- package/dist/node-api/dexPair.js.map +1 -0
- package/dist/node-api/dsl.d.ts +10 -0
- package/dist/node-api/dsl.d.ts.map +1 -0
- package/dist/node-api/dsl.js +7 -0
- package/dist/node-api/dsl.js.map +1 -0
- package/dist/node-api/exchanges.d.ts +49 -0
- package/dist/node-api/exchanges.d.ts.map +1 -0
- package/dist/node-api/exchanges.js +32 -0
- package/dist/node-api/exchanges.js.map +1 -0
- package/dist/node-api/index.d.ts +12 -0
- package/dist/node-api/index.d.ts.map +1 -0
- package/dist/node-api/index.js +12 -0
- package/dist/node-api/index.js.map +1 -0
- package/dist/node-api/marketMaking.d.ts +39 -0
- package/dist/node-api/marketMaking.d.ts.map +1 -0
- package/dist/node-api/marketMaking.js +44 -0
- package/dist/node-api/marketMaking.js.map +1 -0
- package/dist/node-api/octobots.d.ts +14 -0
- package/dist/node-api/octobots.d.ts.map +1 -0
- package/dist/node-api/octobots.js +16 -0
- package/dist/node-api/octobots.js.map +1 -0
- package/dist/node-api/orderBookPreview.d.ts +11 -0
- package/dist/node-api/orderBookPreview.d.ts.map +1 -0
- package/dist/node-api/orderBookPreview.js +7 -0
- package/dist/node-api/orderBookPreview.js.map +1 -0
- package/dist/node-api/pairing.d.ts +39 -0
- package/dist/node-api/pairing.d.ts.map +1 -0
- package/dist/node-api/pairing.js +61 -0
- package/dist/node-api/pairing.js.map +1 -0
- package/dist/node-api/pairs.d.ts +32 -0
- package/dist/node-api/pairs.d.ts.map +1 -0
- package/dist/node-api/pairs.js +72 -0
- package/dist/node-api/pairs.js.map +1 -0
- package/dist/node-api/requiredFunds.d.ts +11 -0
- package/dist/node-api/requiredFunds.d.ts.map +1 -0
- package/dist/node-api/requiredFunds.js +7 -0
- package/dist/node-api/requiredFunds.js.map +1 -0
- package/dist/node-api/setup.d.ts +25 -0
- package/dist/node-api/setup.d.ts.map +1 -0
- package/dist/node-api/setup.js +13 -0
- package/dist/node-api/setup.js.map +1 -0
- package/dist/node-api/wallet.d.ts +55 -0
- package/dist/node-api/wallet.d.ts.map +1 -0
- package/dist/node-api/wallet.js +87 -0
- package/dist/node-api/wallet.js.map +1 -0
- package/dist/protocol/actions.d.ts +40 -0
- package/dist/protocol/actions.d.ts.map +1 -0
- package/dist/protocol/actions.js +118 -0
- package/dist/protocol/actions.js.map +1 -0
- package/dist/protocol/documents.d.ts +25 -0
- package/dist/protocol/documents.d.ts.map +1 -0
- package/dist/protocol/documents.js +2 -0
- package/dist/protocol/documents.js.map +1 -0
- package/dist/protocol/index.d.ts +10 -0
- package/dist/protocol/index.d.ts.map +1 -0
- package/dist/protocol/index.js +12 -0
- package/dist/protocol/index.js.map +1 -0
- package/dist/protocol/orchestration/createAutomation.d.ts +61 -0
- package/dist/protocol/orchestration/createAutomation.d.ts.map +1 -0
- package/dist/protocol/orchestration/createAutomation.js +71 -0
- package/dist/protocol/orchestration/createAutomation.js.map +1 -0
- package/dist/protocol/poll.d.ts +4 -0
- package/dist/protocol/poll.d.ts.map +1 -0
- package/dist/protocol/poll.js +4 -0
- package/dist/protocol/poll.js.map +1 -0
- package/dist/protocol/proposal.d.ts +36 -0
- package/dist/protocol/proposal.d.ts.map +1 -0
- package/dist/protocol/proposal.js +39 -0
- package/dist/protocol/proposal.js.map +1 -0
- package/dist/protocol/state.d.ts +87 -0
- package/dist/protocol/state.d.ts.map +1 -0
- package/dist/protocol/state.js +303 -0
- package/dist/protocol/state.js.map +1 -0
- package/dist/protocol/strategy/build.d.ts +44 -0
- package/dist/protocol/strategy/build.d.ts.map +1 -0
- package/dist/protocol/strategy/build.js +50 -0
- package/dist/protocol/strategy/build.js.map +1 -0
- package/dist/protocol/strategy/builders.d.ts +252 -0
- package/dist/protocol/strategy/builders.d.ts.map +1 -0
- package/dist/protocol/strategy/builders.js +382 -0
- package/dist/protocol/strategy/builders.js.map +1 -0
- package/dist/protocol/strategy/index.d.ts +5 -0
- package/dist/protocol/strategy/index.d.ts.map +1 -0
- package/dist/protocol/strategy/index.js +4 -0
- package/dist/protocol/strategy/index.js.map +1 -0
- package/dist/protocol/strategy/kinds.d.ts +2 -0
- package/dist/protocol/strategy/kinds.d.ts.map +1 -0
- package/dist/protocol/strategy/kinds.js +2 -0
- package/dist/protocol/strategy/kinds.js.map +1 -0
- package/dist/protocol/strategy/patch.d.ts +59 -0
- package/dist/protocol/strategy/patch.d.ts.map +1 -0
- package/dist/protocol/strategy/patch.js +253 -0
- package/dist/protocol/strategy/patch.js.map +1 -0
- package/dist/protocol/symbols.d.ts +8 -0
- package/dist/protocol/symbols.d.ts.map +1 -0
- package/dist/protocol/symbols.js +11 -0
- package/dist/protocol/symbols.js.map +1 -0
- package/dist/transport/constants.d.ts +8 -0
- package/dist/transport/constants.d.ts.map +1 -0
- package/dist/transport/constants.js +8 -0
- package/dist/transport/constants.js.map +1 -0
- package/dist/transport/documents.d.ts +27 -0
- package/dist/transport/documents.d.ts.map +1 -0
- package/dist/transport/documents.js +34 -0
- package/dist/transport/documents.js.map +1 -0
- package/dist/transport/index.d.ts +8 -0
- package/dist/transport/index.d.ts.map +1 -0
- package/dist/transport/index.js +8 -0
- package/dist/transport/index.js.map +1 -0
- package/dist/transport/probe.d.ts +44 -0
- package/dist/transport/probe.d.ts.map +1 -0
- package/dist/transport/probe.js +121 -0
- package/dist/transport/probe.js.map +1 -0
- package/dist/transport/rendezvous.d.ts +116 -0
- package/dist/transport/rendezvous.d.ts.map +1 -0
- package/dist/transport/rendezvous.js +139 -0
- package/dist/transport/rendezvous.js.map +1 -0
- package/dist/transport/rest.d.ts +35 -0
- package/dist/transport/rest.d.ts.map +1 -0
- package/dist/transport/rest.js +58 -0
- package/dist/transport/rest.js.map +1 -0
- package/dist/transport/syncClient.d.ts +14 -0
- package/dist/transport/syncClient.d.ts.map +1 -0
- package/dist/transport/syncClient.js +30 -0
- package/dist/transport/syncClient.js.map +1 -0
- package/dist/transport/urls.d.ts +35 -0
- package/dist/transport/urls.d.ts.map +1 -0
- package/dist/transport/urls.js +126 -0
- package/dist/transport/urls.js.map +1 -0
- package/package.json +55 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { Strategy } from '@drakkar.software/octobot-protocol';
|
|
2
|
+
import type { StrategyKind } from './kinds.js';
|
|
3
|
+
import { type MmInput, type GridInput, type DcaInput, type IndexInput, type CopyInput, type SignalInput } from './builders.js';
|
|
4
|
+
export type StrategyInput = {
|
|
5
|
+
kind: 'mm';
|
|
6
|
+
mm: MmInput;
|
|
7
|
+
} | {
|
|
8
|
+
kind: 'grid';
|
|
9
|
+
grid: GridInput;
|
|
10
|
+
} | {
|
|
11
|
+
kind: 'dca';
|
|
12
|
+
dca: DcaInput;
|
|
13
|
+
} | {
|
|
14
|
+
kind: 'basket';
|
|
15
|
+
basket: IndexInput;
|
|
16
|
+
} | {
|
|
17
|
+
kind: 'copy';
|
|
18
|
+
copy: CopyInput;
|
|
19
|
+
} | {
|
|
20
|
+
kind: 'signal';
|
|
21
|
+
signal: SignalInput;
|
|
22
|
+
} | {
|
|
23
|
+
kind: 'custom';
|
|
24
|
+
} | {
|
|
25
|
+
kind: 'ai-agents';
|
|
26
|
+
};
|
|
27
|
+
export type BuildStrategyOptions = {
|
|
28
|
+
id?: string;
|
|
29
|
+
version?: string;
|
|
30
|
+
name?: string;
|
|
31
|
+
description?: string;
|
|
32
|
+
/** Overrides the quote currency derived from the input pairs. */
|
|
33
|
+
referenceMarket?: string;
|
|
34
|
+
};
|
|
35
|
+
/** The node values the automation's portfolio in Strategy.reference_market
|
|
36
|
+
* (required in protocol 0.4.0) — derive it from the traded pairs' quote. */
|
|
37
|
+
export declare function referenceMarketOf(input: StrategyInput): string;
|
|
38
|
+
/** Build a complete protocol `Strategy` from a `StrategyInput`. This is the
|
|
39
|
+
* function `strategy.build()` in the public facade wraps; `strategy.dca()` /
|
|
40
|
+
* `.grid()` / etc are one-line convenience wrappers around this with the
|
|
41
|
+
* `kind` pre-filled. */
|
|
42
|
+
export declare function buildStrategy(input: StrategyInput, opts?: BuildStrategyOptions): Strategy;
|
|
43
|
+
export type { StrategyKind };
|
|
44
|
+
//# sourceMappingURL=build.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/protocol/strategy/build.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAA;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,EAQL,KAAK,OAAO,EACZ,KAAK,SAAS,EACd,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,WAAW,EACjB,MAAM,eAAe,CAAA;AAQtB,MAAM,MAAM,aAAa,GACrB;IAAE,IAAI,EAAE,IAAI,CAAC;IAAK,EAAE,EAAM,OAAO,CAAA;CAAE,GACnC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAG,IAAI,EAAI,SAAS,CAAA;CAAE,GACrC;IAAE,IAAI,EAAE,KAAK,CAAC;IAAI,GAAG,EAAK,QAAQ,CAAA;CAAE,GACpC;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,UAAU,CAAA;CAAE,GACtC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAG,IAAI,EAAI,SAAS,CAAA;CAAE,GACrC;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,WAAW,CAAA;CAAE,GACvC;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,GAClB;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,CAAA;AAczB,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,iEAAiE;IACjE,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB,CAAA;AAWD;6EAC6E;AAC7E,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,CAS9D;AAED;;;yBAGyB;AACzB,wBAAgB,aAAa,CAAC,KAAK,EAAE,aAAa,EAAE,IAAI,GAAE,oBAAyB,GAAG,QAAQ,CAa7F;AAED,YAAY,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { buildMarketMakingConfig, buildGridConfig, buildDCAConfig, buildIndexConfig, buildCopyConfig, buildSignalConfig, buildGenericProcessConfig, } from './builders.js';
|
|
2
|
+
function buildConfiguration(input) {
|
|
3
|
+
switch (input.kind) {
|
|
4
|
+
case 'mm': return buildMarketMakingConfig(input.mm);
|
|
5
|
+
case 'grid': return buildGridConfig(input.grid);
|
|
6
|
+
case 'dca': return buildDCAConfig(input.dca);
|
|
7
|
+
case 'basket': return buildIndexConfig(input.basket);
|
|
8
|
+
case 'copy': return buildCopyConfig(input.copy);
|
|
9
|
+
case 'signal': return buildSignalConfig(input.signal);
|
|
10
|
+
default: return buildGenericProcessConfig();
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
const DEFAULT_REFERENCE_MARKET = 'USDT';
|
|
14
|
+
function quoteOf(pair) {
|
|
15
|
+
// Strip the perp settle suffix: 'BTC/USDT:USDT' quotes in USDT, and
|
|
16
|
+
// 'USDT:USDT' is not a currency the node can value a portfolio in.
|
|
17
|
+
const quote = pair?.split('/')[1]?.split(':')[0];
|
|
18
|
+
return quote?.trim() ? quote.trim() : null;
|
|
19
|
+
}
|
|
20
|
+
/** The node values the automation's portfolio in Strategy.reference_market
|
|
21
|
+
* (required in protocol 0.4.0) — derive it from the traded pairs' quote. */
|
|
22
|
+
export function referenceMarketOf(input) {
|
|
23
|
+
switch (input.kind) {
|
|
24
|
+
case 'mm': return quoteOf(input.mm.pairs[0]) ?? DEFAULT_REFERENCE_MARKET;
|
|
25
|
+
case 'grid': return quoteOf(input.grid.pairs[0]) ?? DEFAULT_REFERENCE_MARKET;
|
|
26
|
+
case 'dca': return quoteOf(input.dca.pairs[0]) ?? DEFAULT_REFERENCE_MARKET;
|
|
27
|
+
case 'signal': return quoteOf(input.signal.pair) ?? DEFAULT_REFERENCE_MARKET;
|
|
28
|
+
// Basket coins are bare base symbols; copy has no pairs of its own.
|
|
29
|
+
default: return DEFAULT_REFERENCE_MARKET;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
/** Build a complete protocol `Strategy` from a `StrategyInput`. This is the
|
|
33
|
+
* function `strategy.build()` in the public facade wraps; `strategy.dca()` /
|
|
34
|
+
* `.grid()` / etc are one-line convenience wrappers around this with the
|
|
35
|
+
* `kind` pre-filled. */
|
|
36
|
+
export function buildStrategy(input, opts = {}) {
|
|
37
|
+
const id = opts.id ?? `s_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 8)}`;
|
|
38
|
+
const now = new Date().toISOString();
|
|
39
|
+
return {
|
|
40
|
+
id,
|
|
41
|
+
version: opts.version ?? '1.0.0',
|
|
42
|
+
name: opts.name,
|
|
43
|
+
description: opts.description,
|
|
44
|
+
created_at: now,
|
|
45
|
+
updated_at: now,
|
|
46
|
+
reference_market: opts.referenceMarket ?? referenceMarketOf(input),
|
|
47
|
+
configuration: buildConfiguration(input),
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=build.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build.js","sourceRoot":"","sources":["../../../src/protocol/strategy/build.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,uBAAuB,EACvB,e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
|
1
|
+
import type { MarketMakingConfiguration, TradingTentaclesConfiguration, CopyConfiguration, GenericProcessConfiguration } from '@drakkar.software/octobot-protocol';
|
|
2
|
+
export type MmRefInput = {
|
|
3
|
+
pair: string;
|
|
4
|
+
weight: number;
|
|
5
|
+
formula?: string;
|
|
6
|
+
timeframe?: string;
|
|
7
|
+
/** Venue the reference price is quoted on (protocol allows cross-exchange
|
|
8
|
+
* references and sentinels). Absent = the bot's own trading venue. */
|
|
9
|
+
exchange?: string;
|
|
10
|
+
};
|
|
11
|
+
export type MmBudgetPairInput = {
|
|
12
|
+
enabled: boolean;
|
|
13
|
+
/** 0 = disabled — mirrors the protocol's own "0 means unlimited" semantics. */
|
|
14
|
+
maxBase: string | number;
|
|
15
|
+
maxQuote: string | number;
|
|
16
|
+
/** 0 = use the node's suggested value. */
|
|
17
|
+
minBase: string | number;
|
|
18
|
+
minQuote: string | number;
|
|
19
|
+
};
|
|
20
|
+
export type MmStopsPairInput = {
|
|
21
|
+
enabled: boolean;
|
|
22
|
+
minBaseHolding?: string | number;
|
|
23
|
+
minQuoteHolding?: string | number;
|
|
24
|
+
maxPositivePct?: string | number;
|
|
25
|
+
maxNegativePct?: string | number;
|
|
26
|
+
avgPriceMinutes?: string | number;
|
|
27
|
+
};
|
|
28
|
+
export type MmVolumePairInput = {
|
|
29
|
+
enabled: boolean;
|
|
30
|
+
/** Per-trade notional bounds, quote-denominated. */
|
|
31
|
+
minAmount: string | number;
|
|
32
|
+
maxAmount: string | number;
|
|
33
|
+
minIntervalSeconds: string | number;
|
|
34
|
+
maxIntervalSeconds: string | number;
|
|
35
|
+
};
|
|
36
|
+
export type MmHedgingPairInput = {
|
|
37
|
+
enabled: boolean;
|
|
38
|
+
/** Venue to route the hedge trade on — must differ from the bot's own trading exchange. */
|
|
39
|
+
exchange: string;
|
|
40
|
+
maxLossThreshold?: string | number;
|
|
41
|
+
avgPriceMinutes?: string | number;
|
|
42
|
+
maxNegativePct?: string | number;
|
|
43
|
+
maxPositivePct?: string | number;
|
|
44
|
+
};
|
|
45
|
+
/** Per-pair order-book/spread configuration — an optional overlay on top of
|
|
46
|
+
* the bot-wide spreadBp/perSide/shape scalars (which stay the fallback for
|
|
47
|
+
* budget-disabled pairs and edit-mode recovery). Present = the pair carries
|
|
48
|
+
* a real per-pair MarketMakingSymbolConfiguration spread/depth setting. */
|
|
49
|
+
export type MmOrderBookPairInput = {
|
|
50
|
+
minSpreadBp: string | number;
|
|
51
|
+
maxSpreadBp: string | number;
|
|
52
|
+
bidsCount: string | number;
|
|
53
|
+
asksCount: string | number;
|
|
54
|
+
ordersDistribution: 'linear';
|
|
55
|
+
fundsDistribution: 'flat' | 'valley' | 'random';
|
|
56
|
+
/** Order-book depth as % of cumulated volume. */
|
|
57
|
+
cumulatedVolumePercent: string | number;
|
|
58
|
+
/** Order-book depth as % of daily trading volume. */
|
|
59
|
+
percentDailyTradingVolume: string | number;
|
|
60
|
+
};
|
|
61
|
+
export type MmInput = {
|
|
62
|
+
exchange: string;
|
|
63
|
+
pairs: string[];
|
|
64
|
+
/** Reference price configuration per trading pair. */
|
|
65
|
+
refsByPair: Record<string, MmRefInput[] | undefined>;
|
|
66
|
+
/** Spread expressed in basis points (e.g. '50' for 0.5%). */
|
|
67
|
+
spreadBp: string | number;
|
|
68
|
+
/** Orders per side. */
|
|
69
|
+
perSide: string | number;
|
|
70
|
+
/** Base-asset budget per pair. */
|
|
71
|
+
sizeBase: string | number;
|
|
72
|
+
shape: 'flat' | 'linear' | 'expo' | 'random' | 'custom';
|
|
73
|
+
budgetByPair?: Record<string, MmBudgetPairInput | undefined>;
|
|
74
|
+
stopsByPair?: Record<string, MmStopsPairInput | undefined>;
|
|
75
|
+
volumeByPair?: Record<string, MmVolumePairInput | undefined>;
|
|
76
|
+
hedgingByPair?: Record<string, MmHedgingPairInput | undefined>;
|
|
77
|
+
orderBookByPair?: Record<string, MmOrderBookPairInput | undefined>;
|
|
78
|
+
};
|
|
79
|
+
export type GridLadderGeometry = {
|
|
80
|
+
spread: number;
|
|
81
|
+
increment: number;
|
|
82
|
+
buyCount: number;
|
|
83
|
+
sellCount: number;
|
|
84
|
+
};
|
|
85
|
+
export type GridInput = {
|
|
86
|
+
pairs: string[];
|
|
87
|
+
/** Lower price bound, quote-denominated. */
|
|
88
|
+
lower?: number | null;
|
|
89
|
+
/** Upper price bound, quote-denominated. */
|
|
90
|
+
upper?: number | null;
|
|
91
|
+
/** Total initial orders in the ladder (>= 2), split between the buy and sell
|
|
92
|
+
* sides at the current price. The ladder spans `levels + 1` price lines
|
|
93
|
+
* across [lower, upper]; the one the price sits on carries no order, which
|
|
94
|
+
* is why `levels` orders need `levels + 1` lines. */
|
|
95
|
+
levels?: number | null;
|
|
96
|
+
/** Market price snapshot when the user configured the grid — drives the buy/sell split. */
|
|
97
|
+
currentPrice?: number | null;
|
|
98
|
+
/** Raw ladder params (advanced mode / edit rehydration). When all four are
|
|
99
|
+
* set they are emitted verbatim and take precedence over the range
|
|
100
|
+
* derivation — the only way to express flat_spread ≠ flat_increment. */
|
|
101
|
+
flatSpread?: number | null;
|
|
102
|
+
flatIncrement?: number | null;
|
|
103
|
+
buyOrdersCount?: number | null;
|
|
104
|
+
sellOrdersCount?: number | null;
|
|
105
|
+
/** Trail the grid upwards when the price escapes it. Default true. */
|
|
106
|
+
enableTrailingUp?: boolean | null;
|
|
107
|
+
/** Trail one order at a time instead of the whole grid. Default true. */
|
|
108
|
+
orderByOrderTrailing?: boolean | null;
|
|
109
|
+
};
|
|
110
|
+
export type DcaInput = {
|
|
111
|
+
pairs: string[];
|
|
112
|
+
/** Verbatim protocol amount string: '10%t' (percent of total holdings),
|
|
113
|
+
* '25q' (quote amount), '0.1' (base amount). */
|
|
114
|
+
buyOrderAmount?: string | null;
|
|
115
|
+
/** Interval between buys in time-based trigger mode. */
|
|
116
|
+
minutesBeforeNextBuy?: number | null;
|
|
117
|
+
/** Buy with market orders instead of limit orders. */
|
|
118
|
+
useMarketEntry?: boolean | null;
|
|
119
|
+
/** Buy with a limit order this % below current price (limit entries only). */
|
|
120
|
+
entryLimitPricePercent?: string | number | null;
|
|
121
|
+
/** Create a take-profit sell order when a buy is filled. */
|
|
122
|
+
useTakeProfit?: boolean | null;
|
|
123
|
+
/** Sell with a limit order this % above the buying price. */
|
|
124
|
+
exitLimitPricePercent?: string | number | null;
|
|
125
|
+
};
|
|
126
|
+
export type IndexInput = {
|
|
127
|
+
pairs: string[];
|
|
128
|
+
basketWeights?: Record<string, number>;
|
|
129
|
+
basketTotal?: number;
|
|
130
|
+
/** Drift percentage that triggers a rebalance (wizard ±3/5/10 presets). */
|
|
131
|
+
rebalanceTriggerPct?: number | null;
|
|
132
|
+
};
|
|
133
|
+
export type CopyInput = {
|
|
134
|
+
sourceId?: string | null;
|
|
135
|
+
};
|
|
136
|
+
export type SignalInput = {
|
|
137
|
+
webhookId: string;
|
|
138
|
+
webhookSecret: string;
|
|
139
|
+
pair: string;
|
|
140
|
+
sideMode: 'payload' | 'buy' | 'sell';
|
|
141
|
+
/** JSON field carrying buy/sell when sideMode === 'payload'. */
|
|
142
|
+
sidePayloadField?: string;
|
|
143
|
+
orderType: 'market' | 'limit';
|
|
144
|
+
/** Limit offset in bps when orderType === 'limit'. */
|
|
145
|
+
limitOffsetBp?: string | number;
|
|
146
|
+
limitOffsetDir?: 'above' | 'below';
|
|
147
|
+
sizeMode: 'fixed' | 'percent';
|
|
148
|
+
sizeValue: string | number;
|
|
149
|
+
tpEnabled?: boolean;
|
|
150
|
+
tpPct?: string | number;
|
|
151
|
+
slEnabled?: boolean;
|
|
152
|
+
slPct?: string | number;
|
|
153
|
+
};
|
|
154
|
+
/** Webhook-signal bot settings carried inside generic_process profile_data.
|
|
155
|
+
* The webhook secret rides along intentionally: the userActions document is
|
|
156
|
+
* identity-encrypted in transit and the node needs the secret to validate
|
|
157
|
+
* incoming webhook calls. */
|
|
158
|
+
export type SignalProfileData = {
|
|
159
|
+
signal: {
|
|
160
|
+
version: 1;
|
|
161
|
+
webhook: {
|
|
162
|
+
id: string;
|
|
163
|
+
secret: string;
|
|
164
|
+
};
|
|
165
|
+
pair: string;
|
|
166
|
+
side: {
|
|
167
|
+
mode: 'payload' | 'buy' | 'sell';
|
|
168
|
+
payload_field?: string;
|
|
169
|
+
};
|
|
170
|
+
order: {
|
|
171
|
+
type: 'market' | 'limit';
|
|
172
|
+
limit_offset_bp?: number;
|
|
173
|
+
limit_offset_direction?: 'above' | 'below';
|
|
174
|
+
};
|
|
175
|
+
size: {
|
|
176
|
+
mode: 'fixed' | 'percent';
|
|
177
|
+
value: number;
|
|
178
|
+
};
|
|
179
|
+
take_profit_percent?: number;
|
|
180
|
+
stop_loss_percent?: number;
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
/** The wizard's only DCA trigger mode — evaluator-signal triggering needs
|
|
184
|
+
* evaluator config the wizard has no UI for. */
|
|
185
|
+
export declare const DCA_TRIGGER_MODE_TIME_BASED = "Time based";
|
|
186
|
+
export declare const DCA_DEFAULTS: {
|
|
187
|
+
readonly buy_order_amount: "10%t";
|
|
188
|
+
readonly minutes_before_next_buy: 10080;
|
|
189
|
+
readonly use_market_entry_orders: false;
|
|
190
|
+
readonly entry_limit_orders_price_percent: 1;
|
|
191
|
+
readonly use_take_profit_exit_orders: true;
|
|
192
|
+
readonly exit_limit_orders_price_percent: 3;
|
|
193
|
+
};
|
|
194
|
+
/** GridInput-side defaults (spec example values), shared with a caller's own
|
|
195
|
+
* draft store so both layers agree on what an untouched grid emits. */
|
|
196
|
+
export declare const GRID_INPUT_DEFAULTS: {
|
|
197
|
+
readonly buyOrdersCount: 10;
|
|
198
|
+
readonly sellOrdersCount: 20;
|
|
199
|
+
readonly enableTrailingUp: true;
|
|
200
|
+
readonly orderByOrderTrailing: true;
|
|
201
|
+
};
|
|
202
|
+
export declare const INDEX_DEFAULTS: {
|
|
203
|
+
readonly rebalance_trigger_min_percent: 5;
|
|
204
|
+
};
|
|
205
|
+
/** buy_order_amount unit suffixes a caller can express: percent of total
|
|
206
|
+
* holdings ('%t'), quote amount ('q'), bare base amount (''). */
|
|
207
|
+
export type DcaAmountUnit = '%t' | 'q' | 'base';
|
|
208
|
+
export declare function formatDcaAmount(value: string | number, unit: DcaAmountUnit): string;
|
|
209
|
+
/** Split a protocol buy_order_amount string into value + unit. Unknown
|
|
210
|
+
* suffixes ('2%', '12a%'…) stay whole in `value` with unit 'base' so a
|
|
211
|
+
* foreign config re-emits verbatim (formatDcaAmount round-trips it). */
|
|
212
|
+
export declare function parseDcaAmount(amount: string): {
|
|
213
|
+
value: string;
|
|
214
|
+
unit: DcaAmountUnit;
|
|
215
|
+
};
|
|
216
|
+
export declare function buildMarketMakingConfig(input: MmInput): MarketMakingConfiguration;
|
|
217
|
+
/** How many of a `levels`-order ladder sit on the buy side, given where the
|
|
218
|
+
* current price falls in the range (0 = at the lower bound, 100 = at the
|
|
219
|
+
* upper bound). The sell side takes the remainder, so the two always sum to
|
|
220
|
+
* `levels` — that is the whole contract.
|
|
221
|
+
*
|
|
222
|
+
* The index is rounded to 9 decimals before flooring so FP noise in the
|
|
223
|
+
* caller's division can't shift the split by a whole level (e.g.
|
|
224
|
+
* (0.3-0.2)/(0.4-0.2) is 0.49999999999999994, not 0.5).
|
|
225
|
+
*
|
|
226
|
+
* Exported so a caller's own preview UI shows exactly what gets submitted. */
|
|
227
|
+
export declare function gridBuyCount(positionPct: number, levels: number): number;
|
|
228
|
+
export declare function buildGridConfig(input: GridInput): TradingTentaclesConfiguration;
|
|
229
|
+
export declare function buildDCAConfig(input: DcaInput): TradingTentaclesConfiguration;
|
|
230
|
+
export declare function buildIndexConfig(input: IndexInput): TradingTentaclesConfiguration;
|
|
231
|
+
export declare function buildCopyConfig(input: CopyInput): CopyConfiguration;
|
|
232
|
+
export declare function buildSignalConfig(input: SignalInput): GenericProcessConfiguration;
|
|
233
|
+
export declare function isSignalProfileData(data: unknown): data is SignalProfileData;
|
|
234
|
+
export declare function signalProfileDataToInput(data: SignalProfileData): SignalInput;
|
|
235
|
+
/** Subset of {@link MmInput} that the inverse adapter (./patch.ts) populates
|
|
236
|
+
* from a protocol Strategy. */
|
|
237
|
+
export type MmInputPatch = {
|
|
238
|
+
/** Venue from the running config — the edit flow's fallback when the bot's
|
|
239
|
+
* account can no longer be resolved at Apply time. */
|
|
240
|
+
exchange?: string;
|
|
241
|
+
spreadBp?: string | number;
|
|
242
|
+
perSide?: string | number;
|
|
243
|
+
sizeBase?: string | number;
|
|
244
|
+
shape?: MmInput['shape'];
|
|
245
|
+
budgetByPair?: Record<string, MmBudgetPairInput>;
|
|
246
|
+
stopsByPair?: Record<string, MmStopsPairInput>;
|
|
247
|
+
volumeByPair?: Record<string, MmVolumePairInput>;
|
|
248
|
+
hedgingByPair?: Record<string, MmHedgingPairInput>;
|
|
249
|
+
orderBookByPair?: Record<string, MmOrderBookPairInput>;
|
|
250
|
+
};
|
|
251
|
+
export declare function buildGenericProcessConfig(): GenericProcessConfiguration;
|
|
252
|
+
//# sourceMappingURL=builders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builders.d.ts","sourceRoot":"","sources":["../../../src/protocol/strategy/builders.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,yBAAyB,EAIzB,6BAA6B,EAC7B,iBAAiB,EACjB,2BAA2B,EAC5B,MAAM,oCAAoC,CAAA;AAS3C,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;2EACuE;IACvE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,EAAE,OAAO,CAAA;IAChB,+EAA+E;IAC/E,OAAO,EAAE,MAAM,GAAG,MAAM,CAAA;IACxB,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAA;IAC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