REST API (Public & Private Endpoints)

Introduction

The Open Trade REST API is a request/response counterpart to the WebSocket API. Every endpoint here is a direct REST equivalent of a WebSocket channel or command — if you'd rather poll or fire one-off requests instead of holding a persistent socket open, this is the interface to use.

REST vs. WebSocket Use the Market Data API and Private Data API (WebSocket) for real-time streaming subscriptions. Use this REST API for one-shot reads and order actions where a persistent connection isn't needed. Both interfaces share the same underlying authentication flow.

REST Base URL

PROD: https://gateway-public.opentrade.exchange
The URL above is the host only. Each endpoint below shows its complete path, e.g. /hermes-ws-gateway/api/rest/balance — concatenate host + that full path.

Endpoint Groups

Authentication is required on every endpoint Swagger labels the endpoints below as "public" (no `/public/` path segment vs. `/trade-private/`), reflecting their original design intent. In practice, this gateway requires a valid Bearer token on every route, including the ones under /public/. Send the Authorization header on all requests below.
/public/ path (market data, no account-specific data)
  • GET /public/asset-list
  • GET /public/instrument-list
  • GET /public/asset-mapping
  • GET /public/order-book-public
  • GET /public/time
  • GET /public/tickers
  • GET /public/candles
  • GET /public/perp/order-book
  • GET /public/perp/funding-rates
/trade-private/ path and account endpoints (account/order data)
  • POST / PUT / DELETE /trade-private/orders
  • GET /trade-private/trades-history
  • GET /trade-private/orders-history
  • GET /trade-private/active-orders
  • GET /client-portfolio
  • GET /client-portfolio-history
  • GET /balance
/perp/ path (perpetual futures; needs the Trade permission)
  • GET /perp/positions
  • GET /perp/risk
/yield/ path (Yield contracts; needs the Trade permission)
  • GET /yield/product
  • POST /yield/subscriptions
  • GET /yield/contracts/open, GET /yield/contracts/closed
  • GET /yield/contracts/{contractId}
  • GET /yield/summary, GET /yield/contracts/{contractId}/performance
  • GET /yield/contracts/{contractId}/redemption-quote
  • POST /yield/contracts/{contractId}/redeem, POST /yield/contracts/{contractId}/cancel
/yield-basket/ path (Yield Basket units; needs the Trade permission)
  • GET /yield-basket/product, GET /yield-basket/holding
  • GET /yield-basket/activity, GET /yield-basket/requests/open
  • POST /yield-basket/subscriptions, POST /yield-basket/redemptions
  • POST /yield-basket/requests/{reference}/cancel
/portfolio/ path (Portfolio Builder and managed portfolios; needs the Trade permission)
  • GET /portfolio/config, GET /portfolio/universe, GET /portfolio/suggested
  • POST /portfolio/analytics, POST /portfolio/backtest
  • GET / POST /portfolio/portfolios, GET / PUT / DELETE /portfolio/portfolios/{portfolioId}
  • POST /portfolio/mandates, GET /portfolio/mandates, GET /portfolio/mandates/{mandateCode}
  • POST /portfolio/mandates/{mandateCode}/stop, POST /portfolio/mandates/{mandateCode}/follow-model

Versioning & Headers

Every REST call — public or private — must include the X-API-Version header. This lets Open Trade evolve the REST contract without breaking existing integrations.

HeaderRequiredDescription
X-API-Version Yes API version to target. Current value: 1.0.0
Authorization Private only Bearer JWT token, obtained via the authentication flow below. Required on every private endpoint.

Authentication

Private REST endpoints use the exact same credential exchange as the Private Data API (WebSocket) — obtain your JWT once, then reuse it across both interfaces.

Authentication Steps
  1. Login with your API key’s API username and password to obtain a session cookie
  2. Use the session cookie to obtain a JWT token
  3. Send the JWT token as a Bearer token in the Authorization header of every private REST request

Authentication Flow

Before You Start: Create an API Key

Create a key under Account → API Keys: name it, choose its permissions and confirm with your second factor. The platform generates the key's API username, password and secret and shows them once, so store all three straight away.

CredentialExampleWhere it goes
API username100123_mybotThe username field in Step 1, and the {api-username} in the Step 2 URL — the same value both times
Password—The password field in Step 1
Secret—The clientSecret header in Step 2

The password expires one year after the key is created, and login is refused from then on — create a new key before that date.

Step 1: Login with the API Username and Password

Using POST method, send the API username and password to the login endpoint. Note that the credentials must be sent as form-data with keys in lowercase. This returns a SESSION cookie (not JSESSIONID).

Login Endpoints
POST https://auth.opentrade.exchange/login

// Form Data (lowercase keys!)
username: {api-username}
password: {password}
Important! The username and password keys MUST be in lowercase. The login answers HTTP 302 whether or not it succeeded, so check where it redirects: a successful login redirects to the platform, a failed one back to /login. Only the SESSION cookie of a successful login can obtain a token in the next step.

Step 2: Obtain JWT Token

Use the SESSION cookie from Step 1 to obtain your JWT token. This is a POST with the client secret sent as a header, not a query parameter, and an empty body.

Token Endpoints
POST https://auth.opentrade.exchange/auth/jwt/clients/{api-username}/token

// Headers
Cookie: SESSION={session_cookie_from_step_1}
clientSecret: {secret}

// Body: empty
Note the plural The path is /auth/jwt/clients/ (plural) — not /client/. And note this is a single /auth/, not the doubled /auth/auth/ some older references show.

Complete Authentication Flow with cURL

cURL Example
curl -s --cookie-jar cookies.txt -X POST \
    "https://auth.opentrade.exchange/login" \
    -d "username=[API_USERNAME]&password=[PASSWORD]" \
    -o /dev/null -w "login redirected to %{redirect_url}\n" \
    --next -s -b cookies.txt -X POST \
    "https://auth.opentrade.exchange/auth/jwt/clients/[API_USERNAME]/token" \
    -H "accept: */*" \
    -H "clientSecret: [SECRET]" \
    -d ""
Success! The response body is your token, already prefixed: Bearer eyJ.... Use it as-is in the Authorization header — don't add a second "Bearer " prefix. The response also includes a jwt-expire-at header (when the token expires) and jwt-scope header.

Using Your Token

The token returned from the authentication flow already includes the Bearer prefix (the response body reads Bearer eyJ...). Use it exactly as returned in the Authorization header — do not prepend a second Bearer , or the header will read Bearer Bearer eyJ... and be rejected.

Include it on every private REST call, alongside the required X-API-Version header.

Example Authenticated Request
GET /hermes-ws-gateway/api/rest/trade-private/active-orders HTTP/1.1
Host: gateway-public.opentrade.exchange
X-API-Version: 1.0.0
Authorization: Bearer eyJraWQiOiIwYWJmMGYwZS00YzliLTQ3NjItYjkxYS04NjE2YzkxMzJkMjkiLCJhbGciOiJSUzI1NiJ9...

Token Lifetime

The token response includes two headers you should read and store alongside the token itself:

HeaderDescription
jwt-expire-atISO-8601 timestamp of when the token expires. Re-run the login + token exchange before this time to get a fresh token.
jwt-scopeScope granted to this token, e.g. api.access.
Token Management Tips:
  • Store your token securely and never expose it in client-side code
  • Read jwt-expire-at from the token response and refresh proactively before that time, rather than waiting for a 401
  • Re-running the full login + token exchange is how you refresh — there is no separate refresh-token endpoint
  • Use environment variables or a secrets manager to store credentials, never hardcode them in source control
GET /hermes-ws-gateway/api/rest/public/asset-list Auth Required Asset List

REST equivalent of the WS ASSET_LIST channel. Returns the full list of assets supported across all connected exchanges.

Headers

NameInTypeRequiredDescription
Authorization header string Yes Bearer JWT token
X-API-Version header string Optional Default: 1.0.0
200 Response
[
    {
        "class": "Currency",
        "code": "BTC",
        "name": "BTC"
    }
]
GET /hermes-ws-gateway/api/rest/public/instrument-list Auth Required Instrument List

REST equivalent of the WS INSTRUMENT_LIST channel. Returns each spot pair once, with its quote currency (the right-hand side of the pair) and the venues listing it in exchanges. Pass instrumentType=FUTURE to list the perpetual futures open to you instead.

Headers

NameInTypeRequiredDescription
Authorization header string Yes Bearer JWT token
X-API-Version header string Optional Default: 1.0.0
200 Response
[
    {
        "class": "Instrument",
        "quoteCurrencyCode": "USD",
        "code": "BTC/USD",
        "name": "BTC/USD",
        "exchanges": ["BITGET", "HUOBI"]
    }
]

Query Parameters

NameInTypeRequiredDescription
instrumentTypequerystringOptionalSPOT (default) or FUTURE, in capitals. Any other value answers 400
200 Response (instrumentType=FUTURE)
[
    {
        "class": "Instrument",
        "quoteCurrencyCode": "USDT",
        "code": "BTC/USDT",
        "name": "BTC/USDT",
        "instrumentType": "FUTURE",
        "settleAsset": "USDT",
        "exchanges": ["BITGET", "HUOBI"]
    }
]
GET /hermes-ws-gateway/api/rest/public/asset-mapping Auth Required Asset Mapping

Maps each venue's own code for an asset to the Open Trade code used everywhere else in this API, such as usdt on HUOBI to USDT. One row per venue and venue code, sorted by venue and Open Trade code. Use it to translate what a venue shows you into the codes you send here.

Headers

NameInTypeRequiredDescription
Authorization header string Yes Bearer JWT token
X-API-Version header string Optional Default: 1.0.0

Query Parameters

NameInTypeRequiredDescription
exchangequerystringOptionalOne venue, in capitals as in exchanges of Instrument List, such as BITGET or HUOBI. Leave it out for every venue
200 Response (exchange=HUOBI)
[
    {
        "class": "AssetMapping",
        "exchange": "HUOBI",
        "venueCode": "btc",
        "code": "BTC"
    },
    {
        "class": "AssetMapping",
        "exchange": "HUOBI",
        "venueCode": "usdt",
        "code": "USDT"
    }
]
GET /hermes-ws-gateway/api/rest/public/order-book-public Auth Required Order Book

REST equivalent of a WS ORDER_BOOK_PUBLIC channel GET snapshot. Returns an L2 order book snapshot (bids/asks) for the requested instrument(s).

Query Parameters

NameInTypeRequiredDescription
instruments query array<string> Yes Instrument codes to fetch, e.g. BTC/USD
Authorization header string Yes Bearer JWT token
X-API-Version header string Optional Default: 1.0.0
Example Request
GET /hermes-ws-gateway/api/rest/public/order-book-public?instruments=BTC/USD HTTP/1.1
X-API-Version: 1.0.0
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
200 Response
[
    {
        "class": "OrderBook",
        "exchange": "OKEX",
        "symbol": "BTC/USDT",
        "bids": [
            [63985.5, 0.50735545]
        ],
        "asks": [
            [63985.6, 1.08926571]
        ],
        "eventTime": 1783442361532
    }
]
bids / asks format Each entry is a [price, amount] pair, ordered best-price-first. The response returns one entry per exchange with liquidity for the requested instrument — expect multiple entries per instrument (e.g. one each for OKEX, BITGET, HUOBI), not a single merged book.
eventTime The Open Trade gateway's clock, in Unix epoch milliseconds UTC, at the moment the snapshot was built. It is not the venue's matching-engine time. Every venue's book for one instrument carries the same value, and it advances on every request and every WebSocket push whether or not the book changed. For the current time on its own, call Server Time.
GET /hermes-ws-gateway/api/rest/public/time Auth Required Server Time

The Open Trade gateway's clock. Use it as "now" when deciding whether a candle has closed: a candle opened at T with length L has closed once serverTime >= T + L. Candles serves it about two minutes later, so a period that is still missing once serverTime >= T + L + 120000 had no trades.

Example Request
GET /hermes-ws-gateway/api/rest/public/time HTTP/1.1
X-API-Version: 1.0.0
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
200 Response
{
    "serverTime": 1790593200123
}
serverTime Unix epoch milliseconds, UTC, read from the same gateway host clock that stamps eventTime on the order book.
GET /hermes-ws-gateway/api/rest/public/tickers Auth Required Tickers

One consolidated price per spot pair: the mid of the best bid and the best ask across every connected venue, with the number of venues quoting both sides. Prices are at most two seconds old. For depth, use Order Book.

Query Parameters

NameInTypeRequiredDescription
instrumentsquerystringYes1 to 20 pair codes, comma separated, e.g. BTC/USDT,ETH/USDT. A code that is not a pair is answered 400
AuthorizationheaderstringYesBearer JWT token
Example Request
GET /hermes-ws-gateway/api/rest/public/tickers?instruments=BTC/USDT,ETH/USDT HTTP/1.1
X-API-Version: 1.0.0
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
200 Response
[
    {
        "instrument": "BTC/USDT",
        "mid": 80048.075,
        "venues": 5
    },
    {
        "instrument": "ETH/USDT",
        "mid": 2324.135,
        "venues": 4
    }
]
Pairs without a quote A pair no venue is quoting is left out of the answer. When only one side is quoted, mid is that side's best price and venues is 0.
GET /hermes-ws-gateway/api/rest/public/candles Auth Required Candles

Closed OHLCV candles for one pair, newest first. A backtest session serves the same path, parameters and rows for a venue's own trades; pass exchange explicitly so one call works on both.

Query Parameters

NameInTypeRequiredDescription
instrumentquerystringYesPair code, e.g. LTC/USDT
exchangequerystringOptionalDefault OPENTRADE: candles built from public trades on every connected venue, the series the Open Trade chart shows and the reference for SMART orders. Pass a venue code (HUOBI, OKEX, BITGET…) for that venue's own trades
periodquerystringOptionalOne of ONE_MIN (default), FIVE_MIN, FIFTEEN_MIN, ONE_HOUR, FOUR_HOURS, ONE_DAY
toqueryintegerOptionalEpoch milliseconds. Only candles that end at or before to, rounded down to the period, are returned. Default: now. To page back, pass the oldest openTime you already have
limitqueryintegerOptionalHow many periods to cover, 1 to 1000. Default 100
AuthorizationheaderstringYesBearer JWT token
Example Request
GET /hermes-ws-gateway/api/rest/public/candles?instrument=LTC/USDT&period=ONE_HOUR&limit=300 HTTP/1.1
X-API-Version: 1.0.0
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
200 Response
[
    [1790589600000, 84.1, 85.0, 83.9, 84.7, 1520.5],
    [1790586000000, 83.5, 84.2, 83.4, 84.1, 990.0]
]
Rows Each row is [openTime, open, high, low, close, volume]. openTime is the start of the period in epoch milliseconds UTC, and periods line up with UTC boundaries (hours on :00, four hours on 00, 04, 08, 12, 16 and 20 UTC). Prices come from executed public trades, not the book midpoint, and volume is in the base asset. A period with no trades has no row.
Only closed candles are returned The candle still forming is never served, so every row is final. A candle appears about two minutes after its period ends, once the last trades of that period have been collected: the 10:00–11:00 hour is served from about 11:02 UTC.
POST /hermes-ws-gateway/api/rest/trade-private/orders Auth Required Create Orders

REST equivalent of the WS TRADE_PRIVATE channel CREATE command. Accepts an array so multiple orders can be submitted in a single call.

Headers

NameInTypeRequiredDescription
Authorization header string Yes Bearer JWT token
X-API-Version header string Optional Default: 1.0.0

Request Body

