transfers

Api.transfers(raw_ops: List[Tuple[str, Union[decimal.Decimal, float, int, str], str, str]], from_account: str, wif: str)[source]

Execute multiple transfers in a single transaction.

>>> tfrs = [('john', '1.234', 'GOLOS', 'thanks man'), ('dave', '0.374', 'GBG', 'hi dave'), ]
>>> g = Api()
>>> tf = g.transfers(raw_ops=tfrs, from_account='someguy123',
...                  wif='5Jq19TeeVmGrBFnu32oxfxQMiipnSCKmwW7fZGUVLAoqsKJ9JwP')
>>> print('TXID:', tf['id'], 'Block:', tf['block_num'])
TXID: c901c52daf57b60242d9d7be67f790e023cf2780 Block: 30895436
Parameters
  • raw_ops (List[Tuple]) – A list of transfers as 4 key tuples: (to:str, amount:str, asset:str, memo:str)

  • from_account (str) – The username of the account to send from

  • wif (str) – The active/owner private key for the from_account, as a string in WIF format

Return dict transfer

A dictionary containing info about the completed TX, inc. id (full ret below)

Return data:

dict(
    ref_block_num: int, ref_block_prefix:int,
    expiration:str, operations:list, extensions:list,
    signatures:List[str], block_num:int, id:str
)