Python SDK for the Lightecho Stellar Oracle
Project description
Python SDK for the Lightecho Stellar Oracle
pip install lightecho_stellar_oracle
Example:
from lightecho_stellar_oracle import OracleClient, TESTNET_CONTRACT_XLM
from stellar_sdk.keypair import Keypair
oracle_client = OracleClient(
contract_id=TESTNET_CONTRACT_XLM,
signer=Keypair.from_secret("SAES4O3NXUE2CPIB7YH3O5ROAONADPZRXOEYFC4JPLNY6STOBM2RYLGH"),
network="testnet",
)
# list the assets
print(oracle_client.assets())
# show the base Currency
print(oracle_client.base())
# get the last price
tx_id, result = oracle_client.lastprice("other", "USD")
print(tx_id)
print(result)
# Printing the updated result
print(result)
#RESULT
#{'price': 0.11, 'timestamp': 1698240296}
For more information see https://github.com/bp-ventures/lightecho-stellar-oracle.
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
Built Distribution
Close
Hashes for lightecho_stellar_oracle-0.13.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e36b583fa2bb690b59c4620ca9745c82fe8e99945d0924e0867cb8d3ba8a9651 |
|
MD5 | b4715e19a93f124a034599708a50df5a |
|
BLAKE2b-256 | e383a7915b82a383ad09d7e3830c580475fb1f7639dd244906f8499e704a5721 |
Close
Hashes for lightecho_stellar_oracle-0.13.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 501f71082f05ecae2d6f180d392214b59134517d81c44bbe6feb5c46c1fd5646 |
|
MD5 | e9453970c20dc640e82dcae8d149bdc2 |
|
BLAKE2b-256 | 70b0ba82beae38cc75164ca6d5ec97547c7f6b24dfa2dcb637704300c50c7e33 |