Locker Protocol Agentic

v2.5.0
io.github.locker-protocol/agentic Checked 2 days ago Published 1 month ago

Hyperliquid perps for AI agents.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

perps_venues Perps venues

The perps venues this wallet trades on (Hyperliquid).

perps_markets Perps markets

Markets by 24 h volume: mark price, 24 h change, funding, open interest, maximum leverage; halted ones marked.

ParameterTypeDescription
all_dexesbooleanEvery dex the account is funded on
dexstringA HIP-3 dex by name, in lower case (omit for the main dex)
limitintegerHow many markets, largest 24 h volume first (default 25)
searchstringOnly the markets whose name holds this text

perps_quote Quote an order

What an order would cost before anything is signed: entry and worst price on the live book, fees as one total, liquidation estimate, Hyperliquid's $10 minimum.

ParameterTypeDescription
leverage *integerThe leverage, e.g. 3
side *stringlong or short
size *stringThe size in the base asset, e.g. 0.01
symbol *stringThe market, e.g. BTC, ETH, xyz:GOLD
limit_pxstringThe limit price, with type limit
marginstringcross or isolated: the margin the leverage is set in (default: the position's, or the market's; a market that takes isolated only refuses cross). The leverage is set for the whole market
max_slippage_bpsintegerThe worst price accepted, in basis points from the mid (default 300)
reduce_onlybooleanOnly reduce the position held, the side the other way: no leverage set, no margin taken, always allowed by the policy as a close
slstringA stop-loss price
tifstringWith type limit: gtc (default) rests until cancelled, ioc fills what it can at once and cancels the rest, alo is posted to the book only and refused if it would fill at once
tpstringA take-profit price
trigger_pxstringThe entry trigger, with type trigger: a long above the price, a short below; no tp or sl with it
typestringmarket (default), limit, or trigger (a market order once the price reaches trigger_px)

perps_positions Open positions

