Trading (HTTP - Signed)
Update User Settings (Signed)
Set per-symbol max leverage via the unified transaction endpoint
POST
/
order
Update leverage settings
curl -X POST https://mainnet-api1.bulk.trade/api/v1/order \
-H "Content-Type: application/json" \
-d '{"actions":[{"updateUserSettings":{"m":{"BTC-USD":5.0,"ETH-USD":3.0}}}],"nonce":1704067200000,"account":"FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7","signer":"FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7","signature":"5JXWgp1fW6px2Gjhw6YHhQ4..."}'import requests
url = "https://mainnet-api1.bulk.trade/api/v1/order"
payload = {
"actions": [{ "updateUserSettings": { "m": {
"BTC-USD": 5,
"ETH-USD": 3
} } }],
"nonce": 1704067200000,
"account": "FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7",
"signer": "FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7",
"signature": "5JXWgp1fW6px2Gjhw6YHhQ4..."
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
actions: [{updateUserSettings: {m: {'BTC-USD': 5, 'ETH-USD': 3}}}],
nonce: 1704067200000,
account: 'FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7',
signer: 'FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7',
signature: '5JXWgp1fW6px2Gjhw6YHhQ4...'
})
};
fetch('https://mainnet-api1.bulk.trade/api/v1/order', 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://mainnet-api1.bulk.trade/api/v1/order",
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([
'actions' => [
[
'updateUserSettings' => [
'm' => [
'BTC-USD' => 5,
'ETH-USD' => 3
]
]
]
],
'nonce' => 1704067200000,
'account' => 'FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7',
'signer' => 'FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7',
'signature' => '5JXWgp1fW6px2Gjhw6YHhQ4...'
]),
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://mainnet-api1.bulk.trade/api/v1/order"
payload := strings.NewReader("{\n \"actions\": [\n {\n \"updateUserSettings\": {\n \"m\": {\n \"BTC-USD\": 5,\n \"ETH-USD\": 3\n }\n }\n }\n ],\n \"nonce\": 1704067200000,\n \"account\": \"FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7\",\n \"signer\": \"FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7\",\n \"signature\": \"5JXWgp1fW6px2Gjhw6YHhQ4...\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://mainnet-api1.bulk.trade/api/v1/order")
.header("Content-Type", "application/json")
.body("{\n \"actions\": [\n {\n \"updateUserSettings\": {\n \"m\": {\n \"BTC-USD\": 5,\n \"ETH-USD\": 3\n }\n }\n }\n ],\n \"nonce\": 1704067200000,\n \"account\": \"FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7\",\n \"signer\": \"FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7\",\n \"signature\": \"5JXWgp1fW6px2Gjhw6YHhQ4...\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mainnet-api1.bulk.trade/api/v1/order")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"actions\": [\n {\n \"updateUserSettings\": {\n \"m\": {\n \"BTC-USD\": 5,\n \"ETH-USD\": 3\n }\n }\n }\n ],\n \"nonce\": 1704067200000,\n \"account\": \"FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7\",\n \"signer\": \"FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7\",\n \"signature\": \"5JXWgp1fW6px2Gjhw6YHhQ4...\"\n}"
response = http.request(request)
puts response.read_body{
"status": "ok",
"response": {
"type": "order",
"data": {
"statuses": []
}
}
}Leverage settings are updated via the unified
For user settings, the action is a single
Max Leverage (
Object mapping symbol to maximum leverage (1.0–50.0). Cannot exceed the market’s configured maximum.
Constraints:
POST /order endpoint. Send a transaction with an updateUserSettings action in the actions array.
Transaction Envelope
Every request toPOST /order has this shape:
{
"actions": [Action, ...],
"nonce": 1704067200000,
"account": "base58_pubkey",
"signer": "base58_pubkey",
"signature": "base58_signature"
}
updateUserSettings object.
Settings Fields
Max Leverage (m)
Object mapping symbol to maximum leverage (1.0–50.0). Cannot exceed the market’s configured maximum.
| Field | Type | Description |
|---|---|---|
m | object | Map of symbol → max_leverage (e.g. {"BTC-USD": 5.0, "ETH-USD": 3.0}). |
- Leverage is clamped between
1.0and50.0 - Cannot exceed the market’s configured maximum leverage
- Lower leverage reduces liquidation risk
Request Example
{
"actions": [
{"updateUserSettings": {"m": {"BTC-USD": 5.0, "ETH-USD": 3.0}}}
],
"nonce": 1704067200000,
"account": "FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7",
"signer": "FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7",
"signature": "5JXWgp1fW6px2Gjhw6YHhQ4wEqb6FqMam6m4yg4uRcCksH9WxSv9dVjizGfD4StGtv1z9gR71unZY6tQ6dNDdJ3K"
}
Response
SameOrderResponse format as other actions. For update user settings, success returns an empty or applied status; settings are applied to the account.
{
"status": "ok",
"response": {
"type": "order",
"data": {
"statuses": []
}
}
}
Before You Start
See the Transaction Signing guide for how to sign your requests.Nonce: Use a unique value (e.g. timestamp in nanoseconds):
BigInt(Date.now()) * 1_000_000nBody
application/json
Transaction with a single updateUserSettings action
Must contain exactly one updateUserSettings action
Show child attributes
Show child attributes
Unique nonce (e.g. nanoseconds)
Account public key (base58)
Signer public key (base58)
Ed25519 signature (base58)
⌘I
Update leverage settings
curl -X POST https://mainnet-api1.bulk.trade/api/v1/order \
-H "Content-Type: application/json" \
-d '{"actions":[{"updateUserSettings":{"m":{"BTC-USD":5.0,"ETH-USD":3.0}}}],"nonce":1704067200000,"account":"FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7","signer":"FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7","signature":"5JXWgp1fW6px2Gjhw6YHhQ4..."}'import requests
url = "https://mainnet-api1.bulk.trade/api/v1/order"
payload = {
"actions": [{ "updateUserSettings": { "m": {
"BTC-USD": 5,
"ETH-USD": 3
} } }],
"nonce": 1704067200000,
"account": "FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7",
"signer": "FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7",
"signature": "5JXWgp1fW6px2Gjhw6YHhQ4..."
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
actions: [{updateUserSettings: {m: {'BTC-USD': 5, 'ETH-USD': 3}}}],
nonce: 1704067200000,
account: 'FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7',
signer: 'FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7',
signature: '5JXWgp1fW6px2Gjhw6YHhQ4...'
})
};
fetch('https://mainnet-api1.bulk.trade/api/v1/order', 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://mainnet-api1.bulk.trade/api/v1/order",
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([
'actions' => [
[
'updateUserSettings' => [
'm' => [
'BTC-USD' => 5,
'ETH-USD' => 3
]
]
]
],
'nonce' => 1704067200000,
'account' => 'FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7',
'signer' => 'FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7',
'signature' => '5JXWgp1fW6px2Gjhw6YHhQ4...'
]),
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://mainnet-api1.bulk.trade/api/v1/order"
payload := strings.NewReader("{\n \"actions\": [\n {\n \"updateUserSettings\": {\n \"m\": {\n \"BTC-USD\": 5,\n \"ETH-USD\": 3\n }\n }\n }\n ],\n \"nonce\": 1704067200000,\n \"account\": \"FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7\",\n \"signer\": \"FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7\",\n \"signature\": \"5JXWgp1fW6px2Gjhw6YHhQ4...\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://mainnet-api1.bulk.trade/api/v1/order")
.header("Content-Type", "application/json")
.body("{\n \"actions\": [\n {\n \"updateUserSettings\": {\n \"m\": {\n \"BTC-USD\": 5,\n \"ETH-USD\": 3\n }\n }\n }\n ],\n \"nonce\": 1704067200000,\n \"account\": \"FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7\",\n \"signer\": \"FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7\",\n \"signature\": \"5JXWgp1fW6px2Gjhw6YHhQ4...\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mainnet-api1.bulk.trade/api/v1/order")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"actions\": [\n {\n \"updateUserSettings\": {\n \"m\": {\n \"BTC-USD\": 5,\n \"ETH-USD\": 3\n }\n }\n }\n ],\n \"nonce\": 1704067200000,\n \"account\": \"FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7\",\n \"signer\": \"FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7\",\n \"signature\": \"5JXWgp1fW6px2Gjhw6YHhQ4...\"\n}"
response = http.request(request)
puts response.read_body{
"status": "ok",
"response": {
"type": "order",
"data": {
"statuses": []
}
}
}