FieldTypeRequiredDescription
exchangestringOptionalName of exchange to send order to, such as BITFINEX, LMAX, OKX. If not provided, order will be set as SMART
globalInstrumentCdstringYesInstrument code, e.g. BTC/USD
clientOrderIdstringOptionalRecommend unique Unix timestamp; server will assign one if omitted
directionstringYesBUY or SELL
orderTypestringYesMARKET, LIMIT, POST_ONLY, BUY_STOP, SELL_STOP, STOP_LOSS, TAKE_PROFIT
timeInForcestringOptionalGTC, IOC, FOK. GTC when omitted.
pricenumberYesThe limit price for LIMIT and POST_ONLY, and the trigger for BUY_STOP and SELL_STOP. For MARKET, STOP_LOSS and TAKE_PROFIT send the current price as a reference
slnumberOptionalStop loss trigger. Required for STOP_LOSS. On a LIMIT, MARKET, BUY_STOP or SELL_STOP entry it attaches a stop loss. On a TAKE_PROFIT it links a stop loss to it
tpnumberOptionalTake profit trigger. Required for TAKE_PROFIT. On a LIMIT, MARKET, BUY_STOP or SELL_STOP entry it attaches a take profit. On a STOP_LOSS it links a take profit to it
amountnumberYesOrder quantity
instrumentTypestringOptionalSPOT (default) or FUTURE. FUTURE places the order on the perpetual of the pair, for example BTC/USDT. See Perpetual Orders
leveragenumberOptionalPerpetual orders only. From 1 up to your leverage cap
reduceOnlybooleanOptionalPerpetual orders only. true lets the order only shrink or close your position, never open or grow one. Default false
Request Body
[
    {
        "exchange": "OKEX",
        "globalInstrumentCd": "BTC/USD",
        "clientOrderId": "0989876565",
        "direction": "SELL",
        "orderType": "LIMIT",
        "timeInForce": "GTC",
        "price": 0.215,
        "amount": 1.0
    }
]
200 Response
[
    {
        "exchange": "OKEX",
        "globalInstrumentCd": "BTC/USD",
        "clientOrderId": "0989876565",
        "direction": "SELL",
        "orderType": "LIMIT",
        "timeInForce": "GTC",
        "price": 0.215,
        "amount": 1.0,
        "orderStatus": "NEW",
        "exchangeOrderId": "1928374650",
        "filledPrice": 0.0,
        "filledAmount": 0.0,
        "orderDateTime": "2026-07-07T13:04:43.792Z",
        "message": "",
        "processInstanceId": "string"
    }
]

Take profit and stop loss

A LIMIT, MARKET, BUY_STOP or SELL_STOP entry may carry tp, sl or both. With both, the two exits are one-cancels-other. Leave exchange out: take profit and stop loss need smart routing. For a BUY set sl below and tp above the entry price, for a SELL the reverse; for a BUY_STOP or SELL_STOP the entry price is its stop price. The exits arm as the entry fills, sized to what you received. The rules are the same as on the WebSocket TRADE_PRIVATE channel.

To protect a position you already hold, send one STOP_LOSS or TAKE_PROFIT order carrying both sl and tp, with direction set to the side that closes the position and amount to the quantity to protect. The two exits are one-cancels-other and the quantity is reserved once for the pair. Leave exchange out. For a SELL set sl below and tp above the current price, for a BUY the reverse.

Critical! clientOrderId must be unique per order. Reusing an ID will be rejected.
PUT /hermes-ws-gateway/api/rest/trade-private/orders Auth Required Update Orders

REST equivalent of the WS TRADE_PRIVATE channel UPDATE command (order modification — e.g. price/amount changes on a resting order).

Headers

NameInTypeRequiredDescription
AuthorizationheaderstringYesBearer JWT token
X-API-VersionheaderstringOptionalDefault: 1.0.0

Uses the same request/response body shape as Create Orders, but requires an existing clientOrderId or exchangeOrderId to identify the order being modified.

Request Body
[
    {
        "exchange": "OKEX",
        "globalInstrumentCd": "BTC/USD",
        "clientOrderId": "0989876565",
        "direction": "SELL",
        "orderType": "LIMIT",
        "timeInForce": "GTC",
        "price": 0.22,
        "amount": 1.0
    }
]
DELETE /hermes-ws-gateway/api/rest/trade-private/orders Auth Required Cancel Orders

REST equivalent of the WS TRADE_PRIVATE channel CANCEL command.

Headers

NameInTypeRequiredDescription
AuthorizationheaderstringYesBearer JWT token
X-API-VersionheaderstringOptionalDefault: 1.0.0

Note that DELETE requests here carry a request body — identify the order(s) to cancel via clientOrderId, exchangeOrderId, and globalInstrumentCd.

Cancel resolution rules
  • You must provide either clientOrderId or exchangeOrderId — at least one is required to identify the order.
  • If clientOrderId is provided, it is used (takes precedence over exchangeOrderId).
  • If only exchangeOrderId is provided, that order is cancelled.
  • If neither is provided, all orders for the selected pair(s) will be cancelled.
Request Body
[
    {
        "exchange": "OKEX",
        "globalInstrumentCd": "BTC/USD",
        "clientOrderId": "0989876565",
        "exchangeOrderId": "1928374650"
    }
]
200 Response
[
    {
        "exchange": "OKEX",
        "globalInstrumentCd": "BTC/USD",
        "clientOrderId": "0989876565",
        "orderStatus": "CANCELLED",
        "exchangeOrderId": "1928374650",
        "orderDateTime": "2026-07-07T13:04:52.249Z",
        "message": ""
    }
]
GET /hermes-ws-gateway/api/rest/trade-private/active-orders Auth Required Active Orders

REST equivalent of the WS TRADE_PRIVATE channel active orders GET. Returns all currently open (not filled/cancelled/rejected) orders.

Query Parameters

NameInTypeRequiredDescription
instrumentsqueryarray<string>OptionalFilter to specific instruments; omit for all
AuthorizationheaderstringYesBearer JWT token
X-API-VersionheaderstringOptionalDefault: 1.0.0
200 Response
[
    {
        "exchange": "OKEX",
        "globalInstrumentCd": "BTC/USD",
        "clientOrderId": "0989876565",
        "direction": "SELL",
        "orderType": "LIMIT",
        "timeInForce": "GTC",
        "price": 0.215,
        "amount": 1.0,
        "orderStatus": "ACTIVE",
        "exchangeOrderId": "1928374650",
        "filledPrice": 0.0,
        "filledAmount": 0.0,
        "orderDateTime": "2026-07-07T13:06:29.441Z",
        "message": "",
        "processInstanceId": "string"
    }
]
GET /hermes-ws-gateway/api/rest/trade-private/trades-history Auth Required Trades History

REST equivalent of the WS TRADE_PRIVATE channel trades history GET. Returns executed trades (fills) within a date range.

Query Parameters

NameInTypeRequiredDescription
instrumentsqueryarray<string>OptionalFilter to specific instruments
fromDtmquerystring ($date-time)OptionalRange start (ISO-8601)
toDtmquerystring ($date-time)OptionalRange end (ISO-8601)
AuthorizationheaderstringYesBearer JWT token
X-API-VersionheaderstringOptionalDefault: 1.0.0
Example Request
GET /hermes-ws-gateway/api/rest/trade-private/trades-history?instruments=BTC/USDT&fromDtm=2026-06-01T00:00:00&toDtm=2026-07-01T00:00:00 HTTP/1.1
X-API-Version: 1.0.0
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
200 Response
[
    {
        "class": "Order",
        "exchange": "OKEX",
        "globalInstrumentCd": "BTC/USDT",
        "clientOrderId": "11781606906612",
        "direction": "BUY",
        "orderType": "MARKET",
        "timeInForce": "GTC",
        "price": 66591.4,
        "amount": 0.0002,
        "orderStatus": "FILLED",
        "exchangeOrderId": "3660939752535318528",
        "filledPrice": 66558.0,
        "filledAmount": 0.0002,
        "orderDateTime": "2026-06-16T10:48:26.747Z",
        "message": null,
        "processInstanceId": null
    },
    {
        "class": "Order",
        "exchange": "BITGET",
        "globalInstrumentCd": "BTC/USDT",
        "clientOrderId": "11787796637216",
        "direction": "BUY",
        "orderType": "LIMIT",
        "timeInForce": "GTC",
        "price": 66540.2,
        "amount": 0.0005,
        "orderStatus": "PARTIALLY_FILLED",
        "exchangeOrderId": "~",
        "filledPrice": 66540.2,
        "filledAmount": 0.0005,
        "orderDateTime": "2026-06-18T14:02:11.310Z",
        "message": null,
        "processInstanceId": null,
        "internal": true
    }
]
Internal fills An order may fill against another OpenTrade client's order on our own book, at a price no worse than the best price on the external venues. Such a fill carries "internal": true, and exchange names the venue whose balances funded it. Each internal fill is its own row with orderStatus PARTIALLY_FILLED, so an order filled entirely on our book never gets a FILLED row: read whether it is complete from Orders History, or add up filledAmount. On an internal row price and filledPrice are the price that fill crossed at, and amount and filledAmount are the quantity of that fill, not your order's own limit and size. exchangeOrderId is ~, since no exchange order exists. The field is present only on internal fills; a fill executed on an exchange leaves it out.
Partial fills An order that fills across multiple executions appears as multiple rows sharing the same clientOrderId, one per fill (e.g. PARTIALLY_FILLED followed by FILLED; internal fills never end in FILLED, see above). Aggregate by clientOrderId if you need one row per order rather than per fill.
GET /hermes-ws-gateway/api/rest/trade-private/orders-history Auth Required Orders History

REST equivalent of the WS TRADE_PRIVATE channel orders history GET. Returns historical orders filtered by status and date range.

Query Parameters

NameInTypeRequiredDescription
instrumentsqueryarray<string>YesInstrument codes to filter by
statusesqueryarray<string>YesSee status values below
fromDtmquerystring ($date-time)OptionalRange start (ISO-8601)
toDtmquerystring ($date-time)OptionalRange end (ISO-8601)
AuthorizationheaderstringYesBearer JWT token
X-API-VersionheaderstringOptionalDefault: 1.0.0

Available Status Values

NEW, SUBMITTED, PENDING, ACTIVE, IN_RECONCILIATION, PARTIALLY_FILLED, FILLED, CANCELLED, REJECTED, EXPIRED, FAILED, REJECTED_WRONG_ENV, DUPLICATE, UNKNOWN

GET /hermes-ws-gateway/api/rest/journal Auth Required Journal

One entry per action on your account — a fill, a transfer, a deposit, a withdrawal, a yield movement or a fee — assembled from the accounting ledger. Where /trade-private/trades-history reports what executed on an exchange, the journal reports what it did to your balances: the debits, the credits, the fees charged and the balances each action left behind.

One entry, many postings A single action can move several assets at once — a buy debits the quote currency, credits the base currency and charges a fee. Those are one journal entry with a debits, credits and fees list, not three unrelated rows. The postings array always carries the individual ledger rows behind the entry. Debits are negative and credits positive, so the postings of an entry sum to what it did to your balances. debits and credits are the net change to your balance in each asset, fees included; fees is the breakdown of what was charged.

Query Parameters

NameInTypeRequiredDescription
sizequeryintegerOptionalEntries per page. Default: 50, maximum 500. Anything outside 1..500 is rejected with 400
pagequeryintegerOptionalZero-based page number. Default: 0. A negative page is rejected with 400
periodTypequerystringOptionalDefault: L30D. See period values below
atdPeriodStartquerystring ($date-time)OptionalRange start (ISO-8601), required when periodType=ATD
atdPeriodEndquerystring ($date-time)OptionalRange end (ISO-8601), required when periodType=ATD
AuthorizationheaderstringYesBearer JWT token
X-API-VersionheaderstringOptionalDefault: 1.0.0

The client is taken from the token, so there is no way to request another account’s journal.

Period Values

L24H, DTD (today), L7D, WTD, L30D, MTD, L6M, L12M, YTD, ATD (the window given by atdPeriodStart and atdPeriodEnd)

Statuses

COMPLETED, FAILED. A failed entry also carries statusDescription with the reason the ledger recorded.

Fee Types

EXCHANGE, BROKER, CLIENT, SWAP, NETWORK

Action Types

BUY, SELL, DEPOSIT, WITHDRAWAL, TRANSFER, YIELD_SUBSCRIPTION, YIELD_HARVEST, YIELD_REDEMPTION, YIELD_MOVEMENT, DAILY_SETTLEMENT, TRADING_FEE, EXCHANGE_FEE, BROKER_FEE, NETWORK_FEE, FINANCING_FEE, ADJUSTMENT

Perpetual Futures Entries

A perpetual fill or a funding settlement is one entry with instrumentType FUTURE. Its debits and credits are the net change to your futures wallet in the settle asset, fees included, and its balances are the futures wallet after the entry, with scope FUTURES. perpFills lists the fills behind the entry; a funding entry has no fills and no fees. A perpetual entry's postings is always empty: read its debits, credits and balances instead.

actionNameactionTypeWhen
Opened LongBUYA buy that opened or grew a long
Opened ShortSELLA sell that opened or grew a short
Closed LongSELLA sell that shrank or closed a long
Closed ShortBUYA buy that shrank or closed a short
Closed Long, Opened ShortSELLOne order that closed a long and opened a short
Closed Short, Opened LongBUYOne order that closed a short and opened a long
Liquidated LongSELLThe platform closed a long that reached its liquidation price
Liquidated ShortBUYThe platform closed a short that reached its liquidation price
Funding FeeFINANCING_FEEFunding you paid at a settlement
Funding IncomeFINANCING_FEEFunding you received at a settlement
Liquidation shortfall coveredADJUSTMENTA liquidation lost more than the wallet held and the platform covered the difference

perpFills

FieldTypeDescription
timestringFill time
contractCodestringThe venue's contract, e.g. BTC-USDT
settleAssetstringAsset the contract settles in
quantitynumberSigned size filled, in the base asset: positive bought, negative sold
pricenumberFill price
sizeAfternumberSigned position size after the fill
realisedPnlnumberProfit or loss the fill realised
feesarrayFees on the fill, in the shape of the entry's fees
walletAfternumberFutures wallet balance after the fill
tradeIdstringThe venue's trade id
Perpetual Entry
{
    "actionType": "BUY",
    "actionName": "Opened Long",
    "instrumentType": "FUTURE",
    "time": "2026-10-11T14:02:11",
    "baseAsset": "BTC",
    "quoteAsset": "USDT",
    "quantity": 0.01,
    "price": 112380.5,
    "route": ["HUOBI"],
    "debits": [{"asset": "USDT", "amount": -0.45}],
    "credits": [],
    "fees": [
        {"asset": "USDT", "amount": 0.22, "feeType": "EXCHANGE"},
        {"asset": "USDT", "amount": 0.23, "feeType": "CLIENT"}
    ],
    "balances": [{"asset": "USDT", "amount": 999.55, "scope": "FUTURES"}],
    "status": "COMPLETED",
    "perpFills": [
        {
            "time": "2026-10-11T14:02:11",
            "contractCode": "BTC-USDT",
            "settleAsset": "USDT",
            "quantity": 0.01,
            "price": 112380.5,
            "sizeAfter": 0.01,
            "realisedPnl": 0,
            "fees": [
                {"asset": "USDT", "amount": 0.22, "feeType": "EXCHANGE"},
                {"asset": "USDT", "amount": 0.23, "feeType": "CLIENT"}
            ],
            "walletAfter": 999.55,
            "tradeId": "1196418723"
        }
    ]
}
200 Response
{
    "content": [
        {
            "actionKey": "11788521799959",
            "actionType": "BUY",
            "actionName": "Bought",
            "clientId": 1000123,
            "time": "2026-08-31T14:02:11",
            "startTime": "2026-08-31T14:02:09",
            "baseAsset": "BTC",
            "quoteAsset": "USDT",
            "quantity": 0.25,
            "price": 88012.4,
            "route": ["OKEX"],
            "debits": [{"asset": "USDT", "amount": -22014.1}],
            "credits": [{"asset": "BTC", "amount": 0.25}],
            "fees": [{"asset": "USDT", "amount": 11.0, "feeType": "EXCHANGE"}],
            "balances": [{"asset": "BTC", "amount": 1.35}],
            "status": "COMPLETED",
            "statusDescription": null,
            "clientOrderId": "a7c1f0e2-5d44-4e21-9f0b-6e2b8f0d1c33",
            "transactionGroupId": "4a248fbd-1cd8-3164-b081-26f40e8248ac",
            "postings": [
                {
                    "id": 11788521799959,
                    "clientId": 1000123,
                    "assetType": "BTC",
                    "amount": 0.25,
                    "price": 88012.4,
                    "priceCurrency": "USDT",
                    "time": "2026-08-31T14:02:11",
                    "description": "Buy BTC/USDT",
                    "transactionType": "BUY",
                    "operation": "EXECUTE_WITH_UNLOCK",
                    "origin": "TOMS",
                    "status": "SUCCESS",
                    "assetTypeBalance": 1.35,
                    "priceCurrBalance": 150244.02,
                    "transactionGroupId": "4a248fbd-1cd8-3164-b081-26f40e8248ac",
                    "exchange": "OKEX",
                    "clientOrderId": "a7c1f0e2-5d44-4e21-9f0b-6e2b8f0d1c33"
                }
            ]
        }
    ],
    "number": 0,
    "size": 50,
    "totalElements": 120
}
GET /hermes-ws-gateway/api/rest/client-portfolio Auth Required Client Portfolio

