deltadefi 0.0.5__tar.gz → 0.0.7__tar.gz
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.
- {deltadefi-0.0.5 → deltadefi-0.0.7}/PKG-INFO +11 -1
- {deltadefi-0.0.5 → deltadefi-0.0.7}/README.md +10 -0
- {deltadefi-0.0.5 → deltadefi-0.0.7}/pyproject.toml +1 -1
- {deltadefi-0.0.5 → deltadefi-0.0.7}/src/deltadefi/clients/accounts.py +12 -0
- {deltadefi-0.0.5 → deltadefi-0.0.7}/src/deltadefi/clients/clients.py +5 -3
- {deltadefi-0.0.5 → deltadefi-0.0.7}/src/deltadefi/clients/order.py +1 -4
- {deltadefi-0.0.5 → deltadefi-0.0.7}/src/deltadefi/responses/accounts.py +6 -0
- {deltadefi-0.0.5 → deltadefi-0.0.7}/src/deltadefi/__init__.py +0 -0
- {deltadefi-0.0.5 → deltadefi-0.0.7}/src/deltadefi/api.py +0 -0
- {deltadefi-0.0.5 → deltadefi-0.0.7}/src/deltadefi/api_resources/__init__.py +0 -0
- {deltadefi-0.0.5 → deltadefi-0.0.7}/src/deltadefi/api_resources/auth.py +0 -0
- {deltadefi-0.0.5 → deltadefi-0.0.7}/src/deltadefi/api_resources/validation.py +0 -0
- {deltadefi-0.0.5 → deltadefi-0.0.7}/src/deltadefi/clients/__init__.py +0 -0
- {deltadefi-0.0.5 → deltadefi-0.0.7}/src/deltadefi/clients/app.py +0 -0
- {deltadefi-0.0.5 → deltadefi-0.0.7}/src/deltadefi/clients/market.py +0 -0
- {deltadefi-0.0.5 → deltadefi-0.0.7}/src/deltadefi/constants/__init__.py +0 -0
- {deltadefi-0.0.5 → deltadefi-0.0.7}/src/deltadefi/constants/constants.py +0 -0
- {deltadefi-0.0.5 → deltadefi-0.0.7}/src/deltadefi/error.py +0 -0
- {deltadefi-0.0.5 → deltadefi-0.0.7}/src/deltadefi/lib/__init__.py +0 -0
- {deltadefi-0.0.5 → deltadefi-0.0.7}/src/deltadefi/lib/utils.py +0 -0
- {deltadefi-0.0.5 → deltadefi-0.0.7}/src/deltadefi/models/__init__.py +0 -0
- {deltadefi-0.0.5 → deltadefi-0.0.7}/src/deltadefi/models/models.py +0 -0
- {deltadefi-0.0.5 → deltadefi-0.0.7}/src/deltadefi/responses/__init__.py +0 -0
- {deltadefi-0.0.5 → deltadefi-0.0.7}/src/deltadefi/responses/responses.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: deltadefi
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.7
|
|
4
4
|
Summary: Python SDK for DeltaDeFi protocol.
|
|
5
5
|
License: Apache-2.0
|
|
6
6
|
Keywords: cardano
|
|
@@ -101,6 +101,16 @@ submit_order_response = api.order.submit_place_order_transaction(signed_tx="<sig
|
|
|
101
101
|
print(submit_order_response)
|
|
102
102
|
```
|
|
103
103
|
|
|
104
|
+
## Development
|
|
105
|
+
|
|
106
|
+
### Tests
|
|
107
|
+
|
|
108
|
+
Testing sdk:
|
|
109
|
+
|
|
110
|
+
```sh
|
|
111
|
+
DELTADEFI_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx make test
|
|
112
|
+
```
|
|
113
|
+
|
|
104
114
|
## License
|
|
105
115
|
|
|
106
116
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at <http://www.apache.org/licenses/LICENSE-2.0>
|
|
@@ -74,6 +74,16 @@ submit_order_response = api.order.submit_place_order_transaction(signed_tx="<sig
|
|
|
74
74
|
print(submit_order_response)
|
|
75
75
|
```
|
|
76
76
|
|
|
77
|
+
## Development
|
|
78
|
+
|
|
79
|
+
### Tests
|
|
80
|
+
|
|
81
|
+
Testing sdk:
|
|
82
|
+
|
|
83
|
+
```sh
|
|
84
|
+
DELTADEFI_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx make test
|
|
85
|
+
```
|
|
86
|
+
|
|
77
87
|
## License
|
|
78
88
|
|
|
79
89
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at <http://www.apache.org/licenses/LICENSE-2.0>
|
|
@@ -16,6 +16,7 @@ from deltadefi.responses import (
|
|
|
16
16
|
SubmitDepositTransactionResponse,
|
|
17
17
|
SubmitWithdrawalTransactionResponse,
|
|
18
18
|
)
|
|
19
|
+
from deltadefi.responses.accounts import GetOperationKeyResponse
|
|
19
20
|
|
|
20
21
|
|
|
21
22
|
class Accounts(API):
|
|
@@ -28,6 +29,17 @@ class Accounts(API):
|
|
|
28
29
|
def __init__(self, api_key=None, base_url=None, **kwargs):
|
|
29
30
|
super().__init__(api_key=api_key, base_url=base_url, **kwargs)
|
|
30
31
|
|
|
32
|
+
def get_operation_key(self, **kwargs) -> GetOperationKeyResponse:
|
|
33
|
+
"""
|
|
34
|
+
Get the encrypted operation key.
|
|
35
|
+
|
|
36
|
+
Returns:
|
|
37
|
+
A GetOperationKeyResponse object containing the encrypted operation key and its hash.
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
url_path = "/operation-key"
|
|
41
|
+
return self.send_request("GET", self.group_url_path + url_path, kwargs)
|
|
42
|
+
|
|
31
43
|
def create_new_api_key(self, **kwargs) -> CreateNewAPIKeyResponse:
|
|
32
44
|
"""
|
|
33
45
|
Create a new API key.
|
|
@@ -30,14 +30,16 @@ class ApiClient:
|
|
|
30
30
|
"""
|
|
31
31
|
if network == "mainnet":
|
|
32
32
|
self.network_id = 1
|
|
33
|
-
base_url = "https://api-dev.deltadefi.io" # TODO: input production link once available
|
|
33
|
+
self.base_url = "https://api-dev.deltadefi.io" # TODO: input production link once available
|
|
34
34
|
else:
|
|
35
35
|
self.network_id = 0
|
|
36
|
-
base_url = "https://api-dev.deltadefi.io"
|
|
36
|
+
self.base_url = "https://api-dev.deltadefi.io"
|
|
37
|
+
|
|
38
|
+
if base_url:
|
|
39
|
+
self.base_url = base_url
|
|
37
40
|
|
|
38
41
|
self.api_key = api_key
|
|
39
42
|
self.wallet = wallet
|
|
40
|
-
self.base_url = base_url
|
|
41
43
|
|
|
42
44
|
self.accounts = Accounts(base_url=base_url, api_key=api_key)
|
|
43
45
|
self.app = App(base_url=base_url, api_key=api_key)
|
|
@@ -25,9 +25,6 @@ class Order(API):
|
|
|
25
25
|
side: OrderSide,
|
|
26
26
|
type: OrderType,
|
|
27
27
|
quantity: int,
|
|
28
|
-
price: int = None,
|
|
29
|
-
max_slippage_basis_point: int = 10000,
|
|
30
|
-
limit_slippage: bool = False,
|
|
31
28
|
**kwargs,
|
|
32
29
|
) -> BuildPlaceOrderTransactionResponse:
|
|
33
30
|
"""
|
|
@@ -98,7 +95,7 @@ class Order(API):
|
|
|
98
95
|
Returns:
|
|
99
96
|
A SubmitPlaceOrderTransactionResponse object containing the submitted order transaction.
|
|
100
97
|
"""
|
|
101
|
-
check_required_parameters([order_id, "order_id"], [signed_tx, "signed_tx"])
|
|
98
|
+
check_required_parameters([[order_id, "order_id"], [signed_tx, "signed_tx"]])
|
|
102
99
|
payload = {"order_id": order_id, "signed_tx": signed_tx, **kwargs}
|
|
103
100
|
|
|
104
101
|
url_path = "/submit"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|