ddx-python 1.0.4__cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

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 (106) hide show
  1. ddx/.gitignore +1 -0
  2. ddx/__init__.py +58 -0
  3. ddx/_rust/__init__.pyi +2685 -0
  4. ddx/_rust/common/__init__.pyi +17 -0
  5. ddx/_rust/common/accounting.pyi +6 -0
  6. ddx/_rust/common/enums.pyi +3 -0
  7. ddx/_rust/common/requests/__init__.pyi +23 -0
  8. ddx/_rust/common/requests/intents.pyi +19 -0
  9. ddx/_rust/common/specs.pyi +17 -0
  10. ddx/_rust/common/state/__init__.pyi +41 -0
  11. ddx/_rust/common/state/keys.pyi +29 -0
  12. ddx/_rust/common/transactions.pyi +7 -0
  13. ddx/_rust/decimal.pyi +3 -0
  14. ddx/_rust/h256.pyi +3 -0
  15. ddx/_rust.abi3.so +0 -0
  16. ddx/app_config/ethereum/addresses.json +526 -0
  17. ddx/auditor/README.md +32 -0
  18. ddx/auditor/__init__.py +0 -0
  19. ddx/auditor/auditor_driver.py +1043 -0
  20. ddx/auditor/websocket_message.py +54 -0
  21. ddx/common/__init__.py +0 -0
  22. ddx/common/epoch_params.py +28 -0
  23. ddx/common/fill_context.py +141 -0
  24. ddx/common/logging.py +184 -0
  25. ddx/common/market_aware_account.py +259 -0
  26. ddx/common/market_specs.py +64 -0
  27. ddx/common/trade_mining_params.py +19 -0
  28. ddx/common/transaction_utils.py +85 -0
  29. ddx/common/transactions/__init__.py +0 -0
  30. ddx/common/transactions/advance_epoch.py +91 -0
  31. ddx/common/transactions/advance_settlement_epoch.py +63 -0
  32. ddx/common/transactions/all_price_checkpoints.py +84 -0
  33. ddx/common/transactions/cancel.py +76 -0
  34. ddx/common/transactions/cancel_all.py +88 -0
  35. ddx/common/transactions/complete_fill.py +103 -0
  36. ddx/common/transactions/disaster_recovery.py +96 -0
  37. ddx/common/transactions/event.py +48 -0
  38. ddx/common/transactions/fee_distribution.py +119 -0
  39. ddx/common/transactions/funding.py +292 -0
  40. ddx/common/transactions/futures_expiry.py +123 -0
  41. ddx/common/transactions/genesis.py +108 -0
  42. ddx/common/transactions/inner/__init__.py +0 -0
  43. ddx/common/transactions/inner/adl_outcome.py +25 -0
  44. ddx/common/transactions/inner/fill.py +232 -0
  45. ddx/common/transactions/inner/liquidated_position.py +41 -0
  46. ddx/common/transactions/inner/liquidation_entry.py +41 -0
  47. ddx/common/transactions/inner/liquidation_fill.py +118 -0
  48. ddx/common/transactions/inner/outcome.py +32 -0
  49. ddx/common/transactions/inner/trade_fill.py +292 -0
  50. ddx/common/transactions/insurance_fund_update.py +138 -0
  51. ddx/common/transactions/insurance_fund_withdraw.py +100 -0
  52. ddx/common/transactions/liquidation.py +353 -0
  53. ddx/common/transactions/partial_fill.py +125 -0
  54. ddx/common/transactions/pnl_realization.py +120 -0
  55. ddx/common/transactions/post.py +72 -0
  56. ddx/common/transactions/post_order.py +95 -0
  57. ddx/common/transactions/price_checkpoint.py +97 -0
  58. ddx/common/transactions/signer_registered.py +62 -0
  59. ddx/common/transactions/specs_update.py +61 -0
  60. ddx/common/transactions/strategy_update.py +158 -0
  61. ddx/common/transactions/tradable_product_update.py +98 -0
  62. ddx/common/transactions/trade_mining.py +147 -0
  63. ddx/common/transactions/trader_update.py +131 -0
  64. ddx/common/transactions/withdraw.py +90 -0
  65. ddx/common/transactions/withdraw_ddx.py +74 -0
  66. ddx/common/utils.py +176 -0
  67. ddx/config.py +17 -0
  68. ddx/derivadex_client.py +270 -0
  69. ddx/models/__init__.py +0 -0
  70. ddx/models/base.py +132 -0
  71. ddx/py.typed +0 -0
  72. ddx/realtime_client/__init__.py +2 -0
  73. ddx/realtime_client/config.py +2 -0
  74. ddx/realtime_client/models/__init__.py +611 -0
  75. ddx/realtime_client/realtime_client.py +646 -0
  76. ddx/rest_client/__init__.py +0 -0
  77. ddx/rest_client/clients/__init__.py +0 -0
  78. ddx/rest_client/clients/base_client.py +60 -0
  79. ddx/rest_client/clients/market_client.py +1243 -0
  80. ddx/rest_client/clients/on_chain_client.py +439 -0
  81. ddx/rest_client/clients/signed_client.py +292 -0
  82. ddx/rest_client/clients/system_client.py +843 -0
  83. ddx/rest_client/clients/trade_client.py +357 -0
  84. ddx/rest_client/constants/__init__.py +0 -0
  85. ddx/rest_client/constants/endpoints.py +66 -0
  86. ddx/rest_client/contracts/__init__.py +0 -0
  87. ddx/rest_client/contracts/checkpoint/__init__.py +560 -0
  88. ddx/rest_client/contracts/ddx/__init__.py +1949 -0
  89. ddx/rest_client/contracts/dummy_token/__init__.py +1014 -0
  90. ddx/rest_client/contracts/i_collateral/__init__.py +1414 -0
  91. ddx/rest_client/contracts/i_stake/__init__.py +696 -0
  92. ddx/rest_client/exceptions/__init__.py +0 -0
  93. ddx/rest_client/exceptions/exceptions.py +32 -0
  94. ddx/rest_client/http/__init__.py +0 -0
  95. ddx/rest_client/http/http_client.py +336 -0
  96. ddx/rest_client/models/__init__.py +0 -0
  97. ddx/rest_client/models/market.py +693 -0
  98. ddx/rest_client/models/signed.py +61 -0
  99. ddx/rest_client/models/system.py +311 -0
  100. ddx/rest_client/models/trade.py +185 -0
  101. ddx/rest_client/utils/__init__.py +0 -0
  102. ddx/rest_client/utils/encryption_utils.py +26 -0
  103. ddx/utils/__init__.py +0 -0
  104. ddx_python-1.0.4.dist-info/METADATA +63 -0
  105. ddx_python-1.0.4.dist-info/RECORD +106 -0
  106. ddx_python-1.0.4.dist-info/WHEEL +5 -0
