@drakkar.software/octobot-protocol 0.1.0 → 0.2.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 (52) hide show
  1. package/models/Account.ts +2 -2
  2. package/models/AccountActionResult.ts +1 -1
  3. package/models/AccountActionResultErrorMessage.ts +1 -5
  4. package/models/AccountStatus.ts +1 -5
  5. package/models/AccountStatusMessage.ts +1 -11
  6. package/models/AccountType.ts +1 -5
  7. package/models/Action.ts +1 -1
  8. package/models/ActiveOrderSwapStrategyType.ts +1 -4
  9. package/models/AutomationActionResult.ts +1 -1
  10. package/models/AutomationActionResultErrorMessage.ts +1 -8
  11. package/models/AutomationConfiguration.ts +2 -2
  12. package/models/AutomationMetadata.ts +2 -2
  13. package/models/CancelPolicyType.ts +1 -4
  14. package/models/CopyConfiguration.ts +3 -6
  15. package/models/CreateAccountConfiguration.ts +3 -6
  16. package/models/CreateAutomationConfiguration.ts +3 -6
  17. package/models/DCAConfiguration.ts +4 -10
  18. package/models/DeleteAccountConfiguration.ts +3 -6
  19. package/models/EMAMomentumEvaluatorConfiguration.ts +3 -6
  20. package/models/EditAccountConfiguration.ts +3 -6
  21. package/models/EditAutomationConfiguration.ts +3 -6
  22. package/models/GenericProcessConfiguration.ts +3 -6
  23. package/models/GenericWorkflowConfiguration.ts +3 -6
  24. package/models/GridConfiguration.ts +3 -6
  25. package/models/IndexConfiguration.ts +3 -6
  26. package/models/MarketMakingConfiguration.ts +3 -6
  27. package/models/MarketMakingFundsDistribution.ts +1 -5
  28. package/models/MarketMakingHedgingEngine.ts +1 -4
  29. package/models/MarketMakingOrdersDistribution.ts +1 -3
  30. package/models/Order.ts +1 -1
  31. package/models/OrderGroupType.ts +1 -5
  32. package/models/OrderStatus.ts +1 -12
  33. package/models/OrderType.ts +1 -8
  34. package/models/PositionStatus.ts +1 -6
  35. package/models/RSIMomentumEvaluatorConfiguration.ts +3 -6
  36. package/models/RefreshAccountsConfiguration.ts +3 -6
  37. package/models/Side.ts +1 -4
  38. package/models/StopAutomationConfiguration.ts +3 -6
  39. package/models/Strategy.ts +2 -2
  40. package/models/TaskStatus.ts +1 -8
  41. package/models/TimeFrame.ts +1 -14
  42. package/models/Trade.ts +1 -1
  43. package/models/TradingType.ts +1 -6
  44. package/models/TrailingProfileType.ts +1 -3
  45. package/models/UserAction.ts +2 -2
  46. package/models/UserActionResultType.ts +1 -4
  47. package/models/UserActionStatus.ts +1 -6
  48. package/models/index.ts +0 -3
  49. package/package.json +1 -1
  50. package/models/ActionConfigurationType.ts +0 -25
  51. package/models/EvaluatorType.ts +0 -20
  52. package/models/UserActionType.ts +0 -25
