FlatQube
▶️ App🔩 Sources💬 Community🔒 Audit
  • Welcome to FlatQube
  • 👨‍💻Use
    • Getting started
      • How it works
      • Roles
      • How to connect a wallet
      • Glossary
      • Everscale
      • How to get EVER
    • Swap
      • Interface
        • Basic swap
      • How to
        • Make a basic swap
        • Use limit trading
        • Configure slippage tolerance
        • Use cross-exchange
      • Concepts
        • Limit orders
        • Slippage tolerance
        • Fees
        • Price impact
        • Cross-exchange
    • Tokens
      • Interface
        • All tokens
        • Token page
          • Price
          • TVL
          • Trading volume
          • Pairs
          • Transactions
          • Open in explorer
      • How to
        • Upgrade token(s)
        • Add custom token
      • Concepts
        • Tokens we use
        • EVER and wEVER
        • Token lists
    • Pools
      • Interface
        • All pools
        • Pool page
      • How to
        • Connect DEX account
        • Add liquidity (Get LP tokens) / Withdraw liquidity
        • Create a new pool
        • Calculate the amount of LP tokens
      • Pool economics
    • Farming
      • New farming
        • Interface
          • Farming pools
          • Farming page (user)
            • Farming performance and deposits
            • Statistics
            • Farming speed and vesting
            • Transactions
          • Farm page (administrator)
        • How to
          • Claim reward
          • Deposit/Withdraw farm tokens
          • Get a boost
          • Create and manage your farming pool
      • Old farming
        • Interface
          • Farming pools
          • Farm page (user)
            • Farming perfomance and balances
            • Statistics
            • Farming speed
            • Farm information
            • Transactions
          • Farm page (administrator)
        • How to
          • Claim reward
          • Deposit farm tokens
          • Withdraw farm tokens
          • See farming performance
          • Find my transactions
      • Concepts
        • Yield farming
        • Reward distribution
        • Vesting
        • Farming token
        • Boosted farming
        • Pool share
    • DAO
      • Interface
        • DAO page
        • DAO balance
        • Epoch
      • How to
        • Lock tokens
        • Vote in Epoch
        • Get a boost
        • Become a candidate
      • Concept
        • DAO
        • veQUBE
        • Epoch
        • Boosted farming
        • FAQ
    • Token builder
      • Interface
        • Explorer
        • Token page
      • How to
        • Create new token
        • Mint tokens
        • Burn tokens
        • Transfer ownership
  • ⚒️Integrate
    • Open API
      • FlatQube DEX Indexer
        • CMC API
        • Currencies API
        • Pairs API
        • Transactions API
      • FlatQube Farming Indexer
        • Farming pools API
        • Transactions API
        • Graphics API
    • Smart contracts
      • DexAccount
      • DexPair
      • DexPlatform
      • DexRoot
      • DexVault
      • DexVaultLpTokenPending
      • EverToTip3
      • EverWeverToTip3
      • Tip3ToEver
      • TokenFactory
  • ↗️See also
    • EVER Wallet
    • Octus Bridge
    • Platform products
    • Broxus Github
Powered by GitBook
On this page
  • Farming pool TVL graphic data
  • Request parameters
  • Response field explanation
  • Example
  • Farming pool APR graphic data
  • Request parameters
  • Response field explanation
  • Example

Was this helpful?

  1. Integrate
  2. Open API
  3. FlatQube Farming Indexer

Graphics API

Farming pool TVL graphic data

POST http://farming.flatqube.io/v1/graphic/tvl

[
    {
        "data": "19315318.324282999059",
        "timestamp": 1652853600000
    },
...
]

This method gets farming pool TVL graphic data.

It can be used for graphic representation of total value locked - TVL (in USD) change for the desired period of time. Data required for the request is the farming pool address and the timespan for following the change of total value locked, which is set through the body of the request.

Request parameters

Body required. Data used for postman tests:

Filen name
Example value
Comment

farmingPoolAddress

0:39c1ba1305438e59c444267f8887d3ceb7312ab906760b8b891c865217ea8ff0

address of the desired farming pool

from

1646741858511

date time in UNIX format that represents start of desired timespan

timeframe

H1

step of the desired timespan, can be set as hours, days

to

1647346658513

date time in UNIX format representing the end of desired timespamp

Response field explanation

Field name
Example value
Comment

data

19315318.324282999059

total balance (in USD) in one farming pool in a concrete moment

timestamp

1652853600000

date time in UNIX format of a concrete moment in which the data is retrieved

Example

 app.post('/graphic/tvl', (req, res) => {
 
    axios({
        method: 'post',
        url: `${liveApiUrl}/graphic/tvl`,
        data: {
            farmingPoolAddress: req.body.farmingPoolAddress,
            from: req.body.from,
            timeframe: req.body.timeframe,
            to: req.body.to
          }
        })
    .then(function(response){
        res.send(response.data)
    })
    .catch(function(error){
        console.error(error)
        res.send('Error')
    })
  })

Farming pool APR graphic data

POST http://farming.flatqube.io/v1/graphic/apr

[
    {
        "data": "74.5300",
        "timestamp": 1652878800000
    },
    ...
]

This method gets a farming pool APR graphic data.

It can be used for graphic representation of Annual Percentage Rate - APR (percentage) change for the desired period of time. Data required for the request is the farming pool address and the timespan for following the annual percentage rate change, which is set through the body of the request.

Request parameters

Body required. Data used for postman tests:

Field name
Example value
Comment

farmingPoolAddress

0:39c1ba1305438e59c444267f8887d3ceb7312ab906760b8b891c865217ea8ff

address of the desired farming pool

from

1646741858511

date time in UNIX format that represents start of desired timespan

timeframe

H1

step of the desired timespan, can be set as hours, days

to

1647346658513

date time in UNIX format representing the end of desired timespan

Response field explanation

Field name
Example value
Comment

data

74.5300

APR (percentage) in one farming pool in a concrete moment

timestamp

1652878800000

date time in UNIX format of a concrete moment in which the data is retrieved

Example

 app.post('/graphic/apr', (req, res) => {
 
    axios({
        method: 'post',
        url: `${liveApiUrl}/graphic/apr`,
        data: {
            farmingPoolAddress: req.body.farmingPoolAddress,
            from: req.body.from,
            timeframe: req.body.timeframe,
            to: req.body.to
          }
        })
    .then(function(response){
        res.send(response.data)
    })
    .catch(function(error){
        console.error(error)
        res.send('Error')
    })
  })
PreviousTransactions APINextSmart contracts

Last updated 2 years ago

Was this helpful?

⚒️