Create a managed balance refill policy
appIdbearerAuthx-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.
AuthorizationBearer <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.
application/json- body
targetChainId*integertargetTokenSymbol?"USDC""USDC"minimumRaw*stringRefill when the target-chain balance falls below this. USD in 6-decimal atomic units, as an integer string (1000000 = $1.00).
^[1-9][0-9]*$refillAmountRaw*stringAmount to deliver per refill. USD in 6-decimal atomic units, as an integer string (1000000 = $1.00).
^[1-9][0-9]*$dailyCapRaw?stringDaily refill limit in 6-decimal USD units. Defaults to $1,002.
^[1-9][0-9]*$"1002000000"maxFeeRaw?stringPer-refill fee limit in 6-decimal USD units. Defaults to $2.
^[1-9][0-9]*$"2000000"201
application/json- response
id*stringPolicy id.
targetChainId*integerChain kept topped up.
targetTokenAddress*stringUSDC contract on that chain.
targetTokenSymbol*"USDC"Always USDC.
"USDC"minimumRaw*stringRefill when the target-chain balance falls below this. USD in 6-decimal atomic units, as an integer string (1000000 = $1.00).
^[1-9][0-9]*$refillAmountRaw*stringAmount to deliver per refill. USD in 6-decimal atomic units, as an integer string (1000000 = $1.00).
^[1-9][0-9]*$dailyCapRaw*stringMost that can be refilled per day. USD in 6-decimal atomic units, as an integer string (1000000 = $1.00).
^[1-9][0-9]*$maxFeeRaw*stringMost one refill may pay in transfer fees. USD in 6-decimal atomic units, as an integer string (1000000 = $1.00).
^[1-9][0-9]*$status*stringenabled: refills run. paused: no refills until re-enabled.
"enabled""paused"cooldownSeconds*integerMinimum seconds between refills.
60 <= valuelastObservedRaw*stringTarget-chain balance at the last check. USD in 6-decimal atomic units, as an integer string (1000000 = $1.00).
^[0-9]+$lastEvaluatedAt*stringWhen the balance was last checked.
date-timenextEligibleAt*stringEarliest time the next refill may run.
date-timeconsentedAt*stringWhen the user consented.
date-timecreatedAt*stringCreation time.
date-timeupdatedAt*stringTime of the last change.
date-timelatestAttempt*Most recent refill attempt, if any.
curl -X POST 'https://api.t.sufwankhalid.com/execution/balance-refill-policies' \ -H 'Content-Type: application/json' \ -d '{ "targetChainId": 0, "minimumRaw": "string", "refillAmountRaw": "string"}'{ "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" }}