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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
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.2-py3-none-any.whl.
File metadata
- Download URL: volmex_python_sdk-0.1.2-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 |
2b1ffa07e3f50600ac8db7233be95ea41354b597e3d9ed8758c8e92b6e2a0293
|
|
| MD5 |
5f7873bd6344b2d50b80760abfb89ff3
|
|
| BLAKE2b-256 |
0bbdcfac28f109120638216acec160fe403166d21560f2c4a9be3b3d3cbfae8e
|