Agent Skill · version 0.1.0
Download Fensory Cash-and-Carry Agent Skill
Measure an executable spot and perpetual-futures basis, account for costs and prepare two sequential equal-notional legs without claiming atomic execution or convergence.
Download and review
Download the public file, review every instruction, then place it in the skills directory documented by the compatible client you use. Client-specific paths are omitted until each workflow is verified.
- Download
curl -fsSL https://fensory.com/skills/ai-basis-trade/SKILL.md -o SKILL.md- Install in Hermes
hermes skills install https://fensory.com/skills/ai-basis-trade/SKILL.md --name fensory-cash-and-carry
What the skill instructs
- Read the account and instrument before preparing an action.
- Keep the proposal inside the user's ceiling and the account's per-order cap.
- Show the exact symbol, side, order type and size before a write call. Include the limit price for a limit order, or the current quote and expected execution conditions for a market order, then ask for confirmation.
- Report a prepared order, submitted order and fill as three different states.
SKILL.md
---
name: fensory-cash-and-carry
description: Measure an executable spot and perpetual-futures basis, account for costs and prepare two sequential equal-notional legs without claiming atomic execution or convergence.
license: Proprietary
compatibility: Requires access to the Fensory MCP server and an eligible Fensory account. Fensory is not available to US persons.
metadata:
author: Fensory AG
version: "0.1.0"
source: "https://fensory.com/skills/ai-basis-trade"
---
# Build a cash-and-carry basis trade with an AI agent
## When to use
This guide is for an eligible user who wants a transparent, supervised cash-and-carry workflow and is comfortable managing spot custody, perpetual-futures margin and two separate order states.
It is not a promise that the basis will close, an automated profit loop or a fixed-income product. It does not use tokenized equities or app-only yield products, and it does not remove exposure when the legs or instruments do not actually match.
## Operating rules
- Start with read tools and identify the signed-in account, market, venue and instrument before preparing an action.
- Treat the Fensory account state, open orders, positions and fills as authoritative when they differ from the conversation.
- Fensory enforces four controls on the account: a kill-switch, an access expiry, a market allow-list and a per-order cap. Client confirmation instructions are separate from those account controls.
- Never describe a perpetual future as a share or tokenized equity. State the instrument and its risks before discussing an order.
- Never substitute a different market, quote currency or instrument because the requested one is unavailable.
- Keep every proposed order within both the user's stated ceiling and the account's per-order cap.
- Do not place, cancel or replace an order until the exact symbol, side, order type and size have been shown. For a limit order, show the limit price. For a market order, show the current quote and expected execution conditions. The user must confirm that exact action.
- Stop when a required tool is unavailable, the account limit cannot be verified, the quote is stale or the instrument is ambiguous.
## Risk and scope
This file is operational guidance, not financial advice. Trading can lose the full amount committed. Perpetual futures use margin and can be liquidated. Spot assets can lose value. Stop if the instrument, current quote or account controls cannot be verified.
## Procedure
1. **Match the spot token and contract.** The assistant verifies what each symbol represents. A cash-and-carry calculation is invalid when the spot token and derivative reference different assets or when a wrapped token is mistaken for native custody. Tools: `get_spot_metadata`, `get_market`.
2. **Calculate an executable basis.** Mid-price basis is a screen, not an execution price. The assistant uses both books to estimate where equal-notional legs could actually trade and reports funding separately from the basis. Tools: `get_orderbook`, `get_predicted_fundings`.
3. **Check capacity and existing exposure.** Balances, positions, resting orders, fees and controls determine whether the displayed opportunity fits the account. Existing exposure is included rather than hidden by a fresh pair calculation. Tools: `get_spot_account_state`, `get_account_state`, `get_open_orders`, `get_user_fees`.
4. **Prepare the two legs.** The assistant prepares equal-notional spot and perpetual orders but does not call a write tool during the analysis request. Each leg receives its own exact confirmation. Tools: `place_hl_spot_order`, `place_perps_order`.
5. **Reconcile entry and exit records.** Actual fills determine the matched size and entry basis. Funding and closing fills determine the realized result. A displayed basis at setup is not a track record. Tools: `get_order_status`, `get_fills`, `get_open_orders`, `get_funding_payments`.
## Request template
Use the Fensory tools to evaluate a BTC cash-and-carry basis trade. Stay read-only first. Call get_spot_metadata, get_market, get_orderbook for the matching spot and perpetual markets, get_predicted_fundings, get_spot_account_state, get_account_state, get_open_orders and get_user_fees.
Identify the exact spot token and perpetual-futures contract. Report spot mid, perpetual mid, percentage basis as (perp minus spot) divided by spot, current and predicted funding, spread, visible depth, fees, balances, positions, open orders, market allow-list, access expiry and per-order cap. State that UBTC is a wrapped HyperCore spot token and that the perpetual short uses margin and can be liquidated.
Use my minimum entry basis of 0.50% and maximum $25 notional per leg. If the observed basis does not exceed the threshold after a conservative allowance for round-trip fees and visible spread, stop after the analysis. If it does, prepare a limit buy for spot and an equal-notional limit sell for the perpetual. Show the exact sizes, prices, estimated costs, liquidation risk and the rule for an unmatched fill.
Do not submit either leg in this request. If I later confirm the spot leg, place only it and read the actual fill. Recalculate the perpetual size from that fill and the new price, then ask for separate confirmation. Do not claim convergence or annualize the current basis or funding. Stop if the markets do not match, either quote is stale, liquidity is insufficient or any account control cannot be verified.
## Failure handling
- **Convergence never arrives:** A perpetual future has no expiry date that forces delivery against spot. The basis may remain wide or widen further, so the trade needs a time and loss boundary rather than an assumption of automatic convergence.
- **The short is liquidated:** Directional exposure may be reduced across the pair while the perpetual leg still faces margin rules. A sharp move or insufficient collateral can liquidate the short while the spot token remains.
- **Execution consumes the basis:** The screen can show a positive spread while the available bid and ask produce a smaller or negative executable spread. Fees and the eventual exit add another round of cost.
- **One leg remains unmatched:** Sequential orders create a period of outright exposure. Repricing the second leg can reduce the mismatch, but it can also cross a worse book and erase the original basis.
- **Token mapping changes the risk:** A wrapped spot token includes token and venue mechanics that the perpetual contract does not. Matching price references does not make custody and redemption paths identical.
## Response contract
Report the account used, the exact instrument, the tools called, the controls that applied and the current order or position state. Separate a prepared order from a submitted order, and a submitted order from a fill. If no action was taken, say so directly.
## Sources
- [Hyperliquid funding documentation](https://hyperliquid.gitbook.io/hyperliquid-docs/trading/funding)
- [Hyperliquid perpetual-futures contract specifications](https://hyperliquid.gitbook.io/hyperliquid-docs/trading/contract-specifications)
- [Hyperliquid order types](https://hyperliquid.gitbook.io/hyperliquid-docs/trading/order-types)
- [Fensory MCP tools](https://fensory.com/mcp)
Product behavior and client permissions verified 2026-10-18.
Questions people ask
- What does the Fensory Cash-and-Carry Agent Skill install?
- It downloads one SKILL.md file containing operating instructions, risk boundaries, the tool sequence and a response contract. It does not install the Fensory MCP server or create an account.