Skip to content
Longport Whale
Chart of Accounts

Add Account Items

Submitted from the "Create" dialog on the Chart of Accounts page to add an accounting account.

POSThttps://b-api.longbridge.xyz/book/addAccountItems

Authorization

AuthorizationstringheaderRequired

Send the Broker ACCESS_TOKEN as Authorization: Bearer <token>.

Request body application/json

featurestringrequired

Account Feature. Account-attribute ID (corresponding to account-attribute management); values come from the account-attribute dynamic enumeration; not a fixed set.

levelstringrequired

Account Level. Values come from options.book_level (ref_id = book_level), e.g. 1/2/3 corresponding to level-1/level-2/level-3 accounts respectively.

namestringrequired

Account Name

directstringrequired

Account Direction. Values come from book_feature_direct (ref_id=book_feature_direct; directions such as debit/credit); the front end filters out the option with key=3.

pSubjectCodestring

Parent Subject Code. When level=2, take the first-level account code; when level=3, take the second-level account code; when level=1, fixed at 0.

outSubjectCodestring

External Subject Code. The account code used for syncing to external systems; optional.

Responses

HTTP 200No confirmable field definitions are available for the response yet.
Standard response envelopecodemessagedata
dataobjectdata structure

No nested fields

Whale Docs