|
| 1 | +# GMX_TOKENS |
| 2 | + |
| 3 | +  |
| 4 | + |
| 5 | +This document was generated automatically. Please see [README Generator](../../scripts#readme-generator) for more info. |
| 6 | + |
| 7 | +## Environment Variables |
| 8 | + |
| 9 | +| Required? | Name | Description | Type | Options | Default | |
| 10 | +| :-------: | :-----------------------------------: | :---------------------------------------------------------------------------------------: | :----: | :-----: | :------------------------------------------: | |
| 11 | +| ✅ | DATA_ENGINE_ADAPTER_URL | URL of Data Engine EA | string | | | |
| 12 | +| | ARBITRUM_RPC_URL | RPC url of Arbitrum node | string | | | |
| 13 | +| | ARBITRUM_CHAIN_ID | The chain id to connect to for Arbitrum | number | | `42161` | |
| 14 | +| | BOTANIX_RPC_URL | RPC url of Botanix node | string | | | |
| 15 | +| | BOTANIX_CHAIN_ID | The chain id to connect to for Botanix | number | | `3637` | |
| 16 | +| | AVALANCHE_RPC_URL | RPC url of Avalanche node | string | | | |
| 17 | +| | AVALANCHE_CHAIN_ID | The chain id to connect to for Avalanche | number | | `43114` | |
| 18 | +| | ARBITRUM_DATASTORE_CONTRACT_ADDRESS | Address of Data Store contract on Arbitrum | string | | `0xFD70de6b91282D8017aA4E741e9Ae325CAb992d8` | |
| 19 | +| | BOTANIX_DATASTORE_CONTRACT_ADDRESS | Address of Data Store contract on Botanix | string | | `0xA23B81a89Ab9D7D89fF8fc1b5d8508fB75Cc094d` | |
| 20 | +| | AVALANCHE_DATASTORE_CONTRACT_ADDRESS | Address of Data Store contract on Avalanche | string | | `0x2F0b22339414ADeD7D5F06f9D604c7fF5b2fe3f6` | |
| 21 | +| | ARBITRUM_GM_READER_CONTRACT_ADDRESS | Address of GM Reader contract on Arbitrum | string | | `0x470fbC46bcC0f16532691Df360A07d8Bf5ee0789` | |
| 22 | +| | BOTANIX_GM_READER_CONTRACT_ADDRESS | Address of GM Reader contract on Botanix | string | | `0x922766ca6234cD49A483b5ee8D86cA3590D0Fb0E` | |
| 23 | +| | AVALANCHE_GM_READER_CONTRACT_ADDRESS | Address of GM Reader contract on Avalanche | string | | `0x62Cb8740E6986B29dC671B2EB596676f60590A5B` | |
| 24 | +| | ARBITRUM_GLV_READER_CONTRACT_ADDRESS | Address of GLV Reader contract on Arbitrum | string | | `0x2C670A23f1E798184647288072e84054938B5497` | |
| 25 | +| | BOTANIX_GLV_READER_CONTRACT_ADDRESS | Address of GLV Reader contract on Botanix | string | | `0x955Aa50d2ecCeffa59084BE5e875eb676FfAFa98` | |
| 26 | +| | AVALANCHE_GLV_READER_CONTRACT_ADDRESS | Address of GLV Reader contract on Avalanche | string | | `0x5C6905A3002f989E1625910ba1793d40a031f947` | |
| 27 | +| ✅ | ARBITRUM_TOKENS_INFO_URL | URL to token metadata supported by GMX on Arbitrum | string | | `https://arbitrum-api.gmxinfra.io/tokens` | |
| 28 | +| | BOTANIX_TOKENS_INFO_URL | URL to token metadata supported by GMX on Botanix | string | | `https://botanix-api.gmxinfra.io/tokens` | |
| 29 | +| | AVALANCHE_TOKENS_INFO_URL | URL to token metadata supported by GMX on Avalanche | string | | `https://avalanche-api.gmxinfra.io/tokens` | |
| 30 | +| | ARBITRUM_MARKETS_INFO_URL | URL to market metadata supported by GMX on Arbitrum | string | | `https://arbitrum-api.gmxinfra.io/markets` | |
| 31 | +| | BOTANIX_MARKETS_INFO_URL | URL to market metadata supported by GMX on Botanix | string | | `https://botanix-api.gmxinfra.io/markets` | |
| 32 | +| | AVALANCHE_MARKETS_INFO_URL | URL to market metadata supported by GMX on Avalanche | string | | `https://avalanche-api.gmxinfra.io/markets` | |
| 33 | +| | GLV_INFO_API_TIMEOUT_MS | Timeout for metadata API requests. Distinct from API_TIMEOUT used for provider requests. | number | | `10000` | |
| 34 | +| | METADATA_REFRESH_INTERVAL_MS | How often metadata should be refreshed from GMX APIs | number | | `10800000` | |
| 35 | +| ✅ | PNL_FACTOR_TYPE | PnL factor type. See https://github.com/gmx-io/gmx-synthetics#market-token-price | string | | `MAX_PNL_FACTOR_FOR_TRADERS` | |
| 36 | +| | BACKGROUND_EXECUTE_MS | The amount of time the background execute should sleep before performing the next request | number | | `10000` | |
| 37 | + |
| 38 | +--- |
| 39 | + |
| 40 | +## Data Provider Rate Limits |
| 41 | + |
| 42 | +There are no rate limits for this adapter. |
| 43 | + |
| 44 | +--- |
| 45 | + |
| 46 | +## Input Parameters |
| 47 | + |
| 48 | +| Required? | Name | Description | Type | Options | Default | |
| 49 | +| :-------: | :------: | :-----------------: | :----: | :------------------------------------------------------------------------------------------------------------------------------------------: | :--------: | |
| 50 | +| | endpoint | The endpoint to use | string | [crypto-lwba](#glv-price-endpoint), [glv-crypto-lwba](#glv-price-endpoint), [glv-price](#glv-price-endpoint), [gm-price](#gm-price-endpoint) | `gm-price` | |
| 51 | + |
| 52 | +## Gm-price Endpoint |
| 53 | + |
| 54 | +`gm-price` is the only supported name for this endpoint. |
| 55 | + |
| 56 | +### Input Params |
| 57 | + |
| 58 | +| Required? | Name | Aliases | Description | Type | Options | Default | Depends On | Not Valid With | |
| 59 | +| :-------: | :----: | :-----: | :----------------------------------------------------------------------------------: | :----: | :--------------------------------: | :--------: | :--------: | :------------: | |
| 60 | +| ✅ | index | | Index token. Long and short tokens will be opened / closed based on this price feed. | string | | | | | |
| 61 | +| ✅ | long | | Long token. This is the token that will back long positions. | string | | | | | |
| 62 | +| ✅ | short | | Short token. This is the token that will back short positions. | string | | | | | |
| 63 | +| ✅ | market | | Market address of the market pool. | string | | | | | |
| 64 | +| | chain | | Target chain for GM market | string | `arbitrum`, `avalanche`, `botanix` | `arbitrum` | | | |
| 65 | + |
| 66 | +### Example |
| 67 | + |
| 68 | +Request: |
| 69 | + |
| 70 | +```json |
| 71 | +{ |
| 72 | + "data": { |
| 73 | + "endpoint": "gm-price", |
| 74 | + "index": "LINK", |
| 75 | + "long": "LINK", |
| 76 | + "short": "USDC", |
| 77 | + "market": "0x7f1fa204bb700853D36994DA19F830b6Ad18455C", |
| 78 | + "chain": "arbitrum" |
| 79 | + } |
| 80 | +} |
| 81 | +``` |
| 82 | + |
| 83 | +--- |
| 84 | + |
| 85 | +## Glv-price Endpoint |
| 86 | + |
| 87 | +Supported names for this endpoint are: `crypto-lwba`, `glv-crypto-lwba`, `glv-price`. |
| 88 | + |
| 89 | +### Input Params |
| 90 | + |
| 91 | +| Required? | Name | Aliases | Description | Type | Options | Default | Depends On | Not Valid With | |
| 92 | +| :-------: | :---: | :-----: | :-------------------------: | :----: | :--------------------------------: | :--------: | :--------: | :------------: | |
| 93 | +| ✅ | glv | | Glv address | string | | | | | |
| 94 | +| | chain | | Target chain for GLV market | string | `arbitrum`, `avalanche`, `botanix` | `arbitrum` | | | |
| 95 | + |
| 96 | +### Example |
| 97 | + |
| 98 | +Request: |
| 99 | + |
| 100 | +```json |
| 101 | +{ |
| 102 | + "data": { |
| 103 | + "endpoint": "glv-price", |
| 104 | + "glv": "0x528A5bac7E746C9A509A1f4F6dF58A03d44279F9", |
| 105 | + "chain": "arbitrum" |
| 106 | + } |
| 107 | +} |
| 108 | +``` |
| 109 | + |
| 110 | +--- |
| 111 | + |
| 112 | +MIT License |
0 commit comments