ostium-python-sdk 0.1.32__tar.gz → 0.1.34__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.
Files changed (30) hide show
  1. {ostium_python_sdk-0.1.32 → ostium_python_sdk-0.1.34}/PKG-INFO +5 -2
  2. {ostium_python_sdk-0.1.32 → ostium_python_sdk-0.1.34}/README.md +4 -1
  3. {ostium_python_sdk-0.1.32 → ostium_python_sdk-0.1.34}/ostium_python_sdk/ostium.py +3 -3
  4. {ostium_python_sdk-0.1.32 → ostium_python_sdk-0.1.34}/ostium_python_sdk/sdk.py +3 -3
  5. {ostium_python_sdk-0.1.32 → ostium_python_sdk-0.1.34}/ostium_python_sdk.egg-info/PKG-INFO +5 -2
  6. {ostium_python_sdk-0.1.32 → ostium_python_sdk-0.1.34}/setup.py +1 -1
  7. {ostium_python_sdk-0.1.32 → ostium_python_sdk-0.1.34}/tests/test_slippage.py +5 -5
  8. {ostium_python_sdk-0.1.32 → ostium_python_sdk-0.1.34}/ostium_python_sdk/__init__.py +0 -0
  9. {ostium_python_sdk-0.1.32 → ostium_python_sdk-0.1.34}/ostium_python_sdk/abi/__init__.py +0 -0
  10. {ostium_python_sdk-0.1.32 → ostium_python_sdk-0.1.34}/ostium_python_sdk/abi/abi.py +0 -0
  11. {ostium_python_sdk-0.1.32 → ostium_python_sdk-0.1.34}/ostium_python_sdk/abi/faucet_abi.py +0 -0
  12. {ostium_python_sdk-0.1.32 → ostium_python_sdk-0.1.34}/ostium_python_sdk/balance.py +0 -0
  13. {ostium_python_sdk-0.1.32 → ostium_python_sdk-0.1.34}/ostium_python_sdk/config.py +0 -0
  14. {ostium_python_sdk-0.1.32 → ostium_python_sdk-0.1.34}/ostium_python_sdk/constants.py +0 -0
  15. {ostium_python_sdk-0.1.32 → ostium_python_sdk-0.1.34}/ostium_python_sdk/exceptions.py +0 -0
  16. {ostium_python_sdk-0.1.32 → ostium_python_sdk-0.1.34}/ostium_python_sdk/faucet.py +0 -0
  17. {ostium_python_sdk-0.1.32 → ostium_python_sdk-0.1.34}/ostium_python_sdk/formulae.py +0 -0
  18. {ostium_python_sdk-0.1.32 → ostium_python_sdk-0.1.34}/ostium_python_sdk/formulae_wrapper.py +0 -0
  19. {ostium_python_sdk-0.1.32 → ostium_python_sdk-0.1.34}/ostium_python_sdk/price.py +0 -0
  20. {ostium_python_sdk-0.1.32 → ostium_python_sdk-0.1.34}/ostium_python_sdk/subgraph.py +0 -0
  21. {ostium_python_sdk-0.1.32 → ostium_python_sdk-0.1.34}/ostium_python_sdk/utils.py +0 -0
  22. {ostium_python_sdk-0.1.32 → ostium_python_sdk-0.1.34}/ostium_python_sdk.egg-info/SOURCES.txt +0 -0
  23. {ostium_python_sdk-0.1.32 → ostium_python_sdk-0.1.34}/ostium_python_sdk.egg-info/dependency_links.txt +0 -0
  24. {ostium_python_sdk-0.1.32 → ostium_python_sdk-0.1.34}/ostium_python_sdk.egg-info/requires.txt +0 -0
  25. {ostium_python_sdk-0.1.32 → ostium_python_sdk-0.1.34}/ostium_python_sdk.egg-info/top_level.txt +0 -0
  26. {ostium_python_sdk-0.1.32 → ostium_python_sdk-0.1.34}/pyproject.toml +0 -0
  27. {ostium_python_sdk-0.1.32 → ostium_python_sdk-0.1.34}/setup.cfg +0 -0
  28. {ostium_python_sdk-0.1.32 → ostium_python_sdk-0.1.34}/tests/__init__.py +0 -0
  29. {ostium_python_sdk-0.1.32 → ostium_python_sdk-0.1.34}/tests/test_trade_get_tp_price.py +0 -0
  30. {ostium_python_sdk-0.1.32 → ostium_python_sdk-0.1.34}/tests/test_trade_liquidation_price.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: ostium-python-sdk
3
- Version: 0.1.32
3
+ Version: 0.1.34
4
4
  Summary: A python based SDK developed for interacting with Ostium, a leveraged trading application for trading currencies, commodities, indices, crypto and more.
5
5
  Home-page: https://github.com/0xOstium/ostium-python-sdk
6
6
  Author: ami@ostium.io
@@ -89,6 +89,9 @@ Developed using:
89
89
  You can instantiate the SDK with the following parameters.
90
90
  Ostium Platform is deployed on Arbitrum. You can use the testnet or mainnet config via the `NetworkConfig` class, see below for an example.
91
91
 
