Request Quote
End point used to post quote requests to the bindpay API
Headers
x-api-header
: Your API key
Do you have an API key yet? Register for one here
Request Body
fromChain
:chainID // Payor Chain -
Refer to Active Chains to retrieve the chainIDfromToken
:tokenAddress // Payor Token - Refer
fromAddress
:walletAddress // Payor Address
usdAmount
:amount // Transaction amount in USD
Example Request
curl -X POST "https://api.bindpay.com/v1/quote" \
-H "Content-Type: application/json" \
-H "x-api-key: your_api_key_here" \
-d '{
"fromChain": "ethereum",
"fromToken": "ETH",
"fromAddress": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"usdAmount": 100
}'
import requests
url = "https://api.bindpay.com/v1/quote"
headers = {
"Content-Type": "application/json",
"x-api-key": "your_api_key_here"
}
data = {
"fromChain": "ethereum",
"fromToken": "ETH",
"fromAddress": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"usdAmount": 100
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
use reqwest::Client;
use serde_json::json;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let url = "https://api.bindpay.com/v1/quote";
let client = Client::new();
let response = client.post(url)
.header("Content-Type", "application/json")
.header("x-api-key", "your_api_key_here")
.json(&json!({
"fromChain": "ethereum",
"fromToken": "ETH",
"fromAddress": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"usdAmount": 100
}))
.send()
.await?;
println!("{}", response.text().await?);
Ok(())
}
require 'net/http'
require 'uri'
require 'json'
uri = URI('https://api.bindpay.com/v1/quote')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri,
'Content-Type' => 'application/json',
'x-api-key' => 'your_api_key_here'
)
request.body = {
fromChain: 'ethereum',
fromToken: 'ETH',
fromAddress: '0x742d35Cc6634C0532925a3b844Bc454e4438f44e',
usdAmount: 100
}.to_json
response = http.request(request)
puts response.body
const axios = require('axios');
const url = 'https://api.bindpay.com/v1/quote';
const headers = {
'Content-Type': 'application/json',
'x-api-key': 'your_api_key_here'
};
const data = {
fromChain: 'ethereum',
fromToken: 'ETH',
fromAddress: '0x742d35Cc6634C0532925a3b844Bc454e4438f44e',
usdAmount: 100
};
axios.post(url, data, { headers })
.then(response => console.log(response.data))
.catch(error => console.error('Error:', error));
import axios from 'axios';
const url = 'https://api.bindpay.com/v1/quote';
const headers = {
'Content-Type': 'application/json',
'x-api-key': 'your_api_key_here'
};
const data = {
fromChain: 'ethereum',
fromToken: 'ETH',
fromAddress: '0x742d35Cc6634C0532925a3b844Bc454e4438f44e',
usdAmount: 100
};
axios.post(url, data, { headers })
.then(response => console.log(response.data))
.catch(error => console.error('Error:', error));
Last updated