Open positions (the simulation account's with paper: true, or when simulation mode is on and no address is given).

ParameterTypeDescription
addressstringAnother account to read (0x...); omit for the vault account
all_dexesbooleanEvery dex the account is funded on
dexstringA HIP-3 dex by name, in lower case (omit for the main dex)
paperbooleanOn the simulation account

perps_balance Margin balance

Equity and withdrawable margin, per dex (the simulation account's with paper: true).

ParameterTypeDescription
addressstringAnother account to read (0x...); omit for the vault account
all_dexesbooleanEvery dex the account is funded on
dexstringA HIP-3 dex by name, in lower case (omit for the main dex)
paperbooleanOn the simulation account

perps_orders Open orders

Open orders, triggers included (the simulation account's with paper: true: its entry triggers waiting for their price, judged on the mark first, one reached filled and said under fired).

ParameterTypeDescription
addressstringAnother account to read (0x...); omit for the vault account
all_dexesbooleanEvery dex the account is funded on
dexstringA HIP-3 dex by name, in lower case (omit for the main dex)
paperbooleanOn the simulation account

perps_regime Market regime

The regime of a market, read on its 1 h, 4 h and 5 m candles: strong bull, weak bull, range, weak bear or strong bear with its trend score, the EMA stack, the structure (higher highs and lows), RSI 14 and 6, ATR and whether volatility expands, volume, and how long the regime has held. It tells a trending market from one in a range.

ParameterTypeDescription
symbol *stringThe market, e.g. BTC, ETH, xyz:GOLD

perps_ranges Markets in a range

Which markets are in a range now, over the last 4 hours: range width, volatility, their ratio (ranginess), a score from 0 to 10 (0 outside 0.5 to 5 % wide), support and resistance. The markets whose candles fail are skipped and counted.

ParameterTypeDescription
all_dexesbooleanEvery dex the account is funded on
dexstringA HIP-3 dex by name, in lower case (omit for the main dex)
limitintegerHow many markets to scan, by 24 h volume (default 20)

perps_open Open a position

Open or add to a position. Without confirm, returns the quote, the local policy check and a quote_id, and signs nothing. With confirm: true and that quote_id, the guardian rebuilds the order, checks the policy again and signs it with the agent key.

ParameterTypeDescription
leverage *integerThe leverage, e.g. 3
side *stringlong or short
size *stringThe size in the base asset, e.g. 0.01
symbol *stringThe market, e.g. BTC, ETH, xyz:GOLD
confirmbooleanThe user's agreement to this order. Without it nothing is signed.
limit_pxstringThe limit price, with type limit
marginstringcross or isolated: the margin the leverage is set in (default: the position's, or the market's; a market that takes isolated only refuses cross). The leverage is set for the whole market
max_slippage_bpsintegerThe worst price accepted, in basis points from the mid (default 300)
paperbooleanOn the simulation account
quote_idstringThe quote_id of the quote this confirms, as the same call without confirm returned it.
reduce_onlybooleanOnly reduce the position held, the side the other way: no leverage set, no margin taken, always allowed by the policy as a close
slstringA stop-loss price
tifstringWith type limit: gtc (default) rests until cancelled, ioc fills what it can at once and cancels the rest, alo is posted to the book only and refused if it would fill at once
tpstringA take-profit price
trigger_pxstringThe entry trigger, with type trigger: a long above the price, a short below; no tp or sl with it
typestringmarket (default), limit, or trigger (a market order once the price reaches trigger_px)

perps_close Close positions

Close a position (reduce-only, at market), or every one with all: true. Without confirm, returns what would close and a quote_id, and signs nothing. Closing is always allowed by the policy.

ParameterTypeDescription
allbooleanEvery open position (instead of symbol)
confirmbooleanThe user's agreement to this order. Without it nothing is signed.
max_slippage_bpsintegerThe worst price accepted, in basis points (default 300)
paperbooleanOn the simulation account
quote_idstringThe quote_id of the quote this confirms, as the same call without confirm returned it.
sizestringPart of the position, in the base asset, never more than it holds (the whole position when absent)
symbolstringThe market to close

perps_cancel Cancel an order

Cancel an open order. Runs only with confirm: true and the quote_id the same call without confirm returned; without them, signs nothing.

ParameterTypeDescription
order_id *integerThe order id (perps_orders)
symbol *stringThe market of the order
confirmbooleanThe user's agreement to this order. Without it nothing is signed.
quote_idstringThe quote_id of the quote this confirms, as the same call without confirm returned it.

perps_modify Modify a market

Change the leverage of a market, or set TP/SL on an open position. Runs only with confirm: true and the quote_id the same call without confirm returned; without them, signs nothing.

ParameterTypeDescription
symbol *stringThe market
confirmbooleanThe user's agreement to this order. Without it nothing is signed.
leverageintegerA new leverage (within the policy)
quote_idstringThe quote_id of the quote this confirms, as the same call without confirm returned it.
slstringA stop-loss price
tpstringA take-profit price

perps_deposit Deposit USDC

Deposit USDC from Arbitrum to Hyperliquid. Signed by the user's own wallet (Locker Vault, their browser extension or their mobile wallet): this tool signs nothing and returns the command the user types in their own terminal.

ParameterTypeDescription
amount *stringUSDC to bring from Arbitrum One

perps_withdraw Withdraw USDC

Withdraw USDC to Arbitrum. Signed by the user's own wallet (Locker Vault, their browser extension or their mobile wallet): this tool signs nothing and returns the command the user types in their own terminal. The agent key cannot withdraw (Hyperliquid refuses it).

ParameterTypeDescription
amount *stringUSDC to withdraw to Arbitrum
destinationstringAnother address (omit for the vault account)

perps_transfer Move margin between dexes

Move USDC margin between the main dex and a HIP-3 dex of the account. Signed by the user's own wallet (Locker Vault, their browser extension or their mobile wallet): this tool signs nothing and returns the command the user types.

ParameterTypeDescription
amount *stringUSDC to move
to_dex *stringThe dex to move to (main for the main dex)
from_dexstringThe dex to move from (default main)

wallet_address Account

The account the agent trades for, and how it signs: Locker Vault, a browser extension or a mobile wallet.

wallet_balances Balances

ETH and USDC on Arbitrum, margin and spot on Hyperliquid.

ParameterTypeDescription
addressstringAnother account (omit for the vault account)

paper_init Open a simulation account

Open a simulation account: fills on the real order book with the real fees, no key and no vault needed.

ParameterTypeDescription
budgetnumberThe simulation budget in USD (default 1000)
resetbooleanStart an existing simulation account over (its history is lost)

paper_status Simulation account

Equity, positions and fees of the simulation account, at live marks.

paper_on Simulation mode on

Every perps tool uses the simulation account until paper_off; a position's take-profit and stop are set and fire there as on Hyperliquid, the leverage is set by the next order, and the movements of funds are refused meanwhile.

paper_off Simulation mode off

Back to the real account.

paper_record Record the market

Record the market into a local tape for paper_replay: the 1 m, 5 m, 1 h and 4 h candles of each market and its funding history, appended to what is already recorded. One call reaches about a day back on the 1 m band, so the tape grows by running this again over days. Nothing is signed and no key is read.

ParameterTypeDescription
coinsstringThe markets to record, comma separated (BTC,ETH); omit for the busiest ones
min_vlmnumberOnly the markets with at least this much 24 h volume in USD (default 5000000)
topintegerHow many markets to record, by 24 h volume (default 20)

paper_replay Replay a strategy

Replay a strategy on the recorded tape and return the report: trades, win rate with its 95 % lower bound, costs, and a verdict. GATE NOT CLEARED is the usual outcome of a short tape, and it means the tape is too short to tell, not that the strategy is bad; run paper_record again over days. A replay never proves that a real order will win: it is what the recorded past would have given, fees and funding counted, and nothing is signed.

ParameterTypeDescription
strategy *objectThe strategy, as a JSON object of schema version 1: version, name (lower-case letters, digits and dashes), an optional comment, when (the conditions) and order (side, sizeUsd, leverage, entry, tp, sl)…
coinsstringOnly these markets of the tape, comma separated (BTC,ETH)
fromstringThe start: a date, a timestamp in milliseconds, or a duration back from now (3d, 6h)
tostringThe end, in the same forms as from

policy_show Policy

The limits every order is checked against: size per order, leverage, markets, orders per day, risk:reward, expiry and the bounds set on this computer.

mandate_show Mandate

The mandate the user signed, when there is one: the limits the guardian applies before every opening on top of the policy (size, leverage, markets, orders and notional per day, the fee recipient, live copies), its end, and whether it is in force.

mandate_sign Sign a mandate

Sign the limits of the agent with the user's own wallet (Locker Vault, their extension or their mobile wallet): the policy's bounds, a notional ceiling per day, the uses it allows (orders, live copies, the pilot) and the traders live copies may follow, for the agent's life at most (180 days). This tool signs nothing and returns the command the user types in their own terminal.

ParameterTypeDescription
actionsstringThe uses it allows, comma separated: trade (orders from the agent), copy (live copies, with copy_leaders), pilot (orders the pilot decides itself). Default: trade, and copy with copy_leaders
copy_budgetnumberWith copy_leaders: the USD the live copies may use
copy_leadersstringTraders live copies may follow, comma separated (0x...,0x...)
copy_onlybooleanLive copies only, no orders from the agent
daysnumberHow long it lasts (default and at most 180, the agent's life, never past the agent)
max_notional_per_daynumberThe most notional opened per UTC day, in USD (default: the policy's largest order times its orders per day)

mandate_revoke Revoke the mandate

Drop the mandate: the guardian opens nothing under it until the user signs a new one. Closing positions stays allowed. It only restricts.

journal Journal

What was done, refused, and paid: orders, refusals, deposits, and the fees total.

ParameterTypeDescription
limitintegerHow many lines (default 50)
sincestringA duration back from now (24h, 7d) or a date

status Status

Account, agent, guardian (locked or unlocked) and mode, at a glance.

doctor Doctor

Check the setup, sign nothing: each check with what to do.

hyperkeel_status hyperkeel connection

Whether this computer is connected to hyperkeel.com (market data, alerts), with which account, until when. Connecting is the user's: `lpa hyperkeel login`.

hyperkeel_brief Market brief

The state of the market in one answer, from hyperkeel: the movers, funding, liquidations and large trades. No account needed.

hyperkeel_leaders Leaderboard

The first accounts of a Hyperliquid leaderboard, from hyperkeel: their PnL, volume and ROI over the period. No account needed.

ParameterTypeDescription
windowstringThe period ranked (default day)

hyperkeel_follows Traders followed

The traders the user follows on hyperkeel, where their moves are sent, and the latest ones.

hyperkeel_follow Follow a trader

Follow a trader on hyperkeel: its moves reach the user with their alerts. Moves no funds.

ParameterTypeDescription
address *stringThe trader's account (0x...)

hyperkeel_unfollow Stop following a trader

Stop following a trader on hyperkeel.

ParameterTypeDescription
address *stringThe trader's account (0x...)

hyperkeel_alerts Alerts on followed traders

The alerts on the moves of the traders followed (notifications, email): on from 250k, 1m or 5m dollars, or off.

ParameterTypeDescription
offbooleanTurn the alerts off
thresholdstringAlert on moves of at least this many dollars

copy_start Copy a trader, in simulation or live

Start a background process that copies a trader for some days: every order of theirs is mirrored, sized as asked, with the real fees; what the leader reduces is reduced by the same share. In simulation by default, on a simulation account of its own, and nothing is signed. With live, the orders go to the real account through the guardian, each checked against the policy and the mandate the user signed on their phone. The process outlives this call and keeps running after the terminal closes, until copy_stop or the days run out.

ParameterTypeDescription
leader *stringThe trader to copy (0x...)
at_endstringWhat becomes of its positions when the days run out: keep (the default, left as they are) or close (closed at market, reduce-only); copy_stop keeps them either way
budgetnumberSimulated USD for this copy (default 1000)
daysnumberHow long it copies (default 7, at most 30)
fixed_marginnumberWith fixed: the USD of margin for each opening, at most the budget
livebooleanOn the real account instead of simulation: needs the guardian unlocked by the user and a mandate they signed naming this trader, with room in its copy budget
max_scalenumberWith proportional: at most this many times the leader's size (default 1)
percentnumberWith percent: the share of the copy's equity used as the margin of each opening
sizingstringHow each opening is sized: proportional (the default: the leader's size times the copy's equity over the leader's, at most max_scale times the leader's size), mirror (the leader's size), percent (that…

copy_stop Stop a copy

Stop the background process copying a trader, or every one; the result stays in copy_status with all: true.

ParameterTypeDescription
allbooleanEvery copy (instead of leader)
leaderstringThe trader copied (0x...)

copy_status Copies in simulation

The copies in simulation: each one's equity and gain, running or (with all) ended.

ParameterTypeDescription
allbooleanThe ended copies too

copy_resume Resume the copies

Start a background process again for each copy left paused (after a restart of the computer).

pilot_status The pilot

The pilot that trades on its own in the guardian: running and when it thinks next, paused and why, or ended. Read only: no tool arms, stops or resumes it; the user does, in their terminal.