Create a quote, estimates costs & provides the steps needed to bridge.
curl --request POST \
--url https://api.bridge.joltz.app/v1/quote \
--header 'Content-Type: application/json' \
--data '
{
"inputChainID": 1,
"inputToken": "0x0",
"amount": 1,
"address": "0x0",
"sparkAddress": "spark1"
}
'import requests
url = "https://api.bridge.joltz.app/v1/quote"
payload = {
"inputChainID": 1,
"inputToken": "0x0",
"amount": 1,
"address": "0x0",
"sparkAddress": "spark1"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
inputChainID: 1,
inputToken: '0x0',
amount: 1,
address: '0x0',
sparkAddress: 'spark1'
})
};
fetch('https://api.bridge.joltz.app/v1/quote', 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://api.bridge.joltz.app/v1/quote",
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([
'inputChainID' => 1,
'inputToken' => '0x0',
'amount' => 1,
'address' => '0x0',
'sparkAddress' => 'spark1'
]),
CURLOPT_HTTPHEADER => [
"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://api.bridge.joltz.app/v1/quote"
payload := strings.NewReader("{\n \"inputChainID\": 1,\n \"inputToken\": \"0x0\",\n \"amount\": 1,\n \"address\": \"0x0\",\n \"sparkAddress\": \"spark1\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.bridge.joltz.app/v1/quote")
.header("Content-Type", "application/json")
.body("{\n \"inputChainID\": 1,\n \"inputToken\": \"0x0\",\n \"amount\": 1,\n \"address\": \"0x0\",\n \"sparkAddress\": \"spark1\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bridge.joltz.app/v1/quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"inputChainID\": 1,\n \"inputToken\": \"0x0\",\n \"amount\": 1,\n \"address\": \"0x0\",\n \"sparkAddress\": \"spark1\"\n}"
response = http.request(request)
puts response.read_body{
"id": "",
"amount": "0",
"amountInUSD": "0",
"amountOutUSD": "0",
"fees": {
"joltzFee": "0",
"relayFee": "0",
"flashnetFee": "0",
"appFee": "0"
},
"steps": [
{
"name": "deposit",
"tx": {
"from": "<string>",
"to": "<string>",
"data": "<string>",
"value": "<string>",
"maxFeePerGas": "<string>",
"maxPriorityFeePerGas": "<string>",
"chainID": 123
}
}
],
"solanaInstructions": [
{
"keys": [
{
"pubkey": "5mdrbDXzXmyNzXwcESGys5uG1YmzAGPxa1foQvHMsCdw",
"isSigner": true,
"isWritable": true
}
],
"programId": "11111111111111111111111111111111",
"data": "02000000a0a7280300000000"
}
]
}{
"code": "<string>",
"message": "<string>"
}Endpoints
Create Quote
POST
/
quote
Create a quote, estimates costs & provides the steps needed to bridge.
curl --request POST \
--url https://api.bridge.joltz.app/v1/quote \
--header 'Content-Type: application/json' \
--data '
{
"inputChainID": 1,
"inputToken": "0x0",
"amount": 1,
"address": "0x0",
"sparkAddress": "spark1"
}
'import requests
url = "https://api.bridge.joltz.app/v1/quote"
payload = {
"inputChainID": 1,
"inputToken": "0x0",
"amount": 1,
"address": "0x0",
"sparkAddress": "spark1"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
inputChainID: 1,
inputToken: '0x0',
amount: 1,
address: '0x0',
sparkAddress: 'spark1'
})
};
fetch('https://api.bridge.joltz.app/v1/quote', 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://api.bridge.joltz.app/v1/quote",
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([
'inputChainID' => 1,
'inputToken' => '0x0',
'amount' => 1,
'address' => '0x0',
'sparkAddress' => 'spark1'
]),
CURLOPT_HTTPHEADER => [
"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://api.bridge.joltz.app/v1/quote"
payload := strings.NewReader("{\n \"inputChainID\": 1,\n \"inputToken\": \"0x0\",\n \"amount\": 1,\n \"address\": \"0x0\",\n \"sparkAddress\": \"spark1\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.bridge.joltz.app/v1/quote")
.header("Content-Type", "application/json")
.body("{\n \"inputChainID\": 1,\n \"inputToken\": \"0x0\",\n \"amount\": 1,\n \"address\": \"0x0\",\n \"sparkAddress\": \"spark1\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bridge.joltz.app/v1/quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"inputChainID\": 1,\n \"inputToken\": \"0x0\",\n \"amount\": 1,\n \"address\": \"0x0\",\n \"sparkAddress\": \"spark1\"\n}"
response = http.request(request)
puts response.read_body{
"id": "",
"amount": "0",
"amountInUSD": "0",
"amountOutUSD": "0",
"fees": {
"joltzFee": "0",
"relayFee": "0",
"flashnetFee": "0",
"appFee": "0"
},
"steps": [
{
"name": "deposit",
"tx": {
"from": "<string>",
"to": "<string>",
"data": "<string>",
"value": "<string>",
"maxFeePerGas": "<string>",
"maxPriorityFeePerGas": "<string>",
"chainID": 123
}
}
],
"solanaInstructions": [
{
"keys": [
{
"pubkey": "5mdrbDXzXmyNzXwcESGys5uG1YmzAGPxa1foQvHMsCdw",
"isSigner": true,
"isWritable": true
}
],
"programId": "11111111111111111111111111111111",
"data": "02000000a0a7280300000000"
}
]
}{
"code": "<string>",
"message": "<string>"
}Body
application/json
Response
Successful operation
⌘I