JSONAssetDelta#

API documentation for tradeexecutor.state.blockhain_transaction.JSONAssetDelta Python class in Trading Strategy framework.

class JSONAssetDelta[source]#

Bases: object

JSON serialisable asset delta.

Used for diagnostics purposes only.

See eth_defi.tx.AssetDelta for more information.

__init__(asset, raw_amount)#
Parameters:
  • asset (str) –

  • raw_amount (str) –

Return type:

None

Methods

__init__(asset, raw_amount)

from_asset_delta(source)

from_dict(kvs, *[, infer_missing])

from_json(s, *[, parse_float, parse_int, ...])

schema(*[, infer_missing, only, exclude, ...])

to_dict([encode_json])

to_json(*[, skipkeys, ensure_ascii, ...])

Attributes

asset

Address of ERC-20

raw_amount

Integer as string serialisation.

int_amount

Convert token amount back to int.

asset: str#

Address of ERC-20

raw_amount: str#

Integer as string serialisation.

Because JSON cannot handle big ints.

property int_amount: int#

Convert token amount back to int.

__init__(asset, raw_amount)#
Parameters:
  • asset (str) –

  • raw_amount (str) –

Return type:

None