Using streaming API#
MetaApi allows you to receive terminal state updates (account information, open positions, orders, history updates and quotes) in real time via streaming API.
To initiate the streaming process, your application must synchronize to the terminal state first by emiting request
event of synchronize
type and pass desired time to start history synchronization from.
For more see Synchronize request.
Streaming-related considerations#
Some WebSocket responses may contain information about synchronization status of the MetaApi with the terminal. Namely:
synchronizing
field in responses to requests for retrieving history orders and deals indicates that the received data might be incomplete due to initial data synchronization process not completed yetNotSynchronizedError
processingError
indicates that the requested data has not yet been synchronized and cannot be returned yetsynchronization
event of the dealSynchronizationFinished type notifies that the transaction history synchronization has been completedsynchronization
event of the orderSynchronizationFinished type notifies that the history order synchronization has been completed