Create a market order
curl --request POST \
--url https://router-gateway-v3-production.up.railway.app/order/market \
--header 'Content-Type: application/json' \
--data '
{
"quoteId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fromAddress": "<string>",
"toAddress": "<string>",
"idempotencyKey": "<string>",
"refundAuthorizer": "<string>",
"refundAddress": "<string>",
"integrator": "<string>",
"refundMode": "evmSignature",
"amountFormat": "readable"
}
'import requests
url = "https://router-gateway-v3-production.up.railway.app/order/market"
payload = {
"quoteId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fromAddress": "<string>",
"toAddress": "<string>",
"idempotencyKey": "<string>",
"refundAuthorizer": "<string>",
"refundAddress": "<string>",
"integrator": "<string>",
"refundMode": "evmSignature",
"amountFormat": "readable"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
quoteId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
fromAddress: '<string>',
toAddress: '<string>',
idempotencyKey: '<string>',
refundAuthorizer: '<string>',
refundAddress: '<string>',
integrator: '<string>',
refundMode: 'evmSignature',
amountFormat: 'readable'
})
};
fetch('https://router-gateway-v3-production.up.railway.app/order/market', 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-gateway-v3-production.up.railway.app/order/market",
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([
'quoteId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'fromAddress' => '<string>',
'toAddress' => '<string>',
'idempotencyKey' => '<string>',
'refundAuthorizer' => '<string>',
'refundAddress' => '<string>',
'integrator' => '<string>',
'refundMode' => 'evmSignature',
'amountFormat' => 'readable'
]),
CURLOPT_HTTPHEADER => [
"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://router-gateway-v3-production.up.railway.app/order/market"
payload := strings.NewReader("{\n \"quoteId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"fromAddress\": \"<string>\",\n \"toAddress\": \"<string>\",\n \"idempotencyKey\": \"<string>\",\n \"refundAuthorizer\": \"<string>\",\n \"refundAddress\": \"<string>\",\n \"integrator\": \"<string>\",\n \"refundMode\": \"evmSignature\",\n \"amountFormat\": \"readable\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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-gateway-v3-production.up.railway.app/order/market")
.header("Content-Type", "application/json")
.body("{\n \"quoteId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"fromAddress\": \"<string>\",\n \"toAddress\": \"<string>\",\n \"idempotencyKey\": \"<string>\",\n \"refundAuthorizer\": \"<string>\",\n \"refundAddress\": \"<string>\",\n \"integrator\": \"<string>\",\n \"refundMode\": \"evmSignature\",\n \"amountFormat\": \"readable\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://router-gateway-v3-production.up.railway.app/order/market")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"quoteId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"fromAddress\": \"<string>\",\n \"toAddress\": \"<string>\",\n \"idempotencyKey\": \"<string>\",\n \"refundAuthorizer\": \"<string>\",\n \"refundAddress\": \"<string>\",\n \"integrator\": \"<string>\",\n \"refundMode\": \"evmSignature\",\n \"amountFormat\": \"readable\"\n}"
response = http.request(request)
puts response.read_body{
"orderId": "00000000-0000-4000-8000-000000000002",
"orderAddress": "bc1q2p8ms86h3namagp4y486udsv4syydhvqztg886",
"amountToSend": "10",
"quoteId": "00000000-0000-4000-8000-000000000001",
"orderType": "market_order",
"from": "Bitcoin.BTC",
"to": "Ethereum.USDC",
"status": "quoted",
"expiry": "2026-05-04T12:10:00Z",
"estimatedOut": "100000",
"route": [
{
"venue": "cctp_standard",
"from": "Ethereum.USDC",
"to": "Base.USDC",
"amountIn": "5",
"providerAmountIn": "4.995",
"providerAmountOut": "4.993",
"amountOut": "4.992",
"paymasterReimbursement": {
"inputRetained": "0.005",
"outputRetained": "0.001"
}
}
],
"amountFormat": "readable",
"refundMode": "evmSignature",
"refundAuthorizer": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"refundToken": "rgt_abcdefghijklmnopqrstuvwxyz",
"expectedSwapTimeMs": 63000
}{
"error": {
"code": "invalid_request",
"message": "Invalid gateway request.",
"details": "<unknown>"
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid gateway request.",
"details": "<unknown>"
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid gateway request.",
"details": "<unknown>"
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid gateway request.",
"details": "<unknown>"
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid gateway request.",
"details": "<unknown>"
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid gateway request.",
"details": "<unknown>"
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid gateway request.",
"details": "<unknown>"
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid gateway request.",
"details": "<unknown>"
}
}API Endpoints (beta)
Create a market order
POST
/
order
/
market
Create a market order
curl --request POST \
--url https://router-gateway-v3-production.up.railway.app/order/market \
--header 'Content-Type: application/json' \
--data '
{
"quoteId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fromAddress": "<string>",
"toAddress": "<string>",
"idempotencyKey": "<string>",
"refundAuthorizer": "<string>",
"refundAddress": "<string>",
"integrator": "<string>",
"refundMode": "evmSignature",
"amountFormat": "readable"
}
'import requests
url = "https://router-gateway-v3-production.up.railway.app/order/market"
payload = {
"quoteId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fromAddress": "<string>",
"toAddress": "<string>",
"idempotencyKey": "<string>",
"refundAuthorizer": "<string>",
"refundAddress": "<string>",
"integrator": "<string>",
"refundMode": "evmSignature",
"amountFormat": "readable"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
quoteId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
fromAddress: '<string>',
toAddress: '<string>',
idempotencyKey: '<string>',
refundAuthorizer: '<string>',
refundAddress: '<string>',
integrator: '<string>',
refundMode: 'evmSignature',
amountFormat: 'readable'
})
};
fetch('https://router-gateway-v3-production.up.railway.app/order/market', 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-gateway-v3-production.up.railway.app/order/market",
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([
'quoteId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'fromAddress' => '<string>',
'toAddress' => '<string>',
'idempotencyKey' => '<string>',
'refundAuthorizer' => '<string>',
'refundAddress' => '<string>',
'integrator' => '<string>',
'refundMode' => 'evmSignature',
'amountFormat' => 'readable'
]),
CURLOPT_HTTPHEADER => [
"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://router-gateway-v3-production.up.railway.app/order/market"
payload := strings.NewReader("{\n \"quoteId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"fromAddress\": \"<string>\",\n \"toAddress\": \"<string>\",\n \"idempotencyKey\": \"<string>\",\n \"refundAuthorizer\": \"<string>\",\n \"refundAddress\": \"<string>\",\n \"integrator\": \"<string>\",\n \"refundMode\": \"evmSignature\",\n \"amountFormat\": \"readable\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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-gateway-v3-production.up.railway.app/order/market")
.header("Content-Type", "application/json")
.body("{\n \"quoteId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"fromAddress\": \"<string>\",\n \"toAddress\": \"<string>\",\n \"idempotencyKey\": \"<string>\",\n \"refundAuthorizer\": \"<string>\",\n \"refundAddress\": \"<string>\",\n \"integrator\": \"<string>\",\n \"refundMode\": \"evmSignature\",\n \"amountFormat\": \"readable\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://router-gateway-v3-production.up.railway.app/order/market")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"quoteId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"fromAddress\": \"<string>\",\n \"toAddress\": \"<string>\",\n \"idempotencyKey\": \"<string>\",\n \"refundAuthorizer\": \"<string>\",\n \"refundAddress\": \"<string>\",\n \"integrator\": \"<string>\",\n \"refundMode\": \"evmSignature\",\n \"amountFormat\": \"readable\"\n}"
response = http.request(request)
puts response.read_body{
"orderId": "00000000-0000-4000-8000-000000000002",
"orderAddress": "bc1q2p8ms86h3namagp4y486udsv4syydhvqztg886",
"amountToSend": "10",
"quoteId": "00000000-0000-4000-8000-000000000001",
"orderType": "market_order",
"from": "Bitcoin.BTC",
"to": "Ethereum.USDC",
"status": "quoted",
"expiry": "2026-05-04T12:10:00Z",
"estimatedOut": "100000",
"route": [
{
"venue": "cctp_standard",
"from": "Ethereum.USDC",
"to": "Base.USDC",
"amountIn": "5",
"providerAmountIn": "4.995",
"providerAmountOut": "4.993",
"amountOut": "4.992",
"paymasterReimbursement": {
"inputRetained": "0.005",
"outputRetained": "0.001"
}
}
],
"amountFormat": "readable",
"refundMode": "evmSignature",
"refundAuthorizer": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"refundToken": "rgt_abcdefghijklmnopqrstuvwxyz",
"expectedSwapTimeMs": 63000
}{
"error": {
"code": "invalid_request",
"message": "Invalid gateway request.",
"details": "<unknown>"
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid gateway request.",
"details": "<unknown>"
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid gateway request.",
"details": "<unknown>"
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid gateway request.",
"details": "<unknown>"
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid gateway request.",
"details": "<unknown>"
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid gateway request.",
"details": "<unknown>"
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid gateway request.",
"details": "<unknown>"
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid gateway request.",
"details": "<unknown>"
}
}Body
application/json
Required string length:
1 - 128Required string length:
1 - 128Required string length:
16 - 128Pattern:
^[A-Za-z0-9._:-]+$Required string length:
1 - 128Required string length:
1 - 128Required string length:
1 - 128Available options:
evmSignature, token Example:
"evmSignature"
Available options:
readable, raw Example:
"readable"
Response
Order created by the internal router API.
Example:
"00000000-0000-4000-8000-000000000002"
Example:
"bc1q2p8ms86h3namagp4y486udsv4syydhvqztg886"
Example:
"10"
Example:
"00000000-0000-4000-8000-000000000001"
Available options:
market_order Example:
"market_order"
Example:
"Bitcoin.BTC"
Example:
"Ethereum.USDC"
Example:
"quoted"
Example:
"2026-05-04T12:10:00Z"
Example:
"100000"
Route legs describing the hop-by-hop execution of the winning quote path.
Show child attributes
Show child attributes
Available options:
readable, raw Example:
"readable"
Available options:
evmSignature, token Example:
"evmSignature"
Example:
"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
Example:
"rgt_abcdefghijklmnopqrstuvwxyz"
Required range:
x >= 0Example:
63000
⌘I