curl --request POST \
--url https://api.limitless.exchange/auth/api-tokens/derive \
--header 'Content-Type: application/json' \
--header 'lmts-api-key: <api-key>' \
--data '
{
"label": "production-trading-bot",
"scopes": [
"trading",
"account_creation"
]
}
'import requests
url = "https://api.limitless.exchange/auth/api-tokens/derive"
payload = {
"label": "production-trading-bot",
"scopes": ["trading", "account_creation"]
}
headers = {
"lmts-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'lmts-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({label: 'production-trading-bot', scopes: ['trading', 'account_creation']})
};
fetch('https://api.limitless.exchange/auth/api-tokens/derive', 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.limitless.exchange/auth/api-tokens/derive",
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([
'label' => 'production-trading-bot',
'scopes' => [
'trading',
'account_creation'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"lmts-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.limitless.exchange/auth/api-tokens/derive"
payload := strings.NewReader("{\n \"label\": \"production-trading-bot\",\n \"scopes\": [\n \"trading\",\n \"account_creation\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("lmts-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.limitless.exchange/auth/api-tokens/derive")
.header("lmts-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"label\": \"production-trading-bot\",\n \"scopes\": [\n \"trading\",\n \"account_creation\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.limitless.exchange/auth/api-tokens/derive")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["lmts-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"label\": \"production-trading-bot\",\n \"scopes\": [\n \"trading\",\n \"account_creation\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"apiKey": "dGVzdC10b2tlbi0x",
"secret": "c2VjcmV0LWtleS1leGFtcGxlLWJhc2U2NC1lbmNvZGVk",
"tokenId": "dGVzdC10b2tlbi0x",
"createdAt": "2023-11-07T05:31:56Z",
"scopes": [
"trading",
"account_creation"
],
"profile": {
"id": 42,
"account": "0x27b4afBD88fE7c88c6897BB0b4ADE338D0401E37"
}
}Derive Scoped Token
Creates a new scoped API token for the authenticated partner. Requires Privy authentication (Bearer token). The token secret is returned once at creation — store it securely. Requested scopes must be a subset of the partner’s allowed scopes.
curl --request POST \
--url https://api.limitless.exchange/auth/api-tokens/derive \
--header 'Content-Type: application/json' \
--header 'lmts-api-key: <api-key>' \
--data '
{
"label": "production-trading-bot",
"scopes": [
"trading",
"account_creation"
]
}
'import requests
url = "https://api.limitless.exchange/auth/api-tokens/derive"
payload = {
"label": "production-trading-bot",
"scopes": ["trading", "account_creation"]
}
headers = {
"lmts-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'lmts-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({label: 'production-trading-bot', scopes: ['trading', 'account_creation']})
};
fetch('https://api.limitless.exchange/auth/api-tokens/derive', 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.limitless.exchange/auth/api-tokens/derive",
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([
'label' => 'production-trading-bot',
'scopes' => [
'trading',
'account_creation'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"lmts-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.limitless.exchange/auth/api-tokens/derive"
payload := strings.NewReader("{\n \"label\": \"production-trading-bot\",\n \"scopes\": [\n \"trading\",\n \"account_creation\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("lmts-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.limitless.exchange/auth/api-tokens/derive")
.header("lmts-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"label\": \"production-trading-bot\",\n \"scopes\": [\n \"trading\",\n \"account_creation\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.limitless.exchange/auth/api-tokens/derive")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["lmts-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"label\": \"production-trading-bot\",\n \"scopes\": [\n \"trading\",\n \"account_creation\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"apiKey": "dGVzdC10b2tlbi0x",
"secret": "c2VjcmV0LWtleS1leGFtcGxlLWJhc2U2NC1lbmNvZGVk",
"tokenId": "dGVzdC10b2tlbi0x",
"createdAt": "2023-11-07T05:31:56Z",
"scopes": [
"trading",
"account_creation"
],
"profile": {
"id": 42,
"account": "0x27b4afBD88fE7c88c6897BB0b4ADE338D0401E37"
}
}token field from the Privy authenticate response (the identity token) in the identity header as Bearer <token>. Do not use privy_access_token. HMAC and API key auth are not accepted for this endpoint.secret field is returned once at creation time. Store it securely — it cannot be retrieved again.Scopes
| Scope | Description |
|---|---|
trading | Place and cancel orders. Default scope. Required for delegated_signing. |
account_creation | Create sub-account profiles under your partner account. |
delegated_signing | Server signs orders on behalf of sub-accounts via Privy server wallet. Requires trading. |
scopes is omitted from the request body, the token is created with ["trading"] only.
Requested scopes must be a subset of your partner’s allowedScopes (see Get Partner Capabilities).
Using the token
After deriving a token, authenticate subsequent requests using HMAC signing with the returnedapiKey (token ID) and secret. See HMAC Request Signing for the signing protocol.Authorizations
Scoped API token with HMAC-SHA256 signing. Requires three headers: lmts-api-key (token ID), lmts-timestamp (ISO-8601), lmts-signature (Base64-encoded HMAC). See Authentication docs for details.
Body
Human-readable label for the token
128"production-trading-bot"
Scopes to grant. Defaults to ["trading"] if omitted. Must be a subset of the partner's allowed scopes. delegated_signing requires trading.
trading, account_creation, delegated_signing ["trading", "account_creation"]
Response
Token created successfully. The secret is only returned once.
The token ID, used as the lmts-api-key header value for HMAC requests
"dGVzdC10b2tlbi0x"
Base64-encoded secret for HMAC signing. Returned once — store securely.
"c2VjcmV0LWtleS1leGFtcGxlLWJhc2U2NC1lbmNvZGVk"
Same as apiKey. The unique token identifier.
"dGVzdC10b2tlbi0x"
Token creation timestamp
Granted scopes
["trading", "account_creation"]
Show child attributes
Show child attributes