Skip to main content
PATCH
/
api
/
v1
/
portfolio
/
{portfolio_index}
/
name
Rename a portfolio
curl --request PATCH \
  --url https://staging.zerolatencylabs.com/api/v1/portfolio/{portfolio_index}/name \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "name": "Hedge book",
  "subaccount_index": 1
}
'
{
  "account_id": 1,
  "portfolio_index": 1,
  "subaccount_index": 1,
  "cash_balance": "1000.00",
  "name": "Main"
}

Authorizations

X-API-KEY
string
header
required

Base64-encoded API key issued by POST /api/v1/api-keys.

Path Parameters

portfolio_index
integer<int32>
required

Index of the portfolio to rename

Required range: x >= 0

Body

application/json

JSON body for the rename-portfolio endpoint.

name
string
required
Example:

"Hedge book"

subaccount_index
integer<int32>
required

A unique identifier for a subaccount within an account.

Required range: x >= 0

Response

Updated portfolio

Response for a portfolio balance query.

account_id
integer<int64>
required

A system-generated unique identifier for an account.

Required range: x >= 0
portfolio_index
integer<int32>
required

A unique identifier for a portfolio within a subaccount.

Required range: x >= 0
subaccount_index
integer<int32>
required

A unique identifier for a subaccount within an account.

Required range: x >= 0
cash_balance
string
required

Free cash balance in USDC, available for trading and withdrawal.

Example:

"1000.00"

name
string
required

User-facing display name. Defaults to "Main" for index 0 and "Portfolio N" otherwise; renameable via PATCH /portfolio/{portfolio_index}/name.

Example:

"Main"

status
enum<string>
required

Lifecycle status of the portfolio (ACTIVE, IN_LIQUIDATION, or CLOSED).

Available options:
ACTIVE,
IN_LIQUIDATION,
CLOSED