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:

// type User {
  id: String!
  liquidityPositions: [String!]!
  usdSwapped: BigGQL!
}

# The `BigGQL` scalar type to represent currency values
scalar BigGQL

type Token {
  id: String!
  tokenAddress: String!
  symbol: String!
  name: String!
  decimals: Int!
  totalSupply: Int!
  tradeVolume: BigGQL!
  tradeVolumeUSD: BigGQL!
  untrackedVolumeUSD: BigGQL!
  txCount: Int!
  totalLiquidity: BigGQL!
  derivedHYDRA: BigGQL!
}

type Pair {
  id: String!
  pairAddress: String
  token0: Token!
  token1: Token!
  reserve0: BigGQL!
  reserve1: BigGQL!
  totalSupply: BigGQL!
  reserveHYDRA: BigGQL!
  reserveUSD: BigGQL!
  trackedReserveHYDRA: BigGQL!
  token0Price: BigGQL!
  token1Price: BigGQL!
  volumeToken0: BigGQL!
  volumeToken1: BigGQL!
  volumeUSD: BigGQL!
  untrackedVolumeUSD: BigGQL!
  txCount: Int!
  createdAtTimestamp: Int!
  createdAtBlockNumber: Int!
  liquidityProviderCount: Int!
  _oneDayVolumeUSD: BigGQL!
  _oneWeekVolumeUSD: BigGQL!
}

type Burn {
  id: String!
  transactionHash: String!
  transaction: Transaction!
  timestamp: Int!
  pair: Pair
  liquidity: BigGQL!
  sender: String!
  amount0: BigGQL!
  amount1: BigGQL!
  to: String!
  logIndex: Int!
  amountUSD: BigGQL!
  needsComplete: Boolean!
  feeTo: String!
  feeLiquidity: BigGQL!
}

type Mint {
  id: String!
  transactionHash: String!
  transaction: Transaction!
  timestamp: Int!
  pair: Pair!
  to: String!
  liquidity: BigGQL!
  sender: String!
  amount0: BigGQL!
  amount1: BigGQL!
  amountUSD: BigGQL!
  logIndex: Int!
  feeTo: BigGQL!
  feeLiquidity: BigGQL!
}

type Transaction {
  id: String!
  txHash: String!
  blockNumber: Int!
  timestamp: Int!
  mints: [Mint!]!
  burns: [Burn!]!
  swaps: [Swap!]!
}

type Swap {
  id: String!
  transactionHash: String!
  transaction: Transaction!
  timestamp: Int!
  pair: Pair
  sender: User!
  from: String!
  amount0In: BigGQL!
  amount1In: BigGQL!
  amount0Out: BigGQL!
  amount1Out: BigGQL!
  logIndex: Int!
  to: String!
  amountUSD: BigGQL!
}

type Block {
  hash: String!
  height: Int!
  timestamp: Int!
  timestamp_from: Int
  id: String
  number: Int
}

type Bundle {
  id: String!
  hydraPrice: BigGQL!
}

type LiquidityPosition {
  id: String!
  user: User!
  pair: Pair!
  liquidityTokenBalance: BigGQL!
}

type LiquidityPositionSnapshot {
  id: String!
  liquidityPosition: LiquidityPosition!
  timestamp: Int!
  block: Int!
  user: User!
  pair: Pair!
  token0PriceUSD: BigGQL!
  token1PriceUSD: BigGQL!
  reserve0: BigGQL!
  reserve1: BigGQL!
  reserveUSD: BigGQL!
  liquidityTokenTotalSupply: BigGQL!
  liquidityTokenBalance: BigGQL!
}

type PairDayData {
  id: String!
  date: Int!
  pair: Pair!
  token0: Token!
  token1: Token!
  reserve0: BigGQL!
  reserve1: BigGQL!
  totalSupply: BigGQL!
  reserveUSD: BigGQL!
  dailyVolumeToken0: BigGQL!
  dailyVolumeToken1: BigGQL!
  dailyVolumeUSD: BigGQL!
  dailyTxns: Int!
}

