Prepare an order cancellation. This may prompt a challege (e.g. TAN). The resulting PreparedCancellation can then be perform(
id of the portfolio the order belongs to
either the orderId as a string, or CancelOrderOpts
the authenticion method to use
Optional
abortSignal: AbortSignal_2to abort the request
Optional
authorizePrepare an position closing. This may prompt a challege (e.g. TAN). The resulting PreparedCancellation can then be perform(
id of the portfolio the order belongs to
orderId
which amount of the order should be closed
the authenticion method to use
Optional
abortSignal: AbortSignal_2to abort the request
Uses the given authenticationMethod to enable Session TAN.
the authentication method to use
Optional
abortSignal: AbortSignal_2to abort the request
Check if the session is (still) valid. If it's resolved, the session is valid. If it's rejected, it is not valid (anymore). The error may be a TradingError, indicating why it's not valid.
Observe the authorization information of the current session.
Observe the buying power related to the given portfolio.
Optional
clearingAccountId: stringOptional
createIf an order has mayObserveCurrentStop
The list of portfolios can be subscribed, so that creation and deletion of portfolios can be handled during an active session.
Observe quotes/keydata of the given portfolio, as provided by the broker (for realtime quotes, use getRealtimeCalculations
instead).
portfolio to observe
Optional
createIf supported by broker, observe quotes/keydata of the given portfolio since the given date, as provided by the broker.
portfolio to observe
Aggregated performance information (currently size and P/L) for a set of positions, with the performance as it is provided by the positionQuotesObservable
.
Optional
realtimeCalculator: RealtimeCalculatorif the values provided by a realtime should be used, provide the instance here
Optional
createPosition quotes, as provided by the broker. It is possible that this is either not implemented at all, or never emits any quote. The initial quote should be read from the positions observable itself.
Observe the positions of the given portfolio. Whenever the positions in the portfolio change, the new list is emitted.
portfolio to subscribe to
Optional
createIf present, this can be used to compute the potential profit/loss of a given sell order, taking into account the average purchase price of the open position. It is converted to the portfolio currency.
For trailing stop orders, this uses the current stop as defined by createCurrentStopObservable
.
the portfolioId
the orderId
Optional
createIf available for the broker, allows to observe the synchronization status of a portfolio.
For example, if tradeStatsAvailable
is true, trade statistics (= createTradeTrackerObservable and OrderLists with the view history
)
are available. As trade statistics rely on the order history being synced from the broker, this may take
a while after login.
It can be used to notify the user in the frontend (e.g. about their trading report).
the portfolio to observe
Optional
createIf available for the broker, this provides warning status regarding trade summaries. For example, it may indicate that FIFO calculations cannot be made because the order execution history is incomplete for some instruments.
It can be visualized together with trade tracker or with trade history lists.
Optional
createIf available for the broker, this provides data for the stock3 trade tracker for the selected date ranges.
Observe the session's validity. When the returned Observable ends with an error, the session has become invalid and should be destroyed. If the error is a TradingError, that may be displayed to the user.
Frees resources assigned to the session (e.g. if it has some kind of ping to the broker, that will be cancelled). It does not perform a logout request, so it can be used to resume a session later (e.g. when apps go into background etc.) with the same sessionToken.
Optional
endIf supported (check broker flag "supportsSessionTanEnd"), this disables Session TAN.
Optional
getThe broker that this session belongs to.
Get a detailed cost estimation table from a token generated by buildDetailedOrderCostEstimationToken
.
Optional
signal: AbortSignal_2Get a detailed instrument info table from a token in PreparedInstrument.instrumentExplanation.infoTableToken
token, as it can be retrived by PreparedInstrument.instrumentExplanation.infoTableToken
Optional
signal: AbortSignal_2abortSignal
Get order details (e.g. for order receipts).
the order's portfolioId
the orderId
Optional
signal: AbortSignal_2to abort the operation
Optional
getIf present, this can be used to get the label for a fulltext search field in OrderLists of the given view. If this is not present, or if it returns null, no fulltext query can be applied.
the order list view which should be displayed
Check which fields can be sorted by in the given order list view.
the order list view which should be displayed
Optional
getGet a single portfolio by id.
Optional
abortSignal: AbortSignal_2Get the list of portfolios that this session may access.
Normally you should use createPortfolioListObservable
instead to handle creation/deletion of portfolios during an active session. However
for one-time actions, this will return the currently available (or next, when it's not loaded yet) portfolio list.
Optional
abortSignal: AbortSignal_2Optional
getBy default, position and portfolio quotes are values provided by the broker (as in createPositionsObservable
, createPositionQuotesObservable
and createPortfolioQuotesObservable
). However, it is possible to augment the broker data with
the external instruments and quotes data in order to get more up-to-date values.
If this is available for the given broker, a RealtimeCalculationsHelper
can be created for a given portfolio (so the getRealtimeCalculations
function is defined).
If the user should be able to select the exchanges to use per instrument, a selectedExchangesStore
with the user's selection can be provided.
Optional
selectedExchangesStore: SelectedExchangesStoreSome brokers allow to sell instruments from a specific position. This may be the case when there are two different storage locations etc. In this case, the user must be allowed to choose the position they want to sell from.
Optional
abortSignal: AbortSignal_2to abort the request
When the application detects that the network connection has been unstable or that the application may have been suspended for a while, it may be appropriate to reload certain data (e.g. open positions etc.). This function can be called to let the session reload that kind of data.
Positions may be cached aggressively by broker implementations. In that case, user interactions may indicate that it's time to reload (e.g. when users switch tabs, come back to the page after a while etc.). This function can be called so that the broker can decide whether a reload should be done.
id of the affected portfolio
Ends the session at the broker.
Prepare for edit order: find out in which ways the given order can be edited and provides to methods to actually perform an order updae.
the order's portfolio
the order id
Optional
signal: AbortSignal_2to abort the preparation
Prepare an instrument for trading in a given portfolio).
id of the portfolio
id of the instrument
Optional
abortSignal: AbortSignal_2to abort the preparation
Optional
pxOnly available for the PX broker. Used to create cash transactions in BoerseGo PX portfolios.
Optional
pxOnly available for the PX broker. Used to create dividend transactions in BoerseGo PX portfolios.
Optional
pxOnly available for the PX broker. Used to delete transactions in BoerseGo PX portfolios.
Optional
setPause or resume a session (e.g., if a browser tab gets hidden). Sessions may use this to pause expensive operations (e.g. unsubscribing from WebSocket channels).
if true, the session should be paused. If false, it should be resumed.
Optional
updateIf present, a comment can be defined for a position (if position.commentIsEditable
) using this method.
the position's portfolioId
the position id
the comment to set. null to delete the comment.
Optional
updateIf present, the selected exchange can be selected for a position. This is used to update the position.
the position's portfolioId
the position id
the exchangeId to set, as defined in the instruments dependency
Representation of one specific broker session. Sessions are created using the
broker.createSession
function with aSessionToken
.