Set a maker book's quote expiry
Builds an unsigned tx that sets how many slots the book’s quotes stay eligible for matching. 0 disables expiry. Use it as good-til-time for resting limit orders: once the book is untouched for that many slots the matching engine skips it, so the orders stop being fillable without a cancel. Requires the book to exist.
curl --request POST \
--url https://api.archer.exchange/v1/maker/expiry \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"expiryInSlots": 9000,
"market": "u8tnfCb1JSSghuNFquQ2beStYgAN1kmd1f1Lhxbaec4",
"signer": "GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK",
"accountOwner": "<string>",
"platform": "self",
"withInstructions": false
}
'import requests
url = "https://api.archer.exchange/v1/maker/expiry"
payload = {
"expiryInSlots": 9000,
"market": "u8tnfCb1JSSghuNFquQ2beStYgAN1kmd1f1Lhxbaec4",
"signer": "GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK",
"accountOwner": "<string>",
"platform": "self",
"withInstructions": False
}
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({
expiryInSlots: 9000,
market: 'u8tnfCb1JSSghuNFquQ2beStYgAN1kmd1f1Lhxbaec4',
signer: 'GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK',
accountOwner: '<string>',
platform: 'self',
withInstructions: false
})
};
fetch('https://api.archer.exchange/v1/maker/expiry', 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/maker/expiry",
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([
'expiryInSlots' => 9000,
'market' => 'u8tnfCb1JSSghuNFquQ2beStYgAN1kmd1f1Lhxbaec4',
'signer' => 'GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK',
'accountOwner' => '<string>',
'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/maker/expiry"
payload := strings.NewReader("{\n \"expiryInSlots\": 9000,\n \"market\": \"u8tnfCb1JSSghuNFquQ2beStYgAN1kmd1f1Lhxbaec4\",\n \"signer\": \"GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK\",\n \"accountOwner\": \"<string>\",\n \"platform\": \"self\",\n \"withInstructions\": false\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://api.archer.exchange/v1/maker/expiry")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"expiryInSlots\": 9000,\n \"market\": \"u8tnfCb1JSSghuNFquQ2beStYgAN1kmd1f1Lhxbaec4\",\n \"signer\": \"GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK\",\n \"accountOwner\": \"<string>\",\n \"platform\": \"self\",\n \"withInstructions\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.archer.exchange/v1/maker/expiry")
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 \"expiryInSlots\": 9000,\n \"market\": \"u8tnfCb1JSSghuNFquQ2beStYgAN1kmd1f1Lhxbaec4\",\n \"signer\": \"GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK\",\n \"accountOwner\": \"<string>\",\n \"platform\": \"self\",\n \"withInstructions\": false\n}"
response = http.request(request)
puts response.read_body{
"action": "deposit",
"addressLookupTables": [
"<string>"
],
"baseLots": 123,
"expiresAt": 123,
"quoteLots": 123,
"transaction": "<string>",
"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>"
}
}{
"error": "INVALID_PARAMS",
"message": "<string>"
}{
"error": "INVALID_PARAMS",
"message": "<string>"
}{
"error": "INVALID_PARAMS",
"message": "<string>"
}Authorizations
Body
Set how stale a book's quotes may get before the matching engine skips it: the engine skips a book once current_slot - last_updated_slot reaches expiryInSlots. 0 disables the check. A mainnet slot is ~400ms, so ~9000 slots is about an hour. This is the good-til-time control for resting limit orders — orders stop being fillable once the book goes quiet, with no cancel transaction. A small non-zero value makes the book skippable almost immediately; that is legal on-chain and is not rejected.
Slots of allowed staleness; 0 disables expiry.
x >= 0Market address.
The wallet that signs: the book's maker or its delegate, 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.
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 close transaction.
Unsigned tx for deposit / withdraw / close plus the amounts moved (in on-chain lots).
deposit, withdraw, close Base lots the action moves (the explicit amount withdrawn/deposited). For a withdraw, "all" is resolved server-side to the book's free balance and reported here as that concrete amount. 0 for close.
Quote lots the action moves. Same conventions as baseLots.
Base64 unsigned VersionedTransaction.
Unsigned instructions, present only when the request set withInstructions.
Show child attributes
Show child attributes
curl --request POST \
--url https://api.archer.exchange/v1/maker/expiry \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"expiryInSlots": 9000,
"market": "u8tnfCb1JSSghuNFquQ2beStYgAN1kmd1f1Lhxbaec4",
"signer": "GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK",
"accountOwner": "<string>",
"platform": "self",
"withInstructions": false
}
'import requests
url = "https://api.archer.exchange/v1/maker/expiry"
payload = {
"expiryInSlots": 9000,
"market": "u8tnfCb1JSSghuNFquQ2beStYgAN1kmd1f1Lhxbaec4",
"signer": "GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK",
"accountOwner": "<string>",
"platform": "self",
"withInstructions": False
}
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({
expiryInSlots: 9000,
market: 'u8tnfCb1JSSghuNFquQ2beStYgAN1kmd1f1Lhxbaec4',
signer: 'GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK',
accountOwner: '<string>',
platform: 'self',
withInstructions: false
})
};
fetch('https://api.archer.exchange/v1/maker/expiry', 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/maker/expiry",
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([
'expiryInSlots' => 9000,
'market' => 'u8tnfCb1JSSghuNFquQ2beStYgAN1kmd1f1Lhxbaec4',
'signer' => 'GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK',
'accountOwner' => '<string>',
'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/maker/expiry"
payload := strings.NewReader("{\n \"expiryInSlots\": 9000,\n \"market\": \"u8tnfCb1JSSghuNFquQ2beStYgAN1kmd1f1Lhxbaec4\",\n \"signer\": \"GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK\",\n \"accountOwner\": \"<string>\",\n \"platform\": \"self\",\n \"withInstructions\": false\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://api.archer.exchange/v1/maker/expiry")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"expiryInSlots\": 9000,\n \"market\": \"u8tnfCb1JSSghuNFquQ2beStYgAN1kmd1f1Lhxbaec4\",\n \"signer\": \"GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK\",\n \"accountOwner\": \"<string>\",\n \"platform\": \"self\",\n \"withInstructions\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.archer.exchange/v1/maker/expiry")
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 \"expiryInSlots\": 9000,\n \"market\": \"u8tnfCb1JSSghuNFquQ2beStYgAN1kmd1f1Lhxbaec4\",\n \"signer\": \"GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK\",\n \"accountOwner\": \"<string>\",\n \"platform\": \"self\",\n \"withInstructions\": false\n}"
response = http.request(request)
puts response.read_body{
"action": "deposit",
"addressLookupTables": [
"<string>"
],
"baseLots": 123,
"expiresAt": 123,
"quoteLots": 123,
"transaction": "<string>",
"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>"
}
}{
"error": "INVALID_PARAMS",
"message": "<string>"
}{
"error": "INVALID_PARAMS",
"message": "<string>"
}{
"error": "INVALID_PARAMS",
"message": "<string>"
}