DataHub Docs
DataHubLearnCommunity
  • 👋Welcome to Figment Docs
  • 🚩Introduction
    • 🚀Why Build on Web 3?
    • 💻What is DataHub?
  • 📖DataHub Guides
    • 📍DataHub Products
      • Transaction Search API
      • Staking API
    • 🏭DataHub Infrastructure
    • 🏁Get Started With DataHub
    • 🚨Quotas & Rate Limits
    • 💡Dashboard how-tos
      • Configuring CORS whitelist
  • 📚Network Documentation
    • 🔭Network Guide
    • 🅰️Arbitrum
      • 🎮RPC & REST API
    • 🏔️Avalanche
      • 🎮RPC & REST API
        • Avalanche Indexer API
    • 💠Binance Smart Chain
      • 🎮RPC & REST API
    • 💰Celo
      • 💼CELO Wallet
      • 🎮RPC & REST API
    • ➰Centrifuge
      • 🎮RPC & REST API
    • 🌌Cosmos
      • 🎮RPC & REST API
      • 🎊Enriched APIs
        • Transaction Search
        • Rewards API
    • 💎Ethereum
      • 🎮RPC & REST API
    • 🧊Fantom
      • 🎮RPC & REST API
    • 🐦Kusama
      • 🎮RPC & REST API
    • 📱Mina
      • 🎮RPC & REST API
        • Indexer API Documentation
        • Query Mina GraphQL API
    • 🌈NEAR
      • 🎮RPC & REST API
      • 🎊Enriched APIs
        • Indexer API
      • 💼NEAR Wallet
    • 🏝️Oasis
      • 🎮RPC & REST API
        • Oasis REST API
    • 🧪Osmosis
      • 🎮RPC & REST API
    • 🍡Polkadot
      • 🎮RPC & REST API
      • 🎊Enriched APIs
        • Indexer API
        • Transaction Search
    • ⛽Polygon (Matic)
      • 🎮RPC & REST API
    • 🔋Solana
      • 🎮RPC & REST API
    • 📚Extra Guides
      • Blockchain Fundamentals
      • Docker Setup for Windows
      • Troubleshooting CORS Errors on DataHub
      • 5XX Retry Logic Best Practices
        • 5XX Retry Logic Best Practices - NodeJS
        • 5XX Retry Logic Best Practices - Python
        • 5XX Retry Logic Best Practices - Ruby
        • 5XX Retry Logic Best Practices - Go
      • Setting up a fresh JavaScript Project with dotenv
      • Getting started with dotenv and .env files
      • Rust Learning Resources
      • Setup Solana BPF Toolchain on Windows
      • Figment Learn Pathway Troubleshooting
  • 🤔Other
    • 🧾Glossary
    • 🗳️Support
  • 🔗Terms & Conditions
    • Terms of Use
    • Terms & Conditions DataHub
    • Privacy Policy
    • Contributor Terms
Powered by GitBook
On this page
  • transactions_search
  • Transaction Types
  • Example Request
  • Example Response

Was this helpful?

  1. Network Documentation
  2. Cosmos
  3. Enriched APIs

Transaction Search

Learn how to use the Transaction Search API on Cosmos

PreviousEnriched APIsNextRewards API

Last updated 3 years ago

Was this helpful?

Test out our Transaction Search API today with !

transactions_search

POST https://cosmos--search.datahub.figment.io/transactions_search

Transaction Search allows users to filter and query by account, transaction type, and date range. Users can also search by memo field and logs.

Request Body

Name
Type
Description

network

string

Network identifier to search in. In this case, cosmos

account

array

The account identifier to look for. This searches for all account IDs which exist in transaction, including senders, recipients, validators, feeders, etc.

after_height

integer

Gets all transactions bigger than given height. Has to be bigger than BeforeHeight

after_time

string

The time of transaction (if not given by chain API, the same as block)

before_height

integer

Gets all transactions lower than given height. Has to be lesser than AfterHeight

before_time

string

The time of transaction (if not given by the chain API, the same as block)

block_hash

string

The hash of block to get transaction from

chain_ids

array

ChainID to search in. In this case, cosmoshub-3

epoch

string

Epoch of the transaction

hash

string

The hash of the transaction

height

integer

Height of the transactions to get

limit

integer

Limit how many transaction records to get in one request (default: 100, maximum: 1000)

memo

string

Sets full text search for memo field

offset

integer

Offset the next X number of records

receiver

array

Looks for transactions that include given account IDs

sender

array

Looks for transactions that include given account IDs

type

array

The list of types of transactions (see below for full list of parameters)

with_raw

boolean

Include base64 raw request in search response

with_raw_log

boolean

Include base64 raw log from search response. Defaults to false

