Deposit into an ArcherAccount
Moves tokens from the owner’s token account into the account’s (a plain SPL transfer — the account’s token accounts are ordinary ATAs, so deposits can also arrive from anywhere without this endpoint), and/or lamports to the account PDA.
curl --request POST \
--url https://api.archer.exchange/v1/account/deposit \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"signer": "GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK",
"amount": "1.5",
"lamports": 123,
"mint": "So11111111111111111111111111111111111111112",
"platform": "self",
"withInstructions": false,
"wrapSol": true
}
'import requests
url = "https://api.archer.exchange/v1/account/deposit"
payload = {
"signer": "GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK",
"amount": "1.5",
"lamports": 123,
"mint": "So11111111111111111111111111111111111111112",
"platform": "self",
"withInstructions": False,
"wrapSol": True
}
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({
signer: 'GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK',
amount: '1.5',
lamports: 123,
mint: 'So11111111111111111111111111111111111111112',
platform: 'self',
withInstructions: false,
wrapSol: true
})
};
fetch('https://api.archer.exchange/v1/account/deposit', 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/deposit",
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([
'signer' => 'GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK',
'amount' => '1.5',
'lamports' => 123,
'mint' => 'So11111111111111111111111111111111111111112',
'platform' => 'self',
'withInstructions' => false,
'wrapSol' => true
]),
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/deposit"
payload := strings.NewReader("{\n \"signer\": \"GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK\",\n \"amount\": \"1.5\",\n \"lamports\": 123,\n \"mint\": \"So11111111111111111111111111111111111111112\",\n \"platform\": \"self\",\n \"withInstructions\": false,\n \"wrapSol\": true\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/account/deposit")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"signer\": \"GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK\",\n \"amount\": \"1.5\",\n \"lamports\": 123,\n \"mint\": \"So11111111111111111111111111111111111111112\",\n \"platform\": \"self\",\n \"withInstructions\": false,\n \"wrapSol\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.archer.exchange/v1/account/deposit")
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 \"signer\": \"GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK\",\n \"amount\": \"1.5\",\n \"lamports\": 123,\n \"mint\": \"So11111111111111111111111111111111111111112\",\n \"platform\": \"self\",\n \"withInstructions\": false,\n \"wrapSol\": true\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
Provide mint + amount and/or lamports.
The wallet that signs. Must be the account's owner; the funds leave this wallet. Existing clients may keep sending it as owner; send one name only.
"GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK"
Token amount, decimal string in the mint's units.
"1.5"
SOL to deposit as lamports held by the account PDA itself — spendable as rent for maker books, withdrawable with withdraw.
Token to deposit into the account's token account (created if needed).
"So11111111111111111111111111111111111111112"
Which platform's account. A wallet holds one account per platform, each independently delegated.
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.
For the native mint: wrap SOL from the owner straight into the account's wSOL token account.
Response
An unsigned transaction for the owner to sign.
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
curl --request POST \
--url https://api.archer.exchange/v1/account/deposit \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"signer": "GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK",
"amount": "1.5",
"lamports": 123,
"mint": "So11111111111111111111111111111111111111112",
"platform": "self",
"withInstructions": false,
"wrapSol": true
}
'import requests
url = "https://api.archer.exchange/v1/account/deposit"
payload = {
"signer": "GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK",
"amount": "1.5",
"lamports": 123,
"mint": "So11111111111111111111111111111111111111112",
"platform": "self",
"withInstructions": False,
"wrapSol": True
}
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({
signer: 'GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK',
amount: '1.5',
lamports: 123,
mint: 'So11111111111111111111111111111111111111112',
platform: 'self',
withInstructions: false,
wrapSol: true
})
};
fetch('https://api.archer.exchange/v1/account/deposit', 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/deposit",
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([
'signer' => 'GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK',
'amount' => '1.5',
'lamports' => 123,
'mint' => 'So11111111111111111111111111111111111111112',
'platform' => 'self',
'withInstructions' => false,
'wrapSol' => true
]),
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/deposit"
payload := strings.NewReader("{\n \"signer\": \"GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK\",\n \"amount\": \"1.5\",\n \"lamports\": 123,\n \"mint\": \"So11111111111111111111111111111111111111112\",\n \"platform\": \"self\",\n \"withInstructions\": false,\n \"wrapSol\": true\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/account/deposit")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"signer\": \"GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK\",\n \"amount\": \"1.5\",\n \"lamports\": 123,\n \"mint\": \"So11111111111111111111111111111111111111112\",\n \"platform\": \"self\",\n \"withInstructions\": false,\n \"wrapSol\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.archer.exchange/v1/account/deposit")
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 \"signer\": \"GLKCuotKSjPtQhxHmf6q8GUkw6tUZnzs8W5vEbxdaBdK\",\n \"amount\": \"1.5\",\n \"lamports\": 123,\n \"mint\": \"So11111111111111111111111111111111111111112\",\n \"platform\": \"self\",\n \"withInstructions\": false,\n \"wrapSol\": true\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: ..."
}