Errors that belong to no broker
WebSocket close codes explained
12 entries decoded. These are the codes a WebSocket connection reports when it closes, which is how a price or account stream tells you why it stopped. Each page says what the entry means, what it means in trading API work and what to do next, and links to the place it is defined: RFC 6455, The WebSocket Protocol.
Risk warning: CFDs and spread bets are complex instruments and come with a high risk of losing money rapidly due to leverage. You can lose money on these products, and each provider publishes its own loss figure under FCA rules. You should consider whether you understand how they work and whether you can afford to take the high risk of losing your money. Automated and API trading can amplify losses through bugs, connectivity failures and runaway orders.
Close codes
12 entries
When a WebSocket connection closes.
1000 Normal ClosureA normal closure: the purpose for which the connection was established has been fulfilled.1001 Going AwayAn endpoint is going away, such as a server going down or a browser navigating away from a page.1002 Protocol errorAn endpoint is ending the connection because of a protocol error.1003 Unsupported DataAn endpoint is ending the connection because it received a type of data it cannot accept, for example binary data sent to an endpoint that understands only text.1006 Abnormal ClosureA reserved value that is never sent in a close frame.1007 Invalid frame payload dataAn endpoint is ending the connection because it received data within a message that was not consistent with the type of the message, for example text that is not valid UTF-8.1008 Policy ViolationAn endpoint is ending the connection because it received a message that violates its policy.1009 Message Too BigAn endpoint is ending the connection because it received a message that is too big for it to process.1011 Internal ErrorA server is ending the connection because it met an unexpected condition that prevented it from fulfilling the request.1012 Service RestartThe IANA registry of WebSocket close codes names 1012 Service Restart.1013 Try Again LaterThe IANA registry of WebSocket close codes names 1013 Try Again Later.1015 TLS handshakeA reserved value that is never sent in a close frame.
How to cite this
WebSocket close codes explained. Broker API Hub, https://openbrokerapi.com/errors/websocket, newest check .
Where you rely on a single figure, cite the source and the checked date printed beside it as well.