PortfolioTransactionCommands

Split wallet operations out into a new transaction. The returned new transaction id is allocated, not created: the runner creates that transaction after this command commits.

Portfolio-scoped, keeping the URL callers already use. Each entry of operationsToSplit names the transaction it comes from, so the command has no single route transaction.

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

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/SplitPortfolioTransactionCommand
  • Auth: API key in header x-api-key

Path parameters

portfolioSlugstring required

Workspace-scoped portfolio slug

Query parameters

mode'sync' | 'async'

Request body

newOperationType'DEPOSIT_FIAT' | 'INCOME' | 'REFUND' | 'REBATE' | 'WITHDRAWAL_FIAT' | 'EXPENSE' | 'BUY' | 'SELL' | 'EXCHANGE' | 'SWAP' | 'MOVE' | 'INTERCOMPANY_SEND' | 'INTERCOMPANY_RECEIVE' | 'STAKE' | 'UNSTAKE' | 'PROTOCOL_DEPOSIT' | 'PROTOCOL_WITHDRAW' | 'VAULT_DEPOSIT' | 'VAULT_WITHDRAW' | 'LP_IN' | 'LP_OUT' | 'LOAN_BORROW' | 'LOAN_REPAY' | 'LOAN_LIQUIDATION' | 'LEND_GIVE' | 'LEND_WITHDRAW' | 'ADJUSTMENT' | 'UNCATEGORIZED' | 'SPAM' required
newSubTypestring
reasonstring

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.