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.0.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.0-py3-none-any.whl (43.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: volmex_python_sdk-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 b75bcf22ca279ec1fcbe09407708d890316cbc5be028fbb55a75084b58da0504
MD5 56b072c3d439d9bf9b3c6e4088593fbc
BLAKE2b-256 9991b578f14939999407be1443c6b1f18eeb63f45ec01cbc143d6e4fec02df99

See more details on using hashes here.

File details

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

File metadata

  • Download URL: volmex_python_sdk-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 42f1a60c46d90c1e442dc54d7d53cced4c9edc63bdd69064031b88f40eab8814
MD5 8779a9074d2f2b542de95d6a30a11d42
BLAKE2b-256 c416688d9a65074019b6ea68dc77d20d844cfab821821729c69cf4a6ead7548e

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