Package nxt.http

Class StartFundingMonitor


  • public final class StartFundingMonitor
    extends APIServlet.APIRequestHandler
    Start a funding monitor

    A funding monitor will transfer NXT, ASSET or CURRENCY from the funding account to a recipient account when the amount held by the recipient account drops below the threshold. The transfer will not be done until the current block height is greater than equal to the block height of the last transfer plus the interval. Holding type codes are listed in getConstants. The asset or currency is specified by the holding identifier.

    The funding account is identified by the secret phrase. The secret phrase must be specified since the funding monitor needs to sign the transactions that it submits.

    The recipient accounts are identified by the specified account property. Each account that has this property set by the funding account will be monitored for changes. The property value can be omitted or it can consist of a JSON string containing one or more values in the format: {"amount":long,"threshold":long,"interval":integer}

    The long values can be specified as numeric values or as strings.

    For example, {"amount":25,"threshold":10,"interval":1440}. The specified values will override the default values specified when the account monitor is started.

    NXT amounts are specified with 8 decimal places. Asset and Currency decimal places are determined by the asset or currency definition.