Quote a creator-token buy or sell
curl --request GET \
--url https://build.vibechain.com/api/retard/v1227/markets/{marketId}/quote \
--header 'API-KEY: <api-key>'import requests
url = "https://build.vibechain.com/api/retard/v1227/markets/{marketId}/quote"
headers = {"API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'API-KEY': '<api-key>'}};
fetch('https://build.vibechain.com/api/retard/v1227/markets/{marketId}/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://build.vibechain.com/api/retard/v1227/markets/{marketId}/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 => [
"API-KEY: <api-key>"
],
]);
$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://build.vibechain.com/api/retard/v1227/markets/{marketId}/quote"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://build.vibechain.com/api/retard/v1227/markets/{marketId}/quote")
.header("API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://build.vibechain.com/api/retard/v1227/markets/{marketId}/quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"marketId": 1,
"coin": "0x41B13C429675015d32377305D03222CbddB20cA0",
"side": "BUY",
"amountIn": "<string>",
"amountOut": "<string>",
"minimumOut": "<string>",
"poolKey": {
"currency0": "0x41B13C429675015d32377305D03222CbddB20cA0",
"currency1": "0x41B13C429675015d32377305D03222CbddB20cA0",
"fee": 20000,
"tickSpacing": 200,
"hooks": "0x41B13C429675015d32377305D03222CbddB20cA0"
},
"projectedBlock": 1,
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "API_KEY_REQUIRED_OR_RATE_LIMITED",
"docs": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Markets
Quote a creator-token buy or sell
Returns a block-pinned Uniswap v4 Quoter result. For BUY, amount
is native ETH Wei and output is raw creator-token units. For SELL,
amount is raw creator-token units and output is native ETH Wei.
minimumOut is 99% of the quoted output. This is not a transaction and
does not replace immediate wallet-side simulation or a deadline.
GET
/
markets
/
{marketId}
/
quote
Quote a creator-token buy or sell
curl --request GET \
--url https://build.vibechain.com/api/retard/v1227/markets/{marketId}/quote \
--header 'API-KEY: <api-key>'import requests
url = "https://build.vibechain.com/api/retard/v1227/markets/{marketId}/quote"
headers = {"API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'API-KEY': '<api-key>'}};
fetch('https://build.vibechain.com/api/retard/v1227/markets/{marketId}/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://build.vibechain.com/api/retard/v1227/markets/{marketId}/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 => [
"API-KEY: <api-key>"
],
]);
$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://build.vibechain.com/api/retard/v1227/markets/{marketId}/quote"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://build.vibechain.com/api/retard/v1227/markets/{marketId}/quote")
.header("API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://build.vibechain.com/api/retard/v1227/markets/{marketId}/quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"marketId": 1,
"coin": "0x41B13C429675015d32377305D03222CbddB20cA0",
"side": "BUY",
"amountIn": "<string>",
"amountOut": "<string>",
"minimumOut": "<string>",
"poolKey": {
"currency0": "0x41B13C429675015d32377305D03222CbddB20cA0",
"currency1": "0x41B13C429675015d32377305D03222CbddB20cA0",
"fee": 20000,
"tickSpacing": 200,
"hooks": "0x41B13C429675015d32377305D03222CbddB20cA0"
},
"projectedBlock": 1,
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "API_KEY_REQUIRED_OR_RATE_LIMITED",
"docs": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Caller-specific VibeChain API key created through /apikey/create.
Path Parameters
Public numeric market ID
Required range:
x >= 0Query Parameters
Available options:
BUY, SELL Positive input amount as a decimal string Positive unsigned integer below 2^128
Pattern:
^[1-9][0-9]{0,38}$Response
Block-pinned trade quote
Required range:
x >= 0Pattern:
^0x[0-9a-fA-F]{40}$Example:
"0x41B13C429675015d32377305D03222CbddB20cA0"
Available options:
BUY, SELL Unsigned integer encoded as a decimal string
Pattern:
^[0-9]+$Unsigned integer encoded as a decimal string
Pattern:
^[0-9]+$Unsigned integer encoded as a decimal string
Pattern:
^[0-9]+$Show child attributes
Show child attributes
Required range:
x >= 0