Funding

Update or pause a managed balance refill policy

PATCH
/execution/balance-refill-policies/{policyId}

Authorization

appIdbearerAuth
headerx-app-id<token>

Your application ID. Required on app-tier and user-tier routes. Omitted on routes that authenticate with x-app-api-key only.

headerAuthorizationBearer <JWT>

JWT access token from POST /auth/verify. Required with x-app-id on user routes. On the smart-route quote it is optional and turns a preview into an executable quote.

Path Parameters

policyId*string

Request Body

application/json
  1. body
minimumRaw?string

Refill when the target-chain balance falls below this. USD in 6-decimal atomic units, as an integer string (1000000 = $1.00).

Match^[1-9][0-9]*$
refillAmountRaw?string

Amount to deliver per refill. USD in 6-decimal atomic units, as an integer string (1000000 = $1.00).

Match^[1-9][0-9]*$
dailyCapRaw?string

Most that can be refilled per day. USD in 6-decimal atomic units, as an integer string (1000000 = $1.00).

Match^[1-9][0-9]*$
maxFeeRaw?string

Most one refill may pay in transfer fees. USD in 6-decimal atomic units, as an integer string (1000000 = $1.00).

Match^[1-9][0-9]*$
status?string

enabled: refills run. paused: no refills until re-enabled.

Value in"enabled""paused"

Response Body

200

application/json
  1. response
id*string

Policy id.

targetChainId*integer

Chain kept topped up.

targetTokenAddress*string

USDC contract on that chain.

targetTokenSymbol*"USDC"

Always USDC.

Value in"USDC"
minimumRaw*string

Refill when the target-chain balance falls below this. USD in 6-decimal atomic units, as an integer string (1000000 = $1.00).

Match^[1-9][0-9]*$
refillAmountRaw*string

Amount to deliver per refill. USD in 6-decimal atomic units, as an integer string (1000000 = $1.00).

Match^[1-9][0-9]*$
dailyCapRaw*string

Most that can be refilled per day. USD in 6-decimal atomic units, as an integer string (1000000 = $1.00).

Match^[1-9][0-9]*$
maxFeeRaw*string

Most one refill may pay in transfer fees. USD in 6-decimal atomic units, as an integer string (1000000 = $1.00).

Match^[1-9][0-9]*$
status*string

enabled: refills run. paused: no refills until re-enabled.

Value in"enabled""paused"
cooldownSeconds*integer

Minimum seconds between refills.

Range60 <= value
lastObservedRaw*string

Target-chain balance at the last check. USD in 6-decimal atomic units, as an integer string (1000000 = $1.00).

Match^[0-9]+$
lastEvaluatedAt*string

When the balance was last checked.

Formatdate-time
nextEligibleAt*string

Earliest time the next refill may run.

Formatdate-time
consentedAt*string

When the user consented.

Formatdate-time
createdAt*string

Creation time.

Formatdate-time
updatedAt*string

Time of the last change.

Formatdate-time
latestAttempt*

Most recent refill attempt, if any.

Example Request
curl -X PATCH 'https://api.t.sufwankhalid.com/execution/balance-refill-policies/string' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "id": "string",  "targetChainId": 0,  "targetTokenAddress": "string",  "targetTokenSymbol": "USDC",  "minimumRaw": "string",  "refillAmountRaw": "string",  "dailyCapRaw": "string",  "maxFeeRaw": "string",  "status": "enabled",  "cooldownSeconds": 60,  "lastObservedRaw": "string",  "lastEvaluatedAt": "2019-08-24T14:15:22Z",  "nextEligibleAt": "2019-08-24T14:15:22Z",  "consentedAt": "2019-08-24T14:15:22Z",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "latestAttempt": {    "id": "string",    "policyId": "string",    "status": "reserved",    "triggerBalanceRaw": "string",    "requestedDeliveryRaw": "string",    "sourceAmountRaw": "string",    "completedAmountRaw": "string",    "sourceChainId": 0,    "targetChainId": 0,    "feeRaw": "string",    "errorMessage": "string",    "startedAt": "2019-08-24T14:15:22Z",    "completedAt": "2019-08-24T14:15:22Z",    "createdAt": "2019-08-24T14:15:22Z"  }}