# fromSun Helper function that will convert a value in SUN to TRX (1 SUN = 0.000001 TRX). If you want to convert a value in TRX to SUN, `toSun` is available. ### Usage ```JavaScript TronWeb.fromSun(value) ``` ### Parameters | Parameter | Description | Data Type | | --------- | ------------ | --------- | | value | The value in SUN | String | ### Returns String ### Example ```JavaScript > TronWeb.fromSun("1000000") > '1' ```