Transactions API

Transactions data

POST http://farming.flatqube.io/v1/transactions

{
    "transactions": [
        {
            "messageHash": "254f05f87ae6d283ce7fc3bcb13919e0a35b2781db54e50046bde369d9a47f2d",
            "transactionHash": "760aa87b1fd7bcbbccae87ab52b187238ac91638f132b048380f711f55e17d4a",
            "kind": "Withdraw",
            "userAddress": "0:f1f1158fcf4f0725a5a53c4d1ac1d37583b36eb4e9ab542d3a288424f6762fdd",
            "poolAddress": "0:f96da52e928cf4d8e54dcec0e7f7fefddfb7592590f05705dcaa9f211102fbc5",
            "tokenAddress": "0:0bf177d4dcc468293502ce81fd9a05285f7621814a705a000020dc15fa8258f8",
            "tokenCurrency": "FLATQUBE-LP-QUBE-WEVER",
            "tokenExec": "9926.264109806000",
            "tvExec": "11289.535028128434",
            "leftExec": "117.580203251916",
            "rightExec": "17702.052927191519",
            "timestampBlock": 1650533932000
        }
    ],
    "totalCount": 1
}

This method gets transaction data.

It can be used for showing a list of all desired transactions filtered by request body params such as transaction type, user address, pool address, etc. For example, showing detailed information of all the withdrawal transactions of the specific user.

Required data

Body required. Data used for postman tests:

Response field explanation

Example

 app.post('/transactions', (req, res) => {
 
    axios({
        method: 'post',
        url: `${liveApiUrl}/transactions`,
        data: {
            eventTypes: req.body.eventTypes,
            limit: req.body.limit,
            offset: req.body.offset,
            ordering: req.body.ordering,
            poolAddress: req.body.poolAddress,
            rootAddresses: req.body.rootAddresses,
            rootTokenAmountGe: req.body.rootTokenAmountGe,
            rootTokenAmountLe: req.body.rootTokenAmountLe,
            timestampBlockGe: req.body.timestampBlockGe,
            timestampBlockLe: req.body.timestampBlockLe,
            tvGe: req.body.tvGe,
            tvLe: req.body.tvLe,
            userAddress: req.body.userAddress,
            whiteCurrencyAddresses: req.body.whiteCurrencyAddresses,
            whiteListUri: req.body.whiteListUri
          }
        })
    .then(function(response){
        res.send(response.data)
    })
    .catch(function(error){
        console.error(error)
        res.send('Error')
    })
  })

Last updated