No project description provided
Project description
Install
You can install the SDK via pip:
pip install volmex-python-sdk
Basic Usage
Basic Imports
from eth_account import Account
from sanity import CHAIN_ID, NETWORK, SIGNER_PRIVATE_KEY
from volmex_python_sdk.api_client.types.execute import ExecuteInsertOrder, ExecuteInsertOrderAsset
from volmex_python_sdk.api_client.types.models import OrderType, RelayerChain
from volmex_python_sdk.client import VolmexClient, create_volmex_client
from eth_account.signers.local import LocalAccount
from volmex_python_sdk.utils.signed_message_to_str import signed_message_to_str
Connect Account
signer: LocalAccount = Account.from_key(SIGNER_PRIVATE_KEY)
volmex_client: VolmexClient = create_volmex_client(
network=NETWORK,
signer=signer,
)
volmex_client.login()
Submit an Order
volmex_client.send_order(
base_asset_addr=volmex_client.deployment_base_token.bviv_addr,
is_short=False,
price_e6="40000000000000000000",
base_amount="1000000000000000000",
deadline=1820012100
)
Interacting with the Contracts
print("getLiquidationPenaltyRatio:", volmex_client.contracts.positioning_config.functions.getLiquidationPenaltyRatio().call())
commands
To initialize virtual environment
poetry shell
To install dependencies
poetry install
To publish
poetry publish
Run sanity checks
poetry run api-sanity: run sanity checks forapi_clientpoetry run contracts-sanity: run sanity checks forcontractspoetry run client-sanity: run sanity checks forclient
Build Docs
To build the docs locally run:
$ poetry run sphinx-build docs/source docs/build
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
volmex_python_sdk-0.1.3.tar.gz
(30.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file volmex_python_sdk-0.1.3.tar.gz.
File metadata
- Download URL: volmex_python_sdk-0.1.3.tar.gz
- Upload date:
- Size: 30.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/5.15.153.1-microsoft-standard-WSL2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2dcc0e544106fa39ea315d6c66f44ef937782d0a04f237cee70dd3c6ecf741a7
|
|
| MD5 |
0fed70ead27b8f7272681c6705fab659
|
|
| BLAKE2b-256 |
db9dbe2241a0c4e5190ad7c5e0c657beae5444422e729693e6143b78a1ae9a74
|
File details
Details for the file volmex_python_sdk-0.1.3-py3-none-any.whl.
File metadata
- Download URL: volmex_python_sdk-0.1.3-py3-none-any.whl
- Upload date:
- Size: 43.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/5.15.153.1-microsoft-standard-WSL2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c31d7311d4e859013805fc3c54b77662307be45ce8759ad58e331801199288b
|
|
| MD5 |
1ea2731467c333114f5321e4e2ed7e12
|
|
| BLAKE2b-256 |
3e35a087c7ebe9684efe9ef5facddce1fe997185efdc6ba7179cc3784827cde1
|