decibel-python-sdk 0.1.0__py3-none-any.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 (53) hide show
  1. decibel/__init__.py +247 -0
  2. decibel/_base.py +726 -0
  3. decibel/_constants.py +164 -0
  4. decibel/_fee_pay.py +301 -0
  5. decibel/_gas_price_manager.py +262 -0
  6. decibel/_order_status.py +138 -0
  7. decibel/_order_types.py +109 -0
  8. decibel/_pagination.py +82 -0
  9. decibel/_subaccount_types.py +43 -0
  10. decibel/_transaction_builder.py +325 -0
  11. decibel/_utils.py +432 -0
  12. decibel/_version.py +1 -0
  13. decibel/abi/__init__.py +23 -0
  14. decibel/abi/__main__.py +4 -0
  15. decibel/abi/_registry.py +89 -0
  16. decibel/abi/_types.py +55 -0
  17. decibel/abi/generate.py +183 -0
  18. decibel/abi/json/netna.json +2417 -0
  19. decibel/abi/json/testnet.json +2919 -0
  20. decibel/admin.py +868 -0
  21. decibel/py.typed +0 -0
  22. decibel/read/__init__.py +279 -0
  23. decibel/read/_account_overview.py +119 -0
  24. decibel/read/_base.py +137 -0
  25. decibel/read/_candlesticks.py +97 -0
  26. decibel/read/_delegations.py +32 -0
  27. decibel/read/_leaderboard.py +64 -0
  28. decibel/read/_market_contexts.py +35 -0
  29. decibel/read/_market_depth.py +81 -0
  30. decibel/read/_market_prices.py +100 -0
  31. decibel/read/_market_trades.py +81 -0
  32. decibel/read/_markets.py +146 -0
  33. decibel/read/_portfolio_chart.py +48 -0
  34. decibel/read/_trading_points.py +36 -0
  35. decibel/read/_types.py +136 -0
  36. decibel/read/_user_active_twaps.py +70 -0
  37. decibel/read/_user_bulk_orders.py +73 -0
  38. decibel/read/_user_fund_history.py +49 -0
  39. decibel/read/_user_funding_history.py +45 -0
  40. decibel/read/_user_notifications.py +87 -0
  41. decibel/read/_user_open_orders.py +91 -0
  42. decibel/read/_user_order_history.py +101 -0
  43. decibel/read/_user_positions.py +84 -0
  44. decibel/read/_user_subaccounts.py +35 -0
  45. decibel/read/_user_trade_history.py +77 -0
  46. decibel/read/_user_twap_history.py +32 -0
  47. decibel/read/_vaults.py +218 -0
  48. decibel/read/_ws.py +245 -0
  49. decibel/write/__init__.py +1949 -0
  50. decibel/write/_types.py +190 -0
  51. decibel_python_sdk-0.1.0.dist-info/METADATA +255 -0
  52. decibel_python_sdk-0.1.0.dist-info/RECORD +53 -0
  53. decibel_python_sdk-0.1.0.dist-info/WHEEL +4 -0
