Hydra DEX API
Summary
The public GET request endpoints are intended to allow access to market data. Endpoints return results in JSON format. HydraDex-Info uses GraphQL as query language and technology.
Hydradex.org's API can be accessed via https://info.hydradex.org/graphql
You can access the web-app for testing and for exploring the schema, and you can also directly send POST requests to interact with the public API.
Complete Schema
The API follows the same standard as Uniswap v.2 Subgraph Public API. You can access the DOCS and Schema by playing with the GraphQL public web-app, or refer to the following list:
Endpoint Overview
Name | Category | Description |
Indexing Status for Current Version | Health status for the graph server | |
Blocks | General block information and hydra price by block or timestamp | |
Bundles | Current hydra price (or by block number) | |
Burns | General information about liquidity burns on the exchange | |
Factories | General information about Hydra DEX factory like current volume, liqudity and pair numbers (up to two weeks history) | |
Day Data | Information about Hydra DEX factory by day, like daily volume, daily transactions count and liquidity | |
Mints | General information about the liquidity mint history on the exchange | |
Pairs | Information about Hydra DEX pairs like addresses, tokens a pair consist of, token reserves, token prices, volume etc... (up to one week) | |
Pair Day Data | Information about Hydra DEX pairs for particular days | |
Swaps | General information about token swaps on the exchange | |
Tokens | Information about pair tokens like address, symbol, decimals, total transaction count from the exchange pairs, total supply, trade volume etc... for current time or over last 2 days | |
Token Day Data | Information about a token pair for particular days | |
Transactions | General information about last 'x' number of swap, burn or mint transactions on Hydra DEX | |
Liqudity Positions | Information about top addresses liquidity positions on Hydra DEX pairs |
Summary Endpoint
IndexingStatusForCurrentVersion
Name | Type | Description |
data | Object | Default GraphQL response object |
indexingStatusForCurrentVersion | Object | Name of GraphQL request query |
synced | string | Health status of server: – healthy – server has all the information till current moment and its ready for work. – unhealthy - server is still syncing or failed to sync for some reason. |
chains | Array | Current chain head block and server last block synced |
Endpoint A1 (Blocks)
Parametes:
Name | Type | Description |
where.timestamp_gt | int | Look for block greated than timestamp |
where.timestamp_lt | int | Look for block lesser than timestamp |
first | int | First 'x' number of block that is found |
orderBy | string | Ordered by some field (usualy block number) |
orderDirection | string | Order direction of blocks of returned responce |
Blocks response descriptions:
Name | Type | Description |
data | Object | Default GraphQL response object |
blocks | Object | Name of GraphQL request query |
id | string | Unique hash value of a block |
number | number | Block height in the blockchain |
timestamp | decimal | Timestamp of block mined time |
hydraPrice | string | Hydra price for block number |
Endpoint A2 (Bundles)
Parameters:
Name | Type | Description |
block.number | int | Look for bundle by block number |
where.id | string | Always value of 1 |
Bundles responce description:
Name | Type | Description |
data | Object | Default GraphQL response object |
bundles | Object | Name of GraphQL request query |
id | string | Bundle id – it is constant (always equals to 1) |
hydraPrice | string | Current Hydra price or by block number |
Endpoint A3 (Burns)
Parameters:
Name | Type | Description |
where.pair_in | string | Look for burns that happened in a perticular pair |
first | int | First 'x' number of burns that is found
|
orderBy | string | Ordered by some field |
orderDirection | string | Order direction of returned responce |
Burns response descriptions.
Name | Type | Description |
data | Object | Default GraphQL response object |
burns | Array | Name of GraphQL request query |
transaction | Object | Transaction object with metadata for it like unique hash and timestamp |
txHash | string | Hash of burn transaction |
timestamp | int | Timestamp of burn transaction |
pair | Object | Tokens pair/pool in which the burn transaction is linked to |
token0 | Object | One of the two tokens of which the pair/pool is created from |
token1 | Object | Second token of wihich the pair/pool is created from |
tokenAddress | string | Blockchain address of the deployed HRC20 token |
symbol | string | Symbol abbreviation of the deployed HRC20 token |
sender | string | Address of the user who has executed the burn transaction |
liquidity | string | Amount of LP tokens sent by the sender address to pair address to be burned |
amount0 | string | Amount of token0 to be released by pair address and sent to sender address |
amount1 | string | Amount of token1 to be released by pair address and sent to sender address |
amountUSD | string | Amount of tokens converted to USD |
Endpoint A4 (Factories)
Parameters:
Name | Type | Description |
block.number | int | Looks for factory data by block number |
where.id | int | Looks for factory by its contract address |
Factories response descriptions:
Name | Type | Description |
data | Object | Default GraphQL response object |
hydraswapFactories | Array | Array that holds Hydra DEX Factory data information object on index 0 |
id | string | Contract address of the deployed factory |
totalVolumeUSD | string | Total volume converted to USD that passed through factory pairs/pools till current moment or given block number |
totalVolumeHYDRA | string | Total volume converted to HYDRA that passed through factory pairs/pools till current moment or given block number |
untrackedVolumeUSD | string | Untracked volume converted to USD that passed through factory pairs/pools till current moment or given block number |
totalLiquidityUSD | string | Total liqudity converted to USD that factory pairs/pools hold till current moment or given block number |
totalLiquidityHYDRA | string | Total liqudity converted to HYDRA that factory pairs/pools hold till current moment or given block number |
txCount | string | Total transactions count that went through factory pairs/pools till current moment or given block number |
pairCount | string | Total pairs/pools count that factory holds till current moment or given block number |
Endpoint A5 (Day Data)
Parameters:
Name | Type | Description |
first | int | First 'x' number of day data that is found
|
skip | int | Skips 'x' number of day data |
orderBy | string | Ordered by some field |
orderDirection | string | Order direction of returned responce |
Factories response description:
Name | Type | Description |
data | Object | Default GraphQL response object
|
hydraswapDayDatas | Array | Array that holds Hydra DEX Day Data information objects by day |
id | string | Day id composed of transaction timestamp diveded by 86400 and rounded to integer |
date | int | Start of the day timestamp |
totalVolumeUSD | string | Total volume converted in USD passed through Hydra DEX factory till current day |
dailyVolumeUSD | string | Daily volume converted in USD passed through Hydra DEX factory |
dailyVolumeHYDRA | string | Daily volume converted in HYDRA passed through Hydra DEX factory |
totalLiqudityUSD | string | Total liquidity converted in USD tha Hydra DEX factory pairs hold till current day |
totalLiqudityHYDRA | string | Total liquidity converted in HYDRA that Hydra DEX factory pairs hold till current day |
Endpoint A6 (Mints)
Parameters:
Name | Type | Description |
first | int | First 'x' number of mints that are found
|
where.pairs_in | Array | Array of pair addresses to check mints from |
orderBy | string | Ordered by some field |
orderDirection | string | Order direction of returned responce |
Mints response description:
Name | Type | Description |
data | Object | Default GraphQL response object |
mints | Array | Name of GraphQL request query |
transaction | Object | Transaction object with metadata for it like unique hash and timestamp |
txHash | string | Hash of mint transaction |
timestamp | int | Timestamp of mint transaction |
pair | Object | Tokens pair/pool in which the mint transaction is linked to |
token0 | Object | One of the two tokens of which the pair/pool is created from |
token1 | Object | Second token of wihich the pair/pool is created from |
tokenAddress | string | Blockchain address of the deployed HRC20 token |
symbol | string | Symbol abbreviation of the deployed HRC20 token |
to | string | Address of the user who has recieved the LP tokens |
liquidity | string | Amount of newly minted LP tokens recieved by the user address from pair address |
amount0 | string | Amount of token0 to be locked in pair address by user address |
amount1 | string | Amount of token1 to be locked in pair address by user address |
amountUSD | string | Amount of tokens converted to USD |
Endpoint A7 (Pairs)
Parameters:
Name | Type | Description |
first | int | First 'x' number of pairs that are found
|
skip | int | Skips 'x' number of pairs |
where.id_in | Array | Array of pair addresses to get information for |
where.id | string | Single pair address to get information for |
where.token0 | string | Single token address that pairs should hold as token0 in the contract |
where.token1 | string | Single token address that pairs should hold as token1 in the contract |
where.token0_in | Array | Array of token addresses that pairs should hold as token0 in the contract |
where.token1_in | Array | Array of token addresses that pairs should hold as token1 in the contract |
orderBy | string | Ordered by some field |
orderDirection | string | Order direction of returned responce |
block.number | int | Looks for pairs data by block number |
Pairs response description:
Name | Type | Description |
data | Object | Default GraphQL response object |
pairs | Array | Name of GraphQL request query |
pairAddress | string | Address of the deployed Hydra DEX pair contract |
txCount | int | Total transaction count of a pair till current moment or by block number |
transaction | Object | Transaction object with metadata for it like unique hash and timestamp |
txHash | string | Hash of pair transaction |
token0 | Object | One of the two tokens of which the pair/pool is created from |
token1 | Object | Second token of wihich the pair/pool is created from |
tokenAddress | string | Blockchain address of the deployed HRC20 token |
symbol | string | Symbol abbreviation of the deployed HRC20 token |
name | string | Full name of the deployed HRC20 token |
totalLiquidity | string | Total liquidity for current pair of the HRC20 token |
derivedHydra | string | Price of the HRC20 token converted to HYDRA |
reserve0 | string | Reserve of pair's token0 till current time or by block number |
reserve1 | string | Reserve of pair's token1 till current time or by block number |
reserveUSD | string | Reserves of both tokens converted to USD |
totalSupply | string | Total supply that a pair holds till current moment or by block number |
volumeUSD | string | Volume of a pair converted in USD till current moment or by block number |
untrackedVolumeUSD | string | Untracked volume of a pair converted in USD till current moment or by block number |
token0Price | string | Price of token0 converted to amount of token1 |
token1Price | string | Price of token1 converted to amount of token0 |
createdAtTimestamp | int | Tmestamp of the pair's deployment |
Endpoint A8 (Day Pair Data)
Parameters:
Name | Type | Description |
first | int | First 'x' number of day datas that are found
|
skip | int | Skips 'x' number of day datas that are found |
where.pairAddress | string | Looks for day datas of pair address |
orderBy | string | Ordered by some field |
orderDirection | string | Order direction of returned responce |
Pair Day Data response description:
Name | Type | Description |
data | Object | Default GraphQL response object |
pairDayDatas | Array | Name of GraphQL request query |
id | String | Consist of pair address concatinated with '-' and day id composed of transaction timestamp diveded by 86400 and rounded to integer |
date | int | Start of the day timestamp |
dailyVolumeToken0 | string | Daily volume the token sitting at token0 position in a pair |
dailyVolumeToken1 | string | Daily volume the token sitting at token1 position in a pair |
dailyVolumeUSD | string | Daily volume of both tokens converted in USD |
reserveUSD | string | Total reserves of a pair converted in USD |
Endpoint A9 (Swaps)
Parameters:
Name | Type | Description |
first | int | First 'x' number of swaps that are found
|
where.pair_in | Array | Array of pair addresses to check swaps from |
orderBy | string | Ordered by some field |
orderDirection | string | Order direction of returned responce |
Name | Type | Description |
data | Object | Default GraphQL response object |
swaps | Array | Name of GraphQL request query |
transaction | Object | Transaction object with metadata for it like unique hash and timestamp |
txHash | string | Hash of swap transaction |
timestamp | int | Timestamp of swap transaction |
pair | Object | Tokens pair/pool in which the swap transaction is linked to |
token0 | Object | One of the two tokens of which the pair/pool is created from |
token1 | Object | Second token of wihich the pair/pool is created from |
tokenAddress | string | Blockchain address of the deployed HRC20 token |
symbol | string | Symbol abbreviation of the deployed HRC20 token |
to | string | Address of the user who executed the swap transaction |
amount0In | string | Amount of token0 sent from user to pair |
amount0Out | string | Amount of token0 sent from pair to user |
amount1In | string | Amount of token1 sent from user to pair |
amount1Out | string | Amount of token1 sent from pair to user |
amountUSD | string | Amount of swap converted in USD |
Endpoint A10 (Tokens)
Parameters:
Name | Type | Description |
first | int | First 'x' number of tokens that are found |
skip | int | Skips 'x' number of tokens |
where.id_in | Array | Array of token addresses to get information for |
where.id | string | Single token address to get information for |
where.symbol_contains | string | Full or part of token's symbol to get information for |
where.name_cointains | string | Full or part of token's name to get information for |
orderBy | string | Ordered by same field |
orderDirection | string | Order direction of returned responce |
block.number | int | Looks for token data by block number |
Name | Type | Description |
data | Object | Default GraphQL response object |
tokens | Array | Name of GraphQL request query |
id | string | Address of deployed HRC20 token |
name | string | Full name of deployed HRC20 token |
symbol | string | Symbol abbreviation of the deployed HRC20 token |
derivedHYDRA | string | Token price converted in HYDRA |
tradeVolume | string | Trade volume of a token in all Hydra DEX pairs till current moment or by block number |
tradeVolumeUSD | string | Trade volume of a token in all Hydra DEX pairs converted in USD till current moment or by block number |
untrackedVolumeUSD | string | Untracked volume of a token in all Hydra DEX pairs converted in USD till current moment or by block number |
totalLiquidity | string | Total liquidity of a token in all Hydra DEX pairs till current moment or by block number |
txCount | int | Total transaction count of a token in all Hydra DEX pairs till current moment or by block number |
Endpoint A11 (Token Day Data)
Parameters:
Name | Type | Description |
first | int | First 'x' number of day datas that are found
|
skip | int | Skips 'x' number of day datas |
where.token | string | Single token address to get information for its day data |
where.date_gt | string | Date timestamp to get day datas greater then |
orderBy | string | Ordered by some field |
orderDirection | string | Order direction of returned responce |
Name | Type | Description |
data | Object | Default GraphQL response object |
tokenDayDatas | Array | Name of GraphQL request query |
id | string | Consist of token address concatinated with '-' and day id composed of transaction timestamp diveded by 86400 and rounded to integer |
date | int | Start of the day timestamp |
priceUSD | string | Price of a token for given day converted in USD |
totalLiqudityToken | string | Total liqudity of a token in all Hydra DEX pairs for a given day |
totalLiqudityUSD | string | Total liqudity of a token converted in USD in all Hydra DEX pairs for a given day |
totalLiqudityHYDRA | string | Total liqudity of a token converted in HYDRA in all Hydra DEX pairs for a given day |
dailyVolumeToken | string | Daily volume of a token in all Hydra DEX pairs for a given day |
dailyVolumeUSD | string | Daily volume of a token converted in USD in all Hydra DEX pairs for a given day |
dailyVolumeHYDRA | string | Daily volume of a token converted in HYDRA in all Hydra DEX pairs for a given day |
Endpoint A12 (Transactions)
Parameters:
Name | Type | Description |
first | int | First 'x' number of transactions that are found
|
orderBy | string | Ordered by some field |
orderDirection | string | Order direction of returned responce |
Name | Type | Description |
data | Object | Default GraphQL response object |
transactions | Array | Name of GraphQL request query |
mints | Array | Array of Mint objects – ENDPOINT A6 |
burns | Array | Array of Burn objects – ENDPOINT A3 |
swaps | Array | Array of Burn objects – ENDPOINT A9 |
Endpoint A13 (Liquidity)
In works
Last updated