GMX API v2
GMX API v2 serves the order transaction, subaccount, GMX Account cross-chain, and JIT liquidity info routes. JIT liquidity info is also under /v1, and /v2 returns it per side (long and short). The other GMX API routes are only under /v1: see the GMX API OpenAPI Reference.
GMX API v2 (Swagger)
- Swagger/OpenAPI spec: GMX API v2 Swagger
Base URLs
The /v2 routes are served on the same two peer hosts per chain as /v1, and the /v1 base URL rules apply to them too. The peers don't share express order and GMX Account cross-chain withdrawal records, so keep all calls of one order or withdrawal on one base URL.
| Network | Peer A (.io) | Peer B (.ai) |
|---|---|---|
| Arbitrum | https://arbitrum.gmxapi.io/v2 | https://arbitrum.gmxapi.ai/v2 |
| Avalanche | https://avalanche.gmxapi.io/v2 | https://avalanche.gmxapi.ai/v2 |
| MegaETH | https://megaeth.gmxapi.io/v2 | https://megaeth.gmxapi.ai/v2 |
/v1/orders/txns/*, /v1/subaccounts/*, and /v1/gmx-account/* answer 404. Send these requests to /v2.