Deposit into a maker book
Builds an unsigned tx that creates ATAs idempotently, wraps SOL when the affected mint is native, and calls MakerDepositFunds. Used for both LO and MM books.
curl --request POST \
--url https://api.archer.exchange/v1/maker/deposit \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"market": "u8tnfCb1JSSghuNFquQ2beStYgAN1kmd1f1Lhxbaec4",
"signer": "<string>",
"accountOwner": "<string>",
"baseAmount": "1.5",
"kind": "lo",
"platform": "self",
"quoteAmount": "300",
"withInstructions": false
}
'import requests
url = "https://api.archer.exchange/v1/maker/deposit"
payload = {
"market": "u8tnfCb1JSSghuNFquQ2beStYgAN1kmd1f1Lhxbaec4",
"signer": "<string>",
"accountOwner": "<string>",
"baseAmount": "1.5",
"kind": "lo",
"platform": "self",
"quoteAmount": "300",
"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({
market: 'u8tnfCb1JSSghuNFquQ2beStYgAN1kmd1f1Lhxbaec4',
signer: '<string>',
accountOwner: '<string>',
baseAmount: '1.5',
kind: 'lo',
platform: 'self',
quoteAmount: '300',
withInstructions: false
})
};
fetch('https://api.archer.exchange/v1/maker/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/maker/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([
'market' => 'u8tnfCb1JSSghuNFquQ2beStYgAN1kmd1f1Lhxbaec4',
'signer' => '<string>',
'accountOwner' => '<string>',
'baseAmount' => '1.5',
'kind' => 'lo',
'platform' => 'self',
'quoteAmount' => '300',
'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/deposit"
payload := strings.NewReader("{\n \"market\": \"u8tnfCb1JSSghuNFquQ2beStYgAN1kmd1f1Lhxbaec4\",\n \"signer\": \"<string>\",\n \"accountOwner\": \"<string>\",\n \"baseAmount\": \"1.5\",\n \"kind\": \"lo\",\n \"platform\": \"self\",\n \"quoteAmount\": \"300\",\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/deposit")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"market\": \"u8tnfCb1JSSghuNFquQ2beStYgAN1kmd1f1Lhxbaec4\",\n \"signer\": \"<string>\",\n \"accountOwner\": \"<string>\",\n \"baseAmount\": \"1.5\",\n \"kind\": \"lo\",\n \"platform\": \"self\",\n \"quoteAmount\": \"300\",\n \"withInstructions\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.archer.exchange/v1/maker/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 \"market\": \"u8tnfCb1JSSghuNFquQ2beStYgAN1kmd1f1Lhxbaec4\",\n \"signer\": \"<string>\",\n \"accountOwner\": \"<string>\",\n \"baseAmount\": \"1.5\",\n \"kind\": \"lo\",\n \"platform\": \"self\",\n \"quoteAmount\": \"300\",\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
Deposit free balance into a maker book. Amounts are human-decimal strings; absent or empty skips that side. At least one side must be > 0. If the maker book does not yet exist for (market, owner), the tx prepends InitializeMakerBook with the requested kind (defaults to lo).
Market PDA.
"u8tnfCb1JSSghuNFquQ2beStYgAN1kmd1f1Lhxbaec4"
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.
"1.5"
Only used when the maker book doesn't exist yet and needs InitializeMakerBook. lo (default) pins mid at 0 for limit orders; mm allows the movable anchor for market-makers. Init-only and immutable.
lo, mm Platform namespace for accountOwner. Ignored unless accountOwner is set.
self, treadfi "300"
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.
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/deposit \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"market": "u8tnfCb1JSSghuNFquQ2beStYgAN1kmd1f1Lhxbaec4",
"signer": "<string>",
"accountOwner": "<string>",
"baseAmount": "1.5",
"kind": "lo",
"platform": "self",
"quoteAmount": "300",
"withInstructions": false
}
'import requests
url = "https://api.archer.exchange/v1/maker/deposit"
payload = {
"market": "u8tnfCb1JSSghuNFquQ2beStYgAN1kmd1f1Lhxbaec4",
"signer": "<string>",
"accountOwner": "<string>",
"baseAmount": "1.5",
"kind": "lo",
"platform": "self",
"quoteAmount": "300",
"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({
market: 'u8tnfCb1JSSghuNFquQ2beStYgAN1kmd1f1Lhxbaec4',
signer: '<string>',
accountOwner: '<string>',
baseAmount: '1.5',
kind: 'lo',
platform: 'self',
quoteAmount: '300',
withInstructions: false
})
};
fetch('https://api.archer.exchange/v1/maker/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/maker/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([
'market' => 'u8tnfCb1JSSghuNFquQ2beStYgAN1kmd1f1Lhxbaec4',
'signer' => '<string>',
'accountOwner' => '<string>',
'baseAmount' => '1.5',
'kind' => 'lo',
'platform' => 'self',
'quoteAmount' => '300',
'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/deposit"
payload := strings.NewReader("{\n \"market\": \"u8tnfCb1JSSghuNFquQ2beStYgAN1kmd1f1Lhxbaec4\",\n \"signer\": \"<string>\",\n \"accountOwner\": \"<string>\",\n \"baseAmount\": \"1.5\",\n \"kind\": \"lo\",\n \"platform\": \"self\",\n \"quoteAmount\": \"300\",\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/deposit")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"market\": \"u8tnfCb1JSSghuNFquQ2beStYgAN1kmd1f1Lhxbaec4\",\n \"signer\": \"<string>\",\n \"accountOwner\": \"<string>\",\n \"baseAmount\": \"1.5\",\n \"kind\": \"lo\",\n \"platform\": \"self\",\n \"quoteAmount\": \"300\",\n \"withInstructions\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.archer.exchange/v1/maker/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 \"market\": \"u8tnfCb1JSSghuNFquQ2beStYgAN1kmd1f1Lhxbaec4\",\n \"signer\": \"<string>\",\n \"accountOwner\": \"<string>\",\n \"baseAmount\": \"1.5\",\n \"kind\": \"lo\",\n \"platform\": \"self\",\n \"quoteAmount\": \"300\",\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>"
}