curl --request GET \
--url https://api.bebop.xyz/pmm/{chain}/v3/quote \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.bebop.xyz/pmm/{chain}/v3/quote"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.bebop.xyz/pmm/{chain}/v3/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.bebop.xyz/pmm/{chain}/v3/quote",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.bebop.xyz/pmm/{chain}/v3/quote"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.bebop.xyz/pmm/{chain}/v3/quote")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bebop.xyz/pmm/{chain}/v3/quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"requestId": "31a8cd0e-4566-48ad-8fe0-92efcde63dc2",
"type": "121",
"status": "SIG_SUCCESS",
"quoteId": "121-197055704233248307894658608409132099557",
"chainId": 1,
"approvalType": "Standard",
"nativeToken": "ETH",
"taker": "0x5Bad996643a924De21b6b2875c85C33F3c5bBcB6",
"receiver": "0x5Bad996643a924De21b6b2875c85C33F3c5bBcB6",
"expiry": 1772813487,
"slippage": 0,
"gasFee": {
"native": "0",
"usd": 0
},
"buyTokens": {
"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2": {
"amount": "504765657558485082",
"decimals": 18,
"priceUsd": 1980.81,
"symbol": "WETH",
"minimumAmount": "504765657558485082",
"price": 1981.1173462888255,
"priceBeforeFee": 1971.2599999999998,
"amountBeforeFee": "507289753761553600",
"deltaFromExpected": -0.00010614305258680328
}
},
"sellTokens": {
"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48": {
"amount": "1000000000",
"decimals": 6,
"priceUsd": 0.999951,
"symbol": "USDC",
"price": 0.0005047656575584851,
"priceBeforeFee": 0.0005072897537615536
}
},
"settlementAddress": "0xbbbbbBB520d69a9775E85b458C58c648259FAD5F",
"approvalTarget": "0xbbbbbBB520d69a9775E85b458C58c648259FAD5F",
"requiredSignatures": [],
"priceImpact": -0.00010614305258680328,
"partnerFee": {
"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE": "2524096203068442"
},
"warnings": [],
"tx": {
"to": "0xbbbbbBB520d69a9775E85b458C58c648259FAD5F",
"value": "0x0",
"data": "0x4dcebcba00...",
"from": "0x5Bad996643a924De21b6b2875c85C33F3c5bBcB6",
"gas": 102504,
"gasPrice": 459274878
},
"makers": [
"🦖2"
],
"toSign": {
"partner_id": 0,
"expiry": 1772813487,
"taker_address": "0x5Bad996643a924De21b6b2875c85C33F3c5bBcB6",
"maker_address": "0xA8020EcBC321e0C8cEA26B3507f207482d0100c2",
"maker_nonce": "2772802508865834001",
"taker_token": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"maker_token": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"taker_amount": "1000000000",
"maker_amount": "504765657558485082",
"receiver": "0x5Bad996643a924De21b6b2875c85C33F3c5bBcB6",
"packed_commands": "0"
},
"onchainOrderType": "SingleOrder",
"partialFillOffset": 12
}Quote
Overview
Get a quote for the requested tokens and amounts. This endpoint allows you to request quotes for one-to-one trades as well as multi token trades (one-to-many and many-to-one).
Executing the quote
By default this is a gasless quote and will need to be submitted to /order
Specifying gasless=false to the API will return tx that can be used to self execute. You may also specify skip_validation for use cases where validations are a constraint.
curl --request GET \
--url https://api.bebop.xyz/pmm/{chain}/v3/quote \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.bebop.xyz/pmm/{chain}/v3/quote"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.bebop.xyz/pmm/{chain}/v3/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.bebop.xyz/pmm/{chain}/v3/quote",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.bebop.xyz/pmm/{chain}/v3/quote"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.bebop.xyz/pmm/{chain}/v3/quote")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bebop.xyz/pmm/{chain}/v3/quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"requestId": "31a8cd0e-4566-48ad-8fe0-92efcde63dc2",
"type": "121",
"status": "SIG_SUCCESS",
"quoteId": "121-197055704233248307894658608409132099557",
"chainId": 1,
"approvalType": "Standard",
"nativeToken": "ETH",
"taker": "0x5Bad996643a924De21b6b2875c85C33F3c5bBcB6",
"receiver": "0x5Bad996643a924De21b6b2875c85C33F3c5bBcB6",
"expiry": 1772813487,
"slippage": 0,
"gasFee": {
"native": "0",
"usd": 0
},
"buyTokens": {
"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2": {
"amount": "504765657558485082",
"decimals": 18,
"priceUsd": 1980.81,
"symbol": "WETH",
"minimumAmount": "504765657558485082",
"price": 1981.1173462888255,
"priceBeforeFee": 1971.2599999999998,
"amountBeforeFee": "507289753761553600",
"deltaFromExpected": -0.00010614305258680328
}
},
"sellTokens": {
"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48": {
"amount": "1000000000",
"decimals": 6,
"priceUsd": 0.999951,
"symbol": "USDC",
"price": 0.0005047656575584851,
"priceBeforeFee": 0.0005072897537615536
}
},
"settlementAddress": "0xbbbbbBB520d69a9775E85b458C58c648259FAD5F",
"approvalTarget": "0xbbbbbBB520d69a9775E85b458C58c648259FAD5F",
"requiredSignatures": [],
"priceImpact": -0.00010614305258680328,
"partnerFee": {
"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE": "2524096203068442"
},
"warnings": [],
"tx": {
"to": "0xbbbbbBB520d69a9775E85b458C58c648259FAD5F",
"value": "0x0",
"data": "0x4dcebcba00...",
"from": "0x5Bad996643a924De21b6b2875c85C33F3c5bBcB6",
"gas": 102504,
"gasPrice": 459274878
},
"makers": [
"🦖2"
],
"toSign": {
"partner_id": 0,
"expiry": 1772813487,
"taker_address": "0x5Bad996643a924De21b6b2875c85C33F3c5bBcB6",
"maker_address": "0xA8020EcBC321e0C8cEA26B3507f207482d0100c2",
"maker_nonce": "2772802508865834001",
"taker_token": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"maker_token": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"taker_amount": "1000000000",
"maker_amount": "504765657558485082",
"receiver": "0x5Bad996643a924De21b6b2875c85C33F3c5bBcB6",
"packed_commands": "0"
},
"onchainOrderType": "SingleOrder",
"partialFillOffset": 12
}Authorizations
API key passed as a Bearer token.
Query Parameters
The tokens that will be supplied by the taker
"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
The tokens that will be supplied by the maker
"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
The amount of each taker token, order respective to taker_tokens
"1000000000"
The amount of each maker token, order respective to maker_tokens
Address which will sign the order
"0x5Bad996643a924De21b6b2875c85C33F3c5bBcB6"
Address which will receive the taker tokens. (Defaults to taker_address if not specified)
Type of Approval for EVM: Standard/Permit/Permit2
Standard, Permit, Permit2 Ratios of maker tokens to receive for each taker token
Ratios of taker tokens to receive for each maker token
Set to false to receive call data and self execute.
The slippage to use
Original user of the quote if different than taker.
Standard, Short (5 seconds)
standard, short Fee (bps) to be charged for this quote
Response
Success
Standard, Permit, Permit2 Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?