chain.withdraw.v1.AutoWithdrawService
ListAutoWithdrawRuns
List the account's auto-withdraw runs with their payouts, newest first. An API key needs READ_AUTO_WITHDRAW in its policy and reads only its own account. Both refusals answer PERMISSION_DENIED: a key whose policy lacks the action gets "api key policy does not allow READ_AUTO_WITHDRAW", and a key that names an account other than its own, such as a root-account key naming a subaccount, gets "api key target scope mismatch".
Request
curl --request POST \ \
--url 'https://api.testnet.polyester.com/chain.withdraw.v1.AutoWithdrawService/ListAutoWithdrawRuns' \
--header 'Content-Type: application/json' \
--header 'Connect-Protocol-Version: 1' \
--data '{
"limit": 100,
"pageToken": "eyJvZmZzZXQiOjEwMH0",
"subaccountId": "6789012345678"
}'Responses
{
"nextPageToken": "eyJvZmZzZXQiOjIwMH0",
"runs": [
{
"createdAt": "2025-01-01T00:00:00Z",
"finishedAt": "2025-01-01T00:00:00Z",
"reason": "value",
"ruleVersion": 1,
"runSeq": "1",
"scheduledFor": "2025-01-01T00:00:00Z",
"state": "RUN_PLANNED",
"steps": [
{
"amountE18": {
"hi": "1",
"lo": "1"
},
"assetId": 100,
"availableE18": {
"hi": "1",
"lo": "1"
},
"destinationAddress": "0x3333333333333333333333333333333333333333",
"destinationChainId": "1",
"intentId": "9155001234567",
"reason": "value",
"state": "STEP_PENDING",
"txHash": "0xabc123def4567890abc123def4567890abc123def4567890abc123def4567890",
"valueUsdE18": {
"hi": "1",
"lo": "1"
}
}
]
}
]
}chain.withdraw.v1.ListAutoWithdrawRunsRequestchain.withdraw.v1.ListAutoWithdrawRunsResponsePublic subaccount ID; omit for the root account.
Maximum number of runs to return: 0 means 20, at most 100.
Opaque, exclusive, keyset-backed cursor from a previous response, bound to the caller's account or subaccount and the newest-first run_seq order. Empty for the first page.
The account's run number, increasing by one per run.
The rule version the run executes.
The scheduled slot the run belongs to.
Where the run stands.
Machine-readable reason for a skipped run: nothing_to_pay, price_unavailable (an asset was not paid because no current price valued it) or rule_superseded; empty otherwise.
Ledger asset paid.
External destination chain identifier.
Canonical destination address.
Most significant 64 bits.
Least significant 64 bits.
Most significant 64 bits.
Least significant 64 bits.
Where the payout stands.
Machine-readable reason for a skipped or failed step, such as below_minimum, price_unavailable (the rule has a USD minimum and no current price valued the asset; the funds stay for a later run), rule_superseded, destination_not_whitelisted, authority_revoked, gateway_capacity_insufficient (the funds stay for a later run), withdrawal_released or withdrawal_failed; empty otherwise.
Withdraw intent identifier once the withdrawal is accepted; follows the same lifecycle as a user withdrawal.
Destination-network transaction hash once the withdrawal completed.
Most significant 64 bits.
Least significant 64 bits.
When the run started.
When the run ended; unset while it is in progress.
Cursor for the next page. Empty when no more results exist.
| Key | HTTP status | Connect code | Error | When |
|---|---|---|---|---|
| account-shard-unavailable | 503 | unavailable | Account Shard Unavailable | The account shard cannot currently accept fund movement. |
| amount-below-minimum | 400 | invalid_argument | Amount Below Minimum | The withdraw amount is below the configured minimum including fees. |
| amount-exceeds-route-precision | 400 | invalid_argument | Amount Exceeds Route Precision | The withdraw amount has more decimal places than the destination network's token supports. |
| amount-exceeds-supply | 400 | invalid_argument | Amount Exceeds Supply | The withdraw amount exceeds the available zipped-asset supply. |
| api-key-binding-invalid | 403 | permission_denied | API Key Binding Invalid | API-key authorization binding verification failed. |
| api-key-binding-public-key-mismatch | 403 | permission_denied | API Key Binding Public Key Mismatch | The API-key authorization binding does not match the configured public key. |
| api-key-binding-scope-mismatch | 403 | permission_denied | API Key Binding Scope Mismatch | The API-key authorization binding does not cover the requested scope. |
| api-key-not-found | 403 | permission_denied | API Key Not Found | The API key could not be resolved. |
| auth-authentication-required | 401 | unauthenticated | Authentication Required | Authentication is required. |
| auth-session-kind-not-allowed | 403 | permission_denied | Interactive Session Required | This operation accepts only an interactive session; API keys are refused. |
| capital-view-unavailable | 503 | unavailable | Capital View Unavailable | The authoritative capital view is not ready. |
| chain-metadata-unavailable | 503 | unavailable | Chain Metadata Unavailable | Required chain or contract metadata is unavailable. |
| conflict | 409 | aborted | Conflict | The request conflicts with existing state. |
| destination-validation-unavailable | 503 | unavailable | Destination Validation Unavailable | Destination validation is temporarily unavailable. |
| external-destination-not-whitelisted | 403 | permission_denied | External Destination Not Whitelisted | The external destination is not whitelisted. |
| failed-precondition | 400 | failed_precondition | Failed Precondition | A required withdraw precondition was not satisfied. |
| fee-unavailable | 503 | unavailable | Fee Unavailable | Required network fee data is unavailable. |
| funds-lock-conflict | 409 | aborted | Funds Lock Conflict | The funds lock conflicts with an existing or finalized reservation. |
| idempotency-conflict | 409 | already_exists | Idempotency Conflict | The idempotency key was reused with different request data. |
| insufficient-funds | 400 | failed_precondition | Insufficient Funds | The source account does not have enough available Trading balance. |
| internal-error | 500 | internal | Internal Error | The withdraw failed because of an unexpected server error. |
| internal-recipient-not-whitelisted | 403 | permission_denied | Internal Recipient Not Whitelisted | The internal funding recipient is not whitelisted. |
| invalid-action | 400 | invalid_argument | Invalid Withdraw Action | The withdraw action is invalid for this endpoint. |
| invalid-amount | 400 | invalid_argument | Invalid Amount | The withdraw amount is invalid. |
| invalid-auto-withdraw-schedule | 400 | invalid_argument | Invalid Auto-Withdraw Schedule | The auto-withdraw schedule is invalid for its cadence. |
| invalid-destination-address | 400 | invalid_argument | Invalid Destination Address | The destination address is invalid. |
| invalid-destination-chain | 400 | invalid_argument | Invalid Destination Chain | The destination chain is invalid. |
| invalid-request | 400 | invalid_argument | Invalid Request | The request payload or one of its fields is invalid. |
| invalid-subaccount-id | 400 | invalid_argument | Invalid Subaccount | The selected subaccount identifier is invalid. |
| not-found | 404 | not_found | Not Found | The requested resource was not found. |
| permission-denied | 403 | permission_denied | Permission Denied | The caller is not permitted to perform this withdraw operation. |
| rate-limit-exceeded | 429 | resource_exhausted | Rate Limit Exceeded | The withdraw admission rate limit was exceeded. |
| service-unavailable | 503 | unavailable | Service Unavailable | A required service is temporarily unavailable. |
| signature-required | 400 | invalid_argument | Signature Required | A payload signature is required. |
| signature-scheme-unsupported | 400 | invalid_argument | Signature Scheme Unsupported | The signature scheme is unsupported. |
| signer-wallet-invalid | 400 | invalid_argument | Invalid Signer Wallet | The signer wallet is invalid. |
| source-smart-account-unavailable | 400 | failed_precondition | Source Smart Account Unavailable | The source smart-account address is unavailable. |
| step-up-unavailable | 503 | unavailable | Step-Up Unavailable | Fresh step-up verification is temporarily unavailable. |
| subaccount-not-found | 404 | not_found | Subaccount Not Found | The selected subaccount does not exist. |
| supply-unavailable | 503 | unavailable | Supply Unavailable | Required zipped-asset supply data is unavailable. |
| unauthenticated | 401 | unauthenticated | Unauthenticated | Authentication is required. |
| unsupported-asset | 400 | invalid_argument | Unsupported Asset | The requested asset or withdraw route is not supported. |
| unsupported-ledger | 400 | invalid_argument | Unsupported Ledger | The requested ledger is not supported for withdrawals. |
| wallet-binding-invalid | 403 | permission_denied | Wallet Binding Invalid | Wallet authorization binding verification failed. |
| wallet-binding-scope-mismatch | 403 | permission_denied | Wallet Binding Scope Mismatch | The wallet authorization binding does not cover the requested scope. |
| wallet-binding-signer-mismatch | 403 | permission_denied | Wallet Binding Signer Mismatch | The wallet authorization binding does not match the signer. |