ostium-python-sdk 0.1.3__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.
- ostium_python_sdk-0.1.3/PKG-INFO +93 -0
- ostium_python_sdk-0.1.3/README.md +78 -0
- ostium_python_sdk-0.1.3/ostium_python_sdk/__init__.py +4 -0
- ostium_python_sdk-0.1.3/ostium_python_sdk/abi.py +4071 -0
- ostium_python_sdk-0.1.3/ostium_python_sdk/balance.py +54 -0
- ostium_python_sdk-0.1.3/ostium_python_sdk/config.py +33 -0
- ostium_python_sdk-0.1.3/ostium_python_sdk/constants.py +11 -0
- ostium_python_sdk-0.1.3/ostium_python_sdk/formulae.py +352 -0
- ostium_python_sdk-0.1.3/ostium_python_sdk/formulae_wrapper.py +294 -0
- ostium_python_sdk-0.1.3/ostium_python_sdk/ostium.py +320 -0
- ostium_python_sdk-0.1.3/ostium_python_sdk/price.py +37 -0
- ostium_python_sdk-0.1.3/ostium_python_sdk/sdk.py +33 -0
- ostium_python_sdk-0.1.3/ostium_python_sdk/subgraph.py +187 -0
- ostium_python_sdk-0.1.3/ostium_python_sdk/utils.py +604 -0
- ostium_python_sdk-0.1.3/ostium_python_sdk.egg-info/PKG-INFO +93 -0
- ostium_python_sdk-0.1.3/ostium_python_sdk.egg-info/SOURCES.txt +20 -0
- ostium_python_sdk-0.1.3/ostium_python_sdk.egg-info/dependency_links.txt +1 -0
- ostium_python_sdk-0.1.3/ostium_python_sdk.egg-info/requires.txt +1 -0
- ostium_python_sdk-0.1.3/ostium_python_sdk.egg-info/top_level.txt +1 -0
- ostium_python_sdk-0.1.3/pyproject.toml +3 -0
- ostium_python_sdk-0.1.3/setup.cfg +4 -0
- ostium_python_sdk-0.1.3/setup.py +24 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: ostium-python-sdk
|
|
3
|
+
Version: 0.1.3
|
|
4
|
+
Summary: A python based SDK developed for interacting with Ostium, a leveraged trading application for trading currencies, commodities, indices, crypto and more.
|
|
5
|
+
Home-page: https://github.com/0xOstium/ostium-python-sdk
|
|
6
|
+
Author: ami@ostium.io
|
|
7
|
+
Classifier: Development Status :: 3 - Alpha
|
|
8
|
+
Classifier: Intended Audience :: Developers
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
12
|
+
Requires-Python: >=3.8
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
Requires-Dist: web3>=6.0.0
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# Ostium Python SDK
|
|
18
|
+
|
|
19
|
+
A python based SDK developed for interacting with Ostium v1 Trading Platform (https://ostium.app/)
|
|
20
|
+
|
|
21
|
+
Ostium is a decentralized perpetuals exchange on Arbitrum (Ethereum L2) with a focus on providing a seamless experience for traders for trading currencies, commodities, indices, crypto and more.
|
|
22
|
+
|
|
23
|
+
This SDK is designed to be used by developers who want to build applications on top of Ostium and automate their trading strategies.
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## Pip Install
|
|
27
|
+
|
|
28
|
+
The SDK can be installed via pip:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
pip install ostium-python-sdk
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Requirements
|
|
35
|
+
|
|
36
|
+
Developed using:
|
|
37
|
+
```python
|
|
38
|
+
python=3.8
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Example Usage Script
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### Read Block Number
|
|
45
|
+
|
|
46
|
+
To run the example:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
python examples/example-read-block-number.py
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
See [example-read-block-number.py](https://github.com/0xOstium/ostium_python_sdk/blob/main/examples/example-read-block-number.py) for an example of how to use the SDK.
|
|
53
|
+
|
|
54
|
+
### Read Positions
|
|
55
|
+
|
|
56
|
+
To run the example:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
python examples/example-read-positions.py
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
See [example-read-positions.py](https://github.com/0xOstium/ostium_python_sdk/blob/main/examples/example-read-positions.py) for an example of how to use the SDK.
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
### Get Feed Prices
|
|
66
|
+
|
|
67
|
+
To open a trade you need the latest feed price.
|
|
68
|
+
|
|
69
|
+
See this example script on how to get the latest feed prices.
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
python examples/example-get-prices.py
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
See [example-get-prices.py](https://github.com/0xOstium/ostium_python_sdk/blob/main/examples/example-get-prices.py) for an example of how to use the SDK.
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
### Get Balance of an Address
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
See this example script on how to get the latest feed prices.
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
python examples/example-get-balance.py
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
See [example-get-balance.py](https://github.com/0xOstium/ostium_python_sdk/blob/main/examples/example-get-balance.py) for an example of how to use the SDK.
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
|
|
2
|
+
# Ostium Python SDK
|
|
3
|
+
|
|
4
|
+
A python based SDK developed for interacting with Ostium v1 Trading Platform (https://ostium.app/)
|
|
5
|
+
|
|
6
|
+
Ostium is a decentralized perpetuals exchange on Arbitrum (Ethereum L2) with a focus on providing a seamless experience for traders for trading currencies, commodities, indices, crypto and more.
|
|
7
|
+
|
|
8
|
+
This SDK is designed to be used by developers who want to build applications on top of Ostium and automate their trading strategies.
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## Pip Install
|
|
12
|
+
|
|
13
|
+
The SDK can be installed via pip:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
pip install ostium-python-sdk
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Requirements
|
|
20
|
+
|
|
21
|
+
Developed using:
|
|
22
|
+
```python
|
|
23
|
+
python=3.8
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Example Usage Script
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Read Block Number
|
|
30
|
+
|
|
31
|
+
To run the example:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
python examples/example-read-block-number.py
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
See [example-read-block-number.py](https://github.com/0xOstium/ostium_python_sdk/blob/main/examples/example-read-block-number.py) for an example of how to use the SDK.
|
|
38
|
+
|
|
39
|
+
### Read Positions
|
|
40
|
+
|
|
41
|
+
To run the example:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
python examples/example-read-positions.py
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
See [example-read-positions.py](https://github.com/0xOstium/ostium_python_sdk/blob/main/examples/example-read-positions.py) for an example of how to use the SDK.
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
### Get Feed Prices
|
|
51
|
+
|
|
52
|
+
To open a trade you need the latest feed price.
|
|
53
|
+
|
|
54
|
+
See this example script on how to get the latest feed prices.
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
python examples/example-get-prices.py
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
See [example-get-prices.py](https://github.com/0xOstium/ostium_python_sdk/blob/main/examples/example-get-prices.py) for an example of how to use the SDK.
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
### Get Balance of an Address
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
See this example script on how to get the latest feed prices.
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
python examples/example-get-balance.py
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
See [example-get-balance.py](https://github.com/0xOstium/ostium_python_sdk/blob/main/examples/example-get-balance.py) for an example of how to use the SDK.
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|