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.7.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98a8ff09221c3d06151fa94abe3ba261044c65af0997541a80da181eeab4abda |
|
MD5 | 3ba7ce2d2b217cd585dea2b797bde7ed |
|
BLAKE2b-256 | 8266a9000ba8e1a0cc6512b32f5cb59f32f89634ee943dddcc8a6dc2b711eaee |
Close
Hashes for lightecho_stellar_oracle-0.7.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20632b3c23e1ea4c3950c2b39a816151875e36ad2b5c47c109273b7bfedd3843 |
|
MD5 | cdfa9bc9c693f013759b97281114cecc |
|
BLAKE2b-256 | 9ee074d4cdbbbf4976e30c1bfdccb7b1e33e63d176beeff34aae530040d6adef |