TradeResult

Documentation for eth_defi.trade.TradeResult Python class.

class TradeResult[source]

A base class for Success/Fail trade result.

Attributes summary

gas_used

How many units of gas we burned

effective_gas_price

What as the gas price used in wei.

Methods summary

__init__(gas_used, effective_gas_price)

get_cost_of_gas()

This will return the gas cost of the transaction in blockchain's native currency e.g.

get_effective_gas_price_gwei()

gas_used: int

How many units of gas we burned

effective_gas_price: int

What as the gas price used in wei. Set to 0 if not available.

get_cost_of_gas()[source]

This will return the gas cost of the transaction in blockchain’s native currency e.g. in ETH on Ethereum.

Return type

decimal.Decimal

__init__(gas_used, effective_gas_price)
Parameters
  • gas_used (int) –

  • effective_gas_price (int) –

Return type

None