curl --request GET \
--url 'https://api.sprinter.tech/credit/v2/accounts/0xUSER/assets/usdc/operator/auto-topup/update?receiver=0xRECEIVER&threshold=500000000&targetBalance=1000000000'
import requests
response = requests.get(
"https://api.sprinter.tech/credit/v2/accounts/0xUSER/assets/usdc/operator/auto-topup/update",
params={"receiver": "0xRECEIVER", "threshold": "500000000", "targetBalance": "1000000000"}
)
print(response.json())
const response = await fetch(
"https://api.sprinter.tech/credit/v2/accounts/0xUSER/assets/usdc/operator/auto-topup/update?receiver=0xRECEIVER&threshold=500000000&targetBalance=1000000000"
);
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
resp, _ := http.Get("https://api.sprinter.tech/credit/v2/accounts/0xUSER/assets/usdc/operator/auto-topup/update?receiver=0xRECEIVER&threshold=500000000&targetBalance=1000000000")
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
{
"calls": [
{
"chain": "8453",
"to": "0x1234567890abcdef1234567890abcdef12345678",
"data": "0xa9059cbb000000000000000000000000000000000000000000000000000000000005f5e100",
"value": "0"
}
]
}
Credit Advanced
Update Auto Top-Up
Builds calldata to update an existing auto top-up configuration.
GET
/
credit
/
v2
/
accounts
/
{account}
/
assets
/
{asset}
/
operator
/
auto-topup
/
update
curl --request GET \
--url 'https://api.sprinter.tech/credit/v2/accounts/0xUSER/assets/usdc/operator/auto-topup/update?receiver=0xRECEIVER&threshold=500000000&targetBalance=1000000000'
import requests
response = requests.get(
"https://api.sprinter.tech/credit/v2/accounts/0xUSER/assets/usdc/operator/auto-topup/update",
params={"receiver": "0xRECEIVER", "threshold": "500000000", "targetBalance": "1000000000"}
)
print(response.json())
const response = await fetch(
"https://api.sprinter.tech/credit/v2/accounts/0xUSER/assets/usdc/operator/auto-topup/update?receiver=0xRECEIVER&threshold=500000000&targetBalance=1000000000"
);
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
resp, _ := http.Get("https://api.sprinter.tech/credit/v2/accounts/0xUSER/assets/usdc/operator/auto-topup/update?receiver=0xRECEIVER&threshold=500000000&targetBalance=1000000000")
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
{
"calls": [
{
"chain": "8453",
"to": "0x1234567890abcdef1234567890abcdef12345678",
"data": "0xa9059cbb000000000000000000000000000000000000000000000000000000000005f5e100",
"value": "0"
}
]
}
The
asset parameter is the credit asset symbol — currently supported values are usdc and eure. The threshold and targetBalance are in wei. healthFactor is in basis points (10000 = 1.0).curl --request GET \
--url 'https://api.sprinter.tech/credit/v2/accounts/0xUSER/assets/usdc/operator/auto-topup/update?receiver=0xRECEIVER&threshold=500000000&targetBalance=1000000000'
import requests
response = requests.get(
"https://api.sprinter.tech/credit/v2/accounts/0xUSER/assets/usdc/operator/auto-topup/update",
params={"receiver": "0xRECEIVER", "threshold": "500000000", "targetBalance": "1000000000"}
)
print(response.json())
const response = await fetch(
"https://api.sprinter.tech/credit/v2/accounts/0xUSER/assets/usdc/operator/auto-topup/update?receiver=0xRECEIVER&threshold=500000000&targetBalance=1000000000"
);
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
resp, _ := http.Get("https://api.sprinter.tech/credit/v2/accounts/0xUSER/assets/usdc/operator/auto-topup/update?receiver=0xRECEIVER&threshold=500000000&targetBalance=1000000000")
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
{
"calls": [
{
"chain": "8453",
"to": "0x1234567890abcdef1234567890abcdef12345678",
"data": "0xa9059cbb000000000000000000000000000000000000000000000000000000000005f5e100",
"value": "0"
}
]
}
Machine-readable API spec: OpenAPI JSON | Swagger UI
Path Parameters
User account address
Credit asset symbol (e.g. usdc, eure)
Query Parameters
Receiver address whose config is being updated
New balance threshold that triggers top-up (in wei)
New target balance after top-up (in wei, must be >= threshold)
Minimum health factor in basis points (10000 = 1.0)
Response
200 - application/json
Calldata to update auto top-up