Bots
Caller-scoped bot automation resources
Requires an API key created with the immutable bot-withdrawal capability. Funds can move only from the authenticated bot account to that bot's registered owner.
A successful response means the request, immutable Hedera transaction identity, and balance reservations are durable. It does not mean the transaction has already been submitted or reached consensus; poll the returned _links.self resource until terminal is true.
The body must be strict JSON: unknown properties, duplicate keys, trailing JSON values, numeric amount values, Content-Encoding, and request bodies larger than 16 KiB are rejected. Send Content-Type: application/json, serialize the body once, hash those exact transmitted bytes, and send no query string.
X-API-KEY and X-PLEX-SIGNATURE are represented by this operation's security schemes. The other four required signing headers are explicit operation parameters below.
Ed25519 V2 signing
V2 names the signing protocol, not the REST path version. Use it whenever an operation's security requirement contains Ed25519V2Sig.
Serialize the request body exactly once to the bytes that will be sent. Do not compress it or reserialize it after signing. A bodyless request signs zero bytes.
Set
X-PLEX-CONTENT-SHA256to lowercase hexadecimal SHA-256 of those exact bytes.Build this canonical text, substituting the exact header and request values:
LPX-ED25519-V2
<exact X-API-KEY value>
<uppercase HTTP method>
<raw request path>
<X-PLEX-TIMESTAMP decimal value>
<X-PLEX-RECV-WINDOW decimal value>
<X-PLEX-CONTENT-SHA256 lowercase value>Every line separator is one LF byte (0x0A), including one final LF after the content hash. There is no leading LF, CR byte, blank line, or surrounding whitespace. Encode the canonical text as UTF-8, sign those bytes with the API key's Ed25519 private key, and set X-PLEX-SIGNATURE to standard padded Base64 of the raw 64-byte signature.
The raw path begins with / and is exactly the URL path sent on the wire. It excludes scheme, authority, fragment, and query. Do not URL-decode, normalize, or re-encode it. V2 requests must not contain a query string. Send exactly one value for each required V2 header.
Minimal Python reference, assuming private_key is a loaded cryptography.hazmat.primitives.asymmetric.ed25519.Ed25519PrivateKey:
For a bodyless GET, use body = b"", omit Content-Type, and substitute the complete resource path before calculating the signature.
Deterministic interoperability vector
The timestamp below is intentionally fixed and is only for testing a signer; a live request must use a fresh server-compatible epoch-millisecond timestamp.
API key:
lp_example_bot_keyMethod:
POSTRaw path:
/api/v1/bot/withdrawalsTimestamp:
1784832000123Receive window:
5000Exact body length:
174UTF-8 bytes, with no trailing newlineExact body:
Expected body SHA-256:
08b4bf5aa2a74824b03226f3277a248fc80d37acc8e1d5721464fba2a270cd02Canonical UTF-8 text:
The canonical text above has one final LF after the hash and is exactly 147 bytes.
Test-only Ed25519 material—never register or fund this key:
32-byte private seed:
9d61b19deffd5a60ba844af492ec2cc44449c5697b326919703bac031cae7f60Public key:
d75a980182b10ab7d54bfed3c964073a0ee172f3daa62325af021a68f707511aExpected
X-PLEX-SIGNATURE:XFXlsg5++OyHm81DXCYg785515Jz1ecHtO9fJiZNEr3RXvkzB9FDcQmA7Q/uRlCK6JUVIphKY5I+OrV3UswqDQ==
Weight: 100
Ed25519 V2 signing
V2 names the signing protocol, not the REST path version. Use it whenever an
operation's security requirement contains Ed25519V2Sig.
- Serialize the request body exactly once to the bytes that will be sent. Do not compress it or reserialize it after signing. A bodyless request signs zero bytes.
- Set
X-PLEX-CONTENT-SHA256to lowercase hexadecimal SHA-256 of those exact bytes. - Build this canonical text, substituting the exact header and request values:
LPX-ED25519-V2
<exact X-API-KEY value>
<uppercase HTTP method>
<raw request path>
<X-PLEX-TIMESTAMP decimal value>
<X-PLEX-RECV-WINDOW decimal value>
<X-PLEX-CONTENT-SHA256 lowercase value>
Every line separator is one LF byte (0x0A), including one final LF after the
content hash. There is no leading LF, CR byte, blank line, or surrounding whitespace.
Encode the canonical text as UTF-8, sign those bytes with the API key's Ed25519 private
key, and set X-PLEX-SIGNATURE to standard padded Base64 of the raw 64-byte signature.
The raw path begins with / and is exactly the URL path sent on the wire. It excludes
scheme, authority, fragment, and query. Do not URL-decode, normalize, or re-encode it.
V2 requests must not contain a query string. Send exactly one value for each required
V2 header.
Minimal Python reference, assuming private_key is a loaded
cryptography.hazmat.primitives.asymmetric.ed25519.Ed25519PrivateKey:
import base64, hashlib, json, requests
# Define api_key, private_key, base_url, and payload before this block.
method = "POST"
raw_path = "/api/v1/bot/withdrawals"
timestamp = str(requests.get(base_url + "/api/v1/time", timeout=30).json()["serverTime"])
recv_window = "5000"
body = json.dumps(payload, separators=(",", ":"), ensure_ascii=False).encode("utf-8")
content_hash = hashlib.sha256(body).hexdigest()
canonical = "\n".join([
"LPX-ED25519-V2", api_key, method, raw_path,
timestamp, recv_window, content_hash, ""
]).encode("utf-8")
headers = {
"X-API-KEY": api_key,
"X-PLEX-SIGNATURE-VERSION": "2",
"X-PLEX-TIMESTAMP": timestamp,
"X-PLEX-RECV-WINDOW": recv_window,
"X-PLEX-CONTENT-SHA256": content_hash,
"X-PLEX-SIGNATURE": base64.b64encode(private_key.sign(canonical)).decode("ascii"),
"Content-Type": "application/json",
}
response = requests.request(method, base_url + raw_path, data=body, headers=headers)
For a bodyless GET, use body = b"", omit Content-Type, and substitute the complete
resource path before calculating the signature.
Deterministic interoperability vector
The timestamp below is intentionally fixed and is only for testing a signer; a live request must use a fresh server-compatible epoch-millisecond timestamp.
- API key:
lp_example_bot_key - Method:
POST - Raw path:
/api/v1/bot/withdrawals - Timestamp:
1784832000123 - Receive window:
5000 - Exact body length:
174UTF-8 bytes, with no trailing newline - Exact body:
{"clientWithdrawalId":"accountant-2026-07-23T20:00Z","transfers":[{"asset":"HBAR","amount":"123.5"},{"asset":"USDC","amount":"400"},{"asset":"0.0.789012","amount":"0.0001"}]}
- Expected body SHA-256:
08b4bf5aa2a74824b03226f3277a248fc80d37acc8e1d5721464fba2a270cd02 - Canonical UTF-8 text:
LPX-ED25519-V2
lp_example_bot_key
POST
/api/v1/bot/withdrawals
1784832000123
5000
08b4bf5aa2a74824b03226f3277a248fc80d37acc8e1d5721464fba2a270cd02
The canonical text above has one final LF after the hash and is exactly 147 bytes.
Test-only Ed25519 material—never register or fund this key:
- 32-byte private seed:
9d61b19deffd5a60ba844af492ec2cc44449c5697b326919703bac031cae7f60 - Public key:
d75a980182b10ab7d54bfed3c964073a0ee172f3daa62325af021a68f707511a - Expected
X-PLEX-SIGNATURE:XFXlsg5++OyHm81DXCYg785515Jz1ecHtO9fJiZNEr3RXvkzB9FDcQmA7Q/uRlCK6JUVIphKY5I+OrV3UswqDQ==
API key identifier. For Ed25519 V2 operations, its exact header value is the second line of the canonical signing payload.
Ed25519 signing protocol version. This operation accepts only the literal 2.
2Possible values: Fresh Unix epoch time in decimal milliseconds. Use GET /api/v1/time to avoid local-clock drift; sign this exact decimal text. The fixed example belongs only to the interoperability vector and is stale for live requests.
1784832000123Pattern: ^[0-9]+$Positive receive window in decimal milliseconds. 5000 is the current maximum; sign this exact decimal text.
5000Pattern: ^[1-9][0-9]*$Lowercase hexadecimal SHA-256 of the exact transmitted request-body bytes.
08b4bf5aa2a74824b03226f3277a248fc80d37acc8e1d5721464fba2a270cd02Pattern: ^[0-9a-f]{64}$Idempotent request to transfer one or more assets from a bot to its registered owner
Caller-generated idempotency key, unique per bot
accountant-2026-07-23T20:00ZPattern: ^[A-Za-z0-9._:-]+$Exact idempotent replay of a terminal withdrawal
Withdrawal durably queued
Invalid request
Missing or invalid V2 signing headers or signature
Key lacks withdrawal capability
Idempotency, active-slot, association, or funds conflict
Request body exceeds the 16 KiB V2 limit
Rolling withdrawal budget or general API-key rate limit exhausted
Withdrawal intake or a required dependency is unavailable
POST /api/v1/bot/withdrawals HTTP/1.1
Host: api.lambdaplex.io
X-PLEX-SIGNATURE: YOUR_API_KEY
X-API-KEY: YOUR_API_KEY
X-PLEX-SIGNATURE-VERSION: 2
X-PLEX-TIMESTAMP: text
X-PLEX-RECV-WINDOW: text
X-PLEX-CONTENT-SHA256: text
Content-Type: application/json
Accept: */*
Content-Length: 174
{
"clientWithdrawalId": "accountant-2026-07-23T20:00Z",
"transfers": [
{
"asset": "HBAR",
"amount": "123.5"
},
{
"asset": "USDC",
"amount": "400"
},
{
"asset": "0.0.789012",
"amount": "0.0001"
}
]
}{
"withdrawalId": "text",
"clientWithdrawalId": "text",
"status": "QUEUED",
"terminal": true,
"from": "text",
"to": "text",
"transfers": [
{
"asset": "text",
"symbol": "text",
"amount": "text"
}
],
"transaction": {
"transactionId": "text",
"nodeAccountId": "text",
"validStart": "text",
"precheckStatus": "text",
"receiptStatus": "text",
"consensusTimestamp": "text"
},
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z",
"submittedAt": "2026-01-01T00:00:00.000Z",
"completedAt": "2026-01-01T00:00:00.000Z",
"failure": {
"code": "text",
"message": "text"
},
"_links": {
"self": "text"
}
}Returns the current durable state only when the withdrawal belongs to the authenticated bot. Poll until terminal is true; terminal statuses are SUCCEEDED and FAILED.
Send no request body, no Content-Type, and no query string. The exact body is therefore zero bytes and X-PLEX-CONTENT-SHA256 must be: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855.
X-API-KEY and X-PLEX-SIGNATURE are represented by this operation's security schemes. The other four required signing headers are explicit operation parameters below. Substitute the complete raw path, including the withdrawalId, into the V2 canonical payload.
Ed25519 V2 signing
V2 names the signing protocol, not the REST path version. Use it whenever an operation's security requirement contains Ed25519V2Sig.
Serialize the request body exactly once to the bytes that will be sent. Do not compress it or reserialize it after signing. A bodyless request signs zero bytes.
Set
X-PLEX-CONTENT-SHA256to lowercase hexadecimal SHA-256 of those exact bytes.Build this canonical text, substituting the exact header and request values:
LPX-ED25519-V2
<exact X-API-KEY value>
<uppercase HTTP method>
<raw request path>
<X-PLEX-TIMESTAMP decimal value>
<X-PLEX-RECV-WINDOW decimal value>
<X-PLEX-CONTENT-SHA256 lowercase value>Every line separator is one LF byte (0x0A), including one final LF after the content hash. There is no leading LF, CR byte, blank line, or surrounding whitespace. Encode the canonical text as UTF-8, sign those bytes with the API key's Ed25519 private key, and set X-PLEX-SIGNATURE to standard padded Base64 of the raw 64-byte signature.
The raw path begins with / and is exactly the URL path sent on the wire. It excludes scheme, authority, fragment, and query. Do not URL-decode, normalize, or re-encode it. V2 requests must not contain a query string. Send exactly one value for each required V2 header.
Minimal Python reference, assuming private_key is a loaded cryptography.hazmat.primitives.asymmetric.ed25519.Ed25519PrivateKey:
For a bodyless GET, use body = b"", omit Content-Type, and substitute the complete resource path before calculating the signature.
Weight: 2
Ed25519 V2 signing
V2 names the signing protocol, not the REST path version. Use it whenever an
operation's security requirement contains Ed25519V2Sig.
- Serialize the request body exactly once to the bytes that will be sent. Do not compress it or reserialize it after signing. A bodyless request signs zero bytes.
- Set
X-PLEX-CONTENT-SHA256to lowercase hexadecimal SHA-256 of those exact bytes. - Build this canonical text, substituting the exact header and request values:
LPX-ED25519-V2
<exact X-API-KEY value>
<uppercase HTTP method>
<raw request path>
<X-PLEX-TIMESTAMP decimal value>
<X-PLEX-RECV-WINDOW decimal value>
<X-PLEX-CONTENT-SHA256 lowercase value>
Every line separator is one LF byte (0x0A), including one final LF after the
content hash. There is no leading LF, CR byte, blank line, or surrounding whitespace.
Encode the canonical text as UTF-8, sign those bytes with the API key's Ed25519 private
key, and set X-PLEX-SIGNATURE to standard padded Base64 of the raw 64-byte signature.
The raw path begins with / and is exactly the URL path sent on the wire. It excludes
scheme, authority, fragment, and query. Do not URL-decode, normalize, or re-encode it.
V2 requests must not contain a query string. Send exactly one value for each required
V2 header.
Minimal Python reference, assuming private_key is a loaded
cryptography.hazmat.primitives.asymmetric.ed25519.Ed25519PrivateKey:
import base64, hashlib, json, requests
# Define api_key, private_key, base_url, and payload before this block.
method = "POST"
raw_path = "/api/v1/bot/withdrawals"
timestamp = str(requests.get(base_url + "/api/v1/time", timeout=30).json()["serverTime"])
recv_window = "5000"
body = json.dumps(payload, separators=(",", ":"), ensure_ascii=False).encode("utf-8")
content_hash = hashlib.sha256(body).hexdigest()
canonical = "\n".join([
"LPX-ED25519-V2", api_key, method, raw_path,
timestamp, recv_window, content_hash, ""
]).encode("utf-8")
headers = {
"X-API-KEY": api_key,
"X-PLEX-SIGNATURE-VERSION": "2",
"X-PLEX-TIMESTAMP": timestamp,
"X-PLEX-RECV-WINDOW": recv_window,
"X-PLEX-CONTENT-SHA256": content_hash,
"X-PLEX-SIGNATURE": base64.b64encode(private_key.sign(canonical)).decode("ascii"),
"Content-Type": "application/json",
}
response = requests.request(method, base_url + raw_path, data=body, headers=headers)
For a bodyless GET, use body = b"", omit Content-Type, and substitute the complete
resource path before calculating the signature.
Deterministic interoperability vector
The timestamp below is intentionally fixed and is only for testing a signer; a live request must use a fresh server-compatible epoch-millisecond timestamp.
- API key:
lp_example_bot_key - Method:
POST - Raw path:
/api/v1/bot/withdrawals - Timestamp:
1784832000123 - Receive window:
5000 - Exact body length:
174UTF-8 bytes, with no trailing newline - Exact body:
{"clientWithdrawalId":"accountant-2026-07-23T20:00Z","transfers":[{"asset":"HBAR","amount":"123.5"},{"asset":"USDC","amount":"400"},{"asset":"0.0.789012","amount":"0.0001"}]}
- Expected body SHA-256:
08b4bf5aa2a74824b03226f3277a248fc80d37acc8e1d5721464fba2a270cd02 - Canonical UTF-8 text:
LPX-ED25519-V2
lp_example_bot_key
POST
/api/v1/bot/withdrawals
1784832000123
5000
08b4bf5aa2a74824b03226f3277a248fc80d37acc8e1d5721464fba2a270cd02
The canonical text above has one final LF after the hash and is exactly 147 bytes.
Test-only Ed25519 material—never register or fund this key:
- 32-byte private seed:
9d61b19deffd5a60ba844af492ec2cc44449c5697b326919703bac031cae7f60 - Public key:
d75a980182b10ab7d54bfed3c964073a0ee172f3daa62325af021a68f707511a - Expected
X-PLEX-SIGNATURE:XFXlsg5++OyHm81DXCYg785515Jz1ecHtO9fJiZNEr3RXvkzB9FDcQmA7Q/uRlCK6JUVIphKY5I+OrV3UswqDQ==
API key identifier. For Ed25519 V2 operations, its exact header value is the second line of the canonical signing payload.
Opaque server-assigned withdrawal ID returned by the create operation
wd_AQIDBAUGBwgJCgsMDQ4PEAPattern: ^wd_[A-Za-z0-9_-]{22}$Ed25519 signing protocol version. This operation accepts only the literal 2.
2Possible values: Fresh Unix epoch time in decimal milliseconds. Use GET /api/v1/time to avoid local-clock drift; sign this exact decimal text. The fixed example belongs only to the interoperability vector and is stale for live requests.
1784832000123Pattern: ^[0-9]+$Positive receive window in decimal milliseconds. 5000 is the current maximum; sign this exact decimal text.
5000Pattern: ^[1-9][0-9]*$Lowercase hexadecimal SHA-256 of the zero-length request body.
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855Pattern: ^[0-9a-f]{64}$Current durable withdrawal state
A body was supplied to the status request
Missing or invalid V2 signing headers or signature
Key lacks withdrawal capability
Unknown or foreign withdrawal ID
Too Many Requests - Rate limit exceeded.
Service Unavailable
GET /api/v1/bot/withdrawals/{withdrawalId} HTTP/1.1
Host: api.lambdaplex.io
X-PLEX-SIGNATURE: YOUR_API_KEY
X-API-KEY: YOUR_API_KEY
X-PLEX-SIGNATURE-VERSION: 2
X-PLEX-TIMESTAMP: text
X-PLEX-RECV-WINDOW: text
X-PLEX-CONTENT-SHA256: text
Accept: */*
{
"withdrawalId": "text",
"clientWithdrawalId": "text",
"status": "QUEUED",
"terminal": true,
"from": "text",
"to": "text",
"transfers": [
{
"asset": "text",
"symbol": "text",
"amount": "text"
}
],
"transaction": {
"transactionId": "text",
"nodeAccountId": "text",
"validStart": "text",
"precheckStatus": "text",
"receiptStatus": "text",
"consensusTimestamp": "text"
},
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z",
"submittedAt": "2026-01-01T00:00:00.000Z",
"completedAt": "2026-01-01T00:00:00.000Z",
"failure": {
"code": "text",
"message": "text"
},
"_links": {
"self": "text"
}
}Last updated