futures

Open (or add to) a mock futures position

Requires scope trade:futures. idempotencyKey is REQUIRED and unique per intent (reuse replays the result). One net position per coin: a second open on the same coin/side ADDS to it (same leverage; opposite side rejected). Returns 403 only if futures is later disabled.

post/api/agent/futures/open

Request

  • Base URL: https://api.coinrithm.com
  • URL: https://api.coinrithm.com/api/agent/futures/open
  • Auth: HTTP bearer

Request body

coinIdstring required
side'long' | 'short' required
leveragenumber required
marginMusdnumber required
idempotencyKeystring required

Unique per intent. Reusing it replays the original result.

stopLossPricenumber nullable

Optional open-time resting stop-loss. Side-aware: long requires liq < SL < entry mark; short requires entry mark < SL < liq (rejected as a dead trigger otherwise). Fired by the per-minute worker; the FULL position settles at mark with exitReason=stop_loss. Not accepted on an ADD — use /futures/sl-tp.

takeProfitPricenumber nullable

Optional open-time resting take-profit (long: above mark; short: below). Same worker semantics, exitReason=take_profit.

Response

Added to existing position, or idempotent replay

idempotentReplayboolean

present (true) on a replay

Changes

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