92
+
93
+ **NOTE: You can also use the SDK _without_ providing a private key, in which case you will be limited to read only operations on the SDK.**
94
+
92
95
  ```python
93
96
  from dotenv import load_dotenv
94
97
  from ostium_python_sdk import OstiumSDK, NetworkConfig
@@ -96,7 +99,7 @@ from ostium_python_sdk import OstiumSDK, NetworkConfig
96
99
  # Load environment variables if using .env file
97
100
  load_dotenv()
98
101
 
99
- # Get private key from environment variable
102
+ # Get private key from environment variable
100
103
  private_key = os.getenv('PRIVATE_KEY')
101
104
  if not private_key:
102
105
  raise ValueError("PRIVATE_KEY not found in .env file")
@@ -61,6 +61,9 @@ Developed using:
61
61
  You can instantiate the SDK with the following parameters.
62
62
  Ostium Platform is deployed on Arbitrum. You can use the testnet or mainnet config via the `NetworkConfig` class, see below for an example.
63
63
 
64
+
65
+ **NOTE: You can also use the SDK _without_ providing a private key, in which case you will be limited to read only operations on the SDK.**
66
+
64
67
  ```python
65
68
  from dotenv import load_dotenv
66
69
  from ostium_python_sdk import OstiumSDK, NetworkConfig
@@ -68,7 +71,7 @@ from ostium_python_sdk import OstiumSDK, NetworkConfig
68
71
  # Load environment variables if using .env file
69
72
  load_dotenv()
70
73
 
71
- # Get private key from environment variable
74
+ # Get private key from environment variable
72
75
  private_key = os.getenv('PRIVATE_KEY')
73
76
  if not private_key:
74
77
  raise ValueError("PRIVATE_KEY not found in .env file")
@@ -16,9 +16,9 @@ class OpenOrderType(Enum):
16
16
 
17
17
  class Ostium:
18
18
  def __init__(self, w3: Web3, usdc_address: str, ostium_trading_storage_address: str, ostium_trading_address: str, private_key: str) -> None:
19
- if not private_key:
20
- raise ValueError(
21
- "Private key is required for Ostium initialization")
19
+ # if not private_key:
20
+ # raise ValueError(
21
+ # "Private key is required for Ostium initialization")
22
22
 
23
23
  self.web3 = w3
24
24
  self.private_key = private_key
@@ -17,9 +17,9 @@ class OstiumSDK:
17
17
  def __init__(self, network: Union[str, NetworkConfig], private_key: str = None, rpc_url: str = None):
18
18
  load_dotenv()
19
19
  self.private_key = private_key or os.getenv('PRIVATE_KEY')
20
- if not self.private_key:
21
- raise ValueError(
22
- "No private key provided. Please provide via constructor or PRIVATE_KEY environment variable")
20
+ # if not self.private_key:
21
+ # raise ValueError(
22
+ # "No private key provided. Please provide via constructor or PRIVATE_KEY environment variable")
23
23
 
24
24
  self.rpc_url = rpc_url or os.getenv('RPC_URL')
25
25
  if not self.rpc_url:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: ostium-python-sdk
3
- Version: 0.1.32
3
+ Version: 0.1.34
4
4
  Summary: A python based SDK developed for interacting with Ostium, a leveraged trading application for trading currencies, commodities, indices, crypto and more.
5
5
  Home-page: https://github.com/0xOstium/ostium-python-sdk
6
6
  Author: ami@ostium.io
@@ -89,6 +89,9 @@ Developed using:
89
89
  You can instantiate the SDK with the following parameters.
90
90
  Ostium Platform is deployed on Arbitrum. You can use the testnet or mainnet config via the `NetworkConfig` class, see below for an example.
91
91
 
92
+
93
+ **NOTE: You can also use the SDK _without_ providing a private key, in which case you will be limited to read only operations on the SDK.**
94
+
92
95
  ```python
93
96
  from dotenv import load_dotenv
94
97
  from ostium_python_sdk import OstiumSDK, NetworkConfig
@@ -96,7 +99,7 @@ from ostium_python_sdk import OstiumSDK, NetworkConfig
96
99
  # Load environment variables if using .env file
97
100
  load_dotenv()
98
101
 
99
- # Get private key from environment variable
102
+ # Get private key from environment variable
100
103
  private_key = os.getenv('PRIVATE_KEY')
101
104
  if not private_key:
102
105
  raise ValueError("PRIVATE_KEY not found in .env file")
@@ -12,7 +12,7 @@ if changelog_path.exists():
12
12
 
13
13
  setup(
14
14
  name="ostium-python-sdk",
15
- version="0.1.32",
15
+ version="0.1.34",
16
16
  packages=find_packages(),
17
17
  install_requires=[
18
18
  "web3>=6.0.0",
@@ -13,10 +13,10 @@ def sdk():
13
13
  # Load environment variables
14
14
  load_dotenv()
15
15
 
16
- # Get private key and RPC URL from environment variables
17
- private_key = os.getenv('PRIVATE_KEY')
18
- if not private_key:
19
- raise ValueError("PRIVATE_KEY not found in .env file")
16
+ # # Get private key and RPC URL from environment variables
17
+ # private_key = os.getenv('PRIVATE_KEY')
18
+ # if not private_key:
19
+ # raise ValueError("PRIVATE_KEY not found in .env file")
20
20
 
21
21
  rpc_url = os.getenv('RPC_URL')
22
22
  if not rpc_url:
@@ -24,7 +24,7 @@ def sdk():
24
24
 
25
25
  # Initialize SDK with testnet config
26
26
  config = NetworkConfig.testnet()
27
- return OstiumSDK(config, private_key)
27
+ return OstiumSDK(config)
28
28
 
29
29
 
30
30
  @pytest.mark.asyncio