API Documentation
Integrate institutional-grade evaluation and data into your testing loop. Designed for microsecond performance.
Quick Start
Market Data Streams (WebSockets)
Our WebSocket API provides ultra-low latency, real-time market data directly from our normalized feed. Subscribe to multiple channels (L1, L2 order books, trades) across different venues over a single connection. The feed is optimized for minimal bandwidth footprint and maximum speed.
Evaluation Entry (REST / FIX)
Submit signals via REST endpoints or FIX Protocol 4.4 for institutional-grade reliability. Every signal passes through our hardware-accelerated validation checks in under 0.01ms before being processed in the evaluation engine. Standard rate limits apply for REST, while FIX sessions offer dedicated bandwidth.
Endpoint Reference (REST)
The base URL for all REST API endpoints is https://api.twowaymind.com/v1/. All requests must be authenticated using a JWT token in the Authorization: Bearer header. Ensure that your IP address is whitelisted in the Client Portal before making production requests.
| Method | Endpoint | Description | Rate Limit |
|---|---|---|---|
| GET | /markets/symbols | List all tradable instruments. | 100/sec |
| POST | /orders | Submit a new limit or market signal to the evaluation engine. | 1000/sec |
| DELETE | /orders/{id} | Cancel an open signal by ID. | 1000/sec |
| GET | /account/balances | Retrieve current wallet/margin balances. | 50/sec |
Payload Structure & Types
Signal requests accept strictly typed JSON payloads. The type field supports limit, market, stop_loss, and take_profit.
For algorithmic strategies, we highly recommend utilizing the time_in_force parameter (supporting GTC, IOC, FOK) to prevent unintended validations during volatile spikes.
Responses are returned in JSON format with a standard wrapper containing a success boolean, an error_code (if applicable), and a data object.