Place a limit order
curl --request POST \
--url https://relay-production-f175.up.railway.app/v1/limit-orders \
--header 'Content-Type: application/json' \
--data '
{
"draft": {},
"signature": {},
"erc2612": {}
}
'import requests
url = "https://relay-production-f175.up.railway.app/v1/limit-orders"
payload = {
"draft": {},
"signature": {},
"erc2612": {}
}
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({draft: {}, signature: {}, erc2612: {}})
};
fetch('https://relay-production-f175.up.railway.app/v1/limit-orders', 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://relay-production-f175.up.railway.app/v1/limit-orders",
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([
'draft' => [
],
'signature' => [
],
'erc2612' => [
]
]),
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://relay-production-f175.up.railway.app/v1/limit-orders"
payload := strings.NewReader("{\n \"draft\": {},\n \"signature\": {},\n \"erc2612\": {}\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://relay-production-f175.up.railway.app/v1/limit-orders")
.header("Content-Type", "application/json")
.body("{\n \"draft\": {},\n \"signature\": {},\n \"erc2612\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://relay-production-f175.up.railway.app/v1/limit-orders")
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 \"draft\": {},\n \"signature\": {},\n \"erc2612\": {}\n}"
response = http.request(request)
puts response.read_body{
"limitOrderId": "<string>",
"chainId": 123,
"status": "<string>",
"gasFee": {},
"permit": {},
"expiresAt": "<string>",
"quoteId": {},
"attempts": 123,
"lastError": {},
"lastCheckedAt": {},
"bestReceived": {},
"cancelMessage": "<string>",
"revoke": {}
}Limit orders
Place a limit order
Book a signed draft. The relay re-derives every term and checks the taker’s funds and approval.
POST
/
v1
/
limit-orders
Place a limit order
curl --request POST \
--url https://relay-production-f175.up.railway.app/v1/limit-orders \
--header 'Content-Type: application/json' \
--data '
{
"draft": {},
"signature": {},
"erc2612": {}
}
'import requests
url = "https://relay-production-f175.up.railway.app/v1/limit-orders"
payload = {
"draft": {},
"signature": {},
"erc2612": {}
}
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({draft: {}, signature: {}, erc2612: {}})
};
fetch('https://relay-production-f175.up.railway.app/v1/limit-orders', 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://relay-production-f175.up.railway.app/v1/limit-orders",
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([
'draft' => [
],
'signature' => [
],
'erc2612' => [
]
]),
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://relay-production-f175.up.railway.app/v1/limit-orders"
payload := strings.NewReader("{\n \"draft\": {},\n \"signature\": {},\n \"erc2612\": {}\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://relay-production-f175.up.railway.app/v1/limit-orders")
.header("Content-Type", "application/json")
.body("{\n \"draft\": {},\n \"signature\": {},\n \"erc2612\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://relay-production-f175.up.railway.app/v1/limit-orders")
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 \"draft\": {},\n \"signature\": {},\n \"erc2612\": {}\n}"
response = http.request(request)
puts response.read_body{
"limitOrderId": "<string>",
"chainId": 123,
"status": "<string>",
"gasFee": {},
"permit": {},
"expiresAt": "<string>",
"quoteId": {},
"attempts": 123,
"lastError": {},
"lastCheckedAt": {},
"bestReceived": {},
"cancelMessage": "<string>",
"revoke": {}
}object
required
The draft from
prepare, unchanged.hex
required
The taker’s signature over the draft’s
typedData.object
{ value, deadline, v, r, s } when the sell token supports EIP-2612 and Permit2 is not yet approved.201 with the order. The keeper leader auctions it every LIMIT_POLL_MS (5 s) while its price is
within 150 bps of the oracle mid, and fills it through executeLimit when a resolver meets the price.
string
number
string
open, filling, filled, cancelled or expired.object
{ token, max }.object
{ token, amount, nonce, deadline }.string
string | null
The quote that filled it.
number
Auctions run so far.
string | null
string | null
string | null
The best offer at the last auction.
string
The EIP-191 text to sign to cancel:
panofx-cancel-limit|<chainId>|<orderId>.object
{ permit2, wordPos, mask }: the invalidateUnorderedNonces call that ends the Permit2 signature itself.400 terms_mismatch, bad_signature, below_minimum, bad_expiry, limit_below_fees,
taker_not_ready; 409 nonce_used, wrong_chain; 429 too_many_open.
