cURL
curl --request POST \
--url https://gateway.architect.exchange/api/api-keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"account_ids": [
"<string>"
],
"allowed_ips": [
"<string>"
],
"permissions": {
"can_list": true,
"can_read": true,
"can_reduce_or_close": true,
"can_set_limits": true,
"can_trade": true
}
}
'import requests
url = "https://gateway.architect.exchange/api/api-keys"
payload = {
"account_ids": ["<string>"],
"allowed_ips": ["<string>"],
"permissions": {
"can_list": True,
"can_read": True,
"can_reduce_or_close": True,
"can_set_limits": True,
"can_trade": True
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
account_ids: ['<string>'],
allowed_ips: ['<string>'],
permissions: {
can_list: true,
can_read: true,
can_reduce_or_close: true,
can_set_limits: true,
can_trade: true
}
})
};
fetch('https://gateway.architect.exchange/api/api-keys', 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://gateway.architect.exchange/api/api-keys",
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([
'account_ids' => [
'<string>'
],
'allowed_ips' => [
'<string>'
],
'permissions' => [
'can_list' => true,
'can_read' => true,
'can_reduce_or_close' => true,
'can_set_limits' => true,
'can_trade' => true
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://gateway.architect.exchange/api/api-keys"
payload := strings.NewReader("{\n \"account_ids\": [\n \"<string>\"\n ],\n \"allowed_ips\": [\n \"<string>\"\n ],\n \"permissions\": {\n \"can_list\": true,\n \"can_read\": true,\n \"can_reduce_or_close\": true,\n \"can_set_limits\": true,\n \"can_trade\": true\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://gateway.architect.exchange/api/api-keys")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"account_ids\": [\n \"<string>\"\n ],\n \"allowed_ips\": [\n \"<string>\"\n ],\n \"permissions\": {\n \"can_list\": true,\n \"can_read\": true,\n \"can_reduce_or_close\": true,\n \"can_set_limits\": true,\n \"can_trade\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway.architect.exchange/api/api-keys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account_ids\": [\n \"<string>\"\n ],\n \"allowed_ips\": [\n \"<string>\"\n ],\n \"permissions\": {\n \"can_list\": true,\n \"can_read\": true,\n \"can_reduce_or_close\": true,\n \"can_set_limits\": true,\n \"can_trade\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"api_key": "<string>",
"api_secret": "<string>"
}User management
Create API key
POST
/
api-keys
cURL
curl --request POST \
--url https://gateway.architect.exchange/api/api-keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"account_ids": [
"<string>"
],
"allowed_ips": [
"<string>"
],
"permissions": {
"can_list": true,
"can_read": true,
"can_reduce_or_close": true,
"can_set_limits": true,
"can_trade": true
}
}
'import requests
url = "https://gateway.architect.exchange/api/api-keys"
payload = {
"account_ids": ["<string>"],
"allowed_ips": ["<string>"],
"permissions": {
"can_list": True,
"can_read": True,
"can_reduce_or_close": True,
"can_set_limits": True,
"can_trade": True
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
account_ids: ['<string>'],
allowed_ips: ['<string>'],
permissions: {
can_list: true,
can_read: true,
can_reduce_or_close: true,
can_set_limits: true,
can_trade: true
}
})
};
fetch('https://gateway.architect.exchange/api/api-keys', 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://gateway.architect.exchange/api/api-keys",
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([
'account_ids' => [
'<string>'
],
'allowed_ips' => [
'<string>'
],
'permissions' => [
'can_list' => true,
'can_read' => true,
'can_reduce_or_close' => true,
'can_set_limits' => true,
'can_trade' => true
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://gateway.architect.exchange/api/api-keys"
payload := strings.NewReader("{\n \"account_ids\": [\n \"<string>\"\n ],\n \"allowed_ips\": [\n \"<string>\"\n ],\n \"permissions\": {\n \"can_list\": true,\n \"can_read\": true,\n \"can_reduce_or_close\": true,\n \"can_set_limits\": true,\n \"can_trade\": true\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://gateway.architect.exchange/api/api-keys")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"account_ids\": [\n \"<string>\"\n ],\n \"allowed_ips\": [\n \"<string>\"\n ],\n \"permissions\": {\n \"can_list\": true,\n \"can_read\": true,\n \"can_reduce_or_close\": true,\n \"can_set_limits\": true,\n \"can_trade\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway.architect.exchange/api/api-keys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account_ids\": [\n \"<string>\"\n ],\n \"allowed_ips\": [\n \"<string>\"\n ],\n \"permissions\": {\n \"can_list\": true,\n \"can_read\": true,\n \"can_reduce_or_close\": true,\n \"can_set_limits\": true,\n \"can_trade\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"api_key": "<string>",
"api_secret": "<string>"
}Authorizations
User session token
Body
application/json
Accounts the key may act on. Each must be one the caller has access to. When omitted, the key covers every account the caller can access. When provided, the key is restricted to exactly those accounts.
Permissions to grant the key, intersected per request with the caller's current permissions on the requested account (so a key can never out-rank its owner). When omitted, the key is granted full permissions and behaves as the user.
Show child attributes
Show child attributes
⌘I