Create auto-sweep task
This operation creates an auto-sweep task for the specified wallet and token. The task triggers transactions to sweep the full balance of the specified token to the configured sweep-to address.
failed_reasons array of the auto-sweep task.status set to Submitted and an empty transaction_ids array; this is expected and does not indicate a failure. The transaction_ids array is populated only after status becomes TransactionCreated. To retrieve the transaction IDs, poll Get auto-sweep task details using the returned task_id until the status changes.Authorizations
The API key. For more details, refer to API key.
In the API playground, enter your API secret, and your API key will be accordingly calculated.
Body
The request body to create an auto-sweep task.
Wallet and token information required to create an auto-sweep task.
ID of the wallet where the token will be swept.
"f47ac10b-58cc-4372-a567-0e02b2c3d479"
ID of the token to be swept. You can retrieve the IDs of all the tokens you can use by calling List enabled tokens.
"ETH_USDT"
The minimum token balance threshold for auto sweep. If the token balance of an address is less than this threshold, the address will not be swept.
"0.01"
Response
Successfully created auto-sweep task.
Auto-sweep task information.
Auto-sweep task ID.
"aff0e1cb-15b2-4e1f-9b9d-a9133715986f"
Wallet ID.
"f47ac10b-58cc-4372-a567-0e02b2c3d479"
Token ID of the swept token. You can retrieve the IDs of all the tokens you can use by calling List enabled tokens.
"ETH_USDT"
Auto-sweep task status:
Submitted: The auto-sweep task has been submitted.TransactionCreated: The auto-sweep task triggered one or more token sweeping transactions.
Submitted, TransactionCreated "Submitted"
The time when the task was created, in Unix timestamp format, measured in milliseconds.
1610445878970
IDs of the transactions triggered by the task. This array is empty while the task status is Submitted, and is populated only after the status becomes TransactionCreated. Poll Get auto-sweep task details until the transaction IDs are available.
Reasons why the task creation failed.
The time when the task was updated, in Unix timestamp format, measured in milliseconds.
1610445878970
