Account
Revoke the account's delegate
Clears the delegate and resets the builder-fee ceiling to 0. Owner only.
DELETE
/
v1
/
account
/
delegate
Revoke the account's delegate
curl --request DELETE \
--url https://api.archer.exchange/v1/account/delegate \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"signer": "GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK",
"platform": "self",
"withInstructions": false
}
'import requests
url = "https://api.archer.exchange/v1/account/delegate"
payload = {
"signer": "GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK",
"platform": "self",
"withInstructions": False
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
signer: 'GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK',
platform: 'self',
withInstructions: false
})
};
fetch('https://api.archer.exchange/v1/account/delegate', 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/account/delegate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'signer' => 'GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK',
'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/account/delegate"
payload := strings.NewReader("{\n \"signer\": \"GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK\",\n \"platform\": \"self\",\n \"withInstructions\": false\n}")
req, _ := http.NewRequest("DELETE", 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.delete("https://api.archer.exchange/v1/account/delegate")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"signer\": \"GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK\",\n \"platform\": \"self\",\n \"withInstructions\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.archer.exchange/v1/account/delegate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"signer\": \"GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK\",\n \"platform\": \"self\",\n \"withInstructions\": false\n}"
response = http.request(request)
puts response.read_body{
"action": "create",
"addressLookupTables": [
"<string>"
],
"archerAccount": "<string>",
"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": "Invalid market address: xyz"
}{
"error": "INVALID_PARAMS",
"message": "<string>"
}{
"error": "RATE_LIMITED",
"message": "Too many requests. Please slow down."
}{
"error": "INTERNAL_ERROR",
"message": "Internal error: ..."
}Authorizations
Body
application/json
The wallet that signs. Must be the account's owner. Existing clients may keep sending it as owner; send one name only.
Example:
"GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK"
Which platform's account. A wallet holds one account per platform, each independently delegated.
Available options:
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
An unsigned transaction for the owner to sign.
Available options:
create, setDelegate, revokeDelegate, deposit, withdraw The ArcherAccount PDA the action targets.
Base64-encoded unsigned transaction for the owner to sign.
Unsigned instructions, present only when the request set withInstructions.
Show child attributes
Show child attributes
Revoke the account's delegate
curl --request DELETE \
--url https://api.archer.exchange/v1/account/delegate \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"signer": "GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK",
"platform": "self",
"withInstructions": false
}
'import requests
url = "https://api.archer.exchange/v1/account/delegate"
payload = {
"signer": "GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK",
"platform": "self",
"withInstructions": False
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
signer: 'GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK',
platform: 'self',
withInstructions: false
})
};
fetch('https://api.archer.exchange/v1/account/delegate', 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/account/delegate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'signer' => 'GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK',
'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/account/delegate"
payload := strings.NewReader("{\n \"signer\": \"GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK\",\n \"platform\": \"self\",\n \"withInstructions\": false\n}")
req, _ := http.NewRequest("DELETE", 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.delete("https://api.archer.exchange/v1/account/delegate")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"signer\": \"GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK\",\n \"platform\": \"self\",\n \"withInstructions\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.archer.exchange/v1/account/delegate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"signer\": \"GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK\",\n \"platform\": \"self\",\n \"withInstructions\": false\n}"
response = http.request(request)
puts response.read_body{
"action": "create",
"addressLookupTables": [
"<string>"
],
"archerAccount": "<string>",
"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": "Invalid market address: xyz"
}{
"error": "INVALID_PARAMS",
"message": "<string>"
}{
"error": "RATE_LIMITED",
"message": "Too many requests. Please slow down."
}{
"error": "INTERNAL_ERROR",
"message": "Internal error: ..."
}