curl --request GET \
--url 'https://api.sprinter.tech/credit/v2/accounts/0xUSER/assets/usdc/unlock?amount=1000000&collateral=0x833589fcd6edb6e08f4c7c32d4f71b54bda02913'
import requests
response = requests.get(
"https://api.sprinter.tech/credit/v2/accounts/0xUSER/assets/usdc/unlock",
params={"amount": "1000000", "collateral": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"}
)
print(response.json())
const response = await fetch(
"https://api.sprinter.tech/credit/v2/accounts/0xUSER/assets/usdc/unlock?amount=1000000&collateral=0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
);
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/unlock?amount=1000000&collateral=0x833589fcd6edb6e08f4c7c32d4f71b54bda02913")
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
{
"calls": [
{
"chain": "8453",
"to": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"data": "0x095ea7b3000000000000000000000000abcdef1234567890abcdef1234567890abcdef12",
"value": "0"
},
{
"chain": "8453",
"to": "0x1234567890abcdef1234567890abcdef12345678",
"data": "0x2e1a7d4d000000000000000000000000000000000000000000000000000000000005f5e100",
"value": "0"
}
]
}
Credit Actions
Unlock Collateral
Creates list of contract calls to unlock and withdraw collateral and potentially unwrap position from earn vault
GET
/
credit
/
v2
/
accounts
/
{account}
/
assets
/
{asset}
/
unlock
curl --request GET \
--url 'https://api.sprinter.tech/credit/v2/accounts/0xUSER/assets/usdc/unlock?amount=1000000&collateral=0x833589fcd6edb6e08f4c7c32d4f71b54bda02913'
import requests
response = requests.get(
"https://api.sprinter.tech/credit/v2/accounts/0xUSER/assets/usdc/unlock",
params={"amount": "1000000", "collateral": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"}
)
print(response.json())
const response = await fetch(
"https://api.sprinter.tech/credit/v2/accounts/0xUSER/assets/usdc/unlock?amount=1000000&collateral=0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
);
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/unlock?amount=1000000&collateral=0x833589fcd6edb6e08f4c7c32d4f71b54bda02913")
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
{
"calls": [
{
"chain": "8453",
"to": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"data": "0x095ea7b3000000000000000000000000abcdef1234567890abcdef1234567890abcdef12",
"value": "0"
},
{
"chain": "8453",
"to": "0x1234567890abcdef1234567890abcdef12345678",
"data": "0x2e1a7d4d000000000000000000000000000000000000000000000000000000000005f5e100",
"value": "0"
}
]
}
The
asset parameter is the credit asset symbol — currently supported values are usdc and eure. The collateral query parameter is the collateral asset address to unlock.curl --request GET \
--url 'https://api.sprinter.tech/credit/v2/accounts/0xUSER/assets/usdc/unlock?amount=1000000&collateral=0x833589fcd6edb6e08f4c7c32d4f71b54bda02913'
import requests
response = requests.get(
"https://api.sprinter.tech/credit/v2/accounts/0xUSER/assets/usdc/unlock",
params={"amount": "1000000", "collateral": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"}
)
print(response.json())
const response = await fetch(
"https://api.sprinter.tech/credit/v2/accounts/0xUSER/assets/usdc/unlock?amount=1000000&collateral=0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
);
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/unlock?amount=1000000&collateral=0x833589fcd6edb6e08f4c7c32d4f71b54bda02913")
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
{
"calls": [
{
"chain": "8453",
"to": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"data": "0x095ea7b3000000000000000000000000abcdef1234567890abcdef1234567890abcdef12",
"value": "0"
},
{
"chain": "8453",
"to": "0x1234567890abcdef1234567890abcdef12345678",
"data": "0x2e1a7d4d000000000000000000000000000000000000000000000000000000000005f5e100",
"value": "0"
}
]
}
Machine-readable API spec: OpenAPI JSON | Swagger UI