curl --request GET \
--url 'https://api.sprinter.tech/credit/v2/accounts/0xUSER/assets/usdc/draw?amount=1000000&receiver=0xRECEIVER'
import requests
response = requests.get(
"https://api.sprinter.tech/credit/v2/accounts/0xUSER/assets/usdc/draw",
params={"amount": "1000000", "receiver": "0xRECEIVER"}
)
print(response.json())
const response = await fetch(
"https://api.sprinter.tech/credit/v2/accounts/0xUSER/assets/usdc/draw?amount=1000000&receiver=0xRECEIVER"
);
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/draw?amount=1000000&receiver=0xRECEIVER")
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
{
"calls": [
{
"chain": "8453",
"to": "0x1234567890abcdef1234567890abcdef12345678",
"data": "0xa9059cbb000000000000000000000000000000000000000000000000000000000005f5e100",
"value": "0"
}
]
}
Credit Actions
Draw Credit
Returns the calls needed to draw credit. If the user has sufficient registered collateral, the drawCredit call is returned.
GET
/
credit
/
v2
/
accounts
/
{account}
/
assets
/
{asset}
/
draw
curl --request GET \
--url 'https://api.sprinter.tech/credit/v2/accounts/0xUSER/assets/usdc/draw?amount=1000000&receiver=0xRECEIVER'
import requests
response = requests.get(
"https://api.sprinter.tech/credit/v2/accounts/0xUSER/assets/usdc/draw",
params={"amount": "1000000", "receiver": "0xRECEIVER"}
)
print(response.json())
const response = await fetch(
"https://api.sprinter.tech/credit/v2/accounts/0xUSER/assets/usdc/draw?amount=1000000&receiver=0xRECEIVER"
);
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/draw?amount=1000000&receiver=0xRECEIVER")
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. A 0.50% origination fee is deducted from each draw. See Fees for details.curl --request GET \
--url 'https://api.sprinter.tech/credit/v2/accounts/0xUSER/assets/usdc/draw?amount=1000000&receiver=0xRECEIVER'
import requests
response = requests.get(
"https://api.sprinter.tech/credit/v2/accounts/0xUSER/assets/usdc/draw",
params={"amount": "1000000", "receiver": "0xRECEIVER"}
)
print(response.json())
const response = await fetch(
"https://api.sprinter.tech/credit/v2/accounts/0xUSER/assets/usdc/draw?amount=1000000&receiver=0xRECEIVER"
);
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/draw?amount=1000000&receiver=0xRECEIVER")
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 (borrower)
Credit asset symbol (e.g. usdc, eure)
Query Parameters
Amount to borrow (in wei)
Address to receive the borrowed funds
Response
List of contract calls to execute drawing credit
Show child attributes
Show child attributes