Skip to main content
POST
/
user-settings
Update user settings (leverage)
curl --request POST \
  --url https://exchange-api2.bulk.trade/api/v1/user-settings \
  --header 'Content-Type: application/json' \
  --data '
{
  "action": {
    "type": "updateUserSettings",
    "settings": {
      "m": [
        [
          "BTC-USD",
          5
        ],
        [
          "ETH-USD",
          3
        ]
      ]
    },
    "nonce": 1704067200000
  },
  "account": "FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7",
  "signer": "FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7",
  "signature": "5JXWgp1fW6px2Gjhw6YHhQ4wEqb6FqMam6m4yg4uRcCksH9WxSv9dVjizGfD4StGtv1z9gR71unZY6tQ6dNDdJ3K"
}
'
{
  "status": "ok",
  "response": {
    "type": "<string>",
    "data": {
      "statuses": [
        {
          "resting": {
            "oid": "<string>"
          }
        }
      ]
    }
  }
}

Settings Fields

Max Leverage (m)

Array of tuples defining maximum leverage per symbol:
"m": [
  ["BTC-USD", 5.0],   // Max 5x leverage for BTC
  ["ETH-USD", 10.0],  // Max 10x leverage for ETH
  ["SOL-USD", 3.0]    // Max 3x leverage for SOL
]
Constraints:
  • Leverage is clamped between 1.0 and 50.0
  • Cannot exceed the market’s configured maximum leverage
  • Lower leverage = lower liquidation risk

Example

{
  "action": {
    "type": "updateUserSettings",
    "settings": {
      "m": [
        ["BTC-USD", 5.0],
        ["ETH-USD", 3.0]
      ]
    },
    "nonce": 1704067200000000000
  },
  "account": "FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7",
  "signer": "FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7",
  "signature": "5JXWgp1fW6px2Gjhw6YHhQ4wEqb6FqMam6m4yg4uRcCksH9WxSv9dVjizGfD4StGtv1z9gR71unZY6tQ6dNDdJ3K"
}

Response

{
  "status": "ok",
  "response": {
    "type": "updateUserSettings",
    "data": {
      "statuses": [{
        "settings": {
          "maxLeverage": [
            ["BTC-USD", 5.0],
            ["ETH-USD", 3.0]
          ]
        }
      }]
    }
  }
}

Before You Start

See the Transaction Signing guide for details on how to sign your requests.Nonce: Use timestamp in nanoseconds: BigInt(Date.now()) * 1_000_000n

Body

application/json

Signed transaction for updating user settings

action
object
required
account
string
required

Account public key (base58)

signer
string
required

Signer public key (base58)

signature
string
required

Ed25519 signature (base58)

Response

Settings updated

Response from order/cancel/agent wallet operations

status
enum<string>
Available options:
ok,
error
response
object