Skip to main content

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 for api_client
  • poetry run contracts-sanity: run sanity checks for contracts
  • poetry run client-sanity: run sanity checks for client

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.1.tar.gz (30.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

volmex_python_sdk-0.1.1-py3-none-any.whl (43.8 kB view details)

Uploaded Python 3

File details

Details for the file volmex_python_sdk-0.1.1.tar.gz.

File metadata

  • Download URL: volmex_python_sdk-0.1.1.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

Hashes for volmex_python_sdk-0.1.1.tar.gz
Algorithm Hash digest
SHA256 6fe05f59e6a3b23ff0c1224929d6f489115b2460356b0882b49e041e0e80ba5a
MD5 d12f3a6835f8b23a9b1d414372e0397e
BLAKE2b-256 134ab5f8b1603a1cd5afbffa37d7d4623f9a6ed007b526144200df966bfbbe12

See more details on using hashes here.

File details

Details for the file volmex_python_sdk-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: volmex_python_sdk-0.1.1-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

Hashes for volmex_python_sdk-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f80accd2240956b245470571dfbbc0a2c8fb56962551da1dcc2a5a322f699756
MD5 7f0ea667259cca32af496fe7631be98f
BLAKE2b-256 bbdf43b0355b7365b0be92a9815af32eaf2dd547194b63ac2b0bac99a34019f7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page