type PairHourData {
  id: String!
  hourStartUnix: Int!
  pair: Pair!
  reserve0: BigGQL!
  reserve1: BigGQL!
  totalSupply: BigGQL!
  reserveUSD: BigGQL!
  hourlyVolumeToken0: BigGQL!
  hourlyVolumeToken1: BigGQL!
  hourlyVolumeUSD: BigGQL!
  hourlyTxns: Int!
}

type TokenDayData {
  id: String!
  date: Int!
  token: Token!
  dailyVolumeToken: BigGQL!
  dailyVolumeHYDRA: BigGQL!
  dailyVolumeUSD: BigGQL!
  dailyTxns: Int!
  totalLiquidityToken: BigGQL!
  totalLiquidityHYDRA: BigGQL!
  totalLiquidityUSD: BigGQL!
  priceUSD: BigGQL!
}

type Factory {
  id: String!
  factoryAddress: String!
  pairCount: Int!
  totalVolumeUSD: BigGQL!
  totalVolumeHYDRA: BigGQL!
  untrackedVolumeUSD: BigGQL!
  totalLiquidityUSD: BigGQL!
  totalLiquidityHYDRA: BigGQL!
  txCount: Int!
}

type HydraswapDayData {
  id: String!
  date: Int!
  dailyVolumeHYDRA: BigGQL!
  dailyVolumeUSD: BigGQL!
  dailyVolumeUntracked: BigGQL!
  totalVolumeHYDRA: BigGQL!
  totalLiquidityHYDRA: BigGQL!
  totalVolumeUSD: BigGQL!
  totalLiquidityUSD: BigGQL!
  txCount: Int!
}

type SubgraphIndexingStatus {
  health: String!
  synced: Boolean!
  chains: [HydraIndexingStatus!]!
}

type HydraIndexingStatus {
  chainHeadBlock: Block!
  latestBlock: Block!
}

type Query {
  pairs(
    block: ListPairBlockInput
    where: ListPairInput
    orderDirection: String
    orderBy: String
    skip: Int
    first: Float
  ): [Pair!]!
  pair(block: ListPairBlockInput, id: String!): Pair!
  blocks(
    orderDirection: String!
    orderBy: String!
    first: Float!
    where: ListBlockInput!
  ): [Block!]
  getTokens: [Token!]!
  token(block: ListTokenBlockInput, id: String!): Token!
  tokens(
    orderDirection: String
    orderBy: String
    block: ListTokenBlockInput
    where: ListTokenInput
    skip: Int
    first: Float
  ): [Token!]!
  getLiquidityPositionById(id: String!): LiquidityPosition!
  getLiquidityPositionByUser(userAddress: String!): [LiquidityPosition!]!
  liquidityPositions(
    first: Int!
    orderDirection: String!
    orderBy: String!
    where: ListLiquidityPositionsInput!
  ): [LiquidityPosition!]!
  liquidityPositionSnapshots: [LiquidityPositionSnapshot!]!
  getSnapshotsByLiquidityPosition(
    liquidityPosition: String!
  ): [LiquidityPositionSnapshot!]!
  getSnapshotsByPair(pairAddress: String!): [LiquidityPositionSnapshot!]!
  getSnapshotsByUser(userAddress: String!): [LiquidityPositionSnapshot!]!
  users: [User!]!
  bundle(block: ListBundleBlockInput, id: String!): Bundle!
  bundles(where: ListBundleInput!, block: ListBundleBlockInput): [Bundle!]!
  getPairDayDataById(id: String!): [PairHourData!]!
  getPairDayDataByPair(pairAddress: String!): [PairHourData!]!
  getPairDayDataByDay(day: String!): [PairDayData!]!
  getPairDayDataByToken(token: String!): [PairDayData!]!
  pairDayDatas(
    where: ListPairDayDataInput!
    orderDirection: String!
    orderBy: String!
    skip: Int
    first: Float!
  ): [PairDayData!]!
  getTokenDayData: [TokenDayData!]!
  getTokenDayDataByToken(tokenAddress: String!): [TokenDayData!]!
  tokenDayDatas(
    where: ListTokenDayDataInput!
    orderDirection: String!
    orderBy: String!
    skip: Int
    first: Float!
  ): [TokenDayData!]!
  getPairHourDatas: [PairHourData!]!
  getPairDayDataByHour(hour: String!): [PairHourData!]!
  getPairDayDataByHourStartUnix(hourStartUnix: String!): [PairHourData!]!
  getMints: [Mint!]!
  getMintByTx(txHash: String!): Mint!
  mints(
    where: ListMintInput
    orderDirection: String!
    orderBy: String!
    first: Float!
  ): [Mint!]!
  getTransactions: [Transaction!]!
  getTransactionByTxHash(txHash: String!): Transaction!
  getTransactionsByBlockNumber(blockNumber: String!): [Transaction!]!
  transactions(
    orderDirection: String!
    orderBy: String!
    first: Float!
  ): [Transaction!]!
  getBurns: [Burn!]!
  getBurnByTx(txHash: String!): Burn!
  burns(
    where: ListBurnInput
    orderDirection: String!
    orderBy: String!
    first: Float!
  ): [Burn!]!
  swaps(
    where: ListSwapInput
    orderDirection: String!
    orderBy: String!
    first: Float!
  ): [Swap!]!
  getSwapByTx(txHash: String!): [Swap!]!
  getSwapByPair(pairAddress: String!): [Swap!]!
  getSwapByUser(userAddress: String!): [Swap!]!
  factories: [Factory!]!
  getFactoryByAddress(address: String!): Factory!
  hydraswapFactories(
    where: ListFactoryInput!
    block: ListFactoryBlockInput
  ): [Factory!]!
  getHydraswapDayDatas: [HydraswapDayData!]!
  getHydraswapDayDataByDate(date: String!): HydraswapDayData!
  getHydraswapDayDataById(id: String!): HydraswapDayData!
  hydraswapDayDatas(
    orderDirection: String!
    orderBy: String!
    where: ListHydraswapDayDataInput!
    skip: Int!
    first: Int!
  ): [HydraswapDayData!]!
  indexingStatusForCurrentVersion: SubgraphIndexingStatus!
}

