privex.steemengine.SteemEngineToken.SteemEngineToken

class SteemEngineToken(network_account='ssc-mainnet1', history_conf: Optional[dict] = None, network='steem', **rpc_args)[source]

SteemEngineToken - a wrapper class around privex.jsonrpc.SteemEngineRPC, with support for signing transactions, including issuing/sending tokens.

Copyright:

+===================================================+
|                 © 2019 Privex Inc.                |
|               https://www.privex.io               |
+===================================================+
|                                                   |
|        Python Steem Engine Library                |
|        License: X11/MIT                           |
|                                                   |
|        Core Developer(s):                         |
|                                                   |
|          (+)  Chris (@someguy123) [Privex]        |
|                                                   |
+===================================================+

Basic usage:

>>> from privex.steemengine import SteemEngineToken
>>> s = SteemEngineToken()
>>> # Send 10 ENG to @privex from @someguy123 with the memo 'hello memo'
>>> s.send_token('ENG', 'someguy123', 'privex', Decimal('10'), 'hello memo')
__init__(network_account='ssc-mainnet1', history_conf: Optional[dict] = None, network='steem', **rpc_args)[source]

Initialises the class with various configuration options. All parameters are optional.

Pass a dict in history_conf to override the SteemEngine history node used Pass extra kwargs such as hostname='api.example.com' ot override the SteemEngine RPC node used.

Parameters
  • network_account – The Steem account that operates the SteemEngine network, e.g. ssc-mainnet1 for the Steem Smart Contracts Main Network

  • history_conf – A dictionary containing kwargs to pass to SteemEngineHistory constructor

  • rpc_args – Any additional kwargs will be passed to the privex.jsonrpc.SteemEngineRPC constructor

  • nodes (str|list) – If the nodes kwarg is specified, e.g. nodes=['https://api.something.com'], then Beem will be configured during __init__ to use those specific RPC nodes.

Methods

__init__([network_account, history_conf, ...])

Initialises the class with various configuration options.

account_exists(user)

Helper function to verify if a given user exists on Steem.

custom_beem([node, network])

Generates a new Beem Steem / Hive instance

find_fulfilled(txid[, limit, offset, indexes])

find_fulfilled_buys(txid[, limit, offset, ...])

find_fulfilled_sells(txid[, limit, offset, ...])

find_steem_tx(tx_data[, last_blocks])

Used internally to get the transaction ID after a Steem transaction has been broadcasted.

get_balances(user)

Get all token balances for a user.

get_orderbook(symbol[, direction, user, ...])

Get a list of open Steem/Hive Engine orders for a given symbol, by default will display 'buy' orders unless you set direction to 'sell'

get_ticker(symbol, **query)

Retrieve a ticker for a single symbol as a SETicker object.

get_tickers([limit, offset, indexes])

Retrieve a list of market tickers from Hive/SteemEngine as a list of SETicker objects.

get_token(symbol)

Get the token object for an individual token.

get_token_balance(user, symbol)

Find a specific token balance of a user.

get_transaction_info(txid)

issue_token(symbol, to, amount[, find_tx])

Issues a specified amount amount of symbol to the Steem account to.

list_tokens([limit, offset])

Returns a list of all tokens as Token objects.

list_transactions(user[, symbol, limit, offset])

Get the Steem Engine transaction history for a given account

order_history(symbol[, limit, offset, indexes])

Get a list of recent Steem Engine orders for a given symbol.

place_order(user, action, symbol, quantity, ...)

Place an order on the Steem/Hive Engine market

query_order_history([limit, offset, indexes])

Used internally by methods such as order_history() and find_fulfilled_sells() etc.

send_token(symbol, from_acc, to_acc, amount)

Sends a given amount of symbol from from_acc to to_acc with the memo memo.

set_beem([nodes, network])

Create and override the Beem instance used by this instance.

trade_history(symbol[, limit, offset, indexes])

Get a list of recent Steem Engine orders for a given symbol.

verify_network([network, inst])

Check that the current RPC node is on the correct blockchain network.

Attributes

CACHE

Global cache switch.

CACHE_BLACKLIST

A list of fully qualified module paths to functions/methods which always bypass se_cache()

CACHE_BLACKLIST_FUNCS

A list of plain function names which always bypass se_cache()

CACHE_BLACKLIST_MODS

A list of fully qualified module names which always bypass se_cache()

DEFAULT_BLOCKCHAIN_URL

default_nodes

This is a class-level attribute (shared by all instances, instead of specific to one instance), which contains a list of RPC nodes to be used by default for each network.

native_token

Returns the Token object for the native coin native_coin

steem

When a method calls self.steem , this property will first try to return _steem if it was previously called.

use_shared_instances

This is a class-level attribute that controls whether instances of SteemEngineToken should use Beem's shared instances.

network

native_coin