/transaction
Request Body
Send cost_basis with a BUY and sale_price with a SELL.
-
id -
symbolTicker symbol. Must be recognized by Investbrain's market data provider. Stored in upper case.
-
portfolio_id -
transaction_typeAllowed valuesBUYSELL -
quantityNumber of shares. Must be greater than 0. A
SELLcannot exceed the shares held on its date. -
currencyIn requests, the currency of
cost_basisorsale_price; it is converted to the symbol's trading currency if different. Accepted codes: AUD, BRL, CAD, CHF, CNY, CZK, DKK, EUR, GBP, HKD, INR, JPY, KRW, NOK, NZD, SEK, SGD, USD, ZAR. In responses, always the symbol's trading currency. -
cost_basisPrice paid per share. Send it with every
BUY. Ignored onSELL, where it is calculated from the average cost of earlier purchases. -
sale_pricePrice received per share. Send it with every
SELL. Ignored onBUY. -
splittruefor transactions Investbrain created to account for a stock split. Set automatically. -
reinvested_dividendtruefor transactions Investbrain created by reinvesting a dividend. Set automatically. -
dateTrade date (
YYYY-MM-DD). Must be on or after 1970-01-01 and can't be in the future. -
created_at -
updated_at
Responses
201
Returns the newly created transaction
-
id -
symbolTicker symbol. Must be recognized by Investbrain's market data provider. Stored in upper case.
-
portfolio_id -
transaction_typeAllowed valuesBUYSELL -
quantityNumber of shares. Must be greater than 0. A
SELLcannot exceed the shares held on its date. -
currencyIn requests, the currency of
cost_basisorsale_price; it is converted to the symbol's trading currency if different. Accepted codes: AUD, BRL, CAD, CHF, CNY, CZK, DKK, EUR, GBP, HKD, INR, JPY, KRW, NOK, NZD, SEK, SGD, USD, ZAR. In responses, always the symbol's trading currency. -
cost_basisPrice paid per share. Send it with every
BUY. Ignored onSELL, where it is calculated from the average cost of earlier purchases. -
sale_pricePrice received per share. Send it with every
SELL. Ignored onBUY. -
splittruefor transactions Investbrain created to account for a stock split. Set automatically. -
reinvested_dividendtruefor transactions Investbrain created by reinvesting a dividend. Set automatically. -
dateTrade date (
YYYY-MM-DD). Must be on or after 1970-01-01 and can't be in the future. -
created_at -
updated_at
401
Token not provided or invalid
403
Action not permitted
422
The query parameters or request body failed validation
-
message -
errors
429
Rate limit exceeded. Retry after the number of seconds in the Retry-After header.
500
Server error