input ListPairBlockInput {
  number: Float!
}

input ListPairInput {
  id_in: [String!]
  id: String
  token0: String
  token1: String
  token0_in: [String!]
  token1_in: [String!]
}

input ListBlockInput {
  timestamp_gt: Int!
  timestamp_lt: Int!
}

input ListTokenBlockInput {
  number: Float!
}

input ListTokenInput {
  id_in: [String!]
  id: String
  symbol_contains: String
  name_contains: String
}

input ListLiquidityPositionsInput {
  pair: String!
}

input ListBundleBlockInput {
  number: Int!
}

input ListBundleInput {
  id: String!
}

input ListPairDayDataInput {
  pairAddress: String
}

input ListTokenDayDataInput {
  date_gt: String
  token: String
}

input ListMintInput {
  pair_in: [String!]
}

input ListBurnInput {
  pair_in: [String!]
}

input ListSwapInput {
  pair_in: [String!]
}

input ListFactoryInput {
  id: String!
}

input ListFactoryBlockInput {
  number: Float!
}

input ListHydraswapDayDataInput {
  date_gt: Int!
}

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

{
    "data": {
        "indexingStatusForCurrentVersion": {
            "synced": true,
            "health": "healthy",
            "chains": [
                {
                    "chainHeadBlock": {
                        "number": 241834,
                        "__typename": "Block"
                    },
                    "latestBlock": {
                        "number": 241834,
                        "__typename": "Block"
                    },
                    "__typename": "HydraIndexingStatus"
                }
            ],
            "__typename": "SubgraphIndexingStatus"
        }
    }
}

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

{
    "data": {
        "blocks": [
            {
                "id": "93506568085a1b0f2e6306db826fe5e1d799cde02a4f265855756dba33201e32",
                "number": 241162,
                "timestamp": 1636636320,
	  "hydraPrice": "15.042536939257017",
                "__typename": "Block"
            }
        ]
    }
}

or multiple

{
    "data": {
        "t1636636312": [
            {
                "number": 241184,
                "__typename": "Block"
            }
        ],
        "t1636549912": [
            {
                "number": 240509,
                "__typename": "Block"
            }
        ]
    }
}

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

{
    "data": {
        "bundles": [
            {
                "id": "1",
                "hydraPrice": "15.042536939257017",
                "__typename": "Bundle"
            }
        ]
    }
}

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

{
    "data": {
        "burns": [
            {
                "transaction": {
                    "txHash": "aec9359bfa952259ef33837a6b66a103fd2138e94f0946b1bfa6a940ef8288a6",
                    "timestamp": 1635955696,
                    "__typename": "Transaction"
                },
                "pair": {
                    "token0": {
                        "tokenAddress": "4ab26aaa1803daa638910d71075c06386e391147",
                        "symbol": "LOC",
                        "__typename": "Token"
                    },
                    "token1": {
                        "tokenAddress": "6d9115a21863ce31b44cd231e4c4ccc87566222f",
                        "symbol": "WHYDRA",
                        "__typename": "Token"
                    },
                    "__typename": "Pair"
                },
                "sender": "HHFdtHmnRW6vYxZ5vgAZkdtvtz8xuG6Xk3",
                "liquidity": "6.07223061",
                "amount0": "8.95868882",
                "amount1": "4.14558088",
                "amountUSD": "228.8899858177729923598998904770681",
                "__typename": "Burn"
            }
        ]
    }
}

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

{
    "data": {
        "hydraswapFactories": [
            {
                "id": "5a2a927bea6c5f4a48d4e0116049c1e36d52a528",
                "totalVolumeUSD": "358685.06788043550968532958908",
                "totalVolumeHYDRA": "20020.86112041",
                "untrackedVolumeUSD": "7.411694177004923798240936043590744650931272062038152981943902e+30",
                "totalLiquidityUSD": "178881.19973338456520281651928",
                "totalLiquidityHYDRA": "12482.73786436",
                "txCount": 468,
                "pairCount": 10,
                "__typename": "Factory"
            }
        ]
    }
}

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

{
    "data": {
        "hydraswapDayDatas": [
            {
                "id": "18946",
                "date": 1636934400,
                "totalVolumeUSD": "359861.80719992833508720906516",
                "dailyVolumeUSD": "1176.73931949282540187947608",
                "dailyVolumeHYDRA": "82.30170444",
                "totalLiquidityUSD": "184483.66148170780114863117792",
                "totalLiquidityHYDRA": "12660.88530596",
                "__typename": "HydraswapDayData"
            },
            {
                "id": "18947",
                "date": 1637020800,
                "totalVolumeUSD": "389879.18391747133351371801759",
                "dailyVolumeUSD": "30017.37671754299842650895243",
                "dailyVolumeHYDRA": "2168.65893338",
                "totalLiquidityUSD": "411875.44901453406069810494792",
                "totalLiquidityHYDRA": "30055.64978338",
                "__typename": "HydraswapDayData"
            },
            {
                "id": "18948",
                "date": 1637107200,
                "totalVolumeUSD": "389879.18391747133351371801759",
                "dailyVolumeUSD": "0",
                "dailyVolumeHYDRA": "0",
                "totalLiquidityUSD": "403584.6405452823010114",
                "totalLiquidityHYDRA": "30051.62228582",
                "__typename": "HydraswapDayData"
            }
        ]
    }
}

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

{
    "data": {
        "mints": [
            {
                "transaction": {
                    "txHash": "ee987b550c130ff1945c7fb41e877f9ad9879c8dbb1744a5c720a5f1ad1bcdc9",
                    "timestamp": 1635909376,
                    "__typename": "Transaction"
                },
                "pair": {
                    "token0": {
                        "tokenAddress": "4ab26aaa1803daa638910d71075c06386e391147",
                        "symbol": "LOC",
                        "__typename": "Token"
                    },
                    "token1": {
                        "tokenAddress": "6d9115a21863ce31b44cd231e4c4ccc87566222f",
                        "symbol": "WHYDRA",
                        "__typename": "Token"
                    },
                    "__typename": "Pair"
                },
                "to": "HHFdtHmnRW6vYxZ5vgAZkdtvtz8xuG6Xk3",
                "liquidity": "6.07223061",
                "amount0": "9.28376418",
                "amount1": "3.99999999",
                "amountUSD": "594.7191850797705301743471178534177",
                "__typename": "Mint"
            }
        ]
    }
}

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

