Get quote by ID.
curl --request GET \
--url https://{environment}.garden.finance/v3/quote/{id}import requests
url = "https://{environment}.garden.finance/v3/quote/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://{environment}.garden.finance/v3/quote/{id}', 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://{environment}.garden.finance/v3/quote/{id}",
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://{environment}.garden.finance/v3/quote/{id}"
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://{environment}.garden.finance/v3/quote/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{environment}.garden.finance/v3/quote/{id}")
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{
"status": "Ok",
"result": {
"id": "<string>",
"solver_id": "<string>",
"secret_hash": "<string>",
"source_swap_id": "<string>",
"destination_swap_id": "<string>",
"source": {
"asset": "solana_testnet:usdc",
"amount": "15082000",
"display": "15.08200000",
"value": "15.0820"
},
"destination": {
"asset": "solana_testnet:usdc",
"amount": "15082000",
"display": "15.08200000",
"value": "15.0820"
},
"fee": 123,
"fixed_fee": "<string>",
"slippage": 123,
"estimated_time": 123,
"deadline": 123,
"initiate": {
"type": "evm",
"chain_id": 421614,
"initiate_transaction": {
"to": "0xb5ae9785349186069c48794a763db39ec756b1cf",
"value": "0x0",
"data": "0x97ffc7ae0000000000000000000000001fd1f7b5c6e4e7b9f80a4db17903afd83d3fd31d",
"gas_limit": "0x493e0",
"chain_id": 421614
},
"approval_transaction": {
"to": "0xb5ae9785349186069c48794a763db39ec756b1cf",
"value": "0x0",
"data": "0x97ffc7ae0000000000000000000000001fd1f7b5c6e4e7b9f80a4db17903afd83d3fd31d",
"gas_limit": "0x493e0",
"chain_id": 421614
},
"core_to_evm_transfer": {
"to": "0xb5ae9785349186069c48794a763db39ec756b1cf",
"value": "0x0",
"data": "0x97ffc7ae0000000000000000000000001fd1f7b5c6e4e7b9f80a4db17903afd83d3fd31d",
"gas_limit": "0x493e0",
"chain_id": 421614
}
},
"status": "open"
}
}{
"error": "<string>"
}Quotes
Quote
The quote’s state and the terms it was priced at. See GET /orders/{order} for settlement.
GET
/
quote
/
{id}
Get quote by ID.
curl --request GET \
--url https://{environment}.garden.finance/v3/quote/{id}import requests
url = "https://{environment}.garden.finance/v3/quote/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://{environment}.garden.finance/v3/quote/{id}', 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://{environment}.garden.finance/v3/quote/{id}",
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://{environment}.garden.finance/v3/quote/{id}"
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://{environment}.garden.finance/v3/quote/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{environment}.garden.finance/v3/quote/{id}")
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{
"status": "Ok",
"result": {
"id": "<string>",
"solver_id": "<string>",
"secret_hash": "<string>",
"source_swap_id": "<string>",
"destination_swap_id": "<string>",
"source": {
"asset": "solana_testnet:usdc",
"amount": "15082000",
"display": "15.08200000",
"value": "15.0820"
},
"destination": {
"asset": "solana_testnet:usdc",
"amount": "15082000",
"display": "15.08200000",
"value": "15.0820"
},
"fee": 123,
"fixed_fee": "<string>",
"slippage": 123,
"estimated_time": 123,
"deadline": 123,
"initiate": {
"type": "evm",
"chain_id": 421614,
"initiate_transaction": {
"to": "0xb5ae9785349186069c48794a763db39ec756b1cf",
"value": "0x0",
"data": "0x97ffc7ae0000000000000000000000001fd1f7b5c6e4e7b9f80a4db17903afd83d3fd31d",
"gas_limit": "0x493e0",
"chain_id": 421614
},
"approval_transaction": {
"to": "0xb5ae9785349186069c48794a763db39ec756b1cf",
"value": "0x0",
"data": "0x97ffc7ae0000000000000000000000001fd1f7b5c6e4e7b9f80a4db17903afd83d3fd31d",
"gas_limit": "0x493e0",
"chain_id": 421614
},
"core_to_evm_transfer": {
"to": "0xb5ae9785349186069c48794a763db39ec756b1cf",
"value": "0x0",
"data": "0x97ffc7ae0000000000000000000000001fd1f7b5c6e4e7b9f80a4db17903afd83d3fd31d",
"gas_limit": "0x493e0",
"chain_id": 421614
}
},
"status": "open"
}
}{
"error": "<string>"
}Retrieve a quote by its ID, along with its current state.
To follow a swap through to completion, use get order.