REST equivalent of the WS CLIENT_PORTFOLIO channel GET snapshot. Returns current holdings by asset type, including exposure, PnL, and available balances.

Headers

NameInTypeRequiredDescription
AuthorizationheaderstringYesBearer JWT token
X-API-VersionheaderstringOptionalDefault: 1.0.0
200 Response
[
    {
        "class": "ClientPortfolio",
        "assetType": "BTC",
        "quantity": 0.0019553,
        "avgPriceUsd": 90550.7416782,
        "index": 88010.42919245128,
        "onOrders": 0.0,
        "available": 0.0019553,
        "marketValue": 172.0867922,
        "unrealizedPnl": -4.967073,
        "notional": 177.0538652
    }
]

avgPriceUsd is the average price paid for the quantity still open, which is your cost basis over that quantity; index is the current mark price used for valuation. notional is that cost basis in USD, so marketValue less notional is unrealizedPnl, which can be negative. quantity and available can be negative for a short position.

GET /hermes-ws-gateway/api/rest/client-portfolio-history Auth Required Client Portfolio History

Historical counterpart to Client Portfolio — returns portfolio snapshots over a date range instead of the live snapshot.

Full reference coming soon Detailed parameter and response documentation for this endpoint is being finalized. Contact API support for the current schema.
GET /hermes-ws-gateway/api/rest/balance Auth Required Balance

REST equivalent of the WS BALANCE channel. Returns account balances by currency.

Headers

NameInTypeRequiredDescription
AuthorizationheaderstringYesBearer JWT token
X-API-VersionheaderstringOptionalDefault: 1.0.0
200 Response
[
    {
        "class": "Balance",
        "currencyCode": "BTC",
        "balance": 0.0019553,
        "available": 0.0019553,
        "locked": 0.0
    }
]

balance is total holdings for that currency; available is free/withdrawable; locked is held against open orders (balance = available + locked).

GET /hermes-ws-gateway/api/rest/client-balance-distribution Auth Required Balance Distribution

REST equivalent of the WS CLIENT_BALANCE_DISTRIBUTION channel GET. Returns where your tokens actually sit: one row per asset per venue, with cost basis, valuation and PnL for that venue.

Why this is not the same as Balance /balance and /client-portfolio both report the aggregate across every venue, but an order is routed to exactly one exchange and is checked against that venue's balance alone. Read this endpoint to decide where an order can actually be filled, and how much can be withdrawn or transferred off a given venue.

Headers

NameInTypeRequiredDescription
AuthorizationheaderstringYesBearer JWT token
X-API-VersionheaderstringOptionalDefault: 1.0.0

There are no query parameters. The client is taken from the token, so there is no way to request another account's distribution.

200 Response
[
    {
        "class": "ClientBalanceDistribution",
        "clientId": 1000123,
        "asset": "BTC",
        "exchange": "OKEX",
        "finalBalance": 0.35,
        "costBasisUsd": 30642.7595,
        "marketValueUsd": 30803.6502,
        "avgPriceUsd": 87550.7414,
        "lockedAmount": 0.05,
        "availableAmount": 0.3,
        "unrealizedPnl": 160.8907,
        "returnPercent": 0.525
    },
    {
        "class": "ClientBalanceDistribution",
        "clientId": 1000123,
        "asset": "BTC",
        "exchange": "BITGET",
        "finalBalance": 0.12,
        "costBasisUsd": 10866.089,
        "marketValueUsd": 10561.2515,
        "avgPriceUsd": 90550.7417,
        "lockedAmount": 0.0,
        "availableAmount": 0.12,
        "unrealizedPnl": -304.8375,
        "returnPercent": -2.8054
    }
]

Response Fields

FieldTypeDescription
clientIdnumberYour Open Trade client identifier, taken from the token.
assetstringAsset code, e.g. BTC, USDT, GALA.
exchangestringVenue holding the asset: OKEX, HUOBI, BITGET, BITMART, BINANCE, DERIBIT, LMAX, GEMINI, BLOCKCHAIN, OPENTRADE.
finalBalancenumberTotal amount of the asset held on that venue.
availableAmountnumberAmount free to trade, withdraw or transfer from that venue.
lockedAmountnumberAmount reserved on that venue, typically against open orders or a pending transfer.
avgPriceUsdnumberAverage price paid for the quantity still open on that venue, in USD. Equal to costBasisUsd divided by finalBalance.
costBasisUsdnumberUSD paid for the quantity still open on that venue. Anything already closed is excluded.
marketValueUsdnumberCurrent USD market value of the holding on that venue.
unrealizedPnlnumberUnrealized PnL on the holding, in USD, measured as market value less cost basis. Negative when the position is under water, and zero when nothing was paid for the holding.
returnPercentnumberReturn on the holding, in percent, measured against the cost basis. Zero when nothing was paid for the holding.
futuresVenuestringOn a FUTURES row, the venue your futures wallet is held at, as one of the exchange codes, when all of it sits at that venue; balances that round to zero are ignored. null otherwise, and on every venue row.

An asset held on three exchanges comes back as three rows. Sum finalBalance over the rows sharing an asset to reconcile against /balance, and never assume a single row carries the whole position.

Query Parameters

NameInTypeRequiredDescription
includeFuturesquerybooleanOptionalDefault false. true adds your futures wallet as one row per settle asset, summed across venues, with exchange FUTURES. Answers 409 PERPS_NOT_AVAILABLE while perpetual futures are switched off

The futures row counts the whole wallet as locked: its availableAmount is 0. What is free to trade or to move back to spot is availableMargin in Futures Risk. /balance does not count the futures wallet, so leave the FUTURES rows out when you reconcile against it.

Futures Row (includeFutures=true)
{
    "class": "ClientBalanceDistribution",
    "clientId": 1000123,
    "asset": "USDT",
    "exchange": "FUTURES",
    "finalBalance": 999.43,
    "costBasisUsd": 999.43,
    "marketValueUsd": 999.43,
    "avgPriceUsd": 1,
    "lockedAmount": 999.43,
    "availableAmount": 0,
    "unrealizedPnl": 0,
    "returnPercent": 0,
    "futuresVenue": "HUOBI"
}
Same rows as the WebSocket channel These are the objects the CLIENT_BALANCE_DISTRIBUTION channel returns, carrying the same "class" discriminator. Only the envelope differs: the WS message wraps them in a data array, while REST returns the array on its own.
GET /hermes-ws-gateway/api/rest/deposit/wallets Auth Required Deposit Wallets

REST equivalent of the WS DEPOSIT_WALLET channel. Returns the client's deposit wallet addresses, one per supported asset.

Headers

NameInTypeRequiredDescription
AuthorizationheaderstringYesBearer JWT token
X-API-VersionheaderstringOptionalDefault: 1.0.0
200 Response
[
    {
        "class": "DepositWallet",
        "id": 1000003606,
        "clientId": 100882,
        "symbol": "XRP",
        "walletAddress": "rnSffMjADGXG9apHR6gjKz8THc1FtZGCov",
        "status": "ACTIVE",
        "comment": "tag: 1000003606",
        "exchange": "OPENTRADE"
    },
    {
        "class": "DepositWallet",
        "id": 1000003615,
        "clientId": 100882,
        "symbol": "AAVE",
        "walletAddress": "0x649590c78f702ed0cdeab07daf722673d2510afe",
        "status": "ACTIVE",
        "comment": null,
        "exchange": "OPENTRADE"
    }
]

comment carries the destination tag/memo when the asset requires one (e.g. XRP); otherwise null.

GET /hermes-ws-gateway/api/rest/deposit/processes/active Auth Required Deposit Workflow: Active
GET /hermes-ws-gateway/api/rest/deposit/processes/completed Auth Required Deposit Workflow: Completed

REST equivalent of the WS DEPOSIT_WORKFLOW channel GET. Tracks the lifecycle of incoming on-chain deposits as they are detected, confirmed, and credited to your account. /active returns the deposits still in progress as a plain list and takes no parameters; /completed returns the finished ones a page at a time.

Query Parameters

NameInTypeRequiredDescription
removeFailedquerybooleanOptionalExcludes failed/errored processes when true. Default false. Completed only
dateFromquerystring ($date)OptionalRange start (YYYY-MM-DD). Completed only
dateToquerystring ($date)OptionalRange end (YYYY-MM-DD). Completed only
pagequeryintegerOptionalZero-indexed page number. Default 0. Completed only
pageSizequeryintegerOptionalResults per page, 1 to 200. Default 50. Completed only
AuthorizationheaderstringYesBearer JWT token
X-API-VersionheaderstringOptionalDefault: 1.0.0
Example Request
GET /hermes-ws-gateway/api/rest/deposit/processes/completed?removeFailed=true&dateFrom=2026-01-01&dateTo=2026-07-14&page=0&pageSize=50 HTTP/1.1
X-API-Version: 1.0.0
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
200 Response items (/active body; items of a /completed page)
[
    {
        "walletAddress": "0x649590c78f702ed0cdeab07daf722673d2510afe",
        "cryptoAssetCode": "USDT",
        "transferAmount": 20.0002,
        "feeAmount": 0.00001613542206867,
        "feeAssetCode": "ETH",
        "walletTransferId": "a31a5f77-1826-4e20-a416-ba282c4fd864",
        "tag": null,
        "processInstanceId": "96ece4ff-463e-11f1-af10-22add62dcf14",
        "state": "Update Transfer Status - Complete",
        "message": null,
        "startTime": "2026-05-02T15:50:05.922Z",
        "endTime": "2026-05-02T15:53:27.104Z",
        "suspended": false,
        "tokenPriceUsd": 0.9997792134,
        "errorMessage": null
    },
    {
        "walletAddress": "0x649590c78f702ed0cdeab07daf722673d2510afe",
        "cryptoAssetCode": "ETH",
        "transferAmount": 0.000811907277365572,
        "feeAmount": null,
        "feeAssetCode": null,
        "walletTransferId": null,
        "tag": null,
        "processInstanceId": "b6a8edc5-44f0-11f1-bce8-7a2b3ca44423",
        "state": "Check Deposit Amount",
        "message": null,
        "startTime": "2026-05-01T00:00:07.255Z",
        "endTime": "2026-05-01T00:00:08.580Z",
        "suspended": false,
        "tokenPriceUsd": 2255.9838392777,
        "errorMessage": null
    }
]

/completed returns a page: { "items": [...], "page": 0, "pageSize": 50, "totalItems": 2, "totalPages": 1 }. Its items carry the fields shown above; /active items also carry the processing detail of a deposit still in flight: hotWalletAddress, retryCount, maxRetries, batchId, batchTransactionId, batchStatus and tasks.

state reflects the current step in the deposit pipeline; a state ending in Complete indicates the deposit has been credited. feeAmount, feeAssetCode, and walletTransferId populate once the deposit has been processed on-chain.

GET /hermes-ws-gateway/api/rest/transfer/fee-quote Auth Required Transfer Fee Quote

REST equivalent of the WS TRANSFER_FEE_QUOTE channel GET. Prices a transfer or withdrawal before it is created: the venue and network fees it will be charged, and what will reach the destination. Show it to the client, then pass its feeAmount as confirmedFee on Create Transfer.

Query Parameters

NameInTypeRequiredDescription
cryptoAssetCodequerystringYesAsset to transfer, e.g. USDT
amountquerynumberYesWhole amount to be debited. Must be greater than zero; a missing asset, venue or amount is rejected with 400
fromExchangequerystringYesSource venue code, e.g. OKEX or OPENTRADE
toExchangequerystringYesDestination venue code, or BLOCKCHAIN for a withdrawal
walletToAddressquerystringOptionalDestination address of a withdrawal
AuthorizationheaderstringYesBearer JWT token
X-API-VersionheaderstringOptionalDefault: 1.0.0
Example Request
GET /hermes-ws-gateway/api/rest/transfer/fee-quote?cryptoAssetCode=USDT&amount=15&fromExchange=OKEX&toExchange=BLOCKCHAIN&walletToAddress=0x1c93969dce56d7eeeb00679dcfe89d7e0f719979 HTTP/1.1
X-API-Version: 1.0.0
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
200 Response
{
    "class": "TransferFeeQuote",
    "cryptoAssetCode": "USDT",
    "amount": 15,
    "fromExchange": "OKEX",
    "toExchange": "BLOCKCHAIN",
    "quoted": true,
    "sendable": true,
    "feeAssetCode": "USDT",
    "feeAmount": 1.35,
    "venueFee": 1,
    "networkFee": 0.35,
    "receiveAmount": 13.65,
    "minimumAmount": 2,
    "refusal": null,
    "reason": null
}

Quote Fields

FieldTypeDescription
quotedbooleanfalse when the venue or network could not price the fee right now; reason says why
sendablebooleanfalse when the transfer would be refused, for example because the amount does not cover the fee and the venue's minimum; refusal says why
feeAssetCodestringAsset the fee is charged in — the transferred asset
feeAmountnumberTotal fee, venueFee plus networkFee. Send it back as confirmedFee when you create the transfer
venueFeenumberWithdrawal fee of the source venue, null when the transfer does not leave a venue
networkFeenumberNetwork fee of the on-chain send from the platform wallet, null when there is none
receiveAmountnumberWhat reaches the destination: amount less feeAmount, rounded down to what the venue can send
minimumAmountnumberSmallest amount the source venue will send
refusalstringWhy the transfer is not sendable, null when it is
reasonstringWhy the fee could not be quoted, null when it was
POST /hermes-ws-gateway/api/rest/transfer/start Auth Required Create Transfer

REST equivalent of the WS TRANSFER_WORKFLOW channel CREATE command. Initiates a transfer either between two connected exchanges/venues, or from an exchange out to an external blockchain wallet address.

Headers

NameInTypeRequiredDescription
AuthorizationheaderstringYesBearer JWT token
X-API-VersionheaderstringOptionalDefault: 1.0.0

Request Body

FieldTypeRequiredDescription
fromExchangestringYesSource venue code, e.g. OPENTRADE, OKEX
toExchangestringYesDestination venue code, or BLOCKCHAIN to send to an external wallet
walletToAddressstringOptionalRequired only when toExchange is BLOCKCHAIN
cryptoAssetCodestringYesAsset to transfer, e.g. USDT
transferAmountnumberYesWhole amount to debit; the fees come out of it
confirmedFeenumberOptionalThe feeAmount of the fee quote the client confirmed. The transfer is never charged more, and is refused with 409 if the fee has risen
Fees come out of the amount transferAmount is the whole amount debited from your balance. The venue's withdrawal fee and the network fee are taken out of it and the destination receives the rest. Quote it first with Transfer Fee Quote and pass its feeAmount as confirmedFee: the transfer is then never charged more than the client confirmed, and is refused rather than sent if the fee has risen. Without confirmedFee the fee is priced again as the funds are sent and charged at that price, which may be higher than the quote, and when no fee can be quoted it is sent in full and the venue may charge its fees afterwards.

Exchange to Exchange