{
    "data": {
        "pairs": [
            {
                "pairAddress": "1f487cf98b69d4dc43592bca5b89751c146652ff",
                "txCount": 94,
                "token0": {
                    "tokenAddress": "6d9115a21863ce31b44cd231e4c4ccc87566222f",
                    "symbol": "WHYDRA",
                    "name": "Wrapped Hydra",
                    "totalLiquidity": "3275.92822728",
                    "derivedHYDRA": "1",
                    "__typename": "Token"
                },
                "token1": {
                    "tokenAddress": "7b8dd012ec9e1f11e008376ef21d29ba4cc78e24",
                    "symbol": "GOMT",
                    "name": "GoMeat",
                    "totalLiquidity": "65209.49501157",
                    "derivedHYDRA": "0.13251822883978420769",
                    "__typename": "Token"
                },
                "reserve0": "8641.44678247",
                "reserve1": "65209.49501157",
                "reserveUSD": "347951.7583316664736847482572914729",
                "totalSupply": "95736.74797472",
                "trackedReserveHYDRA": "17282.89356494",
                "reserveHYDRA": "17282.8935649400000001163198329733",
                "volumeUSD": "29155.34392696878264625759235",
                "untrackedVolumeUSD": "9153015.614500110481274498874262316",
                "token0Price": "0.13251822883978420769",
                "token1Price": "7.54613164358700764229",
                "createdAtTimestamp": 1636832048,
                "__typename": "Pair"
            }
        ]
    }
}

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

{
    "data": {
        "pairDayDatas": [
            {
                "id": "dc7ba676dc8ded3b476ee6d25a4571002964321e-18947",
                "date": 1637020800,
                "dailyVolumeToken0": "278.47760389",
                "dailyVolumeToken1": "67.26289722",
                "dailyVolumeUSD": "934.32585451049780660854624",
                "reserveUSD": "282220.6776219950517036714504472221",
                "__typename": "PairDayData"
            },
            {
                "id": "dc7ba676dc8ded3b476ee6d25a4571002964321e-18948",
                "date": 1637107200,
                "dailyVolumeToken0": "162.70434047",
                "dailyVolumeToken1": "40",
                "dailyVolumeUSD": "548.15045022555536",
                "reserveUSD": "270818.7301208406840840287689589212",
                "__typename": "PairDayData"
            }
        ]
    }
}

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

{
    "data": {
        "swaps": [
            {
                "transaction": {
                    "txHash": "17947e682246e296c43486e403fe1c4288d9d27c1c97b057e926311856a52d0e",
                    "timestamp": 1636037536,
                    "__typename": "Transaction"
                },
                "id": "17947e682246e296c43486e403fe1c4288d9d27c1c97b057e926311856a52d0e-0",
                "pair": {
                    "token0": {
                        "tokenAddress": "4ab26aaa1803daa638910d71075c06386e391147",
                        "symbol": "LOC",
                        "__typename": "Token"
                    },
                    "token1": {
                        "tokenAddress": "6d9115a21863ce31b44cd231e4c4ccc87566222f",
                        "symbol": "WHYDRA",
                        "__typename": "Token"
                    },
                    "__typename": "Pair"
                },
                "amount0In": "1500",
                "amount0Out": "0",
                "amount1In": "0",
                "amount1Out": "528.15065251",
                "amountUSD": "6568.55724026305028378063235",
                "to": "H6ssQa8tGEqazq5BbGgaKKAjvCmHgLWMKG",
                "__typename": "Swap"
            }
        ]
    }
}

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

{
    "data": {
        "tokens": [
            {
                "id": "4ab26aaa1803daa638910d71075c06386e391147",
                "name": "LockTrip",
                "symbol": "LOC",
                "derivedHYDRA": "0.24670083962341685214",
                "tradeVolume": "59919.7993523",
                "tradeVolumeUSD": "361249.76600571377050862229743",
                "untrackedVolumeUSD": "4.641666930948025425202765473435793e+25",
                "totalLiquidity": "24627.61879609",
                "txCount": 472,
                "__typename": "Token"
            },
            {
                "id": "6d9115a21863ce31b44cd231e4c4ccc87566222f",
                "name": "Wrapped Hydra",
                "symbol": "WHYDRA",
                "derivedHYDRA": "1",
                "tradeVolume": "22534.01459216",
                "tradeVolumeUSD": "393429.00696961071684379051813",
                "untrackedVolumeUSD": "4.078102090490297843129053769621566e+31",
                "totalLiquidity": "3166.43539335",
                "txCount": 592,
                "__typename": "Token"
            }
        ]
    }
}

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

