PortfolioTransactionCommands

Apply a portfolio conversion from a prepared workbook. The adjustment transaction exists once this returns, but its accounting is staged: the runner recomputes it after this command commits.

Each token snapshot names its wallet by the public { chainId, walletAddress } pair. The command takes an internal wallet id, so the selectors are resolved inside the authenticated portfolio before dispatch.

post/v1/portfolios/{portfolioSlug}/transactions/commands/ApplyPortfolioConversionCommand

Request

  • Base URL: https://api.tokenbooks.io (the document declares no server; this is the origin it was published from)
  • URL: https://api.tokenbooks.io/v1/portfolios/{portfolioSlug}/transactions/commands/ApplyPortfolioConversionCommand
  • Auth: API key in header x-api-key

Path parameters

portfolioSlugstring required

Workspace-scoped portfolio slug

Query parameters

mode'sync' | 'async'

Request body

balancingAccountIdstring required
expectedPreviewHashstring required
acceptedWarningHashstring
acceptedWarningCountinteger

Example request

{
  "tokenSnapshots": [
    {
      "balance": "1.5",
      "fiatValue": "1.5",
      "lotSnapshots": [
        {
          "quantity": "1.5",
          "fiatValue": "1.5"
        }
      ]
    }
  ],
  "ledgerAccountSnapshots": [
    {
      "balance": "1.5"
    }
  ]
}

Response

mode'async' required

The command was accepted asynchronously

jobIdstring required

Tracking job ID for the queued command

status'queued' required

Queue admission status

Changes

No recorded changes to this operation across all 1 revision of this API.