Request Body
{
    "fromExchange": "OPENTRADE",
    "toExchange": "BITMART",
    "cryptoAssetCode": "USDT",
    "transferAmount": 4
}

Exchange to Blockchain Wallet (Withdrawal)

This is the same POST /hermes-ws-gateway/api/rest/transfer/start endpoint used above — a withdrawal is simply a transfer where toExchange is set to BLOCKCHAIN and walletToAddress is the external destination address.

Withdraw Request Body
{
    "fromExchange": "OKEX",
    "toExchange": "BLOCKCHAIN",
    "walletToAddress": "0x1c93969dce56d7eeeb00679dcfe89d7e0f719979",
    "cryptoAssetCode": "USDT",
    "transferAmount": 15,
    "confirmedFee": 1.35
}
Critical! Withdrawals to blockchain wallet addresses cannot be reversed. Double-check walletToAddress and cryptoAssetCode before submitting.
Track a withdrawal Once submitted, poll Transfer Workflow at /transfer/processes/active (in flight) or /transfer/processes/completed (finished) to follow the withdrawal's progress. The response's txId is populated once the withdrawal is broadcast on-chain.

Fee Refusals (409 Conflict)

CodeDescription
FEE_CHANGEDThe fee has risen above confirmedFee. Quote again and ask the client to confirm the new fee
FEE_UNAVAILABLEconfirmedFee was sent but the fee cannot be quoted right now. Retry later
FEE_REFUSEDThe amount does not cover the fee and the venue's minimum

A refused transfer starts nothing and locks nothing. Each fee is priced again just before its leg is sent. If the venue's fee has risen above the one quoted at start (above confirmedFee itself when the quote has no networkFee), or the network fee above what confirmedFee leaves for it before anything has left the venue, the transfer ends without sending, your balance is released, and it appears among the completed transfers with its errorMessage. Once the funds have left the venue, a network fee over that is charged at the limit and the platform bears the rest.

409 Response
{
    "class": "TransferWorkflow",
    "state": "FEE_CHANGED",
    "message": "The fee on this transfer is now 1.6 USDT, above the 1.35 USDT confirmed"
}
GET /hermes-ws-gateway/api/rest/transfer/processes/active Auth Required Transfer Workflow: Active
GET /hermes-ws-gateway/api/rest/transfer/processes/completed Auth Required Transfer Workflow: Completed

REST equivalent of the WS TRANSFER_WORKFLOW channel GET. Tracks the lifecycle of transfers created via Create Transfer, whether between exchanges or out to a blockchain wallet. /active returns the transfers still in progress as a plain list and takes no parameters; /completed returns the finished ones a page at a time.

Query Parameters

NameInTypeRequiredDescription
removeFailedquerybooleanOptionalExcludes failed/errored processes when true. Default false. Completed only
dateFromquerystring ($date)OptionalRange start (YYYY-MM-DD). Completed only
dateToquerystring ($date)OptionalRange end (YYYY-MM-DD). Completed only
pagequeryintegerOptionalZero-indexed page number. Default 0. Completed only
pageSizequeryintegerOptionalResults per page, 1 to 200. Default 50. Completed only
transferSubTypequerystringOptionalALL (default), TRANSFER_ONLY for transfers between venues, or WITHDRAWAL_ONLY for withdrawals to a blockchain address. Completed only
AuthorizationheaderstringYesBearer JWT token
X-API-VersionheaderstringOptionalDefault: 1.0.0
Example Request
GET /hermes-ws-gateway/api/rest/transfer/processes/completed?removeFailed=true&dateFrom=2026-07-01&dateTo=2026-07-14&page=0&pageSize=50&transferSubType=ALL HTTP/1.1
X-API-Version: 1.0.0
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
200 Response items (/active body; items of a /completed page)
[
    {
        "fromExchange": "OPENTRADE",
        "toExchange": "OKEX",
        "cryptoAssetCode": "USDT",
        "transferAmount": 5,
        "confirmedFee": null,
        "walletTransferId": "ffa280b4-3c95-4741-bb25-d154193b6510",
        "tag": null,
        "processInstanceId": "b0d4b1a1-78ec-11f1-86a3-b6505867aca1",
        "state": "Completed",
        "message": null,
        "startTime": "2026-07-06T03:42:19.954Z",
        "endTime": "2026-07-15T18:36:19.707Z",
        "suspended": false,
        "walletFromAddress": "0x375b9d792d38105bee4b87f72941a6af071d9218",
        "feeAmount": 0.00001031880686044,
        "feeAssetCode": "ETH",
        "txId": "0x205cce2e2077c709a2c9f2b8fffe8861b30c2421bce308bdc87e662d8f90edfb",
        "exchangeTxId": null,
        "exchangeTransferId": null,
        "errorMessage": null,
        "tasks": null
    },
    {
        "fromExchange": "OKEX",
        "toExchange": "OPENTRADE",
        "cryptoAssetCode": "USDT",
        "transferAmount": 5,
        "confirmedFee": null,
        "walletTransferId": "916e31ee-700b-4e60-b6c2-9d14ad651fe9",
        "tag": null,
        "processInstanceId": "fe8858c3-78dd-11f1-86a3-b6505867aca1",
        "state": "Completed",
        "message": null,
        "startTime": "2026-07-06T01:57:07.865Z",
        "endTime": "2026-07-06T01:59:28.529Z",
        "suspended": false,
        "walletFromAddress": "OKEX",
        "feeAmount": 0.097,
        "feeAssetCode": "USDT",
        "txId": null,
        "exchangeTxId": "413425468",
        "exchangeTransferId": "413425468",
        "errorMessage": null,
        "tasks": null
    }
]

/active returns these objects as a plain list; /completed returns the same objects in a page: { "items": [...], "page": 0, "pageSize": 50, "totalItems": 2, "totalPages": 1 }.

confirmedFee is always null on these two endpoints; the fee a client confirmed is not read back here. walletFromAddress holds the source wallet address for on-chain transfers, or the source exchange name for exchange-internal transfers. txId is populated only for blockchain transfers; exchangeTxId/exchangeTransferId only for exchange-to-exchange transfers.

Perpetual Futures

Perpetual futures are traded through the same order calls as spot. Add "instrumentType": "FUTURE" to an order and it opens, grows, shrinks or closes a position on the perpetual of that pair, margined from your futures wallet. Your positions, your margin and risk, the perpetual order book and funding rates have their own calls, below; the WebSocket equivalents are on the Private and Public pages.

Before you trade perpetuals
  • Move collateral into your futures wallet with Futures Collateral. Only what is in the futures wallet is at risk on a position; your spot balances are never used as margin.
  • List the perpetuals open to you, and the venues quoting each, with Instrument List and instrumentType=FUTURE. An order on a perpetual that is not listed there is refused.
  • Leverage is capped per account. Send a leverage from 1 up to your cap, or leave it out.
When perpetuals are unavailable While perpetual futures are switched off, every perpetual call is refused and nothing is ever placed as spot instead. Cancelling an open perpetual order still works, so you can always remove exposure. REST calls answer 409 with {"code": "PERPS_NOT_AVAILABLE", "message": "Perpetual futures are not available"}; a new perpetual order comes back REJECTED with that message; an update to a perpetual order answers 409 PERPS_NOT_AVAILABLE; a futures transfer is refused with WALLET_REFUSED; new WebSocket subscriptions answer an ERROR event, and a perpetual subscription already open stops receiving updates without one, so when updates stop, read the REST calls; unsubscribing always works.
POST /hermes-ws-gateway/api/rest/trade-private/orders Auth Required Perpetual Orders

The same call as Create Orders, with instrumentType set to FUTURE. BUY opens or grows a long and closes a short; SELL opens or grows a short and closes a long. amount is in the base asset. exchange names a venue quoting the perpetual (see exchanges in Instrument List); leave it out to let the platform route the order.

Perpetual Fields

FieldTypeRequiredDescription
instrumentTypestringYesFUTURE
leveragenumberOptionalFrom 1 up to your leverage cap; a value above the cap is refused. Left out, the order takes the leverage of the position you hold on the contract (the lowest across venues when the order is routed), or 1, capped at your cap
reduceOnlybooleanOptionaltrue only shrinks or closes your position. Default false
Request Body
[
    {
        "exchange": "HUOBI",
        "globalInstrumentCd": "BTC/USDT",
        "clientOrderId": "1760191200001",
        "direction": "BUY",
        "orderType": "MARKET",
        "price": 112400.0,
        "amount": 0.01,
        "instrumentType": "FUTURE",
        "leverage": 2
    }
]
200 Response
[
    {
        "exchange": "HUOBI",
        "globalInstrumentCd": "BTC/USDT",
        "clientOrderId": "1760191200001",
        "direction": "BUY",
        "orderType": "MARKET",
        "amount": 0.01,
        "orderStatus": "NEW",
        "instrumentType": "FUTURE",
        "leverage": 2,
        "reduceOnly": false
    }
]
200 Response (refused)
[
    {
        "globalInstrumentCd": "BTC/USDT",
        "clientOrderId": "1760191200001",
        "orderStatus": "REJECTED",
        "message": "Choose a leverage between 1x and 3x",
        "instrumentType": "FUTURE",
        "leverage": 5,
        "reduceOnly": false
    }
]
Refusals and changes A new perpetual order the platform refuses — a leverage above your cap, not enough margin in the futures wallet, futures trading blocked by a margin call, perpetual futures switched off — comes back with orderStatus REJECTED and the reason in message. An order on a venue that does not offer the perpetual of that pair comes back FAILED with the reason. Check each order in the array. The response carries leverage only when you sent one. Perpetual orders cannot be modified: an update comes back FAILED with the message "a perpetual order cannot be modified, cancel it and place a new one", and the order is left as it was. Cancel with Cancel Orders and place a new one. A cancel needs only the order's exchange, globalInstrumentCd and clientOrderId; the platform knows it is a perpetual. Active orders and order history show instrumentType, leverage and reduceOnly on perpetual orders; spot orders do not carry these fields.
GET /hermes-ws-gateway/api/rest/perp/positions Auth Required Positions

REST equivalent of the WS PERP_POSITION channel snapshot. Your open perpetual positions, one per venue and contract. A closed position is not listed. Needs the Trade permission.

Response Fields

FieldTypeDescription
exchangestringVenue holding the position
instrumentstringThe pair, e.g. BTC/USDT
contractCodestringThe venue's contract, e.g. BTC-USDT
sidestringLONG or SHORT
sizenumberPosition size in the base asset, always positive; side gives the direction
averageEntryPricenumberAverage price the position was opened at
markPricenumberPrice the position is valued at
leveragenumberLeverage of the position
notionalnumberSize times mark price, in the settle asset
unrealisedPnlnumberProfit or loss if closed at the mark price
initialMarginnumberMargin held for the position: its entry notional divided by its leverage
maintenanceMarginnumberMaintenance margin of the position at the venue's rate
liquidationPricenumberMark price at which the platform liquidates the position. Your positions share the margin of the futures wallet (cross margin), so this price moves with the wallet balance and your other positions
distanceToLiquidationnumberHow far the mark price is from liquidationPrice, as a fraction of the mark price
statestringState of your futures account, the same on each of its positions: HEALTHY, WARN, MARGIN_CALL or LIQUIDATING
updatedAtstringWhen the figures were last computed (ISO-8601, UTC)
200 Response
[
    {
        "class": "PerpPosition",
        "exchange": "HUOBI",
        "instrument": "BTC/USDT",
        "contractCode": "BTC-USDT",
        "side": "LONG",
        "size": 0.01,
        "averageEntryPrice": 112380.5,
        "markPrice": 112910.2,
        "leverage": 2,
        "notional": 1129.1,
        "unrealisedPnl": 5.3,
        "initialMargin": 561.9,
        "maintenanceMargin": 5.65,
        "liquidationPrice": 14123.21,
        "distanceToLiquidation": 0.8749,
        "state": "HEALTHY",
        "updatedAt": "2026-10-11T14:02:11.204Z"
    }
]
GET /hermes-ws-gateway/api/rest/perp/risk Auth Required Futures Risk

REST equivalent of the WS PERP_RISK channel snapshot. The margin and risk of your futures wallet, one row per venue and settle asset. Needs the Trade permission.

Response Fields

FieldTypeDescription
exchangestringVenue of the futures wallet
settleAssetstringAsset the wallet and its positions settle in, e.g. USDT
walletBalancenumberCollateral in the futures wallet
equitynumberwalletBalance plus unrealisedPnl
unrealisedPnlnumberUnrealised profit or loss of all positions
initialMarginUsednumberMargin held by open positions
orderMarginnumberMargin held by open orders
availableMarginnumberMargin free for new orders and for moving back to spot
maintenanceMarginnumberSum of the positions' maintenance margins at the venue's rate
marginRationumberThe platform's maintenance margin over equity. The platform's maintenance rate is the venue's rate plus a liquidation buffer, so this is higher than maintenanceMargin over equity. WARN, MARGIN_CALL and liquidation are judged on it; liquidation starts at 1
nearestLiquidationPricenumberThe closest liquidation price among your positions
realisedPnlnumberProfit or loss realised by closed positions
cumulativeFeesnumberTrading fees on futures net of rebates: a charge is positive and is taken from walletBalance
cumulativeFundingnumberFunding paid (negative) and received (positive)
statestringHEALTHY, WARN, MARGIN_CALL or LIQUIDATING
tradingBlockedbooleantrue while new risk-increasing orders are refused
markStalebooleantrue when the mark price is out of date and the figures may lag
updatedAtstringWhen the figures were last computed (ISO-8601, UTC)
200 Response
[
    {
        "class": "PerpRisk",
        "exchange": "HUOBI",
        "settleAsset": "USDT",
        "walletBalance": 999.43,
        "equity": 1004.73,
        "unrealisedPnl": 5.3,
        "initialMarginUsed": 561.9,
        "orderMargin": 0,
        "availableMargin": 442.83,
        "maintenanceMargin": 5.65,
        "marginRatio": 0.0169,
        "nearestLiquidationPrice": 14123.21,
        "realisedPnl": 0,
        "cumulativeFees": 0.45,
        "cumulativeFunding": -0.12,
        "state": "HEALTHY",
        "tradingBlocked": false,
        "markStale": false,
        "updatedAt": "2026-10-11T14:02:11.204Z"
    }
]
POST /hermes-ws-gateway/api/rest/transfer/start Auth Required Futures Collateral

Moves collateral between your spot wallet and your futures wallet on one exchange, through Create Transfer. Name the same exchange as fromExchange and toExchange, set the two wallets, and move the settle asset, USDT.

Additional Request Fields

FieldTypeRequiredDescription
fromAccountTypestringOptionalWallet the funds leave: SPOT (default) or USDT_FUTURES
toAccountTypestringOptionalWallet the funds reach: SPOT (default) or USDT_FUTURES
Request Body
{
    "fromExchange": "HUOBI",
    "toExchange": "HUOBI",
    "cryptoAssetCode": "USDT",
    "transferAmount": 1000,
    "fromAccountType": "SPOT",
    "toAccountType": "USDT_FUTURES"
}
200 Response
{
    "class": "TransferWorkflow",
    "fromExchange": "HUOBI",
    "toExchange": "HUOBI",
    "cryptoAssetCode": "USDT",
    "transferAmount": 1000,
    "fromAccountType": "SPOT",
    "toAccountType": "USDT_FUTURES",
    "processInstanceId": "b1f4c0de-5b8e-11f1-9a51-0242ac120004",
    "state": "STARTED"
}
Refusals A move the platform cannot make starts nothing and answers 409 with state WALLET_REFUSED and the reason in message: futures transfers switched off, a move between two exchanges, a move other than spot to futures or back, an exchange without a futures wallet, an asset other than the settle asset, or an amount that is not positive or has more than 8 decimals. A managed-portfolio account is refused with 403. A move out of futures takes only what is not held as margin: check availableMargin in Futures Risk first, because a larger amount is accepted at start and then fails, leaving the collateral in the futures wallet. Your futures balance is also in Balance Distribution with includeFutures=true.
409 Response
{
    "class": "TransferWorkflow",
    "state": "WALLET_REFUSED",
    "message": "Only USDT moves between Spot and Futures"
}
GET /hermes-ws-gateway/api/rest/public/perp/order-book Auth Required Perpetual Order Book

