Replace all limit orders on a market
Replaces the maker’s entire resting set on one market with orders, in a single transaction.
The set is the intent: levels absent from it are cancelled, levels whose size changed are resized, new ones are placed. A ten-level ladder is one transaction here rather than ten, and the whole refresh lands atomically or not at all.
Every op is still guarded by the size that was read, so a fill landing between the read and the write fails the transaction (LevelSizeMismatch) instead of overwriting the fill — refetch and retry. Sending the set the book already holds is a no-op: no ops are emitted, no sequence number is consumed, and no write is sent. An empty orders cancels everything.
Post-only applies to any level that grows; crossSpread: true opts out.
curl --request PUT \
--url https://api.archer.exchange/v1/order/limit/set \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"market": "u8tnfCb1JSSghuNFquQ2beStYgAN1kmd1f1Lhxbaec4",
"orders": [
{
"price": "<string>",
"size": "<string>"
}
],
"signer": "GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK",
"accountOwner": "<string>",
"crossSpread": false,
"platform": "self",
"withInstructions": false
}
'import requests
url = "https://api.archer.exchange/v1/order/limit/set"
payload = {
"market": "u8tnfCb1JSSghuNFquQ2beStYgAN1kmd1f1Lhxbaec4",
"orders": [
{
"price": "<string>",
"size": "<string>"
}
],
"signer": "GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK",
"accountOwner": "<string>",
"crossSpread": False,
"platform": "self",
"withInstructions": False
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
market: 'u8tnfCb1JSSghuNFquQ2beStYgAN1kmd1f1Lhxbaec4',
orders: [{price: '<string>', size: '<string>'}],
signer: 'GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK',
accountOwner: '<string>',
crossSpread: false,
platform: 'self',
withInstructions: false
})
};
fetch('https://api.archer.exchange/v1/order/limit/set', 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.archer.exchange/v1/order/limit/set",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'market' => 'u8tnfCb1JSSghuNFquQ2beStYgAN1kmd1f1Lhxbaec4',
'orders' => [
[
'price' => '<string>',
'size' => '<string>'
]
],
'signer' => 'GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK',
'accountOwner' => '<string>',
'crossSpread' => false,
'platform' => 'self',
'withInstructions' => false
]),
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://api.archer.exchange/v1/order/limit/set"
payload := strings.NewReader("{\n \"market\": \"u8tnfCb1JSSghuNFquQ2beStYgAN1kmd1f1Lhxbaec4\",\n \"orders\": [\n {\n \"price\": \"<string>\",\n \"size\": \"<string>\"\n }\n ],\n \"signer\": \"GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK\",\n \"accountOwner\": \"<string>\",\n \"crossSpread\": false,\n \"platform\": \"self\",\n \"withInstructions\": false\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.archer.exchange/v1/order/limit/set")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"market\": \"u8tnfCb1JSSghuNFquQ2beStYgAN1kmd1f1Lhxbaec4\",\n \"orders\": [\n {\n \"price\": \"<string>\",\n \"size\": \"<string>\"\n }\n ],\n \"signer\": \"GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK\",\n \"accountOwner\": \"<string>\",\n \"crossSpread\": false,\n \"platform\": \"self\",\n \"withInstructions\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.archer.exchange/v1/order/limit/set")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"market\": \"u8tnfCb1JSSghuNFquQ2beStYgAN1kmd1f1Lhxbaec4\",\n \"orders\": [\n {\n \"price\": \"<string>\",\n \"size\": \"<string>\"\n }\n ],\n \"signer\": \"GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK\",\n \"accountOwner\": \"<string>\",\n \"crossSpread\": false,\n \"platform\": \"self\",\n \"withInstructions\": false\n}"
response = http.request(request)
puts response.read_body{
"addressLookupTables": [
"<string>"
],
"anchorMidTicks": 123,
"depositBaseLots": 123,
"depositQuoteLots": 123,
"expiresAt": 123,
"includesDeposit": true,
"nextSequenceNumber": 123,
"orderIds": [
"<string>"
],
"requiredBaseLots": 123,
"requiredQuoteLots": 123,
"transaction": "<string>",
"orderKind": "limit",
"instructions": {
"addressLookupTables": [
"<string>"
],
"computeBudgetInstructions": [
{
"accounts": [
{
"isSigner": true,
"isWritable": true,
"pubkey": "<string>"
}
],
"data": "<string>",
"programId": "<string>"
}
],
"instructions": [
{
"accounts": [
{
"isSigner": true,
"isWritable": true,
"pubkey": "<string>"
}
],
"data": "<string>",
"programId": "<string>"
}
],
"signer": "<string>"
},
"price": "<string>",
"side": "buy",
"size": "<string>"
}{
"error": "INVALID_PARAMS",
"message": "<string>"
}{
"error": "INVALID_PARAMS",
"message": "<string>"
}{
"error": "INVALID_PARAMS",
"message": "<string>"
}Authorizations
Body
Replace every resting limit order on one market with orders.
The complete intended set. Empty cancels every resting order.
Show child attributes
Show child attributes
The wallet that signs: the book's maker, or with accountOwner the account's owner or delegate. Existing clients may keep sending it as owner; send one name only.
The wallet that owns the ArcherAccount this request acts through. With platform it derives the account PDA server-side — you never handle a PDA. Omit for a plain wallet-owned book. Replaces the earlier archerAccount field, which is no longer read.
Allow levels that cross a registered maker's quote. Default false sends the write post-only.
Platform namespace for accountOwner. Ignored unless accountOwner is set.
self, treadfi Also return the unsigned instructions under instructions, for composing your own transaction instead of signing ours. Omitted or false leaves the response exactly as it was.
Response
Unsigned transaction built (limit order, or a market order when swapIfReject fired).
- Option 1
- Option 2
Result of placing a limit order. When orderKind='limit', all LimitOrderActionResponse fields are present at the top level. When the price crossed the spread and swapIfReject was set, orderKind='market' and all BuildOrderResponse fields are present at the top level instead.
The book's mid anchor in ticks. Always 0 for limit-order books: a level's offset is its absolute price tick.
The maker-book sequence number this tx writes.
Total base lots the resulting book state requires as collateral (the program's update_book solvency check).
Total quote lots required, including the positive-maker-fee buffer.
Base64 unsigned VersionedTransaction in its wire encoding: a v0 message when the write fits 1232 bytes, otherwise a v1 (SIMD-0385) message, which a full maker registry needs. A v1 transaction must be sent base64-encoded and signed by a wallet that supports version 1.
Which kind of order was built. 'market' only when a spread-crossing price triggered the swapIfReject fallback.
limit, market Unsigned instructions, present only when the request set withInstructions.
Show child attributes
Show child attributes
Human price (quote per base) the order rests/rested at. Absent for cancel-all.
Side this action targets. Absent for cancel-all.
buy, sell Human base-token size the action targets — placed size (place), new size (modify), or canceled size (cancel-one). Absent for cancel-all.
curl --request PUT \
--url https://api.archer.exchange/v1/order/limit/set \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"market": "u8tnfCb1JSSghuNFquQ2beStYgAN1kmd1f1Lhxbaec4",
"orders": [
{
"price": "<string>",
"size": "<string>"
}
],
"signer": "GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK",
"accountOwner": "<string>",
"crossSpread": false,
"platform": "self",
"withInstructions": false
}
'import requests
url = "https://api.archer.exchange/v1/order/limit/set"
payload = {
"market": "u8tnfCb1JSSghuNFquQ2beStYgAN1kmd1f1Lhxbaec4",
"orders": [
{
"price": "<string>",
"size": "<string>"
}
],
"signer": "GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK",
"accountOwner": "<string>",
"crossSpread": False,
"platform": "self",
"withInstructions": False
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
market: 'u8tnfCb1JSSghuNFquQ2beStYgAN1kmd1f1Lhxbaec4',
orders: [{price: '<string>', size: '<string>'}],
signer: 'GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK',
accountOwner: '<string>',
crossSpread: false,
platform: 'self',
withInstructions: false
})
};
fetch('https://api.archer.exchange/v1/order/limit/set', 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.archer.exchange/v1/order/limit/set",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'market' => 'u8tnfCb1JSSghuNFquQ2beStYgAN1kmd1f1Lhxbaec4',
'orders' => [
[
'price' => '<string>',
'size' => '<string>'
]
],
'signer' => 'GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK',
'accountOwner' => '<string>',
'crossSpread' => false,
'platform' => 'self',
'withInstructions' => false
]),
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://api.archer.exchange/v1/order/limit/set"
payload := strings.NewReader("{\n \"market\": \"u8tnfCb1JSSghuNFquQ2beStYgAN1kmd1f1Lhxbaec4\",\n \"orders\": [\n {\n \"price\": \"<string>\",\n \"size\": \"<string>\"\n }\n ],\n \"signer\": \"GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK\",\n \"accountOwner\": \"<string>\",\n \"crossSpread\": false,\n \"platform\": \"self\",\n \"withInstructions\": false\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.archer.exchange/v1/order/limit/set")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"market\": \"u8tnfCb1JSSghuNFquQ2beStYgAN1kmd1f1Lhxbaec4\",\n \"orders\": [\n {\n \"price\": \"<string>\",\n \"size\": \"<string>\"\n }\n ],\n \"signer\": \"GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK\",\n \"accountOwner\": \"<string>\",\n \"crossSpread\": false,\n \"platform\": \"self\",\n \"withInstructions\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.archer.exchange/v1/order/limit/set")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"market\": \"u8tnfCb1JSSghuNFquQ2beStYgAN1kmd1f1Lhxbaec4\",\n \"orders\": [\n {\n \"price\": \"<string>\",\n \"size\": \"<string>\"\n }\n ],\n \"signer\": \"GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK\",\n \"accountOwner\": \"<string>\",\n \"crossSpread\": false,\n \"platform\": \"self\",\n \"withInstructions\": false\n}"
response = http.request(request)
puts response.read_body{
"addressLookupTables": [
"<string>"
],
"anchorMidTicks": 123,
"depositBaseLots": 123,
"depositQuoteLots": 123,
"expiresAt": 123,
"includesDeposit": true,
"nextSequenceNumber": 123,
"orderIds": [
"<string>"
],
"requiredBaseLots": 123,
"requiredQuoteLots": 123,
"transaction": "<string>",
"orderKind": "limit",
"instructions": {
"addressLookupTables": [
"<string>"
],
"computeBudgetInstructions": [
{
"accounts": [
{
"isSigner": true,
"isWritable": true,
"pubkey": "<string>"
}
],
"data": "<string>",
"programId": "<string>"
}
],
"instructions": [
{
"accounts": [
{
"isSigner": true,
"isWritable": true,
"pubkey": "<string>"
}
],
"data": "<string>",
"programId": "<string>"
}
],
"signer": "<string>"
},
"price": "<string>",
"side": "buy",
"size": "<string>"
}{
"error": "INVALID_PARAMS",
"message": "<string>"
}{
"error": "INVALID_PARAMS",
"message": "<string>"
}{
"error": "INVALID_PARAMS",
"message": "<string>"
}