Preview the estimated borrowing quote before requesting credit.
GETliquidity/chain/:sourceChainId/protocol/:protocol/type/:type/quote
Borrow quote overview
A borrow quote is the preliminary estimated fee a solver would incur to borrow credit from Sprinter Stash. It is returned off-chain via the Stash API and helps solvers determine if pursuing a fill is profitable.
Borrow quote includes expected gas, risk premiums, protocol fees, and capital access costs — but it is not a binding or reserved price. This can be based on input or output amount.
See the Request a Credit Borrow Quote Estimate example payload.
Request
Responses
- 200
- 400
- 500
Successfully retrieved borrow quote".
Bad request due to invalid input or missing parameters".
Internal server error".
Example Borrow Quote payload
Request Borrow Quote Estimate with type ExactInput (input amount - borrow costs)
const baseUrl = "https://api.sprinter.tech";
const sourceChainId = "eip155:8453"; // eip155:8453(Base), eip155:10 (Optimism), eip155:42161 (Arbitrum). ChainId must use capid format from our configuration
const protocol = "across"; // "across" or "mayan"
const type = "ExactInput"; // Request will consider the amount as (input amount - borrow costs)
const amount = 10000000; // This is the ExactInput eg 1 USDC (6 decimals)
const response = await fetch(
`${baseUrl}/liquidity/chain/${sourceChainId}/protocol/${protocol}/type/${type}/quote`,
{
method: "GET",
headers: {
"X-Auth-Token": "<your_api_key>",
},
body: {
amount: amount,
token: "destination_token_address", // Token address
network: "eip155:10", // Destination_Chain_ID
},
},
);
const borrowQuote = await response.json();
console.log("Expected amount:", borrowQuote.expectedOutput);
console.log("Borrow Cost:", borrowQuote.borrowCost);
Request Final Borrow Quote Estimate with type ExactOutput (output amount + borrow costs)
const baseUrl = "https://api.sprinter.tech";
const sourceChainId = "eip155:8453"; // eip155:8453(Base), eip155:10 (Optimism), eip155:42161 (Arbitrum). ChainId must use capid format from our configuration
const protocol = "across"; // "across" or "mayan"
const type = "ExactOutput"; // Request will consider the amount as (output amount + borrow costs)
const amount = 10000000; // This is the ExactInput eg 1 USDC (6 decimals)
const response = await fetch(
`${baseUrl}/liquidity/chain/${sourceChainId}/protocol/${protocol}/type/${type}/quote`,
{
method: "GET",
headers: {
"X-Auth-Token": "<your_api_key>",
},
body: {
amount: amount,
token: "destination_token_address", // Token address
network: "eip155:10", // Destination_Chiain_ID
},
},
);
const borrowQuote = await response.json();
console.log("Expected Input:", borrowQuote.requiredInput);
console.log("Borrow Cost:", borrowQuote.borrowCost);