Skip to content

Strategy guide

Run a supervised grid strategy with an AI agent

A grid strategy places several limit orders at fixed price intervals inside a defined range. Orders below the reference price prepare buys and orders above it prepare sells. The range, spacing, size and maximum inventory must be set before the first order because a grid can accumulate a directional perpetual-futures position when only one side fills.

Fensory provides the MCP tools needed for one supervised grid cycle: market and order-book reads, account state, open orders, post-only placement, order modification, named-order cancellation, status and fills. This guide stops after the first fill or a range break. It does not claim an unattended loop, automatic recovery or guaranteed profit.

Copy this prompt

Use the Fensory tools to prepare one supervised grid cycle on BTC perpetual futures. Stay read-only first. Call get_perps_status, get_market, get_orderbook with depth 10, get_account_state, get_open_orders, get_user_fees and get_predicted_fundings. Report the mark price, best bid, best ask, spread, visible size at the first five levels, current BTC position, available collateral, existing BTC orders, fees, current funding, market allow-list, access expiry and per-order cap. Stop if trading is not ready, any state is stale, an existing order overlaps this test or the account cannot support the full proposed grid. Propose a four-order grid with two post-only bids below the current mid and two post-only offers above it. Use fixed, evenly spaced levels inside a stated lower and upper boundary. Keep each order at or below $15 notional, total resting notional at or below $60 and maximum planned net inventory at $30. Use limit orders with tif Alo. Show the exact asset, side, size and price for all four orders, plus the distance between levels and the worst one-sided fill outcome. Ask for confirmation separately before each placement. After every confirmed placement, call get_order_status and get_open_orders. Do not describe a submitted order as filled. After any fill, call get_fills and get_account_state, cancel no order automatically and stop the cycle for review. Report the resulting position, remaining grid orders, fees and distance to the range boundaries. If no order has filled and one identified level needs refreshing, use modify_perps_order only after a new order-book read and confirmation. Explain that the replacement is post-only and returns a new oid. Track that new oid from get_open_orders. Do not retry after rejection or timeout. If the price leaves the range, prepare a stop summary and ask before cancelling only the named grid oids returned by get_open_orders. Identify any trigger, stop-loss or take-profit order and exclude it from the cancellation request. Verify the final state with get_open_orders, get_fills and get_account_state.

Who this is for

This guide is for an eligible non-US user who understands perpetual futures and wants to test a small, finite grid on one liquid market while reviewing each real-money action.

What it is not

It is not a 24/7 grid bot, a high-frequency system or a return forecast. It does not continue after the client closes, restart after an error or keep replacing orders without a fresh account and market check.

What you need

  • A range with a reason

    Choose a lower boundary, upper boundary and reference price from current market data. Stop if the current price is outside the range or the range was copied from an old session.

  • Spacing wider than immediate costs

    Compare each interval with the current spread and fee schedule before preparing orders. A visible gap between levels does not guarantee profit after fees, funding, slippage or adverse price movement.

  • A total exposure boundary

    Set maximum notional per order, maximum resting notional and maximum net position. The account per-order cap checks one order at a time, so the prompt must also limit the combined grid.

What the agent does

  1. 01

    Verify the market and account

    The assistant confirms that the market is available, reads minimum size and collateral, checks account controls and calculates whether the complete four-order plan fits the combined exposure boundary.

    Tools: get_perps_status · get_market · get_account_state · get_user_fees

  2. 02

    Set the grid from current data

    The live book anchors the reference price and visible depth. Fees and funding remain explicit costs. Existing orders are checked before new levels are proposed so the grid does not duplicate exposure already working.

    Tools: get_orderbook · get_predicted_fundings · get_open_orders

  3. 03

    Prepare four post-only levels

    Two bids and two offers use Alo time in force so they must rest on the book. Every level is previewed and confirmed separately. The assistant records each returned order id and does not infer a fill from successful submission.

    Tools: place_perps_order

  4. 04

    Stop and reconcile after a fill

    The first confirmed fill ends the cycle. The assistant reports the resulting position, remaining orders, actual fees and current range location. Continuing the grid requires a new review rather than an automatic replacement.

    Tools: get_order_status · get_open_orders · get_fills · get_account_state

  5. 05

    Modify or close named levels

    A modification starts from a live order id and produces a new post-only order id. A range break leads to a named-order cancellation plan. Both paths require fresh state, a preview, separate confirmation and final verification.

    Tools: modify_perps_order · cancel_perps_order

Fensory perpetual-futures terminal showing the order book and live market state used to prepare grid levels
Define the range from current order-book data and review the account after the first fill. A grid is several independent orders, not one guaranteed transaction.

Failure modes and limits

  • The market trends through one side

    Several bids or offers can fill while the opposite side remains untouched, creating directional exposure. This workflow stops after the first fill so the user can review the position before the grid accumulates more inventory.

  • The price leaves the selected range

    A grid is defined by its boundaries. Once price moves outside them, the old levels no longer express the approved plan. The assistant reports the break and prepares named cancellations instead of shifting the whole range silently.

  • Spacing is smaller than the costs

    A narrow interval can be consumed by maker or taker fees, funding and adverse selection. The assistant compares spacing with current costs before placement but does not present that comparison as a profit forecast.

  • A level is modified under a new order id

    A successful modification replaces the old order. The assistant must read open orders again and track the new id before checking status or requesting cancellation.

  • A broad cancel removes protection

    Stop-loss and take-profit orders can appear beside grid orders. The workflow cancels named grid ids only and identifies trigger orders before asking for confirmation.

  • The client disconnects

    Resting venue orders can remain open after the connected client closes. This guide does not provide hosted monitoring or automatic failover. The user must review open orders and account state after reconnecting.

Read the result in the terminal

Open orders
Match every live order id to its approved grid level, side, remaining size and price. Remove an old id from the plan after a successful modification and record its replacement.
Position and liquidation risk
After a fill, inspect net size, entry price, mark price, margin and liquidation price. A symmetric grid plan can still leave a one-sided perpetual-futures position.
Fills and total cost
Use actual fills and fees rather than submitted prices. Include funding when a position remains open. Resting levels and theoretical spacing do not establish realised performance.

Runs on

The client list comes from the same release record as the MCP page. Every verified client has its own setup guide.

Questions people ask

Can Fensory run a grid bot continuously?
This guide covers one supervised grid cycle through a connected client. It does not claim continuous Fensory hosting, automatic restart or unattended order replacement.
Why does the workflow stop after the first fill?
A fill changes the account position and the risk of every remaining order. Stopping creates a clear review point before another order increases, reduces or reverses that exposure.
Can the MCP modify and cancel grid orders?
Yes. The live MCP can modify a named resting perpetual-futures order and can cancel named orders. A modification is post-only and returns a new order id that must replace the old id in the grid record.
Why use post-only orders for the grid?
A post-only order is rejected if it would immediately cross the book. That keeps the planned level from becoming an unintended taker order, but it does not guarantee placement, a fill or a profitable result.
What happens if I close the client with orders still open?
Orders already resting at the venue can remain open. Reconnect, read open orders and account state, and reconcile every grid order before preparing another action.