Submit Smart Balance

Submit a new Smart Balance portfolio for execution.

portfolioType = BALANCE is the focus of this document.

Endpoint

POST /tt/themis-broker/openapi/portfolios/submit

Authentication: HMAC apiKey signature via REST headers. See Authentication.

Parameters

Top-level fields — the request body is flat, no envelope.

Parameter Type Required Description
accountId long true Reality account ID
portfolioType string true BALANCE
strategy string false Free-text strategy label (Custom, Straddle, Butterfly, etc.)
balanceTrade object when portfolioType=BALANCE Balance trade configuration (see below)
legs array true Array of Leg objects; at least 1 leg
customizedNote string false ≤ 100 characters
sendToDummyAccountIds array false Array of long account IDs to mirror the order to

balanceTrade fields — required when portfolioType = BALANCE.

Parameter Type Required Description
parts int true Split count (for example 3 = split into 3 tranches)
eachLimitMs long true Per-part time budget (ms)
totalLimitMs long true Total time budget (ms); 0 disables the total cap
totalEndAction int true 1 CANCEL_REMAINING / 2 FILL_BY_MARKET

legs[].Leg — each leg of the portfolio.

Parameter Type Required Description
instrument string true Exchange symbol
instrumentType string true OPTION / PERPETUAL / DELIVERY_FUTURES / SPOT
side int true 1 BUY / 2 SELL
quantity decimal true Order quantity
priceOptions object true Price configuration (see below)
priceSnapshot array false Reference prices captured at submit time (for audit)
timeInForce int false 1=GTC / 2=IOC / 3=FOK / 4=GTD
postOnly boolean false Default false
reduceOnly boolean false Default false
hidden boolean false Default false
tradeMode int false 1=CASH / 2=CROSS / 3=ISOLATED
positionSide int false 1=LONG / 2=SHORT / 3=NET
hedge boolean false Hedge flag
priority boolean false Mark this leg as the priority (leading) leg that drives the portfolio pacing; other legs follow by ratio. At most 1 priority leg per portfolio. A priority leg cannot be a hedge leg (in mixed option+linear portfolios, non-option legs are auto-marked as hedge). Default false

priceOptions — nested under each leg.

Parameter Type Required Description
priceType string true LIMIT / MARKET / DYNAMIC
price string true Limit price (stringified decimal)
priceIn string true USD / USDT / USDC / BTC / IV (option-only)
dynamicPriceStrategy string when priceType=DYNAMIC MID / MARK / MODEL / BID / ASK
dynamicPriceOffset decimal false Offset applied to the dynamic reference (can be negative)
dynamicMs long false Reprice interval in ms

Request Example

POST /tt/themis-broker/openapi/portfolios/submit HTTP/1.1
Authorization: Bearer pkQJQ1
Signalplus-API-Timestamp: 1776665215780
Signalplus-API-Nonce: e43b0618-6965-4b0b-a62d-a3a4f78eed52
Signalplus-API-Signature: <base64 hmac>
Content-Type: application/json

{
  "accountId": 10003443,
  "portfolioType": "BALANCE",
  "strategy": "Custom",
  "customizedNote": "option + perp combo",
  "sendToDummyAccountIds": [],
  "balanceTrade": {
    "parts": 3,
    "eachLimitMs": 15000,
    "totalLimitMs": 0,
    "totalEndAction": 1
  },
  "legs": [
    {
      "instrument": "BTC-25DEC26-40000-P",
      "instrumentType": "OPTION",
      "side": 1,
      "quantity": 1.5,
      "priceOptions": {
        "priceType": "DYNAMIC",
        "price": "0.6",
        "priceIn": "IV",
        "dynamicPriceStrategy": "MARK",
        "dynamicPriceOffset": 0,
        "dynamicMs": 30000
      },
      "priceSnapshot": [
        {"placePriceIn": "USD", "placePrice": 2144.89, "price": 2144.89, "priceIn": "USD"},
        {"placePriceIn": "BTC", "placePrice": 0.031, "price": 0.031, "priceIn": "BTC"},
        {"placePriceIn": "IV", "placePrice": 0.6, "price": 0.6, "priceIn": "IV"}
      ],
      "reduceOnly": false,
      "tradeMode": 2,
      "positionSide": 3,
      "priority": true
    },
    {
      "instrument": "BTC-PERPETUAL",
      "instrumentType": "PERPETUAL",
      "side": 1,
      "quantity": 13040,
      "priceOptions": {
        "priceType": "DYNAMIC",
        "price": "66956.5",
        "priceIn": "USD",
        "dynamicPriceStrategy": "MID",
        "dynamicPriceOffset": 0,
        "dynamicMs": 30000
      },
      "priceSnapshot": [],
      "reduceOnly": false,
      "tradeMode": 2,
      "positionSide": 3
    }
  ]
}

Response Example

{
  "succ": true,
  "code": 0,
  "message": "",
  "value": {
    "portfolioId": 144115188955249274
  }
}

Response

Name Type Description
portfolioId long Newly created portfolio ID; use this for /info, /cancel, and WS push correlation

portfolioType Matrix

portfolioType Required trade block Use case
BALANCE balanceTrade Smart Balance (this document) — split into N parts with dynamic repricing

All portfolioType values share the same endpoint and the same WS push channels (trade-news + order.change.any). Only the trade-block shape differs.

results matching ""

    No results matching ""