Skip to main content
Order entry is performed over WebSocket.
  • Endpoint: wss://trade.qfex.com?api_key=YOUR_API_KEY
  • Authenticate within 1 minute of connecting.

1) Authenticate

Send this immediately after you connect:

2) Add Order

Adding a stop order follows the same pattern as adding a typical order. Set side to the direction of the order that will reduce your position when triggered. If a TAKE_PROFIT or STOP_LOSS order exceeds your current position, it can be rejected or other stop orders can be cancelled. Each triggered STOP_MARKET attempt has its own order_id in order responses. A cancellation applies to that IOC attempt, and QFEX may still retry the unfilled quantity. See stop-market IOC retries for timing and execution risks.

Parameters

⚠️ Notes:
  • Tick size, lot size, and min/max order quantity are symbol-specific. See Reference Data API.
  • An order may be rejected with OrderStatus codes if parameters are invalid.

Sample Code

Example Response

When you place an order, you will receive an order_response with status ACK: