transfer¶
-
Api.transfer(to: str, amount: Union[decimal.Decimal, float, int, str], from_account: str, wif: str, asset='GOLOS', memo='', **kwargs)[source]¶ Transfer
amountcoins (ofasset) tofrom_accountusing the private keywifand the memomemoBasic usage:
>>> g = Api() >>> tf = golos.transfer( ... to='ksantoprotein', amount='0.1', asset='GOLOS', from_account='someguy123', ... wif='5Jq19TeeVmGrBFnu32oxfxQMiipnSCKmwW7fZGUVLAoqsKJ9JwP', memo='this is an example transfer' ... ) >>> print('TXID:', tf['id'], 'Block:', tf['block_num']) TXID: c901c52daf57b60242d9d7be67f790e023cf2780 Block: 30895436
- Parameters
to (str) – The username of the account you want to send coins to
amount (Decimal) – The amount of coins to send, as either a
Decimal,str,intorfloatfrom_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 formatasset (str) – The asset (coin) to send (Default:
GOLOS(value ofDEFAULT_ASSET))memo (str) – An optional public message to attach to the transfer (Default:
''- empty string)kwargs – Any additional keyword arguments
- Return dict transfer
A dictionary containing info about the completed transfer, 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 )