1Forge · AsyncAPI Specification
1Forge Forex Stream API
Version 2024.01
1Forge streams real-time forex and cryptocurrency price updates over a single WebSocket connection at `wss://sockets.1forge.com/socket`. Messages are pipe-delimited text frames: `{action}|{body}`, where the body is either a single string token or a JSON document for `update` events. Clients must authenticate with their API key immediately after the socket opens and may subscribe to specific pairs, to all pairs, or unsubscribe at any time. WebSocket streaming is not available on free plans.
View Spec
View on GitHub
Currency ExchangeForexCryptocurrencyMarket DataFinancial DataReal-Time DataAsyncAPIWebhooksEvents
Channels
stream
Send control frames (login, subscribe/unsubscribe, heartbeat) to the 1Forge server.
Single bidirectional channel for control and price-update frames.
Messages
LoginPrompt
Login prompt
Server requests the client send its API key.
LoginCommand
Login command
Client sends API key for authentication.
PostLoginSuccess
Login success acknowledgement
Server confirms authentication succeeded.
SubscribeTo
Subscribe to symbol
Subscribe to updates for a single currency pair.
UnsubscribeFrom
Unsubscribe from symbol
Unsubscribe from updates for a single currency pair.
SubscribeToAll
Subscribe to all
Subscribe to updates for every available pair.
UnsubscribeFromAll
Unsubscribe from all
Unsubscribe from every pair currently subscribed.
Update
Price update
Real-time bid/ask/price update for a subscribed currency pair.
Heart
Heartbeat prompt
Server keep-alive prompt; clients respond with `beat`.
Beat
Heartbeat response
Client keep-alive response to a server `heart` frame.
ForceClose
Forced disconnect
Server instructs the client to close the connection.
Servers
wss
production
sockets.1forge.com/socket
1Forge production WebSocket stream.