curl --request POST \
--url https://platform.spritz.finance/v1/off-ramp-quotes/{quoteId}/transaction \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"senderAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f2bD18",
"feePayer": "5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d"
}
'import requests
url = "https://platform.spritz.finance/v1/off-ramp-quotes/{quoteId}/transaction"
payload = {
"senderAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f2bD18",
"feePayer": "5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
senderAddress: '0x742d35Cc6634C0532925a3b844Bc9e7595f2bD18',
feePayer: '5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d'
})
};
fetch('https://platform.spritz.finance/v1/off-ramp-quotes/{quoteId}/transaction', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://platform.spritz.finance/v1/off-ramp-quotes/{quoteId}/transaction",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'senderAddress' => '0x742d35Cc6634C0532925a3b844Bc9e7595f2bD18',
'feePayer' => '5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://platform.spritz.finance/v1/off-ramp-quotes/{quoteId}/transaction"
payload := strings.NewReader("{\n \"senderAddress\": \"0x742d35Cc6634C0532925a3b844Bc9e7595f2bD18\",\n \"feePayer\": \"5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://platform.spritz.finance/v1/off-ramp-quotes/{quoteId}/transaction")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"senderAddress\": \"0x742d35Cc6634C0532925a3b844Bc9e7595f2bD18\",\n \"feePayer\": \"5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.spritz.finance/v1/off-ramp-quotes/{quoteId}/transaction")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"senderAddress\": \"0x742d35Cc6634C0532925a3b844Bc9e7595f2bD18\",\n \"feePayer\": \"5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d\"\n}"
response = http.request(request)
puts response.read_body{
"type": "evm",
"chain": "ethereum",
"inputToken": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"outputToken": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"requiredTokenInput": "100000000",
"contractAddress": "0xbF7Abc15f00a8C2d6b13A952c58d12b7c194A8D0",
"calldata": "0xd71d9632...",
"method": "payWithToken",
"value": "0"
}{
"title": "Unauthorized",
"status": 401,
"type": "urn:problem-type:auth:unauthorized",
"detail": "Bearer token required",
"instance": "<string>",
"realm": "API",
"scope": "read:users"
}{
"title": "<string>",
"status": 404,
"resourceType": "user",
"resourceId": "<string>",
"type": "about:blank",
"detail": "<string>",
"instance": "<string>"
}{
"title": "Unauthorized",
"status": 400,
"type": "urn:problem-type:auth:unauthorized",
"detail": "<string>",
"instance": "/errors/1234567890",
"code": "transaction_limit",
"field": "amountUsd",
"retryable": true,
"retryAfter": 5,
"suggestedAction": "auto_ramp",
"clearsAt": "2023-11-07T05:31:56Z",
"availableAt": "2023-11-07T05:31:56Z",
"permanent": true,
"reason": "crypto_released"
}{
"title": "Unauthorized",
"status": 400,
"type": "urn:problem-type:auth:unauthorized",
"detail": "<string>",
"instance": "/errors/1234567890",
"code": "transaction_limit",
"field": "amountUsd",
"retryable": true,
"retryAfter": 5,
"suggestedAction": "auto_ramp",
"clearsAt": "2023-11-07T05:31:56Z",
"availableAt": "2023-11-07T05:31:56Z",
"permanent": true,
"reason": "crypto_released"
}{
"title": "Unauthorized",
"status": 400,
"type": "urn:problem-type:auth:unauthorized",
"detail": "<string>",
"instance": "/errors/1234567890",
"code": "transaction_limit",
"field": "amountUsd",
"retryable": true,
"retryAfter": 5,
"suggestedAction": "auto_ramp",
"clearsAt": "2023-11-07T05:31:56Z",
"availableAt": "2023-11-07T05:31:56Z",
"permanent": true,
"reason": "crypto_released"
}{
"title": "Unauthorized",
"status": 400,
"type": "urn:problem-type:auth:unauthorized",
"detail": "<string>",
"instance": "/errors/1234567890",
"code": "transaction_limit",
"field": "amountUsd",
"retryable": true,
"retryAfter": 5,
"suggestedAction": "auto_ramp",
"clearsAt": "2023-11-07T05:31:56Z",
"availableAt": "2023-11-07T05:31:56Z",
"permanent": true,
"reason": "crypto_released"
}{
"title": "Unauthorized",
"status": 400,
"type": "urn:problem-type:auth:unauthorized",
"detail": "<string>",
"instance": "/errors/1234567890",
"code": "transaction_limit",
"field": "amountUsd",
"retryable": true,
"retryAfter": 5,
"suggestedAction": "auto_ramp",
"clearsAt": "2023-11-07T05:31:56Z",
"availableAt": "2023-11-07T05:31:56Z",
"permanent": true,
"reason": "crypto_released"
}Get transaction params for a quote
Returns transaction parameters for a sign_transaction quote. Use these to construct, sign, and submit the on-chain transaction.
Returns EVM calldata, or a serialized Solana or Sui transaction, depending on the quote’s chain. Solana and Sui transactions are built for senderAddress, so pass it.
Each call builds a new transaction, so a Solana transaction whose blockhash expired can be rebuilt on the same quote. Rebuild only once the previous transaction can no longer land. Once the quote is no longer created (a transaction was submitted or confirmed), this returns 409 with code: "quote_not_open" and the current quoteStatus.
A Solana swap is simulated before it is returned. When the sender wallet cannot cover it, this returns 422 with code: "insufficient_sol_balance" (SOL for the swap, token account setup and network fees) or "insufficient_token_balance" and retryable: false: fund the wallet or quote a smaller amount. Any other simulation failure returns 502 with code: "swap_simulation_failed" and retryable: true.
curl --request POST \
--url https://platform.spritz.finance/v1/off-ramp-quotes/{quoteId}/transaction \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"senderAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f2bD18",
"feePayer": "5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d"
}
'import requests
url = "https://platform.spritz.finance/v1/off-ramp-quotes/{quoteId}/transaction"
payload = {
"senderAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f2bD18",
"feePayer": "5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
senderAddress: '0x742d35Cc6634C0532925a3b844Bc9e7595f2bD18',
feePayer: '5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d'
})
};
fetch('https://platform.spritz.finance/v1/off-ramp-quotes/{quoteId}/transaction', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://platform.spritz.finance/v1/off-ramp-quotes/{quoteId}/transaction",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'senderAddress' => '0x742d35Cc6634C0532925a3b844Bc9e7595f2bD18',
'feePayer' => '5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://platform.spritz.finance/v1/off-ramp-quotes/{quoteId}/transaction"
payload := strings.NewReader("{\n \"senderAddress\": \"0x742d35Cc6634C0532925a3b844Bc9e7595f2bD18\",\n \"feePayer\": \"5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://platform.spritz.finance/v1/off-ramp-quotes/{quoteId}/transaction")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"senderAddress\": \"0x742d35Cc6634C0532925a3b844Bc9e7595f2bD18\",\n \"feePayer\": \"5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.spritz.finance/v1/off-ramp-quotes/{quoteId}/transaction")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"senderAddress\": \"0x742d35Cc6634C0532925a3b844Bc9e7595f2bD18\",\n \"feePayer\": \"5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d\"\n}"
response = http.request(request)
puts response.read_body{
"type": "evm",
"chain": "ethereum",
"inputToken": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"outputToken": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"requiredTokenInput": "100000000",
"contractAddress": "0xbF7Abc15f00a8C2d6b13A952c58d12b7c194A8D0",
"calldata": "0xd71d9632...",
"method": "payWithToken",
"value": "0"
}{
"title": "Unauthorized",
"status": 401,
"type": "urn:problem-type:auth:unauthorized",
"detail": "Bearer token required",
"instance": "<string>",
"realm": "API",
"scope": "read:users"
}{
"title": "<string>",
"status": 404,
"resourceType": "user",
"resourceId": "<string>",
"type": "about:blank",
"detail": "<string>",
"instance": "<string>"
}{
"title": "Unauthorized",
"status": 400,
"type": "urn:problem-type:auth:unauthorized",
"detail": "<string>",
"instance": "/errors/1234567890",
"code": "transaction_limit",
"field": "amountUsd",
"retryable": true,
"retryAfter": 5,
"suggestedAction": "auto_ramp",
"clearsAt": "2023-11-07T05:31:56Z",
"availableAt": "2023-11-07T05:31:56Z",
"permanent": true,
"reason": "crypto_released"
}{
"title": "Unauthorized",
"status": 400,
"type": "urn:problem-type:auth:unauthorized",
"detail": "<string>",
"instance": "/errors/1234567890",
"code": "transaction_limit",
"field": "amountUsd",
"retryable": true,
"retryAfter": 5,
"suggestedAction": "auto_ramp",
"clearsAt": "2023-11-07T05:31:56Z",
"availableAt": "2023-11-07T05:31:56Z",
"permanent": true,
"reason": "crypto_released"
}{
"title": "Unauthorized",
"status": 400,
"type": "urn:problem-type:auth:unauthorized",
"detail": "<string>",
"instance": "/errors/1234567890",
"code": "transaction_limit",
"field": "amountUsd",
"retryable": true,
"retryAfter": 5,
"suggestedAction": "auto_ramp",
"clearsAt": "2023-11-07T05:31:56Z",
"availableAt": "2023-11-07T05:31:56Z",
"permanent": true,
"reason": "crypto_released"
}{
"title": "Unauthorized",
"status": 400,
"type": "urn:problem-type:auth:unauthorized",
"detail": "<string>",
"instance": "/errors/1234567890",
"code": "transaction_limit",
"field": "amountUsd",
"retryable": true,
"retryAfter": 5,
"suggestedAction": "auto_ramp",
"clearsAt": "2023-11-07T05:31:56Z",
"availableAt": "2023-11-07T05:31:56Z",
"permanent": true,
"reason": "crypto_released"
}{
"title": "Unauthorized",
"status": 400,
"type": "urn:problem-type:auth:unauthorized",
"detail": "<string>",
"instance": "/errors/1234567890",
"code": "transaction_limit",
"field": "amountUsd",
"retryable": true,
"retryAfter": 5,
"suggestedAction": "auto_ramp",
"clearsAt": "2023-11-07T05:31:56Z",
"availableAt": "2023-11-07T05:31:56Z",
"permanent": true,
"reason": "crypto_released"
}Authorizations
Body
Response
Response for status 200
- Option 1
- Option 2
- Option 3
EVM transaction parameters