- Introduction
- Concepts and Design
-
Session Layer
-
Content Layer
- Introduction
-
Pricing
-
SymbolConversion
-
HistoricalPricing
-
News
-
Search
-
FundamentalAndReference
-
IPA FinancialContracts
- Overview
- FinancialContracts.Definition
- Outputs
-
Bond
-
Bond Future
-
Cap Floor
-
CDS
-
Fx Cross
-
IR Swap
-
Option
-
Repo
-
Swaption
-
Term Deposit
-
IPA Curves
- Overview
-
ForwardCurve
-
ForwardCurves
-
ZcCurve
-
ZcCurves
-
ZcCurveDefinition
-
ZcCurveDefinitions
-
IPA Surfaces
- Overview
- VolatilitySurfaces.Definition
- Outputs
-
Cap
-
Eti
-
Fx
-
Swaption
-
Delivery Layer
- Introduction
-
OMMStream
-
RDPStream
-
EndpointRequest
Session.Event
Summary
SessionEvent provides a set of events that can be emitted by Session:
Events
SessionEvent.Error
Emits in case of any error that will be passed as a parameter to a callback
Parameters:
- Error object that contains an error message and a name
SessionEvent.StateChanged
Emits on every state change with the session and the new state as parameters
Parameters:
- Session
- State
SessionEvent.EventReceived
Emits on every authentication event
Parameters:
- Session
- Event
Session.SessionEventCode
Specifies what type of authentication event is passed:
-
SessionEventCode.AuthenticationFailed
-
SessionEventCode.AuthenticationSucceeded
-
SessionEventCode.RefreshFailed
-
SessionEventCode.RefreshSucceeded
Example of usage
session.on(Session.SessionEvent.StateChanged, (session, state) => console.log('Session state:', state));
session.on(SessionEvent.EventReceived, (session, event) => console.log('Event received:', event));
session.on(SessionEvent.Error, err => console.log(err));