execution#

tradeexecutor.ethereum.execution Python module in Trading Strategy framework.

Module description#

Dealing with Ethereum low level tranasctions.

Classes#

EthereumExecutionModel

Run order execution on a single Uniswap v2 style exchanges.

Functions#

approve_infinity(web3, deployment, ...)

Approve multiple ERC-20 token allowances for the trades needed.

approve_tokens(web3, deployment, hot_wallet, ...)

Approve multiple ERC-20 token allowances for the trades needed.

broadcast(web3, ts, instructions[, ...])

Broadcast multiple transations and manage the trade executor state for them.

confirm_approvals(web3, txs[, ...])

Wait until all transactions are confirmed.

get_held_assets(web3, address, assets)

Get list of assets hold by the a wallet .

get_swap_transactions(trade)

Get the swap transaction from multiple transactions associated with the trade

is_swap_function(name)

prepare_swaps(web3, hot_wallet, uniswap, ts, ...)

Prepare multiple swaps to be breoadcasted parallel from the hot wallet.

report_failure(ts, state, trade, ...)

What to do if trade fails

translate_to_naive_swap(web3, deployment, ...)

Creates an AMM swap tranasction out of buy/sell.

update_confirmation_status(web3, ts, tx_map, ...)

First update the state of all transactions, as we now have receipt for them.

wait_trades_to_complete(web3, trades[, ...])

Watch multiple transactions executed at parallel.