{
    "data": {
        "tokenDayDatas": [
            {
                "id": "4ab26aaa1803daa638910d71075c06386e391147-18947",
                "date": 1637020800,
                "priceUSD": "4.496803945523902310997723294336857",
                "totalLiquidityToken": "24798.59218395",
                "totalLiquidityUSD": "83962.89571994544054461579985268684",
                "totalLiquidityHYDRA": "6039.164192901680059650670124808",
                "dailyVolumeHYDRA": "67.6474091746756411462788909687",
                "dailyVolumeToken": "278.47760389",
                "dailyVolumeUSD": "1369.195051861220383034884996311406",
                "__typename": "TokenDayData"
            },
            {
                "id": "4ab26aaa1803daa638910d71075c06386e391147-18948",
                "date": 1637107200,
                "priceUSD": "4.491830518875072979303273998973722",
                "totalLiquidityToken": "24627.61879609",
                "totalLiquidityUSD": "83259.31510716658890447419372476519",
                "totalLiquidityHYDRA": "6075.6542349208455050723243401326",
                "dailyVolumeHYDRA": "40.1392974043232820953222081058",
                "dailyVolumeToken": "162.70434047",
                "dailyVolumeUSD": "550.0593485979318175551753679394968",
                "__typename": "TokenDayData"
            }
        ]
    }
}

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

{
    "data": {
        "transactions": [
            {
                "mints": [
                    {
                        "transaction": {
                            "txHash": "4c5e91be0dfa64c6e6885a03edce977827d80e4d79ef877454d90df068a98ad2",
                            "timestamp": 1637027328,
                            "__typename": "Transaction"
                        },
                        "pair": {
                            "token0": {
                                "tokenAddress": "6d9115a21863ce31b44cd231e4c4ccc87566222f",
                                "symbol": "WHYDRA",
                                "__typename": "Token"
                            },
                            "token1": {
                                "tokenAddress": "7b8dd012ec9e1f11e008376ef21d29ba4cc78e24",
                                "symbol": "GOMT",
                                "__typename": "Token"
                            },
                            "__typename": "Pair"
                        },
                        "to": "HLhspJPd76shxFAUCQnxkHafr6MWzPgLv6",
                        "liquidity": "12.12363183",
                        "amount0": "3.99999999",
                        "amount1": "36.88112963",
                        "amountUSD": "387.4988298778651280812833761830751",
                        "__typename": "Mint"
                    }
                ],
                "burns": [],
                "swaps": [],
                "__typename": "Transaction"
            },
            {
                "mints": [],
                "burns": [],
                "swaps": [
                    {
                        "transaction": {
                            "txHash": "b05dbca0ff16fb54ffcc90cd89024566fe96d324ddff69d623696be60f229ba5",
                            "timestamp": 1637024688,
                            "__typename": "Transaction"
                        },
                        "pair": {
                            "token0": {
                                "tokenAddress": "6d9115a21863ce31b44cd231e4c4ccc87566222f",
                                "symbol": "WHYDRA",
                                "__typename": "Token"
                            },
                            "token1": {
                                "tokenAddress": "7b8dd012ec9e1f11e008376ef21d29ba4cc78e24",
                                "symbol": "GOMT",
                                "__typename": "Token"
                            },
                            "__typename": "Pair"
                        },
                        "amount0In": "30.29",
                        "amount0Out": "0",
                        "amount1In": "0",
                        "amount1Out": "279.52827222",
                        "amountUSD": "418.5892011919932964",
                        "to": "HCY4wMv2nFbA6iFy1iUKxT5rRJv6tnLM4f",
                        "__typename": "Swap"
                    }
                ],
                "__typename": "Transaction"
            }
        ]
    }
}

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