Loading...
Loading...
Use this skill whenever you want to trade Gate options: place order (market/limit), close or reduce a position, cancel open orders, or amend open orders. Trigger phrases include: options, call, put, strike, expiration, mark IV, close option, cancel option order, amend option order.
npx skill4agent add gate/gate-skills gate-exchange-optionsgate-cligate-clicommand -v gate-cligate-cli --version${HOME}/.local/bin/gate-cli${HOME}/.openclaw/skills/bin/gate-cliexchange-runtime-rules.mdgate-runtime-rules.md| Case | Description | Example triggers (EN) | Example output (EN) |
|---|---|---|---|
| Case 1 | Market/limit place order | "Market buy 1 BTC call, strike at current price, expire in one week" / "Sell 1000U weekly BTC call at 70k strike" / "Open long 1 SOL weekly option at market" / "Use half of account to buy BTC call expiring in 3 days" | "Order submitted! You have placed a {buy/sell} order on {underlying} at {market/limit price}, strike {xxx}, expiration {xxx}, option type {call/put}, size {xxx} contracts." |
| Case 2 | Mark IV place order | "Mark IV order: buy 1 BTC call, one week expiry" / "Sell 1000U weekly BTC call at 70k strike, mark IV" / "Open long 1 SOL weekly option, mark IV" | Same as Case 1, but price is derived from mark IV or IV-to-price backend. |
| Case 3 | Market/limit close or reduce position | "Market close my BTC call, expiry 03/18, strike 70000" / "Close half of my ETH put at market" / "Close all profitable option positions" / "Market close all options with loss over 50%" | "Close order submitted! As requested, you have closed {size} of your {long/short} position on {underlying} at {market/limit price}." |
| Case 4 | Cancel open orders | "Cancel the BTC call order at 70k strike, expiry 03/18" / "Cancel all SOL call buy orders" / "Cancel all open orders" / "One-click cancel" | "Cancel successful! Your {specified/all} open order(s) have been cancelled. A total of {N} order(s) were cancelled, releasing {xxx} USDT margin." |
| Case 5 | Amend open orders | "Change my BTC call order at 70k strike, expiry 03/18, price to 0.05" / "Halve the size of my SOL put at strike 70, expiry 03/20" | "Amend confirmed! Your open order on {underlying} has been updated: price is now {new price}, size is now {new size}. Waiting for fill." |
| Module | Description | Trigger keywords |
|---|---|---|
| Place order (market/limit) | Buy or sell options at market or limit price | market buy, limit sell, open long, buy call, sell put, spend X on option |
| Place order (mark IV) | Place order by implied volatility (mark IV) | mark IV, IV order |
| Close/reduce position | Market/limit close or partial close | close position, flat, reduce half, close all profitable, close losing |
| Cancel orders | Cancel one or all open option orders | cancel order, revoke, cancel all, one-click cancel |
| Amend orders | Change price or size of open order | amend, modify price, change size |
| Intent | Example phrases | Route to |
|---|---|---|
| Place order (market/limit) | "Market buy 1 BTC call, strike at current price, expire in one week" / "Sell 1000U of weekly BTC call at 70k strike" / "Open long 1 SOL weekly option at market" / "Use half of account to buy BTC call expiring in 3 days" | Read |
| Place order (mark IV) | "Mark IV order: buy 1 BTC call, one week expiry" / "Sell 1000U weekly BTC call at 70k strike, mark IV" / "Open long 1 SOL weekly option, mark IV" | Read |
| Close/reduce position | "Market close my BTC call, expiry MM/DD, strike XXXX" / "Close half of ETH put at market" / "Close all BTC call long when price hits 60000" / "Market close all profitable option positions" | Read |
| Cancel orders | "Cancel the BTC call order at 70k strike, expiry MM/DD" / "Cancel all SOL call buy orders" / "Cancel all open orders" | Read |
| Amend orders | "Change my BTC call order at 70k strike, expiry MM/DD, price to XXXX" / "Halve the size of my SOL put at strike 70, expiry MM/DD" | Read |
| Unclear | "Help with options", "Show my option positions" | Clarify: query positions/orders, then guide user |
cex_options_| Group | MCP tools |
|---|---|
| Underlying & contracts | |
| Market data | |
| Account & positions | |
| Orders | |
| Amend | |
| Trades | |
GATE_API_KEYGATE_API_SECRETgate-cli config initgate-cli config initGATE_API_KEYGATE_API_SECRET--api-key--api-secretgate-cligate-cliPATHGATE_API_KEYGATE_API_SECRETgate-cli config initgate-cli config initGATE_API_KEYGATE_API_SECRETgate-cli cex options market tickersgate-cli --version{underlying}-{expiration}-{strike}-{C|P}BTC_USDT-20210916-50000-Clist_options_contractsget_options_contract| User phrase | Intent | How to get size (contracts) |
|---|---|---|
| Contracts | Explicit contract count | "1 contract", "buy 3 contracts" → size = 1, 3 |
| Base notional | Notional in underlying | "0.1 BTC call", "1 BTC put" → contracts = base_amount / multiplier (from |
| Quote (USDT) | Premium / cost in USDT | "1000U", "spend 500 USDT", "half of account" → contracts = usdt_amount / price_per_contract (from order book/ticker) |
contracts = base_amount / multiplierget_options_contractcontracts = usdt_amount / price_per_contractlist_options_accountorder_size_minget_options_contractget_options_contractlist_options_contractsclose: truesize: 0reduce_only: truecreate_options_orderOrder submitted! You have placed a {buy/sell} order on {underlying} at {market/limit price / mark IV}, strike {xxx}, expiration {xxx}, option type {call/put}, size {xxx} contracts.Close order submitted! As requested, you have closed {size} of your {long/short} position on {underlying} at {market/limit price}.gate-cli cex options order cancel-allgate-cli cex options order cancelgate-cli cex options order listCancel successful! Your {specified/all} open order(s) have been cancelled. A total of {N} order(s) were cancelled, releasing {xxx} USDT margin.Amend confirmed! Your open order on {underlying} has been updated: price is now {new price}, size is now {new size}. Waiting for fill.create_options_order| Code / situation | Action |
|---|---|
| Insufficient balance | Suggest depositing or reducing size. |
Size below | Inform user; do not submit. |
| Contract not found | Confirm underlying, expiration, strike, call/put; suggest listing contracts. |
| Order not found | Order may be filled, cancelled, or wrong id; suggest checking order history. |
order_size_minorder_price_roundget_options_contractorder_price_round