An implementation of AbortController. In a modern browser, this can simply be window.AbortController.bind(window)
. In other environments like node, other implementations can be used.
Note that this needs to be compatible with the fetch implementation also provided.
The client id to use for BörseGo API requests (used for the instrument API).
Optional
boerseIf authorized requests to the BörseGo API should be made (this is required for PX), a BoerseGoAuth must be provided.
Optional
boerseFor BörseGo-specific WebPush events, this has to be implemented. Currently this is used to observe trailing stops in PX portfolios.
Optional
deviceOptionally specify the kind of device this runs on.
Optional
enableIf true
, enables long-term brokerize guest user tokens to be stored in LocalStorage.
The brokerize guest user's refresh_token_without_tradingsession
will be persisted in LocalStorage. This
does not extend trading session lifetime, but only the lifetime of the brokerize guest user account.
This saves resources in the brokerize backend, as new logins do not need to re-sync the entire account data each day.
Of course, this only affects brokerize implementations.
Optional
enabletrue
to enable the new brokerize trade statistic features. Turning it on means that the order list view "history"
becomes
available. This is a temporary feature toggle which should be removed once trade stats are available in all frontends.
An implementation of fetch. In a modern browser, this can simply be window.fetch.bind(window)
. In other environments like node, other implementations can be used.
Format an amount as string. This is used where amounts are part of human-readable texts generated by the library. In most cases, the amount object is exposed though.
Optional
hideIf present and true
, account numbers are shortened in order to not expose them in the frontend.
The locale (used for formatting rules and translations).
A (persistent) Key/Value store, e.g. for settings or local caches. The localStorage can be shared across bg-trading brokers.
A logger
Optional
metricsAn optional MetricsRecorder for recording some statistics (e.g. request counts etc.)
The platform this runs on.
Optional
ReadableAn implementation of ReadableStream. In a modern browser, this can simply be window.ReadableStream.bind(window)
. In other environments like node, other implementations can be used.
Used by WH Selfinvest quote push.
A (volatile) Key/Value store, e.g. for session data. The sessionStorage can be shared across bg-trading brokers.
Set a cookie that will be used for fetch calls. In browsers, this can be sth like document.cookie=key+'='+value+';domain='+domain
.
True to include the brokers' testing environments (use this for testing of the implementation).
Optional
stock3Used to configure alternative stock3-API urls, e.g. for testing staging envs
Optional
TextAn implementation of TextDecoder. In a modern browser, this can simply be window.TextDecoder.bind(window)
. In other environments like node, other implementations can be used.
Used by WH Selfinvest quote push.
An implementation of WebSocket. In a modern browser, this can simply be window.WebSocket.bind(window)
. In other environments like node, other implementations can be used.
Optional
XMLAn implementation of XMLHttpRequest. In a modern browser, this can simply be window.XMLHttpRequest.bind(window)
. In other environments like node, other implementations can be used.
Used by WH Selfinvest quote push.
Optional
onGRID-34427 GRID-34748 when a onFreestoxxGroupAdded
function is provided, it will be called after the user has been added to the freestoxx group.
Optional
openMethod to open a url in a new tab or external browser. Used for example to open a broker website
Subscribe a StockQuote. The subscription is a subscription as defined in the Instruments dependency's quotation objects.
Optional
trackSpecify a track fn to overwrite the default tracking behaviour (which is sending the tracking to metrics.guidants-trading.de)
data to track
External dependencies required for broker implementations.