REST equivalent of the WS PERP_ORDER_BOOK_PUBLIC snapshot. The order book of each perpetual asked for, one book per venue quoting it, 20 levels a side, best first, in the shape of Order Book. Amounts are in the base asset.

Query Parameters

NameInTypeRequiredDescription
instrumentsquerystring[]YesPerpetual pairs, e.g. BTC/USDT. A pair not open to clients returns no book
200 Response
[
    {
        "class": "OrderBook",
        "symbol": "BTC/USDT",
        "exchange": "HUOBI",
        "bids": [[112399.9, 1.204], [112399.5, 0.37]],
        "asks": [[112400.0, 0.851], [112400.6, 2.06]],
        "eventTime": 1760191331204
    }
]
GET /hermes-ws-gateway/api/rest/public/perp/funding-rates Auth Required Funding Rates

The funding rates a perpetual open to clients settled on one exchange between two times. A positive rate means longs pay shorts. What funding did to your own wallet is in the Journal as Funding Fee and Funding Income.

Query Parameters

NameInTypeRequiredDescription
exchangequerystringYesVenue, e.g. HUOBI
instrumentquerystringYesThe pair (BTC/USDT) or the contract (BTC-USDT)
fromquerylongYesStart, Unix epoch milliseconds
toquerylongYesEnd, Unix epoch milliseconds; after from and at most 90 days after it

A missing or negative bound, to before from, a window over 90 days, an unknown exchange or a perpetual not open on that exchange answers 400. 503 means the rates could not be read; try again.

Response Fields

FieldTypeDescription
exchangestringVenue
instrumentCdstringThe venue's contract
fundingTimelongSettlement time, Unix epoch milliseconds
fundingRatenumberRate settled at fundingTime
realizedRatenumberNot populated yet; always null
200 Response
[
    {
        "exchange": "HUOBI",
        "instrumentCd": "BTC-USDT",
        "fundingTime": 1760169600000,
        "fundingRate": 0.0001,
        "realizedRate": null
    }
]

Yield

Yield earns the funding rate on a perpetual swap while holding the matching spot position, so the contract carries no net price exposure. You subscribe an amount of the quote asset, the platform buys the base asset spot and shorts the same quantity on the perpetual, and the funding it collects is credited to you daily, less the performance fee. A contract runs until you redeem it.

Permission Every Yield endpoint needs the Trade permission on the API key, the same one that places orders. A key made on a sub-account reads and acts on that sub-account's contracts.
Follow a contract as it works Subscribing, redeeming and cancelling each return as soon as the request is accepted; the contract then works through its stages over the next minutes. Subscribe to the YIELD_CONTRACT WebSocket channel to have each change pushed to you, or poll Get Contract and watch status and step.
GET /hermes-ws-gateway/api/rest/yield/product Auth Required Yield Product

The terms a subscription must meet, and how much you can subscribe from each funding venue right now.

Parameters

NameInTypeRequiredDescription
AuthorizationheaderstringYesBearer JWT token
X-API-VersionheaderstringOptionalDefault: 1.0.0
Example Request
GET /hermes-ws-gateway/api/rest/yield/product HTTP/1.1
X-API-Version: 1.0.0
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
200 Response
{
    "enabled": true,
    "quoteAsset": "USDT",
    "baseAssets": ["DOGE"],
    "minAmount": 50,
    "maxAmount": 100000,
    "performanceFeePercent": 15,
    "venue": "HTX",
    "venueExchange": "HUOBI",
    "headlineApyPercent": 10.5,
    "fundingVenues": [
        {
            "exchange": "HUOBI",
            "freeBalance": 1250.4,
            "maxSubscribable": 1250.4
        },
        {
            "exchange": "OPENTRADE",
            "freeBalance": 5000,
            "maxSubscribable": 5000
        }
    ]
}

Product Fields

FieldTypeDescription
enabledbooleanfalse while Yield is closed to new subscriptions; open contracts keep running
quoteAssetstringAsset you subscribe and are paid in
baseAssetsarrayAssets a contract can be built on
minAmount / maxAmountnumberLimits on one subscription, in quoteAsset
performanceFeePercentnumberShare of the gross funding income kept as the performance fee
venuestringWhere the strategy runs
venueExchangestringThe exchange code of that venue. A fundingVenues entry other than it, such as OPENTRADE for your wallet, is moved there first and the network fee of that move comes out of the amount
headlineApyPercentnumberIndicative annual rate, when one is published; not a promise
fundingVenuesarrayPer venue you can fund from, OPENTRADE being your wallet: its freeBalance in quoteAsset and the maxSubscribable amount after the limits
POST /hermes-ws-gateway/api/rest/yield/subscriptions Auth Required Subscribe

Starts a contract with the amount you name, taken from one funding venue. Send a clientRequestId of your own on every subscription: a repeat of the same request, after a timeout say, returns the contract the first one started instead of starting a second.

Request Body

FieldTypeRequiredDescription
baseAssetstringYesOne of the product's baseAssets, e.g. DOGE
amountnumberYesPrincipal in quoteAsset, between minAmount and maxAmount
sourceExchangestringOptionalFunding venue, one of fundingVenues. Defaults to the product's funding venue. OPENTRADE funds from your wallet: the amount is moved to venueExchange first, the network fee comes out of it, and minAmount applies to what arrives
confirmedNetworkFeenumberOptionalWhen funding from the wallet, the network fee you were quoted by Transfer Fee Quote for OPENTRADE to venueExchange. The subscription is refused if the fee has since risen beyond the tolerance
clientRequestIdstringOptionalYour idempotency key, up to 64 characters
Example Request
POST /hermes-ws-gateway/api/rest/yield/subscriptions HTTP/1.1
X-API-Version: 1.0.0
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
Content-Type: application/json

{
    "baseAsset": "DOGE",
    "amount": 1000,
    "sourceExchange": "HUOBI",
    "clientRequestId": "bot-2026-09-22-001"
}
202 Response
{
    "contractId": "7c1d5e2a-5b8e-11f1-9a51-0242ac120004",
    "created": true
}

202 means a new contract was started. 200 with "created": false means this clientRequestId had already started the contract named. A refused subscription starts nothing and moves nothing, and answers with the status below and a body of refusal and message:

409 Response
{
    "created": false,
    "refusal": "INSUFFICIENT_FUNDS",
    "message": "Only 420 USDT is free on HUOBI"
}

Refusal Codes

refusalHTTPMeaning
PRODUCT_DISABLED409Yield is not open for subscriptions
INVALID_REQUEST400A required field is missing or malformed, e.g. no asset, a non-positive amount or a clientRequestId over 64 characters
ASSET_NOT_OFFERED409The asset is not in baseAssets
VENUE_NOT_OFFERED409sourceExchange is not one of fundingVenues
BELOW_MINIMUM / ABOVE_MAXIMUM409The amount is outside minAmount–maxAmount
INSUFFICIENT_FUNDS409The funding venue's free balance does not cover the amount
MONEY_MOVES_NOT_OFFERED409Your account's money is not moved by Open Trade, so it cannot fund from the wallet
FEE_UNAVAILABLE409The network fee of the move to the venue cannot be quoted right now
TRANSFER_REFUSED409The move to the venue is refused: the route is paused, the amount does not cover the fee, or the fee moved past the confirmedNetworkFee
CONTRACT_NOT_FOUND404No contract of yours has that id
NOT_REDEEMABLE409The contract cannot be redeemed now; message names its stage
NOT_CANCELLABLE409The contract is past subscribing and can only be redeemed
GET /hermes-ws-gateway/api/rest/yield/contracts/open Auth Required Open Contracts
GET /hermes-ws-gateway/api/rest/yield/contracts/closed Auth Required Closed Contracts

/open returns every contract that has not settled, as a plain list. /closed returns the settled ones — redeemed, matured, cancelled or failed — a page at a time, newest first.

Parameters

NameInTypeRequiredDescription
dateFromquerystringOptionalClosed only. ISO date; contracts started on or after it
dateToquerystringOptionalClosed only. ISO date; contracts started on or before it
pagequeryintegerOptionalClosed only. Zero-based page, default 0
pageSizequeryintegerOptionalClosed only. Default 50, at most 200; outside that is rejected with 400
AuthorizationheaderstringYesBearer JWT token
X-API-VersionheaderstringOptionalDefault: 1.0.0
Example Request
GET /hermes-ws-gateway/api/rest/yield/contracts/closed?page=0&pageSize=50 HTTP/1.1
X-API-Version: 1.0.0
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...

Each entry is a contract as Get Contract returns it; /closed wraps them as { "items": [...], "page": 0, "pageSize": 50, "totalItems": 3, "totalPages": 1 }.

GET /hermes-ws-gateway/api/rest/yield/contracts/{contractId} Auth Required Get Contract

One contract, with its legs, its income so far, the income accrued since the last credit, and each credit. Answers 404 for an id that is not one of your contracts.

Parameters

NameInTypeRequiredDescription
contractIdpathstringYesThe contract's contractId
AuthorizationheaderstringYesBearer JWT token
X-API-VersionheaderstringOptionalDefault: 1.0.0
Example Request
GET /hermes-ws-gateway/api/rest/yield/contracts/7c1d5e2a-5b8e-11f1-9a51-0242ac120004 HTTP/1.1
X-API-Version: 1.0.0
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
200 Response
{
    "contractId": "7c1d5e2a-5b8e-11f1-9a51-0242ac120004",
    "clientId": 24240001,
    "clientRequestId": "bot-2026-09-22-001",
    "baseAsset": "DOGE",
    "quoteAsset": "USDT",
    "contractCode": "DOGE-USD",
    "status": "ACTIVE",
    "statusLabel": "Active",
    "step": "Active — earning",
    "redeemable": true,
    "cancellable": false,
    "redemptionRequested": false,
    "fundingVenue": "HUOBI",
    "fundedFrom": "HUOBI",
    "requestedAmount": null,
    "fundingNetworkFee": null,
    "venue": "HUOBI",
    "redemptionWithdrawsFromVenue": false,
    "principal": 1000,
    "performanceFeePercent": 15,
    "openedAt": "2026-09-01T09:14:05",
    "spotFilledQty": 4012,
    "spotAvgPrice": 0.2489,
    "perpContracts": 4012,
    "perpAvgPrice": 0.2491,
    "cumulativeYieldGross": 9.41,
    "cumulativeFees": 1.41,
    "cumulativeYieldNet": 8,
    "pendingYieldBase": 2.5,
    "pendingYieldQuote": 0.62,
    "pendingYieldNet": 0.527,
    "lastHarvestAt": "2026-09-22T00:10:00",
    "credits": [
        {
            "creditedAt": "2026-09-22T00:10:00",
            "grossAmount": 0.47,
            "feeAmount": 0.07,
            "netAmount": 0.4,
            "baseAssetAmount": 1.89
        }
    ]
}

Contract Fields

FieldTypeDescription
contractIdstringIdentifier of the contract; use it on every per-contract endpoint
clientRequestIdstringThe idempotency key the subscription was made with, null when none was sent
statusstringSUBSCRIBING, ACTIVE, HARVESTING, REDEEMING, PENDING_UNWIND, CLOSED, CANCELLED or FAILED
contractCodestringThe perpetual the hedge is held in, e.g. DOGE-USD; its second part is the currency perpAvgPrice is quoted in
statusLabelstringThe status in client wording, as the web app shows it
stepstringWhat the contract is doing right now, in client wording; null once it has settled
redeemablebooleantrue while the contract is earning and no redemption has been asked for
cancellablebooleantrue while the contract is still being built and no cancellation has been asked for
redemptionRequestedbooleanA redemption or cancellation has been asked for and is being worked
fundingVenuestringWhere the principal was taken from; OPENTRADE when it came from your wallet
fundedFromstringSame as fundingVenue
requestedAmountnumberAmount debited from your wallet when the contract was funded from it, before the network fee; null otherwise
fundingNetworkFeenumberNetwork fee charged on that move; null when the principal was already on the venue
venuestringVenue the strategy runs on
redemptionWithdrawsFromVenuebooleantrue when a redemption comes back through a venue withdrawal, which carries that venue's fee
principalnumberAmount subscribed, in quoteAsset
performanceFeePercentnumberShare of the gross funding income kept as the performance fee
openedAt / closedAt / cancelledAtstringWhen the contract started earning, settled, or was cancelled (UTC)
subscriptionTransferFeenumberFee taken from the principal to move it to the venue, when it had to move
spotFilledQty / spotAvgPricenumberThe long spot leg: quantity bought and its average price
perpContracts / perpAvgPricenumberThe short perpetual leg: size and its average price
cumulativeYieldGross / cumulativeFees / cumulativeYieldNetnumberFunding income credited so far, the performance fee on it, and what reached you, in quoteAsset
pendingYieldBase / pendingYieldQuotenumberIncome accrued since the last credit and not yet sold, in the base asset and its current quoteAsset value
pendingYieldNetnumberpendingYieldQuote less the performance fee: what the pending income would add to your balance
lastHarvestAtstringWhen income was last credited
creditsarrayOne entry per credit: creditedAt, grossAmount, feeAmount, netAmount, baseAssetAmount
redemptionAmount / redemptionTransferFeenumberWhat a settled contract returned to you and the venue withdrawal fee taken from it
redemptionReasonstringCLOSE, CANCEL or MATURITY once a redemption has started
txIdstringOn-chain transaction of the principal's move to the venue, when it had to move
GET /hermes-ws-gateway/api/rest/yield/summary Auth Required Account Summary
GET /hermes-ws-gateway/api/rest/yield/contracts/{contractId}/performance Auth Required Contract Performance

/summary totals every contract you have held; /contracts/{contractId}/performance gives the same figures for one contract. Both are what the web app's Yield page shows.

Parameters

NameInTypeRequiredDescription
contractIdpathstringYesContract performance only
AuthorizationheaderstringYesBearer JWT token
X-API-VersionheaderstringOptionalDefault: 1.0.0
Example Request
GET /hermes-ws-gateway/api/rest/yield/summary HTTP/1.1
X-API-Version: 1.0.0
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
200 Response
{
    "openPrincipal": 1000,
    "currentValue": 1008.527,
    "lifetimeIncome": 8,
    "lifetimeFees": 1.41,
    "openContracts": 1,
    "deployedContracts": 1,
    "apyPercent": 13.9,
    "pendingByAsset": { "DOGE": 2.5 },
    "pendingValue": 0.527,
    "pendingUnreadable": false,
    "estimatedDays": false,
    "nav": [
        { "date": "2026-09-21", "value": 1007.6, "income": 0.41 },
        { "date": "2026-09-22", "value": 1008.53, "income": 0.4 }
    ]
}

Performance Fields

FieldTypeDescription
openPrincipalnumberPrincipal of the contracts still open
currentValuenumberopenPrincipal plus the income they have earned, credited and pending, net of the performance fee
lifetimeIncome / lifetimeFeesnumberNet income credited and performance fees charged, over every contract
openContracts / deployedContractsintegerContracts still open, and contracts that ever put principal to work
apyPercentnumberAnnualised return on the principal-days deployed; null until a week of history exists
pendingByAsset / pendingValueobject / numberIncome accrued since the last credit: gross per base asset, and in quoteAsset net of the performance fee
pendingUnreadablebooleantrue when pending income could not be read just now; it is then left out of the figures
estimatedDaysbooleantrue when some income could not be placed on the day it was earned and is spread evenly over the contract's life, so the daily figures in nav are partly estimated
navarrayDaily series over up to two years: the date, the position value at the end of it, and the income earned that day
GET /hermes-ws-gateway/api/rest/yield/contracts/{contractId}/redemption-quote Auth Required Redemption Fee Quote

