curl --request POST \
--url https://v2.prod.halliday.xyz/payments/quotes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"request": {
"kind": "FIXED_INPUT",
"fixed_input_amount": {
"asset": "ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"amount": "1"
},
"output_asset": "ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"dest_address": "<string>",
"custom_actions": {
"actions": [
{
"type": "CallImmediateAction",
"target": "<string>",
"value": "<string>",
"calldata": "<string>"
}
],
"user_estimated_gas": "<string>"
}
},
"price_currency": "USD",
"onramps": [
"moonpay",
"coinbase"
],
"onramp_methods": [
"CREDIT_CARD",
"ACH",
"APPLE_PAY"
],
"customer_ip_address": "<string>",
"customer_id": "<string>",
"parent_payment_id": "<string>",
"label": "<string>",
"features": [],
"rev_share_name": "<string>",
"allow_unsafe_transfer_out": true,
"show_all_issues": true,
"allow_unsafe_slippage": true,
"allow_exceed_max_input_limit": true,
"use_intent_refund": true,
"hops": [
"<string>"
]
}
'import requests
url = "https://v2.prod.halliday.xyz/payments/quotes"
payload = {
"request": {
"kind": "FIXED_INPUT",
"fixed_input_amount": {
"asset": "ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"amount": "1"
},
"output_asset": "ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"dest_address": "<string>",
"custom_actions": {
"actions": [
{
"type": "CallImmediateAction",
"target": "<string>",
"value": "<string>",
"calldata": "<string>"
}
],
"user_estimated_gas": "<string>"
}
},
"price_currency": "USD",
"onramps": ["moonpay", "coinbase"],
"onramp_methods": ["CREDIT_CARD", "ACH", "APPLE_PAY"],
"customer_ip_address": "<string>",
"customer_id": "<string>",
"parent_payment_id": "<string>",
"label": "<string>",
"features": [],
"rev_share_name": "<string>",
"allow_unsafe_transfer_out": True,
"show_all_issues": True,
"allow_unsafe_slippage": True,
"allow_exceed_max_input_limit": True,
"use_intent_refund": True,
"hops": ["<string>"]
}
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({
request: {
kind: 'FIXED_INPUT',
fixed_input_amount: {asset: 'ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', amount: '1'},
output_asset: 'ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
dest_address: '<string>',
custom_actions: {
actions: [
{
type: 'CallImmediateAction',
target: '<string>',
value: '<string>',
calldata: '<string>'
}
],
user_estimated_gas: '<string>'
}
},
price_currency: 'USD',
onramps: ['moonpay', 'coinbase'],
onramp_methods: ['CREDIT_CARD', 'ACH', 'APPLE_PAY'],
customer_ip_address: '<string>',
customer_id: '<string>',
parent_payment_id: '<string>',
label: '<string>',
features: [],
rev_share_name: '<string>',
allow_unsafe_transfer_out: true,
show_all_issues: true,
allow_unsafe_slippage: true,
allow_exceed_max_input_limit: true,
use_intent_refund: true,
hops: ['<string>']
})
};
fetch('https://v2.prod.halliday.xyz/payments/quotes', 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://v2.prod.halliday.xyz/payments/quotes",
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([
'request' => [
'kind' => 'FIXED_INPUT',
'fixed_input_amount' => [
'asset' => 'ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
'amount' => '1'
],
'output_asset' => 'ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
'dest_address' => '<string>',
'custom_actions' => [
'actions' => [
[
'type' => 'CallImmediateAction',
'target' => '<string>',
'value' => '<string>',
'calldata' => '<string>'
]
],
'user_estimated_gas' => '<string>'
]
],
'price_currency' => 'USD',
'onramps' => [
'moonpay',
'coinbase'
],
'onramp_methods' => [
'CREDIT_CARD',
'ACH',
'APPLE_PAY'
],
'customer_ip_address' => '<string>',
'customer_id' => '<string>',
'parent_payment_id' => '<string>',
'label' => '<string>',
'features' => [
],
'rev_share_name' => '<string>',
'allow_unsafe_transfer_out' => true,
'show_all_issues' => true,
'allow_unsafe_slippage' => true,
'allow_exceed_max_input_limit' => true,
'use_intent_refund' => true,
'hops' => [
'<string>'
]
]),
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://v2.prod.halliday.xyz/payments/quotes"
payload := strings.NewReader("{\n \"request\": {\n \"kind\": \"FIXED_INPUT\",\n \"fixed_input_amount\": {\n \"asset\": \"ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\n \"amount\": \"1\"\n },\n \"output_asset\": \"ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\n \"dest_address\": \"<string>\",\n \"custom_actions\": {\n \"actions\": [\n {\n \"type\": \"CallImmediateAction\",\n \"target\": \"<string>\",\n \"value\": \"<string>\",\n \"calldata\": \"<string>\"\n }\n ],\n \"user_estimated_gas\": \"<string>\"\n }\n },\n \"price_currency\": \"USD\",\n \"onramps\": [\n \"moonpay\",\n \"coinbase\"\n ],\n \"onramp_methods\": [\n \"CREDIT_CARD\",\n \"ACH\",\n \"APPLE_PAY\"\n ],\n \"customer_ip_address\": \"<string>\",\n \"customer_id\": \"<string>\",\n \"parent_payment_id\": \"<string>\",\n \"label\": \"<string>\",\n \"features\": [],\n \"rev_share_name\": \"<string>\",\n \"allow_unsafe_transfer_out\": true,\n \"show_all_issues\": true,\n \"allow_unsafe_slippage\": true,\n \"allow_exceed_max_input_limit\": true,\n \"use_intent_refund\": true,\n \"hops\": [\n \"<string>\"\n ]\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://v2.prod.halliday.xyz/payments/quotes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"request\": {\n \"kind\": \"FIXED_INPUT\",\n \"fixed_input_amount\": {\n \"asset\": \"ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\n \"amount\": \"1\"\n },\n \"output_asset\": \"ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\n \"dest_address\": \"<string>\",\n \"custom_actions\": {\n \"actions\": [\n {\n \"type\": \"CallImmediateAction\",\n \"target\": \"<string>\",\n \"value\": \"<string>\",\n \"calldata\": \"<string>\"\n }\n ],\n \"user_estimated_gas\": \"<string>\"\n }\n },\n \"price_currency\": \"USD\",\n \"onramps\": [\n \"moonpay\",\n \"coinbase\"\n ],\n \"onramp_methods\": [\n \"CREDIT_CARD\",\n \"ACH\",\n \"APPLE_PAY\"\n ],\n \"customer_ip_address\": \"<string>\",\n \"customer_id\": \"<string>\",\n \"parent_payment_id\": \"<string>\",\n \"label\": \"<string>\",\n \"features\": [],\n \"rev_share_name\": \"<string>\",\n \"allow_unsafe_transfer_out\": true,\n \"show_all_issues\": true,\n \"allow_unsafe_slippage\": true,\n \"allow_exceed_max_input_limit\": true,\n \"use_intent_refund\": true,\n \"hops\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://v2.prod.halliday.xyz/payments/quotes")
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 \"request\": {\n \"kind\": \"FIXED_INPUT\",\n \"fixed_input_amount\": {\n \"asset\": \"ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\n \"amount\": \"1\"\n },\n \"output_asset\": \"ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\n \"dest_address\": \"<string>\",\n \"custom_actions\": {\n \"actions\": [\n {\n \"type\": \"CallImmediateAction\",\n \"target\": \"<string>\",\n \"value\": \"<string>\",\n \"calldata\": \"<string>\"\n }\n ],\n \"user_estimated_gas\": \"<string>\"\n }\n },\n \"price_currency\": \"USD\",\n \"onramps\": [\n \"moonpay\",\n \"coinbase\"\n ],\n \"onramp_methods\": [\n \"CREDIT_CARD\",\n \"ACH\",\n \"APPLE_PAY\"\n ],\n \"customer_ip_address\": \"<string>\",\n \"customer_id\": \"<string>\",\n \"parent_payment_id\": \"<string>\",\n \"label\": \"<string>\",\n \"features\": [],\n \"rev_share_name\": \"<string>\",\n \"allow_unsafe_transfer_out\": true,\n \"show_all_issues\": true,\n \"allow_unsafe_slippage\": true,\n \"allow_exceed_max_input_limit\": true,\n \"use_intent_refund\": true,\n \"hops\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"quote_request": {
"request": {
"kind": "FIXED_INPUT",
"fixed_input_amount": {
"asset": "ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"amount": "1"
},
"output_asset": "ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"dest_address": "<string>",
"custom_actions": {
"actions": [
{
"type": "CallImmediateAction",
"target": "<string>",
"value": "<string>",
"calldata": "<string>"
}
],
"user_estimated_gas": "<string>"
}
},
"price_currency": "USD",
"onramps": [
"moonpay",
"coinbase"
],
"onramp_methods": [
"CREDIT_CARD",
"ACH",
"APPLE_PAY"
],
"customer_ip_address": "<string>",
"customer_id": "<string>",
"parent_payment_id": "<string>",
"label": "<string>",
"features": [],
"rev_share_name": "<string>",
"allow_unsafe_transfer_out": true,
"show_all_issues": true,
"allow_unsafe_slippage": true,
"allow_exceed_max_input_limit": true,
"use_intent_refund": true,
"hops": [
"<string>"
]
},
"quotes": [
{
"output_amount": {
"asset": "ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"amount": "1"
},
"fees": {
"total_fees": "<string>",
"conversion_fees": "<string>",
"network_fees": "<string>",
"business_fees": "<string>",
"currency_symbol": "USD"
},
"route": [
{
"net_effect": {
"consume": [
{
"resource": {
"asset": "<string>"
},
"amount": "<string>",
"tx_id": "<string>"
}
],
"produce": [
{
"resource": {
"asset": "<string>"
},
"amount": "<string>",
"tx_id": "<string>"
}
]
},
"pieces_info": [
{}
],
"step_index": 123
}
],
"payment_id": "<string>",
"onramp": "<string>",
"onramp_method": "CREDIT_CARD"
}
],
"current_prices": {
"USD": "1.00",
"ethereum:0x": "4200",
"ethereum:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48": "1.00"
},
"price_currency": "USD",
"state_token": "<string>",
"quoted_at": "2023-11-07T05:31:56Z",
"accept_by": "2023-11-07T05:31:56Z",
"failures": [
{
"service_ids": [
"<string>"
],
"latency_seconds": 123,
"issues": [
{
"kind": "amount",
"asset": "ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"given": "<string>",
"limits": {
"min": "<string>",
"max": "<string>"
},
"source": "<string>",
"message": "<string>",
"downstream_limits": {
"min": "<string>",
"max": "<string>"
}
}
]
}
],
"limits": [
{
"min": "<string>",
"max": "<string>"
}
]
}{
"errors": [
{
"kind": "amount",
"given": "5",
"limits": {
"min": "10",
"max": "10000"
},
"source": "moonpay",
"message": "Amount too low. Minimum amount is $10 USD"
}
]
}{
"errors": [
{
"kind": "other",
"message": "API key missing or invalid"
}
]
}{
"errors": [
{
"kind": "other",
"message": "Your API key does not have permission to create quotes"
}
]
}Get payment quotes
Request quotes for payments, supporting both fixed input and fixed output scenarios. Returns multiple quote options with pricing, fees, and routing information.
This endpoint can also be used to requote from an existing payment by providing a payment_id. When requoting, input amounts are automatically derived from the payment’s current state, but you can optionally override the output asset.
curl --request POST \
--url https://v2.prod.halliday.xyz/payments/quotes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"request": {
"kind": "FIXED_INPUT",
"fixed_input_amount": {
"asset": "ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"amount": "1"
},
"output_asset": "ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"dest_address": "<string>",
"custom_actions": {
"actions": [
{
"type": "CallImmediateAction",
"target": "<string>",
"value": "<string>",
"calldata": "<string>"
}
],
"user_estimated_gas": "<string>"
}
},
"price_currency": "USD",
"onramps": [
"moonpay",
"coinbase"
],
"onramp_methods": [
"CREDIT_CARD",
"ACH",
"APPLE_PAY"
],
"customer_ip_address": "<string>",
"customer_id": "<string>",
"parent_payment_id": "<string>",
"label": "<string>",
"features": [],
"rev_share_name": "<string>",
"allow_unsafe_transfer_out": true,
"show_all_issues": true,
"allow_unsafe_slippage": true,
"allow_exceed_max_input_limit": true,
"use_intent_refund": true,
"hops": [
"<string>"
]
}
'import requests
url = "https://v2.prod.halliday.xyz/payments/quotes"
payload = {
"request": {
"kind": "FIXED_INPUT",
"fixed_input_amount": {
"asset": "ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"amount": "1"
},
"output_asset": "ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"dest_address": "<string>",
"custom_actions": {
"actions": [
{
"type": "CallImmediateAction",
"target": "<string>",
"value": "<string>",
"calldata": "<string>"
}
],
"user_estimated_gas": "<string>"
}
},
"price_currency": "USD",
"onramps": ["moonpay", "coinbase"],
"onramp_methods": ["CREDIT_CARD", "ACH", "APPLE_PAY"],
"customer_ip_address": "<string>",
"customer_id": "<string>",
"parent_payment_id": "<string>",
"label": "<string>",
"features": [],
"rev_share_name": "<string>",
"allow_unsafe_transfer_out": True,
"show_all_issues": True,
"allow_unsafe_slippage": True,
"allow_exceed_max_input_limit": True,
"use_intent_refund": True,
"hops": ["<string>"]
}
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({
request: {
kind: 'FIXED_INPUT',
fixed_input_amount: {asset: 'ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', amount: '1'},
output_asset: 'ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
dest_address: '<string>',
custom_actions: {
actions: [
{
type: 'CallImmediateAction',
target: '<string>',
value: '<string>',
calldata: '<string>'
}
],
user_estimated_gas: '<string>'
}
},
price_currency: 'USD',
onramps: ['moonpay', 'coinbase'],
onramp_methods: ['CREDIT_CARD', 'ACH', 'APPLE_PAY'],
customer_ip_address: '<string>',
customer_id: '<string>',
parent_payment_id: '<string>',
label: '<string>',
features: [],
rev_share_name: '<string>',
allow_unsafe_transfer_out: true,
show_all_issues: true,
allow_unsafe_slippage: true,
allow_exceed_max_input_limit: true,
use_intent_refund: true,
hops: ['<string>']
})
};
fetch('https://v2.prod.halliday.xyz/payments/quotes', 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://v2.prod.halliday.xyz/payments/quotes",
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([
'request' => [
'kind' => 'FIXED_INPUT',
'fixed_input_amount' => [
'asset' => 'ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
'amount' => '1'
],
'output_asset' => 'ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
'dest_address' => '<string>',
'custom_actions' => [
'actions' => [
[
'type' => 'CallImmediateAction',
'target' => '<string>',
'value' => '<string>',
'calldata' => '<string>'
]
],
'user_estimated_gas' => '<string>'
]
],
'price_currency' => 'USD',
'onramps' => [
'moonpay',
'coinbase'
],
'onramp_methods' => [
'CREDIT_CARD',
'ACH',
'APPLE_PAY'
],
'customer_ip_address' => '<string>',
'customer_id' => '<string>',
'parent_payment_id' => '<string>',
'label' => '<string>',
'features' => [
],
'rev_share_name' => '<string>',
'allow_unsafe_transfer_out' => true,
'show_all_issues' => true,
'allow_unsafe_slippage' => true,
'allow_exceed_max_input_limit' => true,
'use_intent_refund' => true,
'hops' => [
'<string>'
]
]),
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://v2.prod.halliday.xyz/payments/quotes"
payload := strings.NewReader("{\n \"request\": {\n \"kind\": \"FIXED_INPUT\",\n \"fixed_input_amount\": {\n \"asset\": \"ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\n \"amount\": \"1\"\n },\n \"output_asset\": \"ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\n \"dest_address\": \"<string>\",\n \"custom_actions\": {\n \"actions\": [\n {\n \"type\": \"CallImmediateAction\",\n \"target\": \"<string>\",\n \"value\": \"<string>\",\n \"calldata\": \"<string>\"\n }\n ],\n \"user_estimated_gas\": \"<string>\"\n }\n },\n \"price_currency\": \"USD\",\n \"onramps\": [\n \"moonpay\",\n \"coinbase\"\n ],\n \"onramp_methods\": [\n \"CREDIT_CARD\",\n \"ACH\",\n \"APPLE_PAY\"\n ],\n \"customer_ip_address\": \"<string>\",\n \"customer_id\": \"<string>\",\n \"parent_payment_id\": \"<string>\",\n \"label\": \"<string>\",\n \"features\": [],\n \"rev_share_name\": \"<string>\",\n \"allow_unsafe_transfer_out\": true,\n \"show_all_issues\": true,\n \"allow_unsafe_slippage\": true,\n \"allow_exceed_max_input_limit\": true,\n \"use_intent_refund\": true,\n \"hops\": [\n \"<string>\"\n ]\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://v2.prod.halliday.xyz/payments/quotes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"request\": {\n \"kind\": \"FIXED_INPUT\",\n \"fixed_input_amount\": {\n \"asset\": \"ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\n \"amount\": \"1\"\n },\n \"output_asset\": \"ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\n \"dest_address\": \"<string>\",\n \"custom_actions\": {\n \"actions\": [\n {\n \"type\": \"CallImmediateAction\",\n \"target\": \"<string>\",\n \"value\": \"<string>\",\n \"calldata\": \"<string>\"\n }\n ],\n \"user_estimated_gas\": \"<string>\"\n }\n },\n \"price_currency\": \"USD\",\n \"onramps\": [\n \"moonpay\",\n \"coinbase\"\n ],\n \"onramp_methods\": [\n \"CREDIT_CARD\",\n \"ACH\",\n \"APPLE_PAY\"\n ],\n \"customer_ip_address\": \"<string>\",\n \"customer_id\": \"<string>\",\n \"parent_payment_id\": \"<string>\",\n \"label\": \"<string>\",\n \"features\": [],\n \"rev_share_name\": \"<string>\",\n \"allow_unsafe_transfer_out\": true,\n \"show_all_issues\": true,\n \"allow_unsafe_slippage\": true,\n \"allow_exceed_max_input_limit\": true,\n \"use_intent_refund\": true,\n \"hops\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://v2.prod.halliday.xyz/payments/quotes")
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 \"request\": {\n \"kind\": \"FIXED_INPUT\",\n \"fixed_input_amount\": {\n \"asset\": \"ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\n \"amount\": \"1\"\n },\n \"output_asset\": \"ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\n \"dest_address\": \"<string>\",\n \"custom_actions\": {\n \"actions\": [\n {\n \"type\": \"CallImmediateAction\",\n \"target\": \"<string>\",\n \"value\": \"<string>\",\n \"calldata\": \"<string>\"\n }\n ],\n \"user_estimated_gas\": \"<string>\"\n }\n },\n \"price_currency\": \"USD\",\n \"onramps\": [\n \"moonpay\",\n \"coinbase\"\n ],\n \"onramp_methods\": [\n \"CREDIT_CARD\",\n \"ACH\",\n \"APPLE_PAY\"\n ],\n \"customer_ip_address\": \"<string>\",\n \"customer_id\": \"<string>\",\n \"parent_payment_id\": \"<string>\",\n \"label\": \"<string>\",\n \"features\": [],\n \"rev_share_name\": \"<string>\",\n \"allow_unsafe_transfer_out\": true,\n \"show_all_issues\": true,\n \"allow_unsafe_slippage\": true,\n \"allow_exceed_max_input_limit\": true,\n \"use_intent_refund\": true,\n \"hops\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"quote_request": {
"request": {
"kind": "FIXED_INPUT",
"fixed_input_amount": {
"asset": "ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"amount": "1"
},
"output_asset": "ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"dest_address": "<string>",
"custom_actions": {
"actions": [
{
"type": "CallImmediateAction",
"target": "<string>",
"value": "<string>",
"calldata": "<string>"
}
],
"user_estimated_gas": "<string>"
}
},
"price_currency": "USD",
"onramps": [
"moonpay",
"coinbase"
],
"onramp_methods": [
"CREDIT_CARD",
"ACH",
"APPLE_PAY"
],
"customer_ip_address": "<string>",
"customer_id": "<string>",
"parent_payment_id": "<string>",
"label": "<string>",
"features": [],
"rev_share_name": "<string>",
"allow_unsafe_transfer_out": true,
"show_all_issues": true,
"allow_unsafe_slippage": true,
"allow_exceed_max_input_limit": true,
"use_intent_refund": true,
"hops": [
"<string>"
]
},
"quotes": [
{
"output_amount": {
"asset": "ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"amount": "1"
},
"fees": {
"total_fees": "<string>",
"conversion_fees": "<string>",
"network_fees": "<string>",
"business_fees": "<string>",
"currency_symbol": "USD"
},
"route": [
{
"net_effect": {
"consume": [
{
"resource": {
"asset": "<string>"
},
"amount": "<string>",
"tx_id": "<string>"
}
],
"produce": [
{
"resource": {
"asset": "<string>"
},
"amount": "<string>",
"tx_id": "<string>"
}
]
},
"pieces_info": [
{}
],
"step_index": 123
}
],
"payment_id": "<string>",
"onramp": "<string>",
"onramp_method": "CREDIT_CARD"
}
],
"current_prices": {
"USD": "1.00",
"ethereum:0x": "4200",
"ethereum:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48": "1.00"
},
"price_currency": "USD",
"state_token": "<string>",
"quoted_at": "2023-11-07T05:31:56Z",
"accept_by": "2023-11-07T05:31:56Z",
"failures": [
{
"service_ids": [
"<string>"
],
"latency_seconds": 123,
"issues": [
{
"kind": "amount",
"asset": "ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"given": "<string>",
"limits": {
"min": "<string>",
"max": "<string>"
},
"source": "<string>",
"message": "<string>",
"downstream_limits": {
"min": "<string>",
"max": "<string>"
}
}
]
}
],
"limits": [
{
"min": "<string>",
"max": "<string>"
}
]
}{
"errors": [
{
"kind": "amount",
"given": "5",
"limits": {
"min": "10",
"max": "10000"
},
"source": "moonpay",
"message": "Amount too low. Minimum amount is $10 USD"
}
]
}{
"errors": [
{
"kind": "other",
"message": "API key missing or invalid"
}
]
}{
"errors": [
{
"kind": "other",
"message": "Your API key does not have permission to create quotes"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Show child attributes
Show child attributes
Currency that all prices are denominated in
"USD"
Filter by specific onramp providers
["moonpay", "coinbase"]Filter by onramp payment methods
CREDIT_CARD, DEBIT_CARD, ACH, FIAT_BALANCE, TOKEN_BALANCE, APPLE_PAY, PAYPAL, VENMO, REVOLUT, GOOGLE_PAY, SEPA, FASTER_PAYMENTS, PIX, UPI, WIRE ["CREDIT_CARD", "ACH", "APPLE_PAY"]IP address of the customer
Customer ID for tracking
Optional parent payment identifier used when creating a quote from an existing payment.
Optional label for the payment.
255Feature flags to enable for this quote.
BETA_EDGES, ORG_BETA_EDGES, ORG_EDGES Revenue share configuration name.
Allow unsafe transfer out operations.
Return all validation issues instead of failing on the first.
Allow quotes with higher than normal slippage.
Allow quotes that exceed the maximum input limit.
Use intent-based refund flow.
Intermediate chain hops for routing.
Response
Successful quote response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Mapping of asset symbols to their unit prices
Show child attributes
Show child attributes
{
"USD": "1.00",
"ethereum:0x": "4200",
"ethereum:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48": "1.00"
}Currency that all prices are denominated in
"USD"
Signed state token containing routing and payment flow information. This value must be passed unmodified in subsequent API calls. Do not attempt to parse or modify this data as it is cryptographically signed.
Timestamp of when the quote was created, in UTC ISO 8601 format
Timestamp of when the quote will expire, in UTC ISO 8601 format
Providers that failed to return a quote.
Show child attributes
Show child attributes
Input amount limits for the quote.
Show child attributes
Show child attributes