decibel/__init__.py ADDED
@@ -0,0 +1,247 @@
1
+ from decibel._base import (
2
+ BaseSDKOptions,
3
+ BaseSDKOptionsSync,
4
+ )
5
+ from decibel._constants import (
6
+ DEFAULT_COMPAT_VERSION,
7
+ DOCKER_CONFIG,
8
+ LOCAL_CONFIG,
9
+ MAINNET_CONFIG,
10
+ NAMED_CONFIGS,
11
+ NETNA_CONFIG,
12
+ TESTNET_CONFIG,
13
+ CompatVersion,
14
+ DecibelConfig,
15
+ Deployment,
16
+ Network,
17
+ get_perp_engine_global_address,
18
+ get_testc_address,
19
+ get_usdc_address,
20
+ )
21
+ from decibel._fee_pay import (
22
+ PendingTransactionResponse,
23
+ submit_fee_paid_transaction,
24
+ submit_fee_paid_transaction_sync,
25
+ )
26
+ from decibel._gas_price_manager import (
27
+ GasPriceInfo,
28
+ GasPriceManager,
29
+ GasPriceManagerOptions,
30
+ GasPriceManagerSync,
31
+ )
32
+ from decibel._order_status import (
33
+ OrderStatus,
34
+ OrderStatusClient,
35
+ OrderStatusType,
36
+ )
37
+ from decibel._order_types import (
38
+ OrderEvent,
39
+ OrderEventClientOrderId,
40
+ OrderEventOrderId,
41
+ OrderEventStatus,
42
+ OrderEventTimeInForce,
43
+ OrderEventTriggerCondition,
44
+ PlaceBulkOrdersFailure,
45
+ PlaceBulkOrdersResult,
46
+ PlaceBulkOrdersSuccess,
47
+ PlaceOrderFailure,
48
+ PlaceOrderResult,
49
+ PlaceOrderSuccess,
50
+ TwapEvent,
51
+ )
52
+ from decibel._pagination import (
53
+ PARAM_MAP,
54
+ QUERY_PARAM_KEYS,
55
+ KnownQueryParams,
56
+ PageParams,
57
+ PaginatedResponse,
58
+ SearchTermParams,
59
+ SortDirection,
60
+ SortParams,
61
+ construct_known_query_params,
62
+ )
63
+ from decibel._subaccount_types import (
64
+ CreateSubaccountResponse,
65
+ RenameSubaccount,
66
+ RenameSubaccountArgs,
67
+ SubaccountActiveChangedEvent,
68
+ SubaccountCreatedEvent,
69
+ )
70
+ from decibel._transaction_builder import (
71
+ InputEntryFunctionData,
72
+ SimpleTransaction,
73
+ TransactionPayloadOrderless,
74
+ build_simple_transaction_sync,
75
+ generate_expire_timestamp,
76
+ )
77
+ from decibel._utils import (
78
+ FetchError,
79
+ amount_to_chain_units,
80
+ chain_units_to_amount,
81
+ extract_vault_address_from_create_tx,
82
+ generate_random_replay_protection_nonce,
83
+ get_market_addr,
84
+ get_primary_subaccount_addr,
85
+ get_request,
86
+ get_request_sync,
87
+ get_trading_competition_subaccount_addr,
88
+ get_vault_share_address,
89
+ patch_request,
90
+ patch_request_sync,
91
+ post_request,
92
+ post_request_sync,
93
+ round_to_tick_size,
94
+ round_to_valid_order_size,
95
+ round_to_valid_price,
96
+ )
97
+ from decibel._version import __version__
98
+ from decibel.abi import (
99
+ ABIData,
100
+ ABIErrorEntry,
101
+ AbiRegistry,
102
+ ABISummary,
103
+ MoveFunction,
104
+ MoveFunctionId,
105
+ get_abi_data,
106
+ get_default_abi_data,
107
+ )
108
+ from decibel.admin import (
109
+ DecibelAdminDex,
110
+ DecibelAdminDexSync,
111
+ )
112
+ from decibel.write import (
113
+ DecibelWriteDex,
114
+ DecibelWriteDexSync,
115
+ TimeInForce,
116
+ )
117
+ from decibel.write._types import (
118
+ ApproveBuilderFeeArgs,
119
+ CancelBulkOrderArgs,
120
+ CancelClientOrderArgs,
121
+ CancelOrderArgs,
122
+ CancelTpSlOrderArgs,
123
+ CancelTwapOrderArgs,
124
+ ConfigureUserSettingsArgs,
125
+ DeactivateSubaccountArgs,
126
+ DelegateDexActionsArgs,
127
+ DelegateTradingArgs,
128
+ PlaceBulkOrdersArgs,
129
+ PlaceOrderArgs,
130
+ PlaceTpSlOrderArgs,
131
+ PlaceTwapOrderArgs,
132
+ RevokeBuilderFeeArgs,
133
+ RevokeDelegationArgs,
134
+ UpdateSlOrderArgs,
135
+ UpdateTpOrderArgs,
136
+ )
137
+
138
+ __all__ = [
139
+ "__version__",
140
+ "ABIData",
141
+ "BaseSDKOptions",
142
+ "BaseSDKOptionsSync",
143
+ "DecibelAdminDex",
144
+ "DecibelAdminDexSync",
145
+ "ABIErrorEntry",
146
+ "ABISummary",
147
+ "AbiRegistry",
148
+ "amount_to_chain_units",
149
+ "ApproveBuilderFeeArgs",
150
+ "build_simple_transaction_sync",
151
+ "CancelBulkOrderArgs",
152
+ "CancelClientOrderArgs",
153
+ "CancelOrderArgs",
154
+ "CancelTpSlOrderArgs",
155
+ "CancelTwapOrderArgs",
156
+ "chain_units_to_amount",
157
+ "CompatVersion",
158
+ "ConfigureUserSettingsArgs",
159
+ "construct_known_query_params",
160
+ "CreateSubaccountResponse",
161
+ "DeactivateSubaccountArgs",
162
+ "DecibelConfig",
163
+ "DecibelWriteDex",
164
+ "DecibelWriteDexSync",
165
+ "DEFAULT_COMPAT_VERSION",
166
+ "DelegateDexActionsArgs",
167
+ "DelegateTradingArgs",
168
+ "Deployment",
169
+ "DOCKER_CONFIG",
170
+ "extract_vault_address_from_create_tx",
171
+ "FetchError",
172
+ "GasPriceInfo",
173
+ "GasPriceManager",
174
+ "GasPriceManagerOptions",
175
+ "GasPriceManagerSync",
176
+ "generate_expire_timestamp",
177
+ "generate_random_replay_protection_nonce",
178
+ "get_abi_data",
179
+ "get_default_abi_data",
180
+ "get_market_addr",
181
+ "get_perp_engine_global_address",
182
+ "get_primary_subaccount_addr",
183
+ "get_request",
184
+ "get_request_sync",
185
+ "get_testc_address",
186
+ "get_trading_competition_subaccount_addr",
187
+ "get_usdc_address",
188
+ "get_vault_share_address",
189
+ "InputEntryFunctionData",
190
+ "KnownQueryParams",
191
+ "LOCAL_CONFIG",
192
+ "MAINNET_CONFIG",
193
+ "MoveFunction",
194
+ "MoveFunctionId",
195
+ "NAMED_CONFIGS",
196
+ "NETNA_CONFIG",
197
+ "Network",
198
+ "OrderEvent",
199
+ "OrderEventClientOrderId",
200
+ "OrderEventOrderId",
201
+ "OrderEventStatus",
202
+ "OrderEventTimeInForce",
203
+ "OrderEventTriggerCondition",
204
+ "OrderStatus",
205
+ "OrderStatusClient",
206
+ "OrderStatusType",
207
+ "PageParams",
208
+ "PaginatedResponse",
209
+ "PARAM_MAP",
210
+ "patch_request",
211
+ "patch_request_sync",
212
+ "PendingTransactionResponse",
213
+ "PlaceBulkOrdersArgs",
214
+ "PlaceBulkOrdersFailure",
215
+ "PlaceBulkOrdersResult",
216
+ "PlaceBulkOrdersSuccess",
217
+ "PlaceOrderArgs",
218
+ "PlaceOrderFailure",
219
+ "PlaceOrderResult",
220
+ "PlaceOrderSuccess",
221
+ "PlaceTpSlOrderArgs",
222
+ "PlaceTwapOrderArgs",
223
+ "post_request",
224
+ "post_request_sync",
225
+ "QUERY_PARAM_KEYS",
226
+ "RenameSubaccountArgs",
227
+ "RenameSubaccount",
228
+ "RevokeDelegationArgs",
229
+ "RevokeBuilderFeeArgs",
230
+ "round_to_tick_size",
231
+ "round_to_valid_order_size",
232
+ "round_to_valid_price",
233
+ "SearchTermParams",
234
+ "SimpleTransaction",
235
+ "SortDirection",
236
+ "SortParams",
237
+ "SubaccountActiveChangedEvent",
238
+ "SubaccountCreatedEvent",
239
+ "submit_fee_paid_transaction",
240
+ "submit_fee_paid_transaction_sync",
241
+ "TESTNET_CONFIG",
242
+ "TimeInForce",
243
+ "TransactionPayloadOrderless",
244
+ "TwapEvent",
245
+ "UpdateSlOrderArgs",
246
+ "UpdateTpOrderArgs",
247
+ ]