The fee a redemption would take from what it returns. When redemptionWithdrawsFromVenue is false the funds come back without a withdrawal and feeAmount is 0; otherwise it is the venue's current withdrawal fee, in the same shape as Transfer Fee Quote. The fee is charged at the price in force when the funds leave the venue, which may differ from this quote.

Parameters

NameInTypeRequiredDescription
contractIdpathstringYesThe contract's contractId
AuthorizationheaderstringYesBearer JWT token
X-API-VersionheaderstringOptionalDefault: 1.0.0
Example Request
GET /hermes-ws-gateway/api/rest/yield/contracts/7c1d5e2a-5b8e-11f1-9a51-0242ac120004/redemption-quote HTTP/1.1
X-API-Version: 1.0.0
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
200 Response
{
    "cryptoAssetCode": "USDT",
    "amount": 1000,
    "fromExchange": "HUOBI",
    "toExchange": "OPENTRADE",
    "quoted": true,
    "sendable": true,
    "feeAssetCode": "USDT",
    "feeAmount": 0
}
POST /hermes-ws-gateway/api/rest/yield/contracts/{contractId}/redeem Auth Required Redeem
POST /hermes-ws-gateway/api/rest/yield/contracts/{contractId}/cancel Auth Required Cancel

/redeem closes an earning contract: both legs are unwound at market and the principal plus any income not yet credited comes back to your balance, less the fee in Redemption Fee Quote. /cancel stops a contract that is still being built and returns what had been deployed. Check redeemable or cancellable on the contract first. Neither can be undone.

Parameters

NameInTypeRequiredDescription
contractIdpathstringYesThe contract's contractId
AuthorizationheaderstringYesBearer JWT token
X-API-VersionheaderstringOptionalDefault: 1.0.0
Example Request
POST /hermes-ws-gateway/api/rest/yield/contracts/7c1d5e2a-5b8e-11f1-9a51-0242ac120004/redeem HTTP/1.1
X-API-Version: 1.0.0
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
202 Response
{
    "contractId": "7c1d5e2a-5b8e-11f1-9a51-0242ac120004",
    "contract": { "status": "ACTIVE", "redemptionRequested": true, ... }
}

202 means the request was accepted; contract is the contract as it now stands. A contract that cannot be redeemed or cancelled now answers 409 with NOT_REDEEMABLE or NOT_CANCELLABLE, and an id that is not yours answers 404 with CONTRACT_NOT_FOUND — see Refusal Codes.

409 Response
{
    "contractId": "7c1d5e2a-5b8e-11f1-9a51-0242ac120004",
    "refusal": "NOT_REDEEMABLE",
    "message": "The contract is subscribing and cannot be redeemed now"
}

Yield Basket

Yield Basket is a second way to hold Yield: one managed mix of assets, with funding paid in USDT. You subscribe USDT and receive OTY-B units at the net asset value (NAV) per unit. The mix is managed for you, and your holding is worth your units at the latest NAV.

Value can fall NAV moves with funding, costs and the market, so your holding can be worth less than you put in. Past funding is no promise of future income. Read the Risk Disclosure before you subscribe.
Permission Every Yield Basket endpoint needs the Trade permission on the API key, the same one that places orders. Main accounts and sub-accounts can both hold Yield Basket. The account of a managed portfolio cannot subscribe, redeem or cancel. An account that clears through a clearing party, or trades on its own exchange account, can read its holding and cancel a queued request, but cannot subscribe or redeem: those answer 403 with NOT_PERMITTED.
Daily dealing Subscriptions and redemptions queue for the next daily dealing and are priced at that day's NAV, so the units or USDT you end up with are known only after dealing. Read dealsAt on your request, and poll Open Requests to follow it.
Amounts The basket is valued in USDT, so fields ending in Usd hold USDT amounts. Fees on Activity and Holding are signed: a charge is negative. While Yield Basket is not offered, Product answers 404.
GET /hermes-ws-gateway/api/rest/yield-basket/product Auth Required Yield Basket Product

The terms of Yield Basket, the latest NAV and what the basket holds.

Parameters

NameInTypeRequiredDescription
AuthorizationheaderstringYesBearer JWT token
X-API-VersionheaderstringOptionalDefault: 1.0.0
Example Request
GET /hermes-ws-gateway/api/rest/yield-basket/product HTTP/1.1
X-API-Version: 1.0.0
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
200 Response
{
    "portfolioCode": "YIELD-BASKET",
    "name": "Yield Basket",
    "unitTicker": "OTY-B",
    "description": "A managed mix of assets, with funding paid in USDT",
    "status": "ACTIVE",
    "enabled": true,
    "subscriptionsPaused": false,
    "redemptionsPaused": false,
    "minSubscriptionUsd": 100,
    "maxSubscriptionUsd": 250000,
    "minRedemptionUsd": 100,
    "dealingCadenceMinutes": 1440,
    "nextDealingAt": "2026-11-03T00:00:00Z",
    "factSheetUrl": null,
    "navPerUnit": 1.0342,
    "navStruckAt": "2026-11-02T00:00:00Z",
    "composition": [
        { "asset": "SOL", "weightPercent": 60 },
        { "asset": "XRP", "weightPercent": 40 }
    ],
    "venues": [
        { "venue": "HUOBI", "weightPercent": 100 }
    ],
    "fundingAssets": ["USDT"],
    "performanceFeePercent": 15,
    "redemptionNoticeDays": 0,
    "nextRedemptionDealingAt": "2026-11-03T00:00:00Z",
    "marginUsdtShare": 0.2
}

Product Fields

FieldTypeDescription
portfolioCode / name / unitTickerstringThe product's code, its name and the ticker of its units
descriptionstringA short description of the product
status / enabledstring / booleanThe product's state, and whether it is open to clients. enabled stays true for an account that still holds units or a queued request after the product closes, so read the pause flags to decide whether you can subscribe or redeem
subscriptionsPaused / redemptionsPausedbooleantrue while new requests of that kind are held back. Subscriptions can pause on their own during fast markets. While the basket is closing, subscriptions stay paused, queued subscriptions are returned at the next dealing, and redemptions stay open
minSubscriptionUsd / maxSubscriptionUsdnumberLimits on one subscription, after any fee
minRedemptionUsdnumberSmallest redemption, by value at the latest NAV. It does not apply when you redeem all your free units
dealingCadenceMinutesintegerMinutes between dealings: 1440 is daily
nextDealingAtstringWhen the next dealing runs (UTC)
factSheetUrlstringLink to the fact sheet, when one is published
navPerUnit / navStruckAtnumber / stringThe latest NAV per unit and when it was struck
compositionarrayThe coins held, each with its weightPercent at the latest NAV. The weights add up to 100 and leave out the USDT in marginUsdtShare. Before the first NAV they are the target mix. The mix changes as it is managed
venuesarrayWhere the basket is held, each with its weightPercent
fundingAssetsarrayAssets you can subscribe with: USDT only
performanceFeePercentnumberPerformance fee, charged only on a NAV above the high-water mark of your own units
redemptionNoticeDaysintegerDays a redemption waits before it can deal; 0 means the next dealing
nextRedemptionDealingAtstringThe first dealing a redemption asked now can reach, after the notice period (UTC)
marginUsdtSharenumberTarget share of the basket kept in USDT, as a fraction: 0.2 is 20%
GET /hermes-ws-gateway/api/rest/yield-basket/holding Auth Required Holding

Your units and what they are worth at the latest NAV. An account with no units gets zeros, with firstSubscribedAt, highWaterNav and feesPaidUsdt left null.

Example Request
GET /hermes-ws-gateway/api/rest/yield-basket/holding HTTP/1.1
X-API-Version: 1.0.0
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
200 Response
{
    "units": 994.17,
    "lockedUnits": 0,
    "costBasisUsd": 1000,
    "investedUsd": 1000,
    "marketValueUsd": 1028.17,
    "firstSubscribedAt": "2026-10-01T00:00:00Z",
    "markToMarketUsd": -4.1,
    "tradingUsd": 38.3,
    "highWaterNav": 1.0342,
    "feesPaidUsdt": -6.03,
    "navSeries": [
        { "date": "2026-11-02T00:00:00Z", "navPerUnit": 1.0342, "benchmark": null }
    ],
    "venueSlices": [
        { "venue": "HUOBI", "valueUsd": 1028.17 }
    ]
}

Holding Fields

FieldTypeDescription
unitsnumberOTY-B units you hold
lockedUnitsnumberUnits held for a redemption that has not dealt yet
costBasisUsdnumberCost of the units you still hold
investedUsdnumberTotal subscribed through dealings that have settled
marketValueUsdnumberYour units at the latest NAV
firstSubscribedAtstringWhen your first subscription dealt (UTC)
markToMarketUsd / tradingUsdnumberWhat has moved your value so far, split into market moves and trading. Signed
highWaterNavnumberThe NAV your units must pass before a performance fee is charged again
feesPaidUsdtnumberTotal performance fees charged so far, in USDT. Signed: a charge is negative
navSeriesarrayNAV per unit over the time you have held, by date
venueSlicesarrayYour value by venue
GET /hermes-ws-gateway/api/rest/yield-basket/activity Auth Required Activity

What has happened to your holding, newest first: settled subscriptions and redemptions, fees, and each day's change in value.

Example Request
GET /hermes-ws-gateway/api/rest/yield-basket/activity HTTP/1.1
X-API-Version: 1.0.0
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
200 Response
[
    {
        "date": "2026-11-02T00:00:00Z",
        "type": "FEE",
        "description": "Performance fee",
        "units": -5.83,
        "amountUsd": -6.03,
        "feeUsd": null,
        "navPerUnit": 1.0342
    },
    {
        "date": "2026-10-01T00:00:00Z",
        "type": "SUBSCRIPTION",
        "description": "Subscribed with USDT",
        "units": 1000,
        "amountUsd": 1000,
        "feeUsd": 0,
        "navPerUnit": 1
    }
]

Activity Fields

FieldTypeDescription
datestringWhen it happened (UTC)
typestringSUBSCRIPTION, REDEMPTION, FEE, MARK_TO_MARKET or TRADING
descriptionstringA short line to show a person
unitsnumberUnits added, or taken away when negative. null on a change in value
amountUsdnumberValue of the line. Signed: money out, losses and a FEE line are negative
feeUsdnumberFee charged with a subscription or redemption. Signed: a charge is negative. null on a FEE line, whose fee is its amountUsd, and on a change in value
navPerUnitnumberThe NAV the line dealt at. null on a change in value
GET /hermes-ws-gateway/api/rest/yield-basket/requests/open Auth Required Open Requests

Your subscriptions and redemptions that have not finished, newest first.

Example Request
GET /hermes-ws-gateway/api/rest/yield-basket/requests/open HTTP/1.1
X-API-Version: 1.0.0
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
200 Response
[
    {
        "reference": "CPS-3f6c2a14-9d0e-4b7a-8e21-5c1f0a7d4b92",
        "type": "SUBSCRIPTION",
        "status": "AWAITING_DEALING",
        "sourceAsset": "USDT",
        "grossAmount": 1000,
        "feeAmount": 0,
        "netAmount": 1000,
        "requestedUnits": null,
        "createdAt": "2026-11-02T09:14:08Z",
        "dealsAt": "2026-11-03T00:00:00Z"
    }
]

Request Fields

FieldTypeDescription
referencestringThe id to quote when you cancel
typestringSUBSCRIPTION or REDEMPTION
statusstringSee the table below
sourceAssetstringThe asset subscribed: USDT
grossAmount / feeAmount / netAmountnumberOn a subscription, the amount asked for and what remains after any fee. feeAmount is that fee as a positive figure, 0 on a redemption, which has no gross or net amount
requestedUnitsnumberUnits asked for in a redemption
createdAt / dealsAtstringWhen you asked, and the dealing the request is due at (UTC). dealsAt is set only while the request is AWAITING_DEALING. On a redemption it already counts the notice period

Request Status

statusMeaning
AWAITING_DEALINGQueued for dealing. The only status you can cancel from
DEALINGIn today's dealing
SETTLINGDealt, with the units or USDT on their way
ON_HOLDHeld for a check by our team
SETTLEDFinished
CANCELLEDCancelled, with nothing dealt
FAILEDCould not be completed
POST /hermes-ws-gateway/api/rest/yield-basket/subscriptions Auth Required Subscribe

Asks to buy units with USDT at the next dealing. The USDT is set aside straight away, and your units arrive after dealing, at that day's NAV. A repeat of the same request with the same clientRequestId, after a timeout say, answers with the request the first one made instead of making a second.

Request Body

FieldTypeRequiredDescription
sourceAssetstringYesUSDT
amountnumberYesUSDT to subscribe, up to 8 decimal places, between minSubscriptionUsd and maxSubscriptionUsd
clientRequestIdstringYesYour idempotency key, up to 64 characters
Example Request
POST /hermes-ws-gateway/api/rest/yield-basket/subscriptions HTTP/1.1
X-API-Version: 1.0.0
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
Content-Type: application/json

{
    "sourceAsset": "USDT",
    "amount": 1000,
    "clientRequestId": "bot-2026-11-02-001"
}
202 Response
{
    "reference": "CPS-3f6c2a14-9d0e-4b7a-8e21-5c1f0a7d4b92",
    "status": "AWAITING_DEALING",
    "dealsAt": "2026-11-03T00:00:00Z"
}

202 means the request was accepted. A refused request moves nothing, and answers with the status below and a body of refusal and message:

409 Response
{
    "refusal": "SUBSCRIPTIONS_PAUSED",
    "message": "New subscriptions are paused for now."
}

Refusal Codes

refusalHTTPMeaning
PRODUCT_NOT_FOUND404Yield Basket is not offered
PRODUCT_DISABLED409Yield Basket is not open at the moment
SUBSCRIPTIONS_PAUSED / REDEMPTIONS_PAUSED409Requests of that kind are paused for now
INVALID_REQUEST400A required field is missing or malformed, or the clientRequestId was already used for a different request
ASSET_NOT_OFFERED409sourceAsset is not in fundingAssets
BELOW_MINIMUM / ABOVE_MAXIMUM409The amount after any fee is outside the product's limits, or a redemption is below minRedemptionUsd
INSUFFICIENT_FUNDS409Your free USDT does not cover the amount
INSUFFICIENT_UNITS409You hold fewer free units than you asked to redeem
REQUEST_NOT_FOUND404No request of yours has that reference
NOT_CANCELLABLE409The request has left AWAITING_DEALING
NOT_PERMITTED403This account may not do this
UNAVAILABLE503Try again shortly, with the same clientRequestId. A 503 can also come with no body, and the request may then have gone through, so repeat it with the same clientRequestId
POST /hermes-ws-gateway/api/rest/yield-basket/redemptions Auth Required Redeem

Asks to sell units for USDT at a daily dealing. The units are locked straight away and burned at that day's NAV. The USDT reaches your balance once the basket has raised it, which can take longer than the dealing itself. A notice period applies when redemptionNoticeDays is above zero.

Request Body

FieldTypeRequiredDescription
unitsnumberYesUnits to redeem, no more than units less lockedUnits
clientRequestIdstringYesYour idempotency key, up to 64 characters
Example Request
POST /hermes-ws-gateway/api/rest/yield-basket/redemptions HTTP/1.1
X-API-Version: 1.0.0
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
Content-Type: application/json

{
    "units": 250,
    "clientRequestId": "bot-2026-11-02-002"
}
202 Response
{
    "reference": "CPR-a81d47e6-2c35-4f09-b6d3-19e7c0f25a68",
    "status": "AWAITING_DEALING",
    "dealsAt": "2026-11-03T00:00:00Z"
}

A refused request locks nothing and answers as in Refusal Codes.

POST /hermes-ws-gateway/api/rest/yield-basket/requests/{reference}/cancel Auth Required Cancel Request

Cancels a subscription or redemption that is still AWAITING_DEALING and hands back the USDT or units set aside for it. Once dealing has started it answers 409 with NOT_CANCELLABLE. Cancelling a request that is already cancelled answers with that request again.

Parameters

