deltadefi 0.0.2__py3-none-any.whl → 0.0.4__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.

Potentially problematic release.


This version of deltadefi might be problematic. Click here for more details.

@@ -1,10 +1,9 @@
1
1
  # flake8: noqa: E501
2
2
  from sidan_gin import HDWallet
3
3
 
4
- from deltadefi.api_resources.auth import ApiHeaders
5
4
  from deltadefi.clients.accounts import Accounts
6
5
  from deltadefi.clients.app import App
7
- from deltadefi.clients.markets import Markets
6
+ from deltadefi.clients.market import Market
8
7
  from deltadefi.clients.order import Order
9
8
  from deltadefi.responses import PostOrderResponse
10
9
 
@@ -43,7 +42,7 @@ class ApiClient:
43
42
  self.accounts = Accounts(base_url=base_url, api_key=api_key)
44
43
  self.app = App(base_url=base_url, api_key=api_key)
45
44
  self.order = Order(base_url=base_url, api_key=api_key)
46
- self.markets = Markets(base_url=base_url, api_key=api_key)
45
+ self.market = Market(base_url=base_url, api_key=api_key)
47
46
 
48
47
  async def post_order(self, **kwargs) -> PostOrderResponse:
49
48
  """
@@ -11,7 +11,7 @@ from deltadefi.responses import (
11
11
  )
12
12
 
13
13
 
14
- class Markets(API):
14
+ class Market(API):
15
15
  """
16
16
  Markets client for interacting with the DeltaDeFi API.
17
17
  """
@@ -25,9 +25,9 @@ class Order(API):
25
25
  side: OrderSide,
26
26
  type: OrderType,
27
27
  quantity: int,
28
- price: int,
29
- max_slippage_basis_point: int,
30
- limit_slippage: bool,
28
+ price: int = None,
29
+ max_slippage_basis_point: int = 10000,
30
+ limit_slippage: bool = False,
31
31
  **kwargs,
32
32
  ) -> BuildPlaceOrderTransactionResponse:
33
33
  """
@@ -41,9 +41,12 @@ class Order(API):
41
41
  """
42
42
 
43
43
  check_required_parameters(
44
- [symbol, "symbol"],
45
- [side, "side"],
46
- [type, "type"],
44
+ [
45
+ [symbol, "symbol"],
46
+ [side, "side"],
47
+ [type, "type"],
48
+ [quantity, "quantity"],
49
+ ]
47
50
  )
48
51
 
49
52
  if type == "limit":
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: deltadefi
3
- Version: 0.0.2
3
+ Version: 0.0.4
4
4
  Summary: Python SDK for DeltaDeFi protocol.
5
5
  License: Apache-2.0
6
6
  Keywords: cardano
@@ -72,17 +72,17 @@ account_balance = api.accounts.get_account_balance()
72
72
  print(account_balance)
73
73
  ```
74
74
 
75
- ### Markets
75
+ ### Market
76
76
 
77
- The Markets client allows you to interact with market-related endpoints.
77
+ The Market client allows you to interact with market-related endpoints.
78
78
 
79
79
  ```python
80
80
  # Get market depth
81
- market_depth = api.markets.get_depth("ADAUSDX")
81
+ market_depth = api.market.get_depth("ADAUSDX")
82
82
  print(market_depth_response)
83
83
 
84
84
  # Get market price
85
- market_price_response = api.markets.get_market_price("ADAUSDX")
85
+ market_price_response = api.market.get_market_price("ADAUSDX")
86
86
  print(market_price_response)
87
87
  ```
88
88
 
@@ -6,9 +6,9 @@ deltadefi/api_resources/validation.py,sha256=vz-hovpLy9SMOIFGcBHC8vWZH8CJRlQP8rc
6
6
  deltadefi/clients/__init__.py,sha256=AoK_kj_UKpxtCa3_if3yeHFAzHli9Mg-tsrUKOX7eH8,38
7
7
  deltadefi/clients/accounts.py,sha256=I3Yh82iHVK932u2Luvewbxk_KJ-WVLYqH048XBFgrsQ,5347
8
8
  deltadefi/clients/app.py,sha256=TOgRlP83p91r7oS4ez8Gfm8soQzFHrJAmOHZJoGZ4SM,712
9
- deltadefi/clients/clients.py,sha256=KtKWTr3-dgMgmJc8jVqzZ9qJ8I41T8G8KkNNTe9SEz0,2253
10
- deltadefi/clients/markets.py,sha256=EK1VRtLRtmUtIISdJtDthmWsjx_sDWkgJgdjqeQ8lXc,2581
11
- deltadefi/clients/order.py,sha256=1IfYf4uqNz9nchv4l7ulxhUDd_Yink2r8hGWmDf85Jc,3927
9
+ deltadefi/clients/clients.py,sha256=Yzxkpf9-PA6LdYiJtmap1DrE3U5Sd4VNDGjexZxVbcs,2197
10
+ deltadefi/clients/market.py,sha256=v8hK06oXC73qS3IjvWDempHq_-9T6OW2pckIcDR7P2M,2580
11
+ deltadefi/clients/order.py,sha256=4KQ9sA-xeFrT9JCi--ZUuJGq2oT85LIDWjDRhpxO5mE,4030
12
12
  deltadefi/constants/__init__.py,sha256=7LkrzfLTJsCCUl5IgZYrl-AbY_cf1fftcLklgnBYDTs,40
13
13
  deltadefi/constants/constants.py,sha256=9Ksb8_4t78KJpHVUnRArKlvgQk-CzcYsLRmA5qUnMwc,168
14
14
  deltadefi/error.py,sha256=Pq55p7FQbVn1GTih7NQBI7ZcVUUrlkaFKn-SwZUxBA8,1650
@@ -19,6 +19,6 @@ deltadefi/models/models.py,sha256=vnNFFPMQcOOSKhONHNHXJIx4wddV4IKeBszykiqWCwk,11
19
19
  deltadefi/responses/__init__.py,sha256=JKSIUQu6qI_XhbAR2mVMCKNvR6x_vFZdyLGOuQTVrVY,64
20
20
  deltadefi/responses/accounts.py,sha256=aVQq1CqebIQz0YuNphFlA2fGBgvmf8FpboJzToEiY2g,939
21
21
  deltadefi/responses/responses.py,sha256=etlx83GgZC2noLKo8GKrmDo3Xhwup-g8Ob29f0WYA4I,993
22
- deltadefi-0.0.2.dist-info/METADATA,sha256=_Md2KzsVrl6HX1wuEuiJIBS3F8Fwti4KFoX_gf3tI74,3085
23
- deltadefi-0.0.2.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
24
- deltadefi-0.0.2.dist-info/RECORD,,
22
+ deltadefi-0.0.4.dist-info/METADATA,sha256=RQNNYEWgtC9Ym5_Fw_qj6DeTbvvEKGivjee2GCbDwxE,3081
23
+ deltadefi-0.0.4.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
24
+ deltadefi-0.0.4.dist-info/RECORD,,