command line tool and python library for sending hive engine tokens
Project description
# hiveengine Python tools for obtaining and processing hive engine tokens
[![Build Status](https://travis-ci.org/holgern/hiveengine.svg?branch=master)](https://travis-ci.org/holgern/hiveengine)
## Installation ` pip install hiveengine `
## Commands Get the latest block of the sidechain ` from hiveengine.api import Api api = Api() print(api.get_latest_block_info()) `
Get the block with the specified block number of the sidechain ` from hiveengine.api import Api api = Api() print(api.get_block_info(1910)) `
Retrieve the specified transaction info of the sidechain ` from hiveengine.api import Api api = Api() print(api.get_transaction_info("e6c7f351b3743d1ed3d66eb9c6f2c102020aaa5d")) `
Get the contract specified from the database ` from hiveengine.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 hiveengine.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 hiveengine.api import Api api = Api() print(api.find_one("tokens", "tokens")) `
Get the transaction history for an account and a token ` from hiveengine.api import Api api = Api() print(api.get_history("holger80", "FOODIE")) ` ## Token transfer ` from beem import Steem from hiveengine.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 hiveengine.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 hiveengine.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 hiveengine.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]["_id"]) ` ### Cancel a sell order ` from beem import Steem from hiveengine.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]["_id"]) ` ### Deposit Steem ` from beem import Steem from hiveengine.market import Market stm = Steem(keys=["5xx"]) m=Market(steem_instance=stm) m.deposit("test_user", 10) ` ### Withdrawal ` from beem import Steem from hiveengine.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 hiveengine-0.1.4.tar.gz
.
File metadata
- Download URL: hiveengine-0.1.4.tar.gz
- Upload date:
- Size: 14.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a130f5fe7bd747246a2c80483b7d23882b9bfc26660dd6e8e6dd08a2d0a73034 |
|
MD5 | 28e058937d484ff35fbd97abbdd86004 |
|
BLAKE2b-256 | 8095d193a50da4aaeb5a707f2249773e7cac6dc9cb3229eef11c1996a0ea6522 |
File details
Details for the file hiveengine-0.1.4-py2.py3-none-any.whl
.
File metadata
- Download URL: hiveengine-0.1.4-py2.py3-none-any.whl
- Upload date:
- Size: 18.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 040757ea7e11294d3632d279379215ac85b671d773cb7283fee423249aefa150 |
|
MD5 | 1512294b2637faeb29856367a3f5777e |
|
BLAKE2b-256 | 8ee2efebf4facbd9d51752febeaf0d30b63e59811bee743447e649fc20553df6 |