NameInTypeRequiredDescription
referencepathstringYesThe request's reference
AuthorizationheaderstringYesBearer JWT token
X-API-VersionheaderstringOptionalDefault: 1.0.0
Example Request
POST /hermes-ws-gateway/api/rest/yield-basket/requests/CPR-a81d47e6-2c35-4f09-b6d3-19e7c0f25a68/cancel HTTP/1.1
X-API-Version: 1.0.0
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
202 Response
{
    "reference": "CPR-a81d47e6-2c35-4f09-b6d3-19e7c0f25a68",
    "status": "CANCELLED",
    "dealsAt": null
}

Portfolio Builder

The Portfolio Builder lets you design a portfolio of spot assets and Yield, study it, save it, and hand it to the platform to manage. Read the limits with Configuration, choose assets from Universe or start from a Suggested Portfolio, check a mix with Analytics and Backtest, and keep it with Saved Portfolios.

A saved portfolio becomes a managed portfolio when you subscribe it. The platform takes the amount from your free USDT and/or USDC, moves it into the managed portfolio's own sub-account (accountClientId), and buys each target asset. It then rebalances back to the target weights on the 1st of every month at 01:00 UTC (nextCycleAt), until you stop it. When you save a new version of the portfolio, a running managed portfolio keeps its version until you tell it to follow the latest one.

All paths are under /hermes-ws-gateway/api/rest/portfolio. Send Authorization and X-API-Version: 1.0.0 on every call, as elsewhere on this page.

Permission Every Portfolio Builder endpoint needs the Trade permission on the API key. Every call acts on the key's own account; a clientId sent in a body is ignored.
Weights are percentages Every weight on these endpoints is a percent from 0 to 100, never a share of 1: weightPercent, targetWeightPercent, targetWeight and currentWeight alike. A portfolio of 50% BTC is 50.
A managed portfolio's coins are in its own sub-account They are not in Balance, Client Portfolio or Balance Distribution for the key's account. Read what a managed portfolio holds from its value, cashBalance and holdings.
Follow a managed portfolio as it works Subscribing and stopping each return as soon as the request is accepted; the managed portfolio then trades over the next minutes. Following the latest version takes effect at the next rebalance. Subscribe to the PORTFOLIO_MANDATE WebSocket channel to have each change pushed to you, or poll Get Managed Portfolio and watch stage.
GET /hermes-ws-gateway/api/rest/portfolio/config Auth Required Configuration

The limits a portfolio must respect, and the defaults the other calls use when you leave a field out. Read it before you build a portfolio.

Example Request
GET /hermes-ws-gateway/api/rest/portfolio/config HTTP/1.1
X-API-Version: 1.0.0
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
200 Response
{
    "quoteAsset": "USDT",
    "constituentCount": 7,
    "maxWeightPercent": 25,
    "minWeightPercent": 3,
    "weightStepPercent": 0.5,
    "maxYieldWeightPercent": 40,
    "riskFreeRatePercent": 4.00,
    "lookbackDays": 365,
    "lookbackChoices": [90, 180, 365],
    "ewmaLambda": 0.94,
    "maxPortfoliosPerClient": 10,
    "yieldProducts": [
        { "baseAsset": "DOGE", "trailingAprPercent": 9.8 }
    ],
    "riskBands": [
        { "label": "Lower risk", "maxVolatilityPercent": 60 },
        { "label": "Medium risk", "maxVolatilityPercent": 80 },
        { "label": "High risk", "maxVolatilityPercent": null }
    ],
    "yieldAssumedAprPercent": null
}

Configuration Fields

FieldTypeDescription
quoteAssetstringAsset every value and price is expressed in, USDT
constituentCountintegerNumber of spot assets in the platform's own market-cap mix
maxWeightPercentnumberDefault cap on one spot asset's weight. A saved portfolio may set its own cap between 5 and 100 in rules
minWeightPercentnumberLowest weight the platform's own mix gives a spot asset. Your own portfolios only need weights above zero
weightStepPercentnumberDefault step every weight must be a whole number of: 0.1, 0.5 or 1
maxYieldWeightPercentnumberMost of a portfolio that Yield may take, all Yield constituents together. A portfolio may set a lower cap, never a higher one
riskFreeRatePercentnumberAnnual risk-free rate used for Sharpe ratios when you send none
lookbackDaysintegerDefault days of price history behind analytics, and the window every backtest covers
lookbackChoicesarrayThe lookbackDays values Analytics accepts
ewmaLambdanumberDecay of the exponentially weighted forecast of volatility
maxPortfoliosPerClientintegerMost saved portfolios one account may keep
yieldProductsarrayAssets offered as Yield constituents: baseAsset and its trailingAprPercent, the annualised funding income of recent days after the performance fee
riskBandsarrayNamed bands of annualised volatility: label and maxVolatilityPercent, null for the top band
yieldAssumedAprPercentnumberWhen set, the steady APR analytics and backtests assume for Yield constituents instead of their funding history; null when the history is used
GET /hermes-ws-gateway/api/rest/portfolio/universe Auth Required Universe

The spot assets a portfolio may hold, largest market cap first. A spot constituent that is not listed here is refused when you save. Yield constituents are listed under yieldProducts in Configuration.

200 Response
[
    {
        "asset": "BTC",
        "marketCap": 2238000000000,
        "rankPosition": 1,
        "oneYearVolatilityPercent": 41.7
    },
    {
        "asset": "ETH",
        "marketCap": 501000000000,
        "rankPosition": 2,
        "oneYearVolatilityPercent": 63.2
    },
    {
        "asset": "DOGE",
        "marketCap": 37600000000,
        "rankPosition": 8,
        "oneYearVolatilityPercent": 88.5
    }
]
FieldTypeDescription
assetstringAsset code, as you send it in a constituent
marketCapnumberMarket capitalisation in USD
rankPositionintegerPosition by market cap, 1 being the largest
oneYearVolatilityPercentnumberAnnualised volatility over the last year; null when there is too little price history
GET /hermes-ws-gateway/api/rest/portfolio/suggested Auth Required Suggested Portfolios

Ready-made portfolios to start from. Each carries its weights and its historical one-day tail risk. To use one, save its weights as a portfolio of your own with Saved Portfolios.

