Skip to main content
GET
/
auto_sweep
/
tasks
/
{task_id}
import cobo_waas2
from cobo_waas2.models.auto_sweep_task import AutoSweepTask
from cobo_waas2.rest import ApiException
from pprint import pprint

# See configuration.py for a list of all supported configurations.
configuration = cobo_waas2.Configuration(
    # Replace `<YOUR_PRIVATE_KEY>` with your private key
    api_private_key="<YOUR_PRIVATE_KEY>",
    # Select the development environment. To use the production environment, change the URL to https://api.cobo.com/v2.
    host="https://api.dev.cobo.com/v2",
)
# Enter a context with an instance of the API client
with cobo_waas2.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = cobo_waas2.AutoSweepApi(api_client)
    task_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479"

    try:
        # Get auto-sweep task details
        api_response = api_instance.get_auto_sweep_task_by_id(task_id)
        print("The response of AutoSweepApi->get_auto_sweep_task_by_id:\n")
        pprint(api_response)
    except Exception as e:
        print(
            "Exception when calling AutoSweepApi->get_auto_sweep_task_by_id: %s\n" % e
        )

{
  "task_id": "aff0e1cb-15b2-4e1f-9b9d-a9133715986f",
  "wallet_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "token_id": "ETH_USDT",
  "status": "Submitted",
  "transaction_ids": [
    "0011039d-27fb-49ba-b172-6e0aa80e37ec"
  ],
  "failed_reasons": [
    "exist pending transaction"
  ],
  "created_timestamp": 1610445878970,
  "updated_timestamp": 1610445878970
}
import cobo_waas2
from cobo_waas2.models.auto_sweep_task import AutoSweepTask
from cobo_waas2.rest import ApiException
from pprint import pprint

# See configuration.py for a list of all supported configurations.
configuration = cobo_waas2.Configuration(
    # Replace `<YOUR_PRIVATE_KEY>` with your private key
    api_private_key="<YOUR_PRIVATE_KEY>",
    # Select the development environment. To use the production environment, change the URL to https://api.cobo.com/v2.
    host="https://api.dev.cobo.com/v2",
)
# Enter a context with an instance of the API client
with cobo_waas2.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = cobo_waas2.AutoSweepApi(api_client)
    task_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479"

    try:
        # Get auto-sweep task details
        api_response = api_instance.get_auto_sweep_task_by_id(task_id)
        print("The response of AutoSweepApi->get_auto_sweep_task_by_id:\n")
        pprint(api_response)
    except Exception as e:
        print(
            "Exception when calling AutoSweepApi->get_auto_sweep_task_by_id: %s\n" % e
        )

Authorizations

BIZ-API-KEY
string
header
required

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.

Path Parameters

task_id
string<uuid>
required

The auto sweep task ID.

Response

Information about a auto-sweep task.

Auto-sweep task information.

task_id
string<uuid>
required

Auto-sweep task ID.

Example:

"aff0e1cb-15b2-4e1f-9b9d-a9133715986f"

wallet_id
string
required

Wallet ID.

Example:

"f47ac10b-58cc-4372-a567-0e02b2c3d479"

token_id
string
required

Token ID of the swept token. You can retrieve the IDs of all the tokens you can use by calling List enabled tokens.

Example:

"ETH_USDT"

status
enum<string>
required

Auto-sweep task status:

  • Submitted: The auto-sweep task has been submitted.
  • TransactionCreated: The auto-sweep task triggered one or more token sweeping transactions.
Available options:
Submitted,
TransactionCreated
Example:

"Submitted"

created_timestamp
integer
required

The time when the task was created, in Unix timestamp format, measured in milliseconds.

Example:

1610445878970

transaction_ids
string[]

IDs of the transactions triggered by the task.

failed_reasons
string[]

Reasons why the task creation failed.

updated_timestamp
integer

The time when the task was updated, in Unix timestamp format, measured in milliseconds.

Example:

1610445878970