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 test_python_sdk.api_client.types.execute import ExecuteInsertOrder, ExecuteInsertOrderAsset
from test_python_sdk.api_client.types.models import OrderType, RelayerChain
from test_python_sdk.client import VolmexClient, create_volmex_client
from eth_account.signers.local import LocalAccount
from test_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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
test_python_sdk-0.1.0.tar.gz
(48.2 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 test_python_sdk-0.1.0.tar.gz.
File metadata
- Download URL: test_python_sdk-0.1.0.tar.gz
- Upload date:
- Size: 48.2 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 |
4230f8123b6d7829e0244650e27121a92cc01431ae14e54be269b028c577792f
|
|
| MD5 |
643410370a3011fe61cc58b056dd4c6f
|
|
| BLAKE2b-256 |
584957268f79c091d18166f2109b8e80c3edfb6634e8ecf87b9887c2d4e7e40b
|
File details
Details for the file test_python_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: test_python_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 43.6 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 |
18a1cb9460d5cc9b974cf8949f0878f89c6ca02c3a46a17d9823427b39e071e3
|
|
| MD5 |
0c013cb1cb46a127dba5f3166c55888f
|
|
| BLAKE2b-256 |
940a8735cf0845ad0e558af92fa3207fe8fabcc3f5fe9c341e9f0794bb5aea93
|