200 Response
[
    {
        "asOf": "2026-10-16T08:00:00Z",
        "name": "Balanced",
        "weights": [
            {
                "asset": "BTC",
                "targetWeight": 50,
                "rawWeight": 50,
                "marketCap": 2238000000000,
                "rankPosition": 1,
                "capped": false,
                "constituentType": "SPOT"
            },
            {
                "asset": "ETH",
                "targetWeight": 30,
                "rawWeight": 30,
                "marketCap": 501000000000,
                "rankPosition": 2,
                "capped": false,
                "constituentType": "SPOT"
            },
            {
                "asset": "DOGE",
                "targetWeight": 20,
                "rawWeight": 20,
                "marketCap": null,
                "rankPosition": 3,
                "capped": false,
                "constituentType": "YIELD"
            }
        ],
        "var95Percent": -3.91,
        "cvar95Percent": -5.62,
        "tailSampleSize": 365
    }
]
FieldTypeDescription
asOfstringWhen the list was built (UTC)
namestringName of the suggested portfolio
weightsarrayOne entry per constituent, below
weights[].assetstringAsset code
weights[].constituentTypestringSPOT (the asset is held) or YIELD (the asset's Yield is held)
weights[].targetWeightnumberWeight in percent, 0–100; the weights add up to 100
weights[].rawWeightnumberWeight in percent before any cap was applied
weights[].cappedbooleantrue when a cap lowered the weight
weights[].marketCap / rankPositionnumberMarket cap in USD (null for Yield) and the constituent's position in the list
var95Percent / cvar95PercentnumberHistorical one-day 95% value at risk and expected shortfall, in percent of value: the 5th-percentile daily return and the average of the worst 5% of days. Negative numbers are losses; null when there is too little history
tailSampleSizeintegerNumber of daily returns the tail figures come from
POST /hermes-ws-gateway/api/rest/portfolio/analytics Auth Required Analytics

Risk and return of a mix you name, from daily price history: statistics for each constituent and for the whole portfolio, each constituent's share of the risk, the correlation matrix, the efficient frontier, and value at risk. Nothing is saved or traded.

Request Body

FieldTypeRequiredDescription
constituentsarrayYesOne entry per constituent: type (SPOT or YIELD), asset and weightPercent. Each pair of type and asset at most once, no negative weight, at most 50 constituents. The weights are scaled to the constituents that have price history, so they need not add up to 100
lookbackDaysintegerOptionalOne of lookbackChoices. Defaults to lookbackDays in Configuration
riskFreeRatePercentnumberOptionalAnnual rate for the Sharpe ratios, between -100 and 100. Defaults to riskFreeRatePercent
maxWeightPercentnumberOptionalCap on one spot asset for the capped frontier, 5–100
maxYieldWeightPercentnumberOptionalCap on Yield for the capped frontier, from 0 to the configured cap
weightStepPercentnumberOptional0.1, 0.5 or 1; both caps must be whole numbers of it
Example Request
POST /hermes-ws-gateway/api/rest/portfolio/analytics HTTP/1.1
X-API-Version: 1.0.0
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
Content-Type: application/json

{
    "constituents": [
        { "type": "SPOT", "asset": "BTC", "weightPercent": 50 },
        { "type": "SPOT", "asset": "ETH", "weightPercent": 30 },
        { "type": "SPOT", "asset": "DOGE", "weightPercent": 20 }
    ],
    "lookbackDays": 365,
    "riskFreeRatePercent": 4,
    "maxWeightPercent": 50
}
200 Response
{
    "asOf": "2026-10-15",
    "lookbackDays": 365,
    "riskFreeRatePercent": 4,
    "ewmaLambda": 0.94,
    "constituents": [
        {
            "type": "SPOT",
            "asset": "BTC",
            "weightPercent": 50,
            "expectedReturnPercent": 38.4,
            "historicalVolatilityPercent": 41.7,
            "forecastVolatilityPercent": 36.9,
            "sharpe": 0.82,
            "forecastSharpe": 0.93,
            "riskContributionPercent": 38.6,
            "var95Percent": -3.42,
            "cvar95Percent": -4.95
        },
        ...
    ],
    "portfolio": {
        "expectedReturnPercent": 41.2,
        "historicalVolatilityPercent": 52.3,
        "forecastVolatilityPercent": 47.8,
        "sharpe": 0.71,
        "forecastSharpe": 0.78,
        "diversificationRatio": 1.16,
        "maxDrawdownPercent": -31.8,
        "drawdownPeakDate": "2026-01-06",
        "drawdownTroughDate": "2026-04-08",
        "var95Percent": -4.18,
        "cvar95Percent": -6.07
    },
    "correlation": {
        "labels": ["BTC", "ETH", "DOGE"],
        "matrix": [[1, 0.81, 0.72], [0.81, 1, 0.74], [0.72, 0.74, 1]]
    },
    "frontier": {
        "capped": [ { "volatilityPercent": 41.7, "returnPercent": 38.4 }, ... ],
        "uncapped": [ ... ],
        "minVariance": { "volatilityPercent": 41.5, "returnPercent": 38.2, "sharpe": 0.82, "weights": [ ... ], "var95Percent": -3.40, "cvar95Percent": -4.91 },
        "maxSharpe": { ... },
        "capitalMarketLine": [ ... ]
    },
    "volatilitySeries": [
        { "date": "2026-10-15", "realised30dPercent": 44.1, "forecastPercent": 47.8 },
        ...
    ],
    "exclusions": [],
    "tailSampleSize": 365
}

Analytics Fields

FieldTypeDescription
asOfstringLast day of price history used
lookbackDaysintegerDays of history the figures cover
riskFreeRatePercent / ewmaLambdanumberThe risk-free rate and forecast decay the figures were worked out with
constituentsarrayOne entry per constituent with history: type, asset, weightPercent as sent, and the figures below for that constituent alone, plus riskContributionPercent, its share of the portfolio's volatility (the shares add up to 100)
expectedReturnPercentnumberAnnualised mean daily return over the lookback
historicalVolatilityPercentnumberAnnualised standard deviation of daily returns over the lookback
forecastVolatilityPercentnumberAnnualised exponentially weighted forecast of volatility
sharpe / forecastSharpenumberExcess return over the risk-free rate per unit of historical or forecast volatility
var95Percent / cvar95PercentnumberHistorical one-day 95% value at risk and expected shortfall, in percent of value; negative numbers are losses
portfolioobjectThe same figures for the whole mix, plus diversificationRatio (weighted constituent volatility over portfolio volatility), maxDrawdownPercent (deepest fall, as a negative percent) and the drawdownPeakDate and drawdownTroughDate it ran between
correlationobjectlabels and the matching matrix of correlations of daily returns. A Yield constituent is labelled like DOGE Yield
frontierobjectThe efficient frontier as points of volatilityPercent and returnPercent: capped respects the weight and Yield caps, uncapped does not; minVariance and maxSharpe are those two portfolios with their weights (type, asset, weightPercent); capitalMarketLine runs from the risk-free rate through maxSharpe
volatilitySeriesarrayThe portfolio's volatility day by day: date, realised30dPercent and forecastPercent, both annualised
exclusionsarrayConstituents left out of the figures, each with type, asset and the reason, e.g. too little price history
tailSampleSizeintegerNumber of daily returns the tail figures come from
POST /hermes-ws-gateway/api/rest/portfolio/backtest Auth Required Backtest

Replays a mix over the last lookbackDays of price history (see Configuration) two ways: managed is rebalanced back to the target weights at the start of every month, as a managed portfolio is; buyAndHold buys once and lets the weights drift. Nothing is saved or traded.

Request Body

FieldTypeRequiredDescription
constituentsarrayYestype, asset and weightPercent, as for Analytics. Here the weights must add up to exactly 100
startValuenumberOptionalValue at the start, above zero. Default 100
Example Request
POST /hermes-ws-gateway/api/rest/portfolio/backtest HTTP/1.1
X-API-Version: 1.0.0
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
Content-Type: application/json

{
    "constituents": [
        { "type": "SPOT", "asset": "BTC", "weightPercent": 50 },
        { "type": "SPOT", "asset": "ETH", "weightPercent": 30 },
        { "type": "SPOT", "asset": "DOGE", "weightPercent": 20 }
    ],
    "startValue": 1000
}
200 Response
{
    "startDate": "2025-10-15",
    "endDate": "2026-10-15",
    "startValue": 1000,
    "rebalanceCount": 12,
    "buyAndHold": {
        "points": [ { "date": "2025-10-15", "value": 1000 }, ... ],
        "endValue": 1268.4,
        "totalReturnPercent": 26.84,
        "annualisedReturnPercent": 26.84,
        "annualisedVolatilityPercent": 51.9,
        "maxDrawdownPercent": -33.1,
        "drawdownPeakDate": "2026-01-06",
        "drawdownTroughDate": "2026-04-08"
    },
    "managed": {
        "points": [ ... ],
        "endValue": 1301.7,
        "totalReturnPercent": 30.17,
        "annualisedReturnPercent": 30.17,
        "annualisedVolatilityPercent": 52.6,
        "maxDrawdownPercent": -31.8,
        "drawdownPeakDate": "2026-01-06",
        "drawdownTroughDate": "2026-04-08"
    },
    "lateStarts": [],
    "exclusions": []
}

Backtest Fields

FieldTypeDescription
startDate / endDatestringFirst and last day of the replay
startValuenumberValue both series start from
rebalanceCountintegerNumber of monthly rebalances in the managed series
buyAndHold / managedobjectEach series: points (date and value per day), endValue, totalReturnPercent, annualisedReturnPercent and annualisedVolatilityPercent (null when the replay is too short), maxDrawdownPercent (negative) with its drawdownPeakDate and drawdownTroughDate
lateStartsarrayConstituents whose price history starts inside the window, each with type, asset and firstPricedDate
exclusionsarrayConstituents left out, each with type, asset and reason; the rest are scaled up to 100%
GET /hermes-ws-gateway/api/rest/portfolio/portfolios Auth Required List Saved Portfolios
GET /hermes-ws-gateway/api/rest/portfolio/portfolios/{portfolioId} Auth Required Get Saved Portfolio
POST /hermes-ws-gateway/api/rest/portfolio/portfolios Auth Required Save Portfolio
PUT /hermes-ws-gateway/api/rest/portfolio/portfolios/{portfolioId} Auth Required Save New Version
DELETE /hermes-ws-gateway/api/rest/portfolio/portfolios/{portfolioId} Auth Required Retire Portfolio

Your saved portfolios. GET /portfolios lists them; GET /portfolios/{portfolioId} returns one, or 404 when it is not yours. POST saves a new portfolio as version 1 and answers 201. PUT saves the portfolio as a new version and answers 200; send the version you are amending as expectedVersion, and a portfolio changed since then is refused with 409. DELETE retires the portfolio and answers 204: it leaves the list and can no longer be subscribed.

Request Body (POST and PUT)

FieldTypeRequiredDescription
namestringYesYour name for the portfolio
constituentsarrayYesOne entry per constituent: type (SPOT or YIELD), asset and weightPercent. A spot asset must be in Universe and a Yield asset in yieldProducts. Each weight is above zero and a whole number of weight steps, a spot weight is at most the max weight, all Yield weights together are at most the Yield cap, and the weights add up to exactly 100
rulesobjectOptionalmaxWeightPercent (5–100), maxYieldWeightPercent (0 up to the configured cap) and weightStepPercent (0.1, 0.5 or 1); both caps must be whole numbers of the step. Left out, POST takes the defaults in Configuration and PUT keeps the portfolio's rules
expectedVersionintegerPUT onlyThe version you are amending
Example Request
POST /hermes-ws-gateway/api/rest/portfolio/portfolios HTTP/1.1
X-API-Version: 1.0.0
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
Content-Type: application/json

{
    "name": "Majors and DOGE",
    "constituents": [
        { "type": "SPOT", "asset": "BTC", "weightPercent": 50 },
        { "type": "SPOT", "asset": "ETH", "weightPercent": 30 },
        { "type": "SPOT", "asset": "DOGE", "weightPercent": 20 }
    ],
    "rules": {
        "maxWeightPercent": 50,
        "maxYieldWeightPercent": 40,
        "weightStepPercent": 0.5
    }
}
201 Response
{
    "portfolioId": "PF-4141001-1",
    "name": "Majors and DOGE",
    "version": 1,
    "status": "ACTIVE",
    "createdAt": "2026-10-14T09:12:40",
    "updatedAt": "2026-10-14T09:12:40",
    "constituents": [
        { "type": "SPOT", "asset": "BTC", "targetWeightPercent": 50 },
        { "type": "SPOT", "asset": "ETH", "targetWeightPercent": 30 },
        { "type": "SPOT", "asset": "DOGE", "targetWeightPercent": 20 }
    ],
    "rules": {
        "maxWeightPercent": 50,
        "maxYieldWeightPercent": 40,
        "weightStepPercent": 0.5
    }
}

Saved Portfolio Fields

FieldTypeDescription
portfolioIdstringIdentifier of the portfolio; send it as portfolioCode to Subscribe
namestringYour name for it
versionintegerVersion number, 1 when first saved and one more on every PUT
statusstringACTIVE for a portfolio in your list
createdAt / updatedAtstringWhen the portfolio was first saved, and when this version was saved (UTC)
constituentsarraytype, asset and targetWeightPercent, a percent; they add up to 100
rulesobjectThe maxWeightPercent, maxYieldWeightPercent and weightStepPercent the portfolio was checked against

A portfolio that breaks a rule is refused with 400 and the reason, e.g. {"code": "400", "message": "The weights must sum to 100%, not 95%"}. Saving more than maxPortfoliosPerClient portfolios is refused the same way.

POST /hermes-ws-gateway/api/rest/portfolio/mandates Auth Required Subscribe

Hands a saved portfolio to the platform to manage, with the amount you name. The platform moves the amount from your free USDT and/or USDC into the managed portfolio's own sub-account and buys each target asset. Send a new clientRequestId of your own on every subscription: repeat the same request, after a timeout say, and it answers 202 with the managed portfolio the first one started instead of starting a second.

Request Body

FieldTypeRequiredDescription
portfolioCodestringYesThe portfolioId of one of your saved portfolios, e.g. PF-4141001-1. Its latest version is subscribed
clientRequestIdstringYesYour idempotency key: up to 64 letters, digits or . _ : -. Reusing it for a different portfolio, amount or funding assets is refused with REQUEST_ID_REUSED
fundingAssetsarrayYesWhat to pay with: ["USDT"], ["USDC"] or ["USDT", "USDC"]
amountnumberOptionalTotal to invest, in USDT terms. With both funding assets, free USDT is used first and USDC makes up the rest
usdtAmount / usdcAmountnumberOptionalSend these instead of amount to name exactly how much of each to use. Each must be in fundingAssets; sent with amount, they must add up to it
Example Request
POST /hermes-ws-gateway/api/rest/portfolio/mandates HTTP/1.1
X-API-Version: 1.0.0
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
Content-Type: application/json

{
    "portfolioCode": "PF-4141001-1",
    "clientRequestId": "bot-2026-10-14-001",
    "amount": 1000,
    "fundingAssets": ["USDT"]
}
202 Response
{
    "mandateCode": "MP-4141001-1",
    "mandate": {
        "mandateCode": "MP-4141001-1",
        "portfolioCode": "PF-4141001-1",
        "stage": "SUBSCRIBING",
        "investedAmount": 1000,
        "fundingAssets": ["USDT"],
        ...
    }
}

202 means the subscription was accepted; mandate is the managed portfolio as it now stands, with the fields in Managed Portfolios. A refused subscription starts nothing and moves nothing; it answers with the status of its refusal code and a body of refusal and message:

409 Response
{
    "refusal": "BELOW_MINIMUM",
    "message": "Invest at least 25 USDT so every asset can be bought"
}
GET /hermes-ws-gateway/api/rest/portfolio/mandates Auth Required List Managed Portfolios
GET /hermes-ws-gateway/api/rest/portfolio/mandates/{mandateCode} Auth Required Get Managed Portfolio

/mandates lists every managed portfolio of the account, running or ended. /mandates/{mandateCode} returns one, with its value, its holdings against their targets and every rebalance with its trades; it answers 404 for a code that is not yours. value and currentWeight move with prices: read them again with GET whenever you need them fresh.

Parameters

NameInTypeRequiredDescription
mandateCodepathstringYesThe managed portfolio's mandateCode
AuthorizationheaderstringYesBearer JWT token
X-API-VersionheaderstringOptionalDefault: 1.0.0
Example Request
GET /hermes-ws-gateway/api/rest/portfolio/mandates/MP-4141001-1 HTTP/1.1
X-API-Version: 1.0.0
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
200 Response
{
    "mandateCode": "MP-4141001-1",
    "clientId": 4141001,
    "accountClientId": 4141002,
    "portfolioCode": "PF-4141001-1",
    "portfolioName": "Majors and DOGE",
    "modelVersion": 1,
    "newerModelAvailable": false,
    "stage": "ACTIVE",
    "investedAmount": 1000,
    "quoteAsset": "USDT",
    "fundingAssets": ["USDT"],
    "value": 1010.97,
    "cashBalance": 1.12,
    "subscribedAt": "2026-10-14T09:30:12",
    "lastCycleAt": "2026-10-14T09:31:02",
    "nextCycleAt": "2026-11-01T01:00:00",
    "closedAt": null,
    "holdings": [
        { "asset": "BTC", "type": "SPOT", "targetWeight": 50, "currentWeight": 49.6276, "quantity": 0.00444, "value": 501.72 },
        { "asset": "ETH", "type": "SPOT", "targetWeight": 30, "currentWeight": 30.0073, "quantity": 0.0731, "value": 303.365 },
        { "asset": "DOGE", "type": "SPOT", "targetWeight": 20, "currentWeight": 20.2543, "quantity": 803, "value": 204.765 }
    ],
    "cycles": [
        {
            "cycleId": "SUBSCRIBE",
            "status": "DONE",
            "valueBefore": 1000,
            "valueAfter": 999.75,
            "startedAt": "2026-10-14T09:30:13",
            "finishedAt": "2026-10-14T09:31:02",
            "trades": [
                { "asset": "BTC", "type": "SPOT", "side": "BUY", "quantity": 0.00444, "avgPrice": 112400, "status": "FILLED" },
                { "asset": "ETH", "type": "SPOT", "side": "BUY", "quantity": 0.0731, "avgPrice": 4100, "status": "FILLED" },
                { "asset": "DOGE", "type": "SPOT", "side": "BUY", "quantity": 803, "avgPrice": 0.2489, "status": "FILLED" }
            ]
        }
    ]
}

Managed Portfolio Fields

FieldTypeDescription
mandateCodestringIdentifier of the managed portfolio; use it on every per-portfolio endpoint
clientIdintegerYour account
accountClientIdintegerThe managed portfolio's own sub-account, where its coins and cash are held
portfolioCode / portfolioNamestringThe saved portfolio it follows, and that portfolio's name
modelVersionintegerVersion of the saved portfolio whose weights it rebalances to
newerModelAvailablebooleantrue when a later version of the portfolio has been saved; call Follow Model to move onto it
stagestringSUBSCRIBING (the amount is being moved and the targets bought), ACTIVE (held and rebalanced monthly), STOPPING (a stop is being worked), STOPPED or FAILED
investedAmountnumberAmount subscribed, in quoteAsset
quoteAssetstringUSDT, the asset values and prices are in
fundingAssetsarrayThe assets the subscription was paid with
valuenumberWhat the managed portfolio is worth now, holdings at current prices plus cashBalance, in quoteAsset; null when an asset has no price
cashBalancenumberUSDT held in the managed portfolio and not invested
subscribedAtstringWhen you subscribed (UTC)
lastCycleAtstringWhen the last rebalance finished
nextCycleAtstringWhen the next monthly rebalance runs, the 1st of the month at 01:00 UTC; null unless stage is ACTIVE
closedAtstringWhen it stopped or failed
holdingsarrayOne entry per asset, below
cyclesarrayOne entry per rebalance, below

Holding Fields

FieldTypeDescription
assetstringAsset code
typestringSPOT or YIELD
targetWeightnumberWeight the portfolio aims for, in percent (0–100)
currentWeightnumberShare of value the holding is now, in percent; the remainder is cashBalance
quantitynumberAmount held, in the asset; for a Yield holding, its principal in USDT
valuenumberThe holding at the current price, in quoteAsset

Cycle Fields

FieldTypeDescription
cycleIdstringSUBSCRIBE for the first purchase, the month (e.g. 2026-11) for a monthly rebalance, CLOSE for the stop
statusstringRUNNING, RECOVERING (picked up again after an interruption), DONE, PARTIAL (finished with some trades not fully filled), ABANDONED (given up before it finished) or FAILED
valueBefore / valueAfternumberValue of the managed portfolio before and after the rebalance, in quoteAsset
startedAt / finishedAtstringWhen the rebalance started and finished (UTC)
tradesarrayThe trades it made, below

Trade Fields

FieldTypeDescription
assetstringAsset traded
typestringSPOT or YIELD. USDC turned into USDT shows as a SELL of USDC with type SPOT
sidestringBUY or SELL
quantitynumberQuantity filled, or the quantity planned until it fills
avgPricenumberAverage fill price in quoteAsset
statusstringPLANNED, PLACED, FILLED, PARTIAL, FAILED or SKIPPED
POST /hermes-ws-gateway/api/rest/portfolio/mandates/{mandateCode}/stop Auth Required Stop

Stops managing the portfolio and brings what it holds back to your account. Send {"sellToCash": false}, or no body, to get the coins back as they are; send {"sellToCash": true} to have them sold to USDT first. stage goes to STOPPING, then STOPPED. A stop cannot be undone.

Request Body

FieldTypeRequiredDescription
sellToCashbooleanOptionaltrue sells the holdings to USDT; false keeps them. Default false
Example Request
POST /hermes-ws-gateway/api/rest/portfolio/mandates/MP-4141001-1/stop HTTP/1.1
X-API-Version: 1.0.0
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
Content-Type: application/json

{
    "sellToCash": true
}
202 Response
{
    "mandateCode": "MP-4141001-1",
    "mandate": { "mandateCode": "MP-4141001-1", "stage": "STOPPING", "nextCycleAt": null, ... }
}

A managed portfolio already stopping or stopped answers 409 ALREADY_STOPPED; one that is in the middle of a change answers 409 BUSY, so try again in a moment; a code that is not yours answers 404 MANDATE_NOT_FOUND.

POST /hermes-ws-gateway/api/rest/portfolio/mandates/{mandateCode}/follow-model Auth Required Follow Model

Moves a running managed portfolio onto the latest saved version of its portfolio. Saving a new version with PUT /portfolios/{portfolioId} does not change a managed portfolio on its own: newerModelAvailable turns true, and the managed portfolio keeps its modelVersion until you call this. Afterwards, modelVersion and the holdings' targetWeight show the new version, and the next rebalance trades to it. No body is needed.

Example Request
POST /hermes-ws-gateway/api/rest/portfolio/mandates/MP-4141001-1/follow-model HTTP/1.1
X-API-Version: 1.0.0
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
202 Response
{
    "mandateCode": "MP-4141001-1",
    "mandate": { "mandateCode": "MP-4141001-1", "modelVersion": 2, "newerModelAvailable": false, "stage": "ACTIVE", ... }
}

Only an ACTIVE managed portfolio can follow the latest version; any other answers 409 ALREADY_STOPPED. A managed portfolio already changing answers 409 BUSY, and one whose saved portfolio was retired answers 404 PORTFOLIO_NOT_FOUND.

Errors & Refusals

Subscribe, Stop and Follow Model answer a refusal with the HTTP status below and a body naming it; nothing is moved or traded. Repeat a request only after fixing what message says, except for BUSY and UNAVAILABLE, which you can simply retry.

Refusal Body
{
    "mandateCode": "MP-4141001-1",
    "refusal": "ALREADY_STOPPED",
    "message": "This portfolio is already stopped or stopping"
}

Refusal Codes

refusalHTTPMeaning
INVALID_REQUEST400A field is missing or wrong: no portfolioCode, a missing or malformed clientRequestId, funding assets other than USDT and USDC, no amount above zero, USDT and USDC amounts that do not add up to amount, or an amount from an asset not in fundingAssets
NOT_PERMITTED403Your account may not subscribe a managed portfolio; message says why
PORTFOLIO_NOT_FOUND404portfolioCode is not one of your saved portfolios, or was retired
MANDATE_NOT_FOUND404No managed portfolio of yours has that mandateCode
UNAVAILABLE503Your account could not be checked just now; try again
PRODUCT_DISABLED409Managed portfolios are not open to new subscriptions right now
ALREADY_MANAGED409That saved portfolio already has a managed portfolio running
NOT_TRADABLE409An asset of the portfolio cannot be traded, its Yield is not offered, or USDC cannot be converted to USDT right now; message names it
BELOW_MINIMUM409The amount is too small for every asset to be bought, or the USDC part is below the smallest USDC conversion; message states the minimum
ABOVE_MAXIMUM409The amount is more than the portfolio's Yield constituents can take; message states the most
INSUFFICIENT_FUNDS409Your free USDT or USDC does not cover the amount
ALREADY_STOPPED409The managed portfolio is already stopping or stopped, or is not running and so cannot follow the latest version
REQUEST_ID_REUSED409That clientRequestId was already used for a different subscription; send a new one
BUSY409The managed portfolio is in the middle of a change; try again in a moment

Other Errors

Any other error on these endpoints answers with its HTTP status and a body of code (the status) and message (the reason), except a 404 for a portfolio or managed portfolio that is not yours, which has no body. A builder request that breaks a rule answers 400; a saved portfolio changed since the version you amend answers 409. 502, with or without a body, means the service is unavailable: try again in a moment.

400 Response
{
    "code": "400",
    "message": "BTC at 60% is over the 50% max weight"
}