command line tool and python library for sending steem engine tokens
Project description
# steemengine Python tools for obtaining and processing steem engine tokens
[![Build Status](https://travis-ci.org/holgern/steemengine.svg?branch=master)](https://travis-ci.org/holgern/steemengine)
## Installation ` pip install steemengine `
## Commands Get the latest block of the sidechain ` from steemengine.api import Api api = Api() print(api.get_latest_block_info()) `
Get the block with the specified block number of the sidechain ` from steemengine.api import Api api = Api() print(api.get_block_info(1910)) `
Retrieve the specified transaction info of the sidechain ` from steemengine.api import Api api = Api() print(api.get_transaction_info("e6c7f351b3743d1ed3d66eb9c6f2c102020aaa5d")) `
Get the contract specified from the database ` from steemengine.api import Api api = Api() print(api.get_contract("tokens")) `
Get an array of objects that match the query from the table of the specified contract ` from steemengine.api import Api api = Api() print(api.find("tokens", "tokens")) `
Get the object that matches the query from the table of the specified contract ` from steemengine.api import Api api = Api() print(api.find_one("tokens", "tokens")) `
Get the transaction history for an account and a token ` from steemengine.api import Api api = Api() print(api.get_history("holger80", "NINJA")) ` ## Token transfer ` from beem import Steem from steemengine.wallet import Wallet stm = Steem(keys=["5xx"]) wallet = Wallet("test_user", steem_instance=stm) wallet.transfer("test1",1,"TST", memo="This is a test") ` ## Buy/Sell ### Create a buy order ` from beem import Steem from steemengine.market import Market stm = Steem(keys=["5xx"]) m=Market(steem_instance=stm) m.buy("test_user", 1, "TST", 9.99) ` ### Create a sell order
` from beem import Steem from steemengine.market import Market stm = Steem(keys=["5xx"]) m=Market(steem_instance=stm) m.sell("test_user", 1, "TST", 9.99) ` ### Cancel a buy order ` from beem import Steem from steemengine.market import Market stm = Steem(keys=["5xx"]) m=Market(steem_instance=stm) open_buy_orders = m.get_buy_book("TST", "test_user") m.cancel("test_user", "buy", open_buy_orders[0]["$loki"]) ` ### Cancel a sell order ` from beem import Steem from steemengine.market import Market stm = Steem(keys=["5xx"]) m=Market(steem_instance=stm) open_sell_orders = m.get_sell_book("TST", "test_user") m.cancel("test_user", "sell", open_sell_orders[0]["$loki"]) ` ### Deposit Steem ` from beem import Steem from steemengine.market import Market stm = Steem(keys=["5xx"]) m=Market(steem_instance=stm) m.deposit("test_user", 10) ` ### Withdrawel ` from beem import Steem from steemengine.market import Market stm = Steem(keys=["5xx"]) m=Market(steem_instance=stm) m.withdraw("test_user", 10) `
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
File details
Details for the file steemengine-0.3.0.tar.gz
.
File metadata
- Download URL: steemengine-0.3.0.tar.gz
- Upload date:
- Size: 10.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4bd5674e495c7daf377dad2251d674b6525e352ecd38dcc387dcf0b4fd184977 |
|
MD5 | 1c49e239f0487931fc60fd647a692f86 |
|
BLAKE2b-256 | 1fe13939fc66ce2974fdd148c4f2619afb823559d74d00ab06274f201bd3c54d |
File details
Details for the file steemengine-0.3.0-py2.py3-none-any.whl
.
File metadata
- Download URL: steemengine-0.3.0-py2.py3-none-any.whl
- Upload date:
- Size: 14.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cdfacee615cf1fd0c15a961c8223442c9357f497706bda6e46d0eec4036ad2ca |
|
MD5 | 2298597beabf44efacd6b272408b68fa |
|
BLAKE2b-256 | 0e294d463232bdfb33fdd08c0b1b3ae74055afc044d33dc6ce2ea482b08b89fc |