package/models/Account.ts CHANGED
@@ -22,8 +22,8 @@ export class Account {
22
22
  'is_simulated': boolean;
23
23
  'description'?: string;
24
24
  'state'?: AccountState;
25
- 'created_at': Date;
26
- 'updated_at': Date;
25
+ 'created_at': string;
26
+ 'updated_at': string;
27
27
  'details'?: AccountDetails;
28
28
 
29
29
  static readonly discriminator: string | undefined = undefined;
@@ -17,7 +17,7 @@ import { UserActionResultType } from '../models/UserActionResultType';
17
17
  * AccountActionResult
18
18
  */
19
19
  export class AccountActionResult {
20
- 'updated_at': Date;
20
+ 'updated_at': string;
21
21
  'error_message'?: AccountActionResultErrorMessage;
22
22
  'error_details'?: string;
23
23
  'result_type': UserActionResultType;
@@ -14,8 +14,4 @@
14
14
  /**
15
15
  * AccountActionResultErrorMessage
16
16
  */
17
- export enum AccountActionResultErrorMessage {
18
- AccountNotFound = 'account_not_found',
19
- InvalidConfiguration = 'invalid_configuration',
20
- InternalError = 'internal_error'
21
- }
17
+ export type AccountActionResultErrorMessage = 'account_not_found' | 'invalid_configuration' | 'internal_error'
@@ -14,8 +14,4 @@
14
14
  /**
15
15
  * AccountStatus
16
16
  */
17
- export enum AccountStatus {
18
- Valid = 'valid',
19
- Invalid = 'invalid',
20
- Unknown = 'unknown'
21
- }
17
+ export type AccountStatus = 'valid' | 'invalid' | 'unknown'
@@ -14,14 +14,4 @@
14
14
  /**
15
15
  * AccountStatusMessage
16
16
  */
17
- export enum AccountStatusMessage {
18
- PendingValidation = 'pending_validation',
19
- Valid = 'valid',
20
- InvalidApiKeys = 'invalid_api_keys',
21
- MissingApiTradingRights = 'missing_api_trading_rights',
22
- RevokeApiWithdrawalRights = 'revoke_api_withdrawal_rights',
23
- InvalidApiIpWhitelist = 'invalid_api_ip_whitelist',
24
- InternalServerError = 'internal_server_error',
25
- AccountTooOld = 'account_too_old',
26
- IncompatibleAccountReferral = 'incompatible_account_referral'
27
- }
17
+ export type AccountStatusMessage = 'pending_validation' | 'valid' | 'invalid_api_keys' | 'missing_api_trading_rights' | 'revoke_api_withdrawal_rights' | 'invalid_api_ip_whitelist' | 'internal_server_error' | 'account_too_old' | 'incompatible_account_referral'
@@ -14,8 +14,4 @@
14
14
  /**
15
15
  * Account category discriminator.
16
16
  */
17
- export enum AccountType {
18
- Generic = 'generic',
19
- Exchange = 'exchange',
20
- Blockchain = 'blockchain'
21
- }
17
+ export type AccountType = 'generic' | 'exchange' | 'blockchain'
package/models/Action.ts CHANGED
@@ -23,7 +23,7 @@ export class Action {
23
23
  'configuration'?: { [key: string]: any; };
24
24
  'result'?: string;
25
25
  'error'?: string;
26
- 'completed_at'?: Date;
26
+ 'completed_at'?: string;
27
27
 
28
28
  static readonly discriminator: string | undefined = undefined;
29
29
 
@@ -14,7 +14,4 @@
14
14
  /**
15
15
  * Active order swap strategy class name (mirrors octobot_trading active_order_swap_strategy_factory).
16
16
  */
17
- export enum ActiveOrderSwapStrategyType {
18
- StopFirstActiveOrderSwapStrategy = 'StopFirstActiveOrderSwapStrategy',
19
- TakeProfitFirstActiveOrderSwapStrategy = 'TakeProfitFirstActiveOrderSwapStrategy'
20
- }
17
+ export type ActiveOrderSwapStrategyType = 'StopFirstActiveOrderSwapStrategy' | 'TakeProfitFirstActiveOrderSwapStrategy'
@@ -17,7 +17,7 @@ import { UserActionResultType } from '../models/UserActionResultType';
17
17
  * AutomationActionResult
18
18
  */
19
19
  export class AutomationActionResult {
20
- 'updated_at': Date;
20
+ 'updated_at': string;
21
21
  'error_message'?: AutomationActionResultErrorMessage;
22
22
  'error_details'?: string;
23
23
  'created_automation_id'?: string;
@@ -14,11 +14,4 @@
14
14
  /**
15
15
  * AutomationActionResultErrorMessage
16
16
  */
17
- export enum AutomationActionResultErrorMessage {
18
- AutomationNotFound = 'automation_not_found',
19
- InvalidConfiguration = 'invalid_configuration',
20
- StrategyNotFound = 'strategy_not_found',
21
- StrategyVersionNotFound = 'strategy_version_not_found',
22
- AccountNotFound = 'account_not_found',
23
- InternalError = 'internal_error'
24
- }
17
+ export type AutomationActionResultErrorMessage = 'automation_not_found' | 'invalid_configuration' | 'strategy_not_found' | 'strategy_version_not_found' | 'account_not_found' | 'internal_error'
@@ -19,8 +19,8 @@ import { StrategyReference } from '../models/StrategyReference';
19
19
  export class AutomationConfiguration {
20
20
  'name': string;
21
21
  'description'?: string;
22
- 'created_at': Date;
23
- 'updated_at'?: Date;
22
+ 'created_at': string;
23
+ 'updated_at'?: string;
24
24
  'strategy': StrategyReference;
25
25
  'accounts': Array<AccountReference>;
26
26
 
@@ -17,8 +17,8 @@
17
17
  export class AutomationMetadata {
18
18
  'name': string;
19
19
  'description': string;
20
- 'created_at'?: Date;
21
- 'updated_at'?: Date;
20
+ 'created_at'?: string;
21
+ 'updated_at'?: string;
22
22
 
23
23
  static readonly discriminator: string | undefined = undefined;
24
24
 
@@ -14,7 +14,4 @@
14
14
  /**
15
15
  * Cancel policy class name (mirrors octobot_trading cancel_policy_factory).
16
16
  */
17
- export enum CancelPolicyType {
18
- ExpirationTimeOrderCancelPolicy = 'ExpirationTimeOrderCancelPolicy',
19
- ChainedOrderFillingPriceOrderCancelPolicy = 'ChainedOrderFillingPriceOrderCancelPolicy'
20
- }
17
+ export type CancelPolicyType = 'ExpirationTimeOrderCancelPolicy' | 'ChainedOrderFillingPriceOrderCancelPolicy'
@@ -10,16 +10,12 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
 
13
- import { ActionConfigurationType } from '../models/ActionConfigurationType';
14
13
 
15
14
  /**
16
15
  * CopyConfiguration
17
16
  */
18
17
  export class CopyConfiguration {
19
- /**
20
- * copy
21
- */
22
- 'configuration_type': ActionConfigurationType;
18
+ 'configuration_type': CopyConfigurationConfigurationTypeEnum;
23
19
  'strategy_id': string;
24
20
 
25
21
  static readonly discriminator: string | undefined = undefined;
@@ -30,7 +26,7 @@ export class CopyConfiguration {
30
26
  {
31
27
  "name": "configuration_type",
32
28
  "baseName": "configuration_type",
33
- "type": "ActionConfigurationType",
29
+ "type": "CopyConfigurationConfigurationTypeEnum",
34
30
  "format": ""
35
31
  },
36
32
  {
@@ -48,4 +44,5 @@ export class CopyConfiguration {
48
44
  }
49
45
  }
50
46
 
47
+ export type CopyConfigurationConfigurationTypeEnum = 'CopyConfiguration'
51
48
 
@@ -11,16 +11,12 @@
11
11
  */
12
12
 
13
13
  import { Account } from '../models/Account';
14
- import { UserActionType } from '../models/UserActionType';
15
14
 
16
15
  /**
17
16
  * CreateAccountConfiguration
18
17
  */
19
18
  export class CreateAccountConfiguration {
20
- /**
21
- * account_create
22
- */
23
- 'action_type': UserActionType;
19
+ 'action_type': CreateAccountConfigurationActionTypeEnum;
24
20
  'configuration': Account;
25
21
 
26
22
  static readonly discriminator: string | undefined = undefined;
@@ -31,7 +27,7 @@ export class CreateAccountConfiguration {
31
27
  {
32
28
  "name": "action_type",
33
29
  "baseName": "action_type",
34
- "type": "UserActionType",
30
+ "type": "CreateAccountConfigurationActionTypeEnum",
35
31
  "format": ""
36
32
  },
37
33
  {
@@ -49,4 +45,5 @@ export class CreateAccountConfiguration {
49
45
  }
50
46
  }
51
47
 
48
+ export type CreateAccountConfigurationActionTypeEnum = 'account_create'
52
49
 
@@ -11,16 +11,12 @@
11
11
  */
12
12
 
13
13
  import { AutomationConfiguration } from '../models/AutomationConfiguration';
14
- import { UserActionType } from '../models/UserActionType';
15
14
 
16
15
  /**
17
16
  * CreateAutomationConfiguration
18
17
  */
19
18
  export class CreateAutomationConfiguration {
20
- /**
21
- * automation_create
22
- */
23
- 'action_type': UserActionType;
19
+ 'action_type': CreateAutomationConfigurationActionTypeEnum;
24
20
  'configuration': AutomationConfiguration;
25
21
 
26
22
  static readonly discriminator: string | undefined = undefined;
@@ -31,7 +27,7 @@ export class CreateAutomationConfiguration {
31
27
  {
32
28
  "name": "action_type",
33
29
  "baseName": "action_type",
34
- "type": "UserActionType",
30
+ "type": "CreateAutomationConfigurationActionTypeEnum",
35
31
  "format": ""
36
32
  },
37
33
  {
@@ -49,4 +45,5 @@ export class CreateAutomationConfiguration {
49
45
  }
50
46
  }
51
47
 
48
+ export type CreateAutomationConfigurationActionTypeEnum = 'automation_create'
52
49
 
@@ -10,7 +10,6 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
 
13
- import { ActionConfigurationType } from '../models/ActionConfigurationType';
14
13
  import { EvaluatorConfiguration } from '../models/EvaluatorConfiguration';
15
14
  import { TimeFrame } from '../models/TimeFrame';
16
15
 
@@ -18,10 +17,7 @@ import { TimeFrame } from '../models/TimeFrame';
18
17
  * DCAConfiguration
19
18
  */
20
19
  export class DCAConfiguration {
21
- /**
22
- * dca
23
- */
24
- 'configuration_type': ActionConfigurationType;
20
+ 'configuration_type': DCAConfigurationConfigurationTypeEnum;
25
21
  'symbols': Array<string>;
26
22
  'buy_orders_count': number;
27
23
  'percent_amount_per_buy_order': number;
@@ -42,7 +38,7 @@ export class DCAConfiguration {
42
38
  {
43
39
  "name": "configuration_type",
44
40
  "baseName": "configuration_type",
45
- "type": "ActionConfigurationType",
41
+ "type": "DCAConfigurationConfigurationTypeEnum",
46
42
  "format": ""
47
43
  },
48
44
  {
@@ -120,8 +116,6 @@ export class DCAConfiguration {
120
116
  }
121
117
  }
122
118
 
123
- export enum DCAConfigurationTriggerModeEnum {
124
- MaximumEvaluatorsSignalsBased = 'Maximum evaluators signals based',
125
- TimeBased = 'Time based'
126
- }
119
+ export type DCAConfigurationConfigurationTypeEnum = 'DCAConfiguration'
120
+ export type DCAConfigurationTriggerModeEnum = 'Maximum evaluators signals based' | 'Time based'
127
121
 
@@ -10,16 +10,12 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
 
13
- import { UserActionType } from '../models/UserActionType';
14
13
 
15
14
  /**
16
15
  * DeleteAccountConfiguration
17
16
  */
18
17
  export class DeleteAccountConfiguration {
19
- /**
20
- * account_delete
21
- */
22
- 'action_type': UserActionType;
18
+ 'action_type': DeleteAccountConfigurationActionTypeEnum;
23
19
  'id': string;
24
20
 
25
21
  static readonly discriminator: string | undefined = undefined;
@@ -30,7 +26,7 @@ export class DeleteAccountConfiguration {
30
26
  {
31
27
  "name": "action_type",
32
28
  "baseName": "action_type",
33
- "type": "UserActionType",
29
+ "type": "DeleteAccountConfigurationActionTypeEnum",
34
30
  "format": ""
35
31
  },
36
32
  {
@@ -48,4 +44,5 @@ export class DeleteAccountConfiguration {
48
44
  }
49
45
  }
50
46
 
47
+ export type DeleteAccountConfigurationActionTypeEnum = 'account_delete'
51
48
 
@@ -10,16 +10,12 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
 
13
- import { EvaluatorType } from '../models/EvaluatorType';
14
13
 
15
14
  /**
16
15
  * EMAMomentumEvaluatorConfiguration
17
16
  */
18
17
  export class EMAMomentumEvaluatorConfiguration {
19
- /**
20
- * EMAMomentumEvaluator
21
- */
22
- 'configuration_type': EvaluatorType;
18
+ 'configuration_type': EMAMomentumEvaluatorConfigurationConfigurationTypeEnum;
23
19
  'period_length': number;
24
20
  'price_threshold_percent': number;
25
21
  'reverse_signal': boolean;
@@ -32,7 +28,7 @@ export class EMAMomentumEvaluatorConfiguration {
32
28
  {
33
29
  "name": "configuration_type",
34
30
  "baseName": "configuration_type",
35
- "type": "EvaluatorType",
31
+ "type": "EMAMomentumEvaluatorConfigurationConfigurationTypeEnum",
36
32
  "format": ""
37
33
  },
38
34
  {
@@ -62,4 +58,5 @@ export class EMAMomentumEvaluatorConfiguration {
62
58
  }
63
59
  }
64
60
 
61
+ export type EMAMomentumEvaluatorConfigurationConfigurationTypeEnum = 'EMAMomentumEvaluator'
65
62
 
@@ -11,16 +11,12 @@
11
11
  */
12
12
 
13
13
  import { Account } from '../models/Account';
14
- import { UserActionType } from '../models/UserActionType';
15
14
 
16
15
  /**
17
16
  * EditAccountConfiguration
18
17
  */
19
18
  export class EditAccountConfiguration {
20
- /**
21
- * account_edit
22
- */
23
- 'action_type': UserActionType;
19
+ 'action_type': EditAccountConfigurationActionTypeEnum;
24
20
  'id': string;
25
21
  'configuration'?: Account;
26
22
 
@@ -32,7 +28,7 @@ export class EditAccountConfiguration {
32
28
  {
33
29
  "name": "action_type",
34
30
  "baseName": "action_type",
35
- "type": "UserActionType",
31
+ "type": "EditAccountConfigurationActionTypeEnum",
36
32
  "format": ""
37
33
  },
38
34
  {
@@ -56,4 +52,5 @@ export class EditAccountConfiguration {
56
52
  }
57
53
  }
58
54
 
55
+ export type EditAccountConfigurationActionTypeEnum = 'account_edit'
59
56
 
@@ -11,17 +11,13 @@
11
11
  */
12
12
 
13
13
  import { AutomationConfiguration } from '../models/AutomationConfiguration';
14
- import { UserActionType } from '../models/UserActionType';
15
14
 
16
15
  /**
17
16
  * EditAutomationConfiguration
18
17
  */
19
18
  export class EditAutomationConfiguration {
20
19
  'id': string;
21
- /**
22
- * automation_edit
23
- */
24
- 'action_type': UserActionType;
20
+ 'action_type': EditAutomationConfigurationActionTypeEnum;
25
21
  'configuration': AutomationConfiguration;
26
22
 
27
23
  static readonly discriminator: string | undefined = undefined;
@@ -38,7 +34,7 @@ export class EditAutomationConfiguration {
38
34
  {
39
35
  "name": "action_type",
40
36
  "baseName": "action_type",
41
- "type": "UserActionType",
37
+ "type": "EditAutomationConfigurationActionTypeEnum",
42
38
  "format": ""
43
39
  },
44
40
  {
@@ -56,4 +52,5 @@ export class EditAutomationConfiguration {
56
52
  }
57
53
  }
58
54
 
55
+ export type EditAutomationConfigurationActionTypeEnum = 'automation_edit'
59
56
 
@@ -10,16 +10,12 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
 
13
- import { ActionConfigurationType } from '../models/ActionConfigurationType';
14
13
 
15
14
  /**
16
15
  * GenericProcessConfiguration
17
16
  */
18
17
  export class GenericProcessConfiguration {
19
- /**
20
- * generic_process
21
- */
22
- 'configuration_type': ActionConfigurationType;
18
+ 'configuration_type': GenericProcessConfigurationConfigurationTypeEnum;
23
19
  'profile_data': any;
24
20
 
25
21
  static readonly discriminator: string | undefined = undefined;
@@ -30,7 +26,7 @@ export class GenericProcessConfiguration {
30
26
  {
31
27
  "name": "configuration_type",
32
28
  "baseName": "configuration_type",
33
- "type": "ActionConfigurationType",
29
+ "type": "GenericProcessConfigurationConfigurationTypeEnum",
34
30
  "format": ""
35
31
  },
36
32
  {
@@ -48,4 +44,5 @@ export class GenericProcessConfiguration {
48
44
  }
49
45
  }
50
46
 
47
+ export type GenericProcessConfigurationConfigurationTypeEnum = 'GenericProcessConfiguration'
51
48
 
@@ -11,16 +11,12 @@
11
11
  */
12
12
 
13
13
  import { Action } from '../models/Action';
14
- import { ActionConfigurationType } from '../models/ActionConfigurationType';
15
14
 
16
15
  /**
17
16
  * GenericWorkflowConfiguration
18
17
  */
19
18
  export class GenericWorkflowConfiguration {
20
- /**
21
- * generic_workflow
22
- */
23
- 'configuration_type': ActionConfigurationType;
19
+ 'configuration_type': GenericWorkflowConfigurationConfigurationTypeEnum;
24
20
  'actions': Array<Action>;
25
21
 
26
22
  static readonly discriminator: string | undefined = undefined;
@@ -31,7 +27,7 @@ export class GenericWorkflowConfiguration {
31
27
  {
32
28
  "name": "configuration_type",
33
29
  "baseName": "configuration_type",
34
- "type": "ActionConfigurationType",
30
+ "type": "GenericWorkflowConfigurationConfigurationTypeEnum",
35
31
  "format": ""
36
32
  },
37
33
  {
@@ -49,4 +45,5 @@ export class GenericWorkflowConfiguration {
49
45
  }
50
46
  }
51
47
 
48
+ export type GenericWorkflowConfigurationConfigurationTypeEnum = 'GenericWorkflowConfiguration'
52
49
 
@@ -10,16 +10,12 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
 
13
- import { ActionConfigurationType } from '../models/ActionConfigurationType';
14
13
 
15
14
  /**
16
15
  * GridConfiguration
17
16
  */
18
17
  export class GridConfiguration {
19
- /**
20
- * grid
21
- */
22
- 'configuration_type': ActionConfigurationType;
18
+ 'configuration_type': GridConfigurationConfigurationTypeEnum;
23
19
  'symbol': string;
24
20
  /**
25
21
  * Price difference between the closest buy and sell orders. Denominated in the quote currency (600 for a 600 USDT spread on BTC/USDT).
@@ -49,7 +45,7 @@ export class GridConfiguration {
49
45
  {
50
46
  "name": "configuration_type",
51
47
  "baseName": "configuration_type",
52
- "type": "ActionConfigurationType",
48
+ "type": "GridConfigurationConfigurationTypeEnum",
53
49
  "format": ""
54
50
  },
55
51
  {
@@ -109,4 +105,5 @@ export class GridConfiguration {
109
105
  }
110
106
  }
111
107
 
108
+ export type GridConfigurationConfigurationTypeEnum = 'GridConfiguration'
112
109
 
@@ -10,17 +10,13 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
 
13
- import { ActionConfigurationType } from '../models/ActionConfigurationType';
14
13
  import { IndexCoin } from '../models/IndexCoin';
15
14
 
16
15
  /**
17
16
  * IndexConfiguration
18
17
  */
19
18
  export class IndexConfiguration {
20
- /**
21
- * index
22
- */
23
- 'configuration_type': ActionConfigurationType;
19
+ 'configuration_type': IndexConfigurationConfigurationTypeEnum;
24
20
  'coins': Array<IndexCoin>;
25
21
  'rebalance_trigger_min_percent': number;
26
22
 
@@ -32,7 +28,7 @@ export class IndexConfiguration {
32
28
  {
33
29
  "name": "configuration_type",
34
30
  "baseName": "configuration_type",
35
- "type": "ActionConfigurationType",
31
+ "type": "IndexConfigurationConfigurationTypeEnum",
36
32
  "format": ""
37
33
  },
38
34
  {
@@ -56,4 +52,5 @@ export class IndexConfiguration {
56
52
  }
57
53
  }
58
54
 
55
+ export type IndexConfigurationConfigurationTypeEnum = 'IndexConfiguration'
59
56
 
@@ -10,17 +10,13 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
 
13
- import { ActionConfigurationType } from '../models/ActionConfigurationType';
14
13
  import { MarketMakingSymbolConfiguration } from '../models/MarketMakingSymbolConfiguration';
15
14
 
16
15
  /**
17
16
  * Per-symbol market making parameters.
18
17
  */
19
18
  export class MarketMakingConfiguration {
20
- /**
21
- * market_making
22
- */
23
- 'configuration_type': ActionConfigurationType;
19
+ 'configuration_type': MarketMakingConfigurationConfigurationTypeEnum;
24
20
  'pair_settings': Array<MarketMakingSymbolConfiguration>;
25
21
 
26
22
  static readonly discriminator: string | undefined = undefined;
@@ -31,7 +27,7 @@ export class MarketMakingConfiguration {
31
27
  {
32
28
  "name": "configuration_type",
33
29
  "baseName": "configuration_type",
34
- "type": "ActionConfigurationType",
30
+ "type": "MarketMakingConfigurationConfigurationTypeEnum",
35
31
  "format": ""
36
32
  },
37
33
  {
@@ -49,4 +45,5 @@ export class MarketMakingConfiguration {
49
45
  }
50
46
  }
51
47
 
48
+ export type MarketMakingConfigurationConfigurationTypeEnum = 'MarketMakingConfiguration'
52
49
 
@@ -14,8 +14,4 @@
14
14
  /**
15
15
  * How allocated funds are spread across ladder levels.
16
16
  */
17
- export enum MarketMakingFundsDistribution {
18
- Flat = 'flat',
19
- Valley = 'valley',
20
- Random = 'random'
21
- }
17
+ export type MarketMakingFundsDistribution = 'flat' | 'valley' | 'random'
@@ -79,8 +79,5 @@ export class MarketMakingHedgingEngine {
79
79
  }
80
80
  }
81
81
 
82
- export enum MarketMakingHedgingEngineHedgingEngineTypeEnum {
83
- Spot = 'spot',
84
- PerpetualFutures = 'perpetual_futures'
85
- }
82
+ export type MarketMakingHedgingEngineHedgingEngineTypeEnum = 'spot' | 'perpetual_futures'
86
83
 
@@ -14,6 +14,4 @@
14
14
  /**
15
15
  * How order prices are spaced across the book.
16
16
  */
17
- export enum MarketMakingOrdersDistribution {
18
- Linear = 'linear'
19
- }
17
+ export type MarketMakingOrdersDistribution = 'linear'
package/models/Order.ts CHANGED
@@ -33,7 +33,7 @@ export class Order {
33
33
  'reduce_only'?: boolean;
34
34
  'is_active'?: boolean;
35
35
  'status': OrderStatus;
36
- 'created_at': Date;
36
+ 'created_at': string;
37
37
  'entries'?: Array<string>;
38
38
  'update_with_triggering_order_fees'?: boolean;
39
39
  'order_group'?: OrderGroup;
@@ -14,8 +14,4 @@
14
14
  /**
15
15
  * Order group class name (mirrors persisted OrderGroup.__name__ in octobot_trading).
16
16
  */
17
- export enum OrderGroupType {
18
- BalancedTakeProfitAndStopOrderGroup = 'BalancedTakeProfitAndStopOrderGroup',
19
- TrailingOnFilledTpBalancedOrderGroup = 'TrailingOnFilledTPBalancedOrderGroup',
20
- OneCancelsTheOtherOrderGroup = 'OneCancelsTheOtherOrderGroup'
21
- }
17
+ export type OrderGroupType = 'BalancedTakeProfitAndStopOrderGroup' | 'TrailingOnFilledTPBalancedOrderGroup' | 'OneCancelsTheOtherOrderGroup'
@@ -14,15 +14,4 @@
14
14
  /**
15
15
  * Lifecycle state of an order.
16
16
  */
17
- export enum OrderStatus {
18
- PendingCreation = 'pending_creation',
19
- Open = 'open',
20
- PartiallyFilled = 'partially_filled',
21
- Filled = 'filled',
22
- Canceled = 'canceled',
23
- Canceling = 'canceling',
24
- Closed = 'closed',
25
- Expired = 'expired',
26
- Rejected = 'rejected',
27
- Unknown = 'unknown'
28
- }
17
+ export type OrderStatus = 'pending_creation' | 'open' | 'partially_filled' | 'filled' | 'canceled' | 'canceling' | 'closed' | 'expired' | 'rejected' | 'unknown'
@@ -14,11 +14,4 @@
14
14
  /**
15
15
  * Exchange order type.
16
16
  */
17
- export enum OrderType {
18
- Limit = 'limit',
19
- Market = 'market',
20
- StopLoss = 'stop_loss',
21
- StopLossLimit = 'stop_loss_limit',
22
- TakeProfit = 'take_profit',
23
- TakeProfitLimit = 'take_profit_limit'
24
- }
17
+ export type OrderType = 'limit' | 'market' | 'stop_loss' | 'stop_loss_limit' | 'take_profit' | 'take_profit_limit'
@@ -14,9 +14,4 @@
14
14
  /**
15
15
  * PositionStatus
16
16
  */
17
- export enum PositionStatus {
18
- Open = 'open',
19
- Liquidated = 'liquidated',
20
- Liquidating = 'liquidating',
21
- AutoDeleveraging = 'auto_deleveraging'
22
- }
17
+ export type PositionStatus = 'open' | 'liquidated' | 'liquidating' | 'auto_deleveraging'
@@ -10,16 +10,12 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
 
13
- import { EvaluatorType } from '../models/EvaluatorType';
14
13
 
15
14
  /**
16
15
  * RSIMomentumEvaluatorConfiguration
17
16
  */
18
17
  export class RSIMomentumEvaluatorConfiguration {
19
- /**
20
- * RSIMomentumEvaluator
21
- */
22
- 'configuration_type': EvaluatorType;
18
+ 'configuration_type': RSIMomentumEvaluatorConfigurationConfigurationTypeEnum;
23
19
  'period_length': number;
24
20
  'short_threshold': number;
25
21
  'long_threshold': number;
@@ -32,7 +28,7 @@ export class RSIMomentumEvaluatorConfiguration {
32
28
  {
33
29
  "name": "configuration_type",
34
30
  "baseName": "configuration_type",
35
- "type": "EvaluatorType",
31
+ "type": "RSIMomentumEvaluatorConfigurationConfigurationTypeEnum",
36
32
  "format": ""
37
33
  },
38
34
  {
@@ -62,4 +58,5 @@ export class RSIMomentumEvaluatorConfiguration {
62
58
  }
63
59
  }
64
60
 
61
+ export type RSIMomentumEvaluatorConfigurationConfigurationTypeEnum = 'RSIMomentumEvaluator'
65
62
 
@@ -10,16 +10,12 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
 
13
- import { UserActionType } from '../models/UserActionType';
14
13
 
15
14
  /**
16
15
  * RefreshAccountsConfiguration
17
16
  */
18
17
  export class RefreshAccountsConfiguration {
19
- /**
20
- * accounts_refresh
21
- */
22
- 'action_type': UserActionType;
18
+ 'action_type': RefreshAccountsConfigurationActionTypeEnum;
23
19
  'account_ids'?: Array<string>;
24
20
 
25
21
  static readonly discriminator: string | undefined = undefined;
@@ -30,7 +26,7 @@ export class RefreshAccountsConfiguration {
30
26
  {
31
27
  "name": "action_type",
32
28
  "baseName": "action_type",
33
- "type": "UserActionType",
29
+ "type": "RefreshAccountsConfigurationActionTypeEnum",
34
30
  "format": ""
35
31
  },
36
32
  {
@@ -48,4 +44,5 @@ export class RefreshAccountsConfiguration {
48
44
  }
49
45
  }
50
46
 
47
+ export type RefreshAccountsConfigurationActionTypeEnum = 'accounts_refresh'
51
48
 
package/models/Side.ts CHANGED
@@ -14,7 +14,4 @@
14
14
  /**
15
15
  * Order execution side.
16
16
  */
17
- export enum Side {
18
- Buy = 'buy',
19
- Sell = 'sell'
20
- }
17
+ export type Side = 'buy' | 'sell'
@@ -10,17 +10,13 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
 
13
- import { UserActionType } from '../models/UserActionType';
14
13
 
15
14
  /**
16
15
  * StopAutomationConfiguration
17
16
  */
18
17
  export class StopAutomationConfiguration {
19
18
  'id': string;
20
- /**
21
- * automation_stop
22
- */
23
- 'action_type': UserActionType;
19
+ 'action_type': StopAutomationConfigurationActionTypeEnum;
24
20
 
25
21
  static readonly discriminator: string | undefined = undefined;
26
22
 
@@ -36,7 +32,7 @@ export class StopAutomationConfiguration {
36
32
  {
37
33
  "name": "action_type",
38
34
  "baseName": "action_type",
39
- "type": "UserActionType",
35
+ "type": "StopAutomationConfigurationActionTypeEnum",
40
36
  "format": ""
41
37
  } ];
42
38
 
@@ -48,4 +44,5 @@ export class StopAutomationConfiguration {
48
44
  }
49
45
  }
50
46
 
47
+ export type StopAutomationConfigurationActionTypeEnum = 'automation_stop'
51
48
 
@@ -20,8 +20,8 @@ export class Strategy {
20
20
  'version': string;
21
21
  'name'?: string;
22
22
  'description'?: string;
23
- 'created_at'?: Date;
24
- 'updated_at'?: Date;
23
+ 'created_at'?: string;
24
+ 'updated_at'?: string;
25
25
  'configuration': StrategyConfiguration;
26
26
 
27
27
  static readonly discriminator: string | undefined = undefined;
@@ -14,11 +14,4 @@
14
14
  /**
15
15
  * TaskStatus
16
16
  */
17
- export enum TaskStatus {
18
- Pending = 'pending',
19
- Scheduled = 'scheduled',
20
- Periodic = 'periodic',
21
- Running = 'running',
22
- Completed = 'completed',
23
- Failed = 'failed'
24
- }
17
+ export type TaskStatus = 'pending' | 'scheduled' | 'periodic' | 'running' | 'completed' | 'failed'
@@ -14,17 +14,4 @@
14
14
  /**
15
15
  * TimeFrame
16
16
  */
17
- export enum TimeFrame {
18
- _1m = '1m',
19
- _5m = '5m',
20
- _15m = '15m',
21
- _30m = '30m',
22
- _1h = '1h',
23
- _4h = '4h',
24
- _6h = '6h',
25
- _8h = '8h',
26
- _12h = '12h',
27
- _1d = '1d',
28
- _3d = '3d',
29
- _1w = '1w'
30
- }
17
+ export type TimeFrame = '1m' | '5m' | '15m' | '30m' | '1h' | '4h' | '6h' | '8h' | '12h' | '1d' | '3d' | '1w'
package/models/Trade.ts CHANGED
@@ -26,7 +26,7 @@ export class Trade {
26
26
  'quantity': number;
27
27
  'price': number;
28
28
  'status': OrderStatus;
29
- 'executed_at': Date;
29
+ 'executed_at': string;
30
30
 
31
31
  static readonly discriminator: string | undefined = undefined;
32
32
 
@@ -14,9 +14,4 @@
14
14
  /**
15
15
  * TradingType
16
16
  */
17
- export enum TradingType {
18
- Spot = 'spot',
19
- Futures = 'futures',
20
- Options = 'options',
21
- Margin = 'margin'
22
- }
17
+ export type TradingType = 'spot' | 'futures' | 'options' | 'margin'
@@ -14,6 +14,4 @@
14
14
  /**
15
15
  * Trailing profile discriminator (mirrors octobot_trading TrailingProfileTypes values).
16
16
  */
17
- export enum TrailingProfileType {
18
- FilledTakeProfit = 'filled_take_profit'
19
- }
17
+ export type TrailingProfileType = 'filled_take_profit'
@@ -20,8 +20,8 @@ import { UserActionStatus } from '../models/UserActionStatus';
20
20
  export class UserAction {
21
21
  'id': string;
22
22
  'status'?: UserActionStatus;
23
- 'created_at'?: Date;
24
- 'updated_at'?: Date;
23
+ 'created_at'?: string;
24
+ 'updated_at'?: string;
25
25
  'configuration'?: UserActionConfiguration;
26
26
  'result'?: UserActionResult;
27
27
 
@@ -14,7 +14,4 @@
14
14
  /**
15
15
  * UserActionResultType
16
16
  */
17
- export enum UserActionResultType {
18
- Automation = 'automation',
19
- Account = 'account'
20
- }
17
+ export type UserActionResultType = 'automation' | 'account'
@@ -14,9 +14,4 @@
14
14
  /**
15
15
  * UserActionStatus
16
16
  */
17
- export enum UserActionStatus {
18
- Pending = 'pending',
19
- Running = 'running',
20
- Completed = 'completed',
21
- Failed = 'failed'
22
- }
17
+ export type UserActionStatus = 'pending' | 'running' | 'completed' | 'failed'
package/models/index.ts CHANGED
@@ -9,7 +9,6 @@ export * from "./AccountStatusMessage";
9
9
  export * from "./AccountType";
10
10
  export * from "./AccountsState";
11
11
  export * from "./Action";
12
- export * from "./ActionConfigurationType";
13
12
  export * from "./ActiveOrderSwapStrategy";
14
13
  export * from "./ActiveOrderSwapStrategyType";
15
14
  export * from "./Asset";
@@ -33,7 +32,6 @@ export * from "./EditAccountConfiguration";
33
32
  export * from "./EditAutomationConfiguration";
34
33
  export * from "./EvaluatorConfiguration";
35
34
  export * from "./EvaluatorConfigurationConfiguration";
36
- export * from "./EvaluatorType";
37
35
  export * from "./ExchangeAccount";
38
36
  export * from "./GenericAccount";
39
37
  export * from "./GenericProcessConfiguration";
@@ -79,6 +77,5 @@ export * from "./UserActionConfiguration";
79
77
  export * from "./UserActionResult";
80
78
  export * from "./UserActionResultType";
81
79
  export * from "./UserActionStatus";
82
- export * from "./UserActionType";
83
80
  export * from "./UserActionsState";
84
81
  export * from "./UserDataState";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drakkar.software/octobot-protocol",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "TypeScript types generated from OctoBot OpenAPI schema",
5
5
  "types": "./models/index.ts",
6
6
  "files": ["models"],
@@ -1,25 +0,0 @@
1
- /**
2
- * OctoBot protocol types
3
- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
- *
5
- * OpenAPI spec version: 1.0.0
6
- *
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
-
13
-
14
- /**
15
- * ActionConfigurationType
16
- */
17
- export enum ActionConfigurationType {
18
- MarketMaking = 'market_making',
19
- Dca = 'dca',
20
- Index = 'index',
21
- Grid = 'grid',
22
- Copy = 'copy',
23
- GenericProcess = 'generic_process',
24
- GenericWorkflow = 'generic_workflow'
25
- }
@@ -1,20 +0,0 @@
1
- /**
2
- * OctoBot protocol types
3
- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
- *
5
- * OpenAPI spec version: 1.0.0
6
- *
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
-
13
-
14
- /**
15
- * EvaluatorType
16
- */
17
- export enum EvaluatorType {
18
- RsiMomentumEvaluator = 'RSIMomentumEvaluator',
19
- EmaMomentumEvaluator = 'EMAMomentumEvaluator'
20
- }
@@ -1,25 +0,0 @@
1
- /**
2
- * OctoBot protocol types
3
- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
- *
5
- * OpenAPI spec version: 1.0.0
6
- *
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
-
13
-
14
- /**
15
- * UserActionType
16
- */
17
- export enum UserActionType {
18
- AutomationCreate = 'automation_create',
19
- AutomationEdit = 'automation_edit',
20
- AutomationStop = 'automation_stop',
21
- AccountCreate = 'account_create',
22
- AccountEdit = 'account_edit',
23
- AccountDelete = 'account_delete',
24
- AccountsRefresh = 'accounts_refresh'
25
- }