The 4casters Orders API supports real-time order placement, cancellation, and session management over a raw WebSocket connection.Documentation Index
Fetch the complete documentation index at: https://docs.4casters.io/llms.txt
Use this file to discover all available pages before exploring further.
Endpoints
- Orders API:
wss://orders-api.4casters.io/orders/ws
Auth
The connection authenticates with a 4Casters token. Send the token in theAuthorization header on the WebSocket handshake. The server derives the user
from the token — no username in the URL.
Get a token
Log in with your 4Casters username and password by calling the/user/login
endpoint of the 4Casters REST API. The response includes a token you can use
here.
See POST /user/login in the 4Casters REST API docs.
Connect
Message format
Every client request is a 2-tuple[messageType, payload]. Every payload should include a requestID that you generate; the server echoes it back so you can correlate responses.
requestID plus either data (success) or error (failure):