Quote a perp open
curl --request POST \
--url https://router.raze.bot/perp/sol/quote \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"market_id": "jup:SOL-PERP",
"side": "long",
"collateral_usdc_e6": 100000000,
"leverage_bps": 50000,
"slippage_bps": 50
}
'import requests
url = "https://router.raze.bot/perp/sol/quote"
payload = {
"market_id": "jup:SOL-PERP",
"side": "long",
"collateral_usdc_e6": 100000000,
"leverage_bps": 50000,
"slippage_bps": 50
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
market_id: 'jup:SOL-PERP',
side: 'long',
collateral_usdc_e6: 100000000,
leverage_bps: 50000,
slippage_bps: 50
})
};
fetch('https://router.raze.bot/perp/sol/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://router.raze.bot/perp/sol/quote",
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([
'market_id' => 'jup:SOL-PERP',
'side' => 'long',
'collateral_usdc_e6' => 100000000,
'leverage_bps' => 50000,
'slippage_bps' => 50
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://router.raze.bot/perp/sol/quote"
payload := strings.NewReader("{\n \"market_id\": \"jup:SOL-PERP\",\n \"side\": \"long\",\n \"collateral_usdc_e6\": 100000000,\n \"leverage_bps\": 50000,\n \"slippage_bps\": 50\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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://router.raze.bot/perp/sol/quote")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"market_id\": \"jup:SOL-PERP\",\n \"side\": \"long\",\n \"collateral_usdc_e6\": 100000000,\n \"leverage_bps\": 50000,\n \"slippage_bps\": 50\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://router.raze.bot/perp/sol/quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"market_id\": \"jup:SOL-PERP\",\n \"side\": \"long\",\n \"collateral_usdc_e6\": 100000000,\n \"leverage_bps\": 50000,\n \"slippage_bps\": 50\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"market_id": "<string>",
"entry_price": 123,
"est_liquidation_price": 123,
"size": 123,
"funding_or_borrow_bps_per_hour": 123,
"fee_bps": 123,
"quote_ts_ms": 123,
"slot": 123
},
"error": "<string>"
}Perpetuals
Quote a perp open
Compute expected entry, liquidation price, position size, and funding/borrow rate for a hypothetical perp open.
Reads live Pyth from the in-process oracle map; falls back to the
venue’s quote API when the feed is missing. Cached for 10s by
(market_id, side, size, leverage).
POST
/
perp
/
sol
/
quote
Quote a perp open
curl --request POST \
--url https://router.raze.bot/perp/sol/quote \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"market_id": "jup:SOL-PERP",
"side": "long",
"collateral_usdc_e6": 100000000,
"leverage_bps": 50000,
"slippage_bps": 50
}
'import requests
url = "https://router.raze.bot/perp/sol/quote"
payload = {
"market_id": "jup:SOL-PERP",
"side": "long",
"collateral_usdc_e6": 100000000,
"leverage_bps": 50000,
"slippage_bps": 50
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
market_id: 'jup:SOL-PERP',
side: 'long',
collateral_usdc_e6: 100000000,
leverage_bps: 50000,
slippage_bps: 50
})
};
fetch('https://router.raze.bot/perp/sol/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://router.raze.bot/perp/sol/quote",
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([
'market_id' => 'jup:SOL-PERP',
'side' => 'long',
'collateral_usdc_e6' => 100000000,
'leverage_bps' => 50000,
'slippage_bps' => 50
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://router.raze.bot/perp/sol/quote"
payload := strings.NewReader("{\n \"market_id\": \"jup:SOL-PERP\",\n \"side\": \"long\",\n \"collateral_usdc_e6\": 100000000,\n \"leverage_bps\": 50000,\n \"slippage_bps\": 50\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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://router.raze.bot/perp/sol/quote")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"market_id\": \"jup:SOL-PERP\",\n \"side\": \"long\",\n \"collateral_usdc_e6\": 100000000,\n \"leverage_bps\": 50000,\n \"slippage_bps\": 50\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://router.raze.bot/perp/sol/quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"market_id\": \"jup:SOL-PERP\",\n \"side\": \"long\",\n \"collateral_usdc_e6\": 100000000,\n \"leverage_bps\": 50000,\n \"slippage_bps\": 50\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"market_id": "<string>",
"entry_price": 123,
"est_liquidation_price": 123,
"size": 123,
"funding_or_borrow_bps_per_hour": 123,
"fee_bps": 123,
"quote_ts_ms": 123,
"slot": 123
},
"error": "<string>"
}Authorizations
ApiKeyAuthBearerAuth
Body
application/json
Example:
"jup:SOL-PERP"
Available options:
long, short Collateral the user is putting up, denominated in USDC micros (1e6 = $1).
Example:
100000000
Leverage in basis-points (10000 = 1x).
Example:
50000
Optional slippage tolerance in bps. Defaults to 50 (0.5%).
Example:
50
⌘I
