REST V1
REST endpoints for V1 protocol information.
Tokens
- Arbitrum URL: https://api.gmx.io/tokens
- Avalanche URL: https://gmx-avax-server.uc.r.appspot.com/tokens
- Retrieve a list of tokens and information for each token
- USD amounts are multiplied by (10 ** 30)
- Token amounts are multiplied by (10 ** token.decimals)
Prices
The tokens endpoint will return the current prices in the contract, these prices are used for swaps, GLP minting / redeeming.
For opening and closing positions the realtime median prices are used instead, to get these values:
- Arbitrum URL: https://api.gmx.io/prices
- Avalanche URL: https://gmx-avax-server.uc.r.appspot.com/prices
- Retrieve a list of tokens and information for each token
- USD amounts are multiplied by (10 ** 30)
- Token amounts are multiplied by (10 ** token.decimals)
Actions
- URL: https://api.gmx.io/actions
- Retrieve a list of actions, these will include swaps, increasing a position, decreasing a position, orders and liquidations
- Params:
- account (optional): pass in the checksum address of the account
- after (optional): for pagination, the id to start after
- To get the checksum address you can use Web3 Tools, you can also use the ethers library.
Volume
- Arbitrum
- Avalanche
- Volumes are separated by action, token, day / week
- Params:
- after (optional): for pagination, the id to start after