perp

Perp Open

Open a perpetual position (optionally with a TP/SL bracket).

post/v1/perp/open

Request

  • Base URL
    https://api.fereai.xyz
  • URL
    https://api.fereai.xyz/v1/perp/open
  • Auth
    none declared

Query parameters

waitboolean

Block until task completes

timeoutinteger

Seconds to block when wait=true (max 90; the ~100s edge cuts longer waits — use wait=false + poll for longer).

Request body

assetstring required

Perp asset symbol, e.g. 'BTC' or 'ETH'.

is_buyboolean required

True to open a long, False to open a short.

sizenumber required

Position size in contracts (not smallest units).

leverageinteger

Leverage multiplier.

is_crossboolean

True for cross margin, False for isolated.

order_typestring

Order type: 'market' or 'limit'.

limit_pricenumber nullable

Limit price (required when order_type='limit').

slippage_pctnumber

Allowed slippage in percent points (0.5 = 0.5%).

reduce_onlyboolean

True to only reduce an existing position.

tp_pricenumber nullable

Optional take-profit trigger price (reduce-only bracket attached after open).

sl_pricenumber nullable

Optional stop-loss trigger price (reduce-only bracket attached after open).

tp_is_marketboolean

True = market-on-trigger for the take-profit leg.

sl_is_marketboolean

True = market-on-trigger for the stop-loss leg.

Example request

{
  "asset": "BTC",
  "is_buy": true,
  "leverage": 2,
  "size": 0.001
}

Response

Successful Response

task_idstring required

Celery task ID for tracking the async operation.

statusstring

Current task status: queued, pending, started.

poll_urlstring nullable

Relative URL to poll for task status.

notification_streamstring nullable

SSE stream URL for real-time task updates.

Example response

{
  "notification_stream": "/v1/notifications/stream",
  "poll_url": "/v1/tasks/d290f1ee-6c54-4b01-90e6-d701748f0851",
  "status": "queued",
  "task_id": "d290f1ee-6c54-4b01-90e6-d701748f0851"
}

Changes

No recorded changes to this operation across all 1 revision of this API.