format#

API documentation for tradingstrategy.utils.format Python module in Trading Strategy.

Module description#

Value formatting utilities.

Functions#

format_duration_days_hours_mins(d)

format_percent(v)

format_percent_2_decimals(v)

format_price(v)

Crypto prices in dollars may have significant decimals up to 6 decimal points

format_value(v)

Format US dollar trade value, assume value significantly > $1 dollar.

string_to_eth_address(input_string)

Convert a string to an Ethereum address deterministically.