{
  "block_hash": "string",
  "chain_id": "string",
  "created_at": "2020-10-15T20:38:09.017Z",
  "epoch": "string",
  "events": [
    {
      "id": "string",
      "kind": "string",
      "sub": [
        {
          "action": "string",
          "additional": {
            "additionalProp1": [
              "string"
            ],
            "additionalProp2": [
              "string"
            ],
            "additionalProp3": [
              "string"
            ]
          },
          "amount": {
            "additionalProp1": {
              "currency": "string",
              "exp": 0,
              "numeric": {},
              "text": "string"
            },
            "additionalProp2": {
              "currency": "string",
              "exp": 0,
              "numeric": {},
              "text": "string"
            },
            "additionalProp3": {
              "currency": "string",
              "exp": 0,
              "numeric": {},
              "text": "string"
            }
          },
          "completion": "2020-10-15T20:38:09.017Z",
          "error": {
            "message": "string"
          },
          "module": "string",
          "node": {
            "additionalProp1": [
              {
                "detail": {
                  "contact": "string",
                  "description": "string",
                  "name": "string",
                  "website": "string"
                },
                "id": "string"
              }
            ],
            "additionalProp2": [
              {
                "detail": {
                  "contact": "string",
                  "description": "string",
                  "name": "string",
                  "website": "string"
                },
                "id": "string"
              }
            ],
            "additionalProp3": [
              {
                "detail": {
                  "contact": "string",
                  "description": "string",
                  "name": "string",
                  "website": "string"
                },
                "id": "string"
              }
            ]
          },
          "nonce": "string",
          "recipient": [
            {
              "account": {
                "detail": {
                  "contact": "string",
                  "description": "string",
                  "name": "string",
                  "website": "string"
                },
                "id": "string"
              },
              "amounts": [
                {
                  "currency": "string",
                  "exp": 0,
                  "numeric": {},
                  "text": "string"
                }
              ]
            }
          ],
          "sender": [
            {
              "account": {
                "detail": {
                  "contact": "string",
                  "description": "string",
                  "name": "string",
                  "website": "string"
                },
                "id": "string"
              },
              "amounts": [
                {
                  "currency": "string",
                  "exp": 0,
                  "numeric": {},
                  "text": "string"
                }
              ]
            }
          ],
          "type": [
            "string"
          ]
        }
      ]
    }
  ],
  "gas_used": 0,
  "gas_wanted": 0,
  "hash": "string",
  "height": 0,
  "id": [
    0
  ],
  "memo": "string",
  "raw": [
    0
  ],
  "raw_log": [
    0
  ],
  "time": "2020-10-15T20:38:09.017Z",
  "transaction_fee": [
    {
      "currency": "string",
      "exp": 0,
      "numeric": {},
      "text": "string"
    }
  ],
  "updated_at": "2020-10-15T20:38:09.017Z",
  "version": "string",
  "has_errors": false,
}
{
  "error": "Bad parameters sent"
}
{
  "error": "Not acceptable content type"
}
{
  "error": "Something bad happened" 
}

Transaction Types

List of currently supporter transaction types in cosmos-worker are (listed by modules):

Module

Type

bank

multisend , send

crisis

verify_invariant

distribution

withdraw_validator_commission, set_withdraw_address, withdraw_delegator_reward, fund_community_pool

evidence

submit_evidence

gov

deposit, vote, submit_proposal

slashing

unjail

staking

begin_unbonding, edit_validator, create_validator , delegate, begin_redelegate

internal

error

Example Request

{
    "network": "cosmos",
    "limit": 1
}

Example Response

[
    {
        "id": "45af02cd-bf42-414b-8c5d-75d42b49cd39",
        "hash": "BE62B6C0AB33B6CD251CCF6C76E433A813D858265F94506EFC57938B683030D3",
        "block_hash": "12038986D3F65E1508DF7D86E6290284B973BCF24A7F802C8BFF19554C0F8F9F",
        "height": 92,
        "chain_id": "cosmoshub-3",
        "time": "2019-12-11T16:43:51.699557Z",
        "gas_wanted": 200000,
        "gas_used": 93105,
        "memo": "P2P Dashboard",
        "version": "0.0.1",
        "has_errors": false,
        "events": [
            {
                "id": "0",
                "kind": "delegate",
                "sub": [
                    {
                        "type": [
                            "delegate"
                        ],
                        "module": "staking",
                        "node": {
                            "delegator": [
                                {
                                    "id": "cosmos1r0cpzr5aj4lpt2aefnmz7arz4sq5p6htgw2sfv"
                                }
                            ],
                            "validator": [
                                {
                                    "id": "cosmosvaloper132juzk0gdmwuxvx4phug7m3ymyatxlh9734g4w"
                                }
                            ]
                        },
                        "amount": {
                            "delegate": {
                                "text": "1uatom",
                                "currency": "uatom",
                                "numeric": 1
                            }
                        }
                    }
                ]
            }
        ]
    }
]

If you need help with this API or simply want to share with other builders, you can !

📚
🌌
🎊
DataHub
join our community today