@@ -0,0 +1,17 @@
1
+ from .. import (
2
+ ProductSymbol,
3
+ TokenSymbol,
4
+ get_operator_context,
5
+ reinit_operator_context,
6
+ OperatorContext,
7
+ CoreCommonError,
8
+ )
9
+
10
+ __all__ = [
11
+ "ProductSymbol",
12
+ "TokenSymbol",
13
+ "get_operator_context",
14
+ "reinit_operator_context",
15
+ "OperatorContext",
16
+ "CoreCommonError",
17
+ ]
@@ -0,0 +1,6 @@
1
+ from .. import PriceMetadata, MarkPriceMetadata
2
+
3
+ __all__ = [
4
+ "PriceMetadata",
5
+ "MarkPriceMetadata",
6
+ ]
@@ -0,0 +1,3 @@
1
+ from .. import OrderSide, PositionSide, OrderType, TradeSide, PriceDirection
2
+
3
+ __all__ = ["OrderSide", "OrderType", "PositionSide", "TradeSide", "PriceDirection"]
@@ -0,0 +1,23 @@
1
+ from ... import (
2
+ AdvanceEpoch,
3
+ AdvanceTime,
4
+ AdvanceSettlementEpoch,
5
+ Block,
6
+ IndexPrice,
7
+ MintPriceCheckpoint,
8
+ UpdateProductListings,
9
+ SettlementAction,
10
+ SafetyFailure,
11
+ )
12
+
13
+ __all__ = [
14
+ "AdvanceEpoch",
15
+ "AdvanceTime",
16
+ "AdvanceSettlementEpoch",
17
+ "Block",
18
+ "IndexPrice",
19
+ "MintPriceCheckpoint",
20
+ "UpdateProductListings",
21
+ "SettlementAction",
22
+ "SafetyFailure",
23
+ ]
@@ -0,0 +1,19 @@
1
+ from ... import (
2
+ OrderIntent,
3
+ ModifyOrderIntent,
4
+ CancelOrderIntent,
5
+ CancelAllIntent,
6
+ ProfileUpdateIntent,
7
+ WithdrawIntent,
8
+ WithdrawDDXIntent,
9
+ )
10
+
11
+ __all__ = [
12
+ "OrderIntent",
13
+ "ModifyOrderIntent",
14
+ "CancelOrderIntent",
15
+ "CancelAllIntent",
16
+ "ProfileUpdateIntent",
17
+ "WithdrawIntent",
18
+ "WithdrawDDXIntent",
19
+ ]
@@ -0,0 +1,17 @@
1
+ from .. import (
2
+ SpecsKind,
3
+ ProductSpecs,
4
+ SingleNamePerpetual,
5
+ IndexFundPerpetual,
6
+ QuarterlyExpiryFuture,
7
+ Quarter,
8
+ )
9
+
10
+ __all__ = [
11
+ "SpecsKind",
12
+ "ProductSpecs",
13
+ "SingleNamePerpetual",
14
+ "IndexFundPerpetual",
15
+ "QuarterlyExpiryFuture",
16
+ "Quarter",
17
+ ]
@@ -0,0 +1,41 @@
1
+ from ... import (
2
+ ItemKind,
3
+ Item,
4
+ TradableProductParameters,
5
+ DerivadexSMT,
6
+ MerkleProof,
7
+ Balance,
8
+ Trader,
9
+ Strategy,
10
+ Position,
11
+ BookOrder,
12
+ Price,
13
+ InsuranceFund,
14
+ Stats,
15
+ Signer,
16
+ Specs,
17
+ TradableProduct,
18
+ InsuranceFundContribution,
19
+ EpochMetadata,
20
+ )
21
+
22
+ __all__ = [
23
+ "ItemKind",
24
+ "Item",
25
+ "TradableProductParameters",
26
+ "DerivadexSMT",
27
+ "MerkleProof",
28
+ "Balance",
29
+ "Trader",
30
+ "Strategy",
31
+ "Position",
32
+ "BookOrder",
33
+ "Price",
34
+ "InsuranceFund",
35
+ "Stats",
36
+ "Signer",
37
+ "Specs",
38
+ "TradableProduct",
39
+ "InsuranceFundContribution",
40
+ "EpochMetadata",
41
+ ]
@@ -0,0 +1,29 @@
1
+ from ... import (
2
+ TraderKey,
3
+ StrategyKey,
4
+ PositionKey,
5
+ BookOrderKey,
6
+ PriceKey,
7
+ InsuranceFundKey,
8
+ StatsKey,
9
+ SignerKey,
10
+ SpecsKey,
11
+ TradableProductKey,
12
+ InsuranceFundContributionKey,
13
+ EpochMetadataKey,
14
+ )
15
+
16
+ __all__ = [
17
+ "TraderKey",
18
+ "StrategyKey",
19
+ "PositionKey",
20
+ "BookOrderKey",
21
+ "PriceKey",
22
+ "InsuranceFundKey",
23
+ "StatsKey",
24
+ "SignerKey",
25
+ "SpecsKey",
26
+ "TradableProductKey",
27
+ "InsuranceFundContributionKey",
28
+ "EpochMetadataKey",
29
+ ]
@@ -0,0 +1,7 @@
1
+ from .. import StrategyUpdateKind, InsuranceFundUpdateKind, TraderUpdateKind
2
+
3
+ __all__ = [
4
+ "StrategyUpdateKind",
5
+ "InsuranceFundUpdateKind",
6
+ "TraderUpdateKind",
7
+ ]
ddx/_rust/decimal.pyi ADDED
@@ -0,0 +1,3 @@
1
+ from . import Decimal, DecimalError
2
+
3
+ __all__ = ["Decimal", "DecimalError"]
ddx/_rust/h256.pyi ADDED
@@ -0,0 +1,3 @@
1
+ from . import H256, H256Error
2
+
3
+ __all__ = ["H256", "H256Error"]
ddx/_rust.abi3.so ADDED
Binary file