GetSwapInstructions
curl --request GET \
--url https://api.hular.dev/json/v1/quotes/{quote_hash}/instructionsimport requests
url = "https://api.hular.dev/json/v1/quotes/{quote_hash}/instructions"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.hular.dev/json/v1/quotes/{quote_hash}/instructions', 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.hular.dev/json/v1/quotes/{quote_hash}/instructions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.hular.dev/json/v1/quotes/{quote_hash}/instructions"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.hular.dev/json/v1/quotes/{quote_hash}/instructions")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hular.dev/json/v1/quotes/{quote_hash}/instructions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"router_address": "<string>",
"src_token": "<string>",
"amount_in": "<string>",
"bridge_token": "<string>",
"min_bridge_out": "<string>",
"evm": {
"aggregator": "<string>",
"swap_calldata": "<string>",
"value": "<string>"
},
"svm": {
"setup": [
{
"program_id": "<string>",
"accounts": [
{
"pubkey": "<string>",
"is_signer": true,
"is_writable": true
}
],
"data": "<string>"
}
],
"swap": {
"program_id": "<string>",
"accounts": [
{
"pubkey": "<string>",
"is_signer": true,
"is_writable": true
}
],
"data": "<string>"
},
"cleanup": [
{
"program_id": "<string>",
"accounts": [
{
"pubkey": "<string>",
"is_signer": true,
"is_writable": true
}
],
"data": "<string>"
}
],
"lookup_tables": [
{
"address": "<string>",
"addresses": [
"<string>"
]
}
],
"allowed_swap_programs": [
"<string>"
],
"swap_programs_signature": "<string>"
}
}{
"code": 123,
"message": "<string>",
"details": [
{}
]
}HularApi
GetSwapInstructions
GET
/
v1
/
quotes
/
{quote_hash}
/
instructions
GetSwapInstructions
curl --request GET \
--url https://api.hular.dev/json/v1/quotes/{quote_hash}/instructionsimport requests
url = "https://api.hular.dev/json/v1/quotes/{quote_hash}/instructions"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.hular.dev/json/v1/quotes/{quote_hash}/instructions', 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.hular.dev/json/v1/quotes/{quote_hash}/instructions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.hular.dev/json/v1/quotes/{quote_hash}/instructions"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.hular.dev/json/v1/quotes/{quote_hash}/instructions")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hular.dev/json/v1/quotes/{quote_hash}/instructions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"router_address": "<string>",
"src_token": "<string>",
"amount_in": "<string>",
"bridge_token": "<string>",
"min_bridge_out": "<string>",
"evm": {
"aggregator": "<string>",
"swap_calldata": "<string>",
"value": "<string>"
},
"svm": {
"setup": [
{
"program_id": "<string>",
"accounts": [
{
"pubkey": "<string>",
"is_signer": true,
"is_writable": true
}
],
"data": "<string>"
}
],
"swap": {
"program_id": "<string>",
"accounts": [
{
"pubkey": "<string>",
"is_signer": true,
"is_writable": true
}
],
"data": "<string>"
},
"cleanup": [
{
"program_id": "<string>",
"accounts": [
{
"pubkey": "<string>",
"is_signer": true,
"is_writable": true
}
],
"data": "<string>"
}
],
"lookup_tables": [
{
"address": "<string>",
"addresses": [
"<string>"
]
}
],
"allowed_swap_programs": [
"<string>"
],
"swap_programs_signature": "<string>"
}
}{
"code": 123,
"message": "<string>",
"details": [
{}
]
}Headers
Optional. Without a key the request is rate limited per client IP and quotes carry extra spread.