# Trade GMX V2 perpetuals on Arbitrum with an agent

Find a GMX market, review USDC collateral and keeper fees, prepare an increase or decrease, and match the order key to the wallet’s position.

Guide: https://www.bitpont.com/help/ai-agents/gmx-arbitrum-perpetual-orders/

MCP resource: `bitpont://guides/gmx-arbitrum-perpetual-orders`

[Open Arbitrum perpetuals](https://www.bitpont.com/perps/arbitrum/)

## 1. Locate the market and owner

Start with the workflow below. Use gmx.markets to identify the published market, then read gmx.account for the Arbitrum wallet. Use derivativeReadPlan to inspect the exact reads and derivativeSnapshot to run them together. Read each result and its errors separately. For a reduction, match the market, direction and owner to the live position. Check available collateral and ETH for the network and execution fees.

## 2. Review the order terms

Choose ticketGmxIncrease or ticketGmxDecrease. Use describeTool for its exact input schema and derivativeActionCheck to check the fields before preparation. Set the size, direction, maximum execution fee and slippage explicitly. For a conditional order, check the order type, trigger price and direction. Confirm eligibility with the owner.

## 3. Sign the reviewed ticket

Keep a stable request ID and store the original workspace privately. Inspect the prepared transaction. An allowance transaction can precede the order. Confirm it, refresh the preparation and sign the order under the wallet’s policy.

## 4. Verify keeper execution or cancellation

Recover a lost preparation with the matching recoverGmxIncrease or recoverGmxDecrease tool in the original workspace. Call executionNext in that workspace with the execution ID or original request ID for the next read. Check executionStatus for the transaction, then gmx.history and gmx.account for the order and position. If an order remains open, use its exact orderKey with ticketGmxCancel and verify the result.

## Find the GMX trading and signing workflow

```
curl -fsS "https://www.bitpont.com/api/v1/agent/derivatives/workflow" \
  -H 'Content-Type: application/json' \
  -d '{"venue":"gmx","intent":"trade"}'
```

### MCP tool call

```json
{
  "method": "tools/call",
  "params": {
    "name": "bitpont_derivativeWorkflow",
    "arguments": {
      "venue": "gmx",
      "intent": "trade"
    }
  }
}
```

## Tools

- `derivativeWorkflow`
- `derivativeReadPlan`
- `derivativeSnapshot`
- `derivativeActionCheck`
- `executionNext`
- `gmx.markets`
- `gmx.account`
- `ticketGmxIncrease`
- `ticketGmxDecrease`
- `ticketGmxCancel`
- `gmx.history`

## Further reading

- [Trade ETH perpetuals on Arbitrum](<https://www.bitpont.com/perps/arbitrum/eth/>)
- [Review derivatives in Portfolio](<https://www.bitpont.com/portfolio/perps/>)
- [Open, manage and reconcile an Ostium trade](<https://www.bitpont.com/help/ai-agents/ostium-trade-and-settlement/>)
- [Trade perpetuals and inspect funding-rate markets](<https://www.bitpont.com/help/ai-agents/perpetuals-and-funding-rates/>)
- [Sign wallet actions and recover an agent order](<https://www.bitpont.com/help/ai-agents/wallet-signing-and-order-recovery/>)
