curl --request GET \
--url 'https://api.sprinter.tech/credit/earn/wrap?owner=0xUSER&amount=1000000&asset=0x833589fcd6edb6e08f4c7c32d4f71b54bda02913&chain=eip155:8453&earn=gauntlet-usdc-prime'
import requests
response = requests.get(
"https://api.sprinter.tech/credit/earn/wrap",
params={
"owner": "0xUSER",
"amount": "1000000",
"asset": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"chain": "eip155:8453",
"earn": "gauntlet-usdc-prime"
}
)
print(response.json())
const response = await fetch(
"https://api.sprinter.tech/credit/earn/wrap?owner=0xUSER&amount=1000000&asset=0x833589fcd6edb6e08f4c7c32d4f71b54bda02913&chain=eip155:8453&earn=gauntlet-usdc-prime"
);
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/earn/wrap?owner=0xUSER&amount=1000000&asset=0x833589fcd6edb6e08f4c7c32d4f71b54bda02913&chain=eip155:8453&earn=gauntlet-usdc-prime")
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
{
"amountOut": "999850000000000000000",
"calls": [
{
"chain": "8453",
"to": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"data": "0x095ea7b3000000000000000000000000abcdef1234567890abcdef1234567890abcdef12",
"value": "0"
},
{
"chain": "8453",
"to": "0x1234567890abcdef1234567890abcdef12345678",
"data": "0x2e1a7d4d000000000000000000000000000000000000000000000000000000000005f5e100",
"value": "0"
}
],
"tokenOut": "0xeE8F4eC5672F09119b96Ab6fB59C27E1b7e44b61"
}
Credit Advanced
Wrap into Earn Vault
Creates a list of contract calls (approve + deposit) to wrap an underlying token into an earn vault and receive vault shares.
GET
/
credit
/
earn
/
wrap
curl --request GET \
--url 'https://api.sprinter.tech/credit/earn/wrap?owner=0xUSER&amount=1000000&asset=0x833589fcd6edb6e08f4c7c32d4f71b54bda02913&chain=eip155:8453&earn=gauntlet-usdc-prime'
import requests
response = requests.get(
"https://api.sprinter.tech/credit/earn/wrap",
params={
"owner": "0xUSER",
"amount": "1000000",
"asset": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"chain": "eip155:8453",
"earn": "gauntlet-usdc-prime"
}
)
print(response.json())
const response = await fetch(
"https://api.sprinter.tech/credit/earn/wrap?owner=0xUSER&amount=1000000&asset=0x833589fcd6edb6e08f4c7c32d4f71b54bda02913&chain=eip155:8453&earn=gauntlet-usdc-prime"
);
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/earn/wrap?owner=0xUSER&amount=1000000&asset=0x833589fcd6edb6e08f4c7c32d4f71b54bda02913&chain=eip155:8453&earn=gauntlet-usdc-prime")
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
{
"amountOut": "999850000000000000000",
"calls": [
{
"chain": "8453",
"to": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"data": "0x095ea7b3000000000000000000000000abcdef1234567890abcdef1234567890abcdef12",
"value": "0"
},
{
"chain": "8453",
"to": "0x1234567890abcdef1234567890abcdef12345678",
"data": "0x2e1a7d4d000000000000000000000000000000000000000000000000000000000005f5e100",
"value": "0"
}
],
"tokenOut": "0xeE8F4eC5672F09119b96Ab6fB59C27E1b7e44b61"
}
The
chain parameter uses CAIP-2 format: eip155:<chainId>. For example, eip155:8453 for Base. See Supported Chains for the full list.curl --request GET \
--url 'https://api.sprinter.tech/credit/earn/wrap?owner=0xUSER&amount=1000000&asset=0x833589fcd6edb6e08f4c7c32d4f71b54bda02913&chain=eip155:8453&earn=gauntlet-usdc-prime'
import requests
response = requests.get(
"https://api.sprinter.tech/credit/earn/wrap",
params={
"owner": "0xUSER",
"amount": "1000000",
"asset": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"chain": "eip155:8453",
"earn": "gauntlet-usdc-prime"
}
)
print(response.json())
const response = await fetch(
"https://api.sprinter.tech/credit/earn/wrap?owner=0xUSER&amount=1000000&asset=0x833589fcd6edb6e08f4c7c32d4f71b54bda02913&chain=eip155:8453&earn=gauntlet-usdc-prime"
);
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/earn/wrap?owner=0xUSER&amount=1000000&asset=0x833589fcd6edb6e08f4c7c32d4f71b54bda02913&chain=eip155:8453&earn=gauntlet-usdc-prime")
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
{
"amountOut": "999850000000000000000",
"calls": [
{
"chain": "8453",
"to": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"data": "0x095ea7b3000000000000000000000000abcdef1234567890abcdef1234567890abcdef12",
"value": "0"
},
{
"chain": "8453",
"to": "0x1234567890abcdef1234567890abcdef12345678",
"data": "0x2e1a7d4d000000000000000000000000000000000000000000000000000000000005f5e100",
"value": "0"
}
],
"tokenOut": "0xeE8F4eC5672F09119b96Ab6fB59C27E1b7e44b61"
}
Machine-readable API spec: OpenAPI JSON | Swagger UI
Query Parameters
Account providing the underlying asset
Amount of underlying asset to wrap
Underlying token address
Earn strategy identifier
Chain CAIP-2 identifier
⌘I