User
Save one UI preference
Creates or replaces the UI preference blob stored under key for the authenticated user. Last write wins — clients send debounced writes after local (optimistic) updates, so the server copy trails the device by a second or two. Maximum payload is 512KB per key; keys must match ^[a-z0-9_]+(:[A-Za-z0-9._-]+)?$.
PUT
/
v1
/
user
/
ui-preferences
/
{key}
Save one UI preference
curl --request PUT \
--url https://api.hyperprop.com/platform/v1/user/ui-preferences/{key} \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"candleUpColor": "#22c55e",
"clickToTrade": true
}
}
'import requests
url = "https://api.hyperprop.com/platform/v1/user/ui-preferences/{key}"
payload = { "data": {
"candleUpColor": "#22c55e",
"clickToTrade": True
} }
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({data: {candleUpColor: '#22c55e', clickToTrade: true}})
};
fetch('https://api.hyperprop.com/platform/v1/user/ui-preferences/{key}', 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.hyperprop.com/platform/v1/user/ui-preferences/{key}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'candleUpColor' => '#22c55e',
'clickToTrade' => true
]
]),
CURLOPT_HTTPHEADER => [
"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://api.hyperprop.com/platform/v1/user/ui-preferences/{key}"
payload := strings.NewReader("{\n \"data\": {\n \"candleUpColor\": \"#22c55e\",\n \"clickToTrade\": true\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
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.put("https://api.hyperprop.com/platform/v1/user/ui-preferences/{key}")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"candleUpColor\": \"#22c55e\",\n \"clickToTrade\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperprop.com/platform/v1/user/ui-preferences/{key}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"candleUpColor\": \"#22c55e\",\n \"clickToTrade\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"key": "chart_settings",
"updatedAt": "2026-07-24T15:00:00.000Z"
}
}{
"statusCode": 400,
"error": "Bad Request",
"message": "Preference rejected (key format or size limit)",
"code": "UI_PREFERENCE_INVALID"
}{
"success": false,
"statusCode": 401,
"error": "Unauthorized",
"message": "Authentication required",
"code": "UNAUTHORIZED"
}{
"success": false,
"statusCode": 500,
"error": "Internal Server Error",
"message": "An unexpected error occurred",
"code": "INTERNAL_ERROR"
}Path Parameters
Namespaced preference key: lowercase namespace, optional :qualifier (e.g. drawings:ESU6).
Maximum string length:
64Pattern:
^[a-z0-9_]+(:[A-Za-z0-9._-]+)?$Body
application/json
Opaque JSON document (object or array) owned by the client.
Example:
{
"candleUpColor": "#22c55e",
"clickToTrade": true
}
Related topics
Delete one UI preferenceGet all UI preferencesUpdate notification preferencesGet notification preferencesRevoke (soft delete) a PnL card⌘I
Save one UI preference
curl --request PUT \
--url https://api.hyperprop.com/platform/v1/user/ui-preferences/{key} \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"candleUpColor": "#22c55e",
"clickToTrade": true
}
}
'import requests
url = "https://api.hyperprop.com/platform/v1/user/ui-preferences/{key}"
payload = { "data": {
"candleUpColor": "#22c55e",
"clickToTrade": True
} }
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({data: {candleUpColor: '#22c55e', clickToTrade: true}})
};
fetch('https://api.hyperprop.com/platform/v1/user/ui-preferences/{key}', 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.hyperprop.com/platform/v1/user/ui-preferences/{key}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'candleUpColor' => '#22c55e',
'clickToTrade' => true
]
]),
CURLOPT_HTTPHEADER => [
"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://api.hyperprop.com/platform/v1/user/ui-preferences/{key}"
payload := strings.NewReader("{\n \"data\": {\n \"candleUpColor\": \"#22c55e\",\n \"clickToTrade\": true\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
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.put("https://api.hyperprop.com/platform/v1/user/ui-preferences/{key}")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"candleUpColor\": \"#22c55e\",\n \"clickToTrade\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperprop.com/platform/v1/user/ui-preferences/{key}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"candleUpColor\": \"#22c55e\",\n \"clickToTrade\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"key": "chart_settings",
"updatedAt": "2026-07-24T15:00:00.000Z"
}
}{
"statusCode": 400,
"error": "Bad Request",
"message": "Preference rejected (key format or size limit)",
"code": "UI_PREFERENCE_INVALID"
}{
"success": false,
"statusCode": 401,
"error": "Unauthorized",
"message": "Authentication required",
"code": "UNAUTHORIZED"
}{
"success": false,
"statusCode": 500,
"error": "Internal Server Error",
"message": "An unexpected error occurred",
"code": "INTERNAL_ERROR"
}