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
Metadata
Release files for volmex-python-sdk 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| volmex_python_sdk-0.1.3.tar.gz | 30.0 kB | Without provenance | Details for volmex_python_sdk-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| volmex_python_sdk-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for volmex_python_sdk-0.1.3-py3-none-any.whl |
Total release size: 73.8 kB
Release files / volmex_python_sdk-0.1.3.tar.gz
| Download URL | volmex_python_sdk-0.1.3.tar.gz |
|---|---|
| Size | 30.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2dcc0e544106fa39ea315d6c66f44ef937782d0a04f237cee70dd3c6ecf741a7
|
|
BLAKE2b-256 checksum How to use checksums |
db9dbe2241a0c4e5190ad7c5e0c657beae5444422e729693e6143b78a1ae9a74
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.10.12 Linux/5.15.153.1-microsoft-standard-WSL2
|
Release files / volmex_python_sdk-0.1.3-py3-none-any.whl
| Download URL | volmex_python_sdk-0.1.3-py3-none-any.whl |
|---|---|
| Size | 43.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0c31d7311d4e859013805fc3c54b77662307be45ce8759ad58e331801199288b
|
|
BLAKE2b-256 checksum How to use checksums |
3e35a087c7ebe9684efe9ef5facddce1fe997185efdc6ba7179cc3784827cde1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.10.12 Linux/5.15.153.1-microsoft-standard-WSL2
|
Security for volmex-python-sdk 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.