TronGrid Contracts API
The Contracts API from TronGrid — 4 operation(s) for contracts.
Operations 4
GET
/v1/contracts/{contractAddress}/internal-transactions
Get internal transactions by contract address
#
The Contracts API from TronGrid — 4 operation(s) for contracts.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/trongrid:trongrid-contracts-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: trongrid-v1-api Contracts API
version: 4.8.0
servers:
- url: https://api.shasta.trongrid.io
tags:
- name: Contracts
paths:
/v1/contracts/{contractAddress}/transactions:
get:
summary: Get transaction info by contract address
description: ''
operationId: get-transaction-info-by-contract-address
parameters:
- name: contractAddress
in: path
description: 'The address of contract (format: Base58 or Hex). Example: `TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs`'
schema:
type: string
required: true
- name: only_confirmed
in: query
description: Set to `true` to return only confirmed transactions; set to `false` (or omit) to return both confirmed and unconfirmed. Cannot be used simultaneously with `only_unconfirmed`.
schema:
type: boolean
- name: only_unconfirmed
in: query
description: Set to `true` to return only unconfirmed transactions; set to `false` (or omit) to return both. Cannot be used simultaneously with `only_confirmed`.
schema:
type: boolean
- name: min_timestamp
in: query
description: 'The minimum block timestamp to filter by. (Unit: milliseconds, Default: 0)'
schema:
type: string
format: date-time
- name: max_timestamp
in: query
description: 'The maximum block timestamp to filter by. (Unit: milliseconds, Default: current time)'
schema:
type: string
format: date-time
- name: order_by
in: query
description: 'Sort order: `block_timestamp,asc` or `block_timestamp,desc` (default).'
schema:
type: string
- name: fingerprint
in: query
description: 'The fingerprint for pagination, obtained from the `meta.fingerprint` field of a previous response. Note: When using `fingerprint`, all other parameters must remain the same.'
schema:
type: string
- name: limit
in: query
description: 'The maximum number of transactions to return per page. (Default: 20, Max: 200)'
schema:
type: integer
format: int32
responses:
'200':
description: '200'
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
type: object
properties:
txID:
type: string
description: Transaction ID(Hash).
blockNumber:
type: string
description: The block number.
block_timestamp:
type: string
description: The block timestamp.(Unit:millisecond)
ret:
type: array
items:
type: object
properties:
contractRet:
type: string
description: Transaction execution result. (e.g. `SUCCESS`, `REVERT`)
fee:
type: integer
format: int64
description: Transaction fee.(Unit:sun)
signature:
type: array
items:
type: string
description: Transaction signature.
raw_data_hex:
type: string
description: 'The transaction''s raw data. (Format: hex)'
raw_data:
type: object
description: Transaction content. See [here](https://developers.tron.network/docs/tron-protocol-transaction) for details.
properties:
fee_limit:
type: integer
format: int64
description: 'The transaction''s `FeeLimit`. See [here](https://developers.tron.network/docs/feelimit) for details. (Unit: sun)'
expiration:
type: integer
format: int64
description: 'Transaction expiration time. (Unit: millisecond)'
timestamp:
type: integer
format: int64
description: 'The block timestamp. (Unit: millisecond)'
ref_block_bytes:
type: string
description: The last two bytes of the reference block's number (height), used for transaction validation.
ref_block_hash:
type: string
description: Bytes 8 to 16 of the reference block's hash, used for transaction validation.
energy_fee:
type: integer
format: int64
description: 'The amount of TRX burned for Energy. (Unit: sun)'
energy_usage:
type: integer
format: int64
description: The amount of Energy consumed by the sender's account.
energy_usage_total:
type: integer
format: int64
description: The total amount of Energy consumed by the transaction.
net_fee:
type: integer
format: int64
description: The amount of TRX burned to pay for the Bandwidth.
net_usage:
type: integer
format: int64
description: The amount of Bandwidth consumed.
internal_transactions:
type: array
items:
type: object
properties:
internal_tx_id:
type: string
description: The unique ID for the internal transaction.
tx_id:
type: string
description: The hash of the parent transaction.
from_address:
type: string
description: 'The sender''s address. (Format: Hex, starts with `41`.)'
to_address:
type: string
description: 'The recipient''s address. (Format: Hex, starts with `41`.)'
data:
type: object
properties:
note:
type: string
description: The instruction type, e.g. `call`, `create`, `suicide`.
reject:
type: boolean
description: 'Whether the internal transaction failed. Note: on this endpoint the wire field is `reject` (an implementation typo of the canonical `rejected`).'
call_value:
type: array
items:
type: object
properties:
call_value:
type: integer
format: int64
description: 'Transfer amount. (Unit: sun)'
token_id:
type: string
description: Token ID. `_` denotes TRX (decimals 6); otherwise a TRC-10 token ID.
description: An array of internal transactions. See [here](https://developers.tron.network/docs/tron-protocol-transaction#internal-transactions) for details.
success:
type: boolean
description: Whether the request was successful.
meta:
type: object
properties:
at:
type: integer
format: int64
description: 'The response timestamp. (Unit: millisecond)'
page_size:
type: integer
format: int32
description: The number of items returned on the current page.
fingerprint:
type: string
description: The fingerprint for paginating to the next page.
links:
type: object
properties:
next:
type: string
description: The URL for the next page of results.
examples:
Result:
value: ''
'400':
description: '400'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
deprecated: false
tags:
- Contracts
/v1/contracts/{contractAddress}/tokens:
get:
summary: Get TRC-20 token holder balances
description: ''
operationId: get-trc20-token-holder-balances
parameters:
- name: contractAddress
in: path
description: 'The address of contract (format: Base58 or Hex). Example: `TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs`'
schema:
type: string
required: true
- name: fingerprint
in: query
description: 'The fingerprint for pagination, obtained from the `meta.fingerprint` field of a previous response. Note: When using `fingerprint`, all other parameters must remain the same.'
schema:
type: string
- name: limit
in: query
description: 'The maximum number of token holders to return per page. (Default: 20, Max: 200)'
schema:
type: integer
format: int32
- name: order_by
in: query
description: 'Sort order: `balance,asc` or `balance,desc` (default).'
schema:
type: string
responses:
'200':
description: '200'
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
type: object
description: 'A single-key map: holder address (Base58, `T...`) -> balance (string, scaled by token decimals).'
description: The balance of the TRC-20 holder.
success:
type: boolean
description: Whether the request was successful.
meta:
type: object
properties:
at:
type: integer
format: int64
description: 'The timestamp for when the API response was generated. (Unit: millisecond)'
page_size:
type: integer
format: int32
description: The number of items returned on the current page.
fingerprint:
type: string
description: A fingerprint of the last transaction on this page, used to fetch the next page of results.
links:
type: object
properties:
next:
type: string
description: The complete URL to request the next page of results. `null` if this is the last page.
examples:
Result:
value: ''
'400':
description: '400'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
deprecated: false
tags:
- Contracts
/v1/contracts/{address}/events:
get:
summary: Get events by contract address
description: ''
operationId: get-events-by-contract-address
parameters:
- name: address
in: path
description: 'Contract address. (Format: Base58 or Hex). Example: `TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs`'
schema:
type: string
required: true
- name: event_name
in: query
description: 'The event name to filter by.
Example: `Transfer`'
schema:
type: string
default: Transfer
- name: block_number
in: query
description: 'The specific block number to query.
Example: `61840405` Accepts a specific block height or `latest`.'
schema:
type: string
- name: only_unconfirmed
in: query
description: Set to `true` to return only unconfirmed events; set to `false` (or omit) to return both. Cannot be used simultaneously with `only_confirmed`.
schema:
type: boolean
- name: only_confirmed
in: query
description: Set to `true` to return only confirmed events; set to `false` (or omit) to return both confirmed and unconfirmed. Cannot be used simultaneously with `only_unconfirmed`.
schema:
type: boolean
- name: min_timestamp
in: query
description: 'The minimum block timestamp to filter by. (Unit: milliseconds, Default: 0)'
schema:
type: integer
format: int64
- name: max_timestamp
in: query
description: 'The maximum block timestamp to filter by. (Unit: milliseconds, Default: current time)'
schema:
type: integer
format: int64
- name: order_by
in: query
description: 'Sort order: `block_timestamp,asc` or `block_timestamp,desc` (default).'
schema:
type: string
- name: fingerprint
in: query
description: 'The fingerprint for pagination, obtained from the `meta.fingerprint` field of a previous response. Note: When using `fingerprint`, all other parameters must remain the same.'
schema:
type: string
- name: limit
in: query
description: 'The maximum number of events to return per page. (Default: 20, Max: 200)'
schema:
type: integer
format: int32
responses:
'200':
description: '200'
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
type: object
properties:
block_number:
type: integer
format: int64
description: The block number
block_timestamp:
type: integer
format: int64
description: 'The block timestamp. (Unit: millisecond)'
caller_contract_address:
type: string
description: Same as data.[0].contract_address for backward compatibility.
contract_address:
type: string
description: The address of the contract that emitted the event.
event_index:
type: integer
description: The event's index within the transaction's event log.
event_name:
type: string
description: The event name
event:
type: string
description: The event signature used to parse indexed and non-indexed parameters. (e.g., `Transfer(address,address,uint256)`)
transaction_id:
type: string
description: Transaction hash.
result:
type: object
description: The event's parameters, including both indexed and non-indexed parameters.
result_type:
type: object
description: The type of parameter
_unconfirmed:
type: boolean
description: Whether the transaction is unconfirmed. `true` means unconfirmed.
success:
type: boolean
description: Whether the request was successful.
meta:
type: object
properties:
page_size:
type: integer
format: int32
description: The number of items returned on the current page.
at:
type: integer
format: int64
description: 'The response timestamp. (Unit: millisecond)'
fingerprint:
type: string
description: Pagination cursor (present when a full page is returned).
links:
type: object
properties:
next:
type: string
description: URL for the next page (conditional).
examples:
Result:
value: '{}'
'400':
description: '400'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
deprecated: false
tags:
- Contracts
/v1/contracts/{contractAddress}/internal-transactions:
get:
summary: Get internal transactions by contract address
description: ''
operationId: get-internal-transactions-by-contract-address
parameters:
- name: contractAddress
in: path
schema:
type: string
required: true
description: 'The address of contract (format: Base58 or Hex). Example: `TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs`'
- name: only_confirmed
in: query
description: Set to `true` to return only confirmed transactions; set to `false` (or omit) to return both confirmed and unconfirmed. Cannot be used simultaneously with `only_unconfirmed`.
schema:
type: boolean
- name: only_unconfirmed
in: query
description: Set to `true` to return only unconfirmed transactions; set to `false` (or omit) to return both. Cannot be used simultaneously with `only_confirmed`.
schema:
type: boolean
- name: limit
in: query
description: 'The maximum number of transactions to return per page. (Default: 20, Max: 200)'
schema:
type: integer
format: int32
- name: fingerprint
in: query
description: 'The fingerprint for pagination, obtained from the `meta.fingerprint` field of a previous response. Note: When using `fingerprint`, all other parameters must remain the same.'
schema:
type: string
- name: min_timestamp
in: query
description: 'The minimum block timestamp to filter by. (Unit: milliseconds, Default: 0)'
schema:
type: string
format: date
- name: max_timestamp
in: query
description: 'The maximum block timestamp to filter by. (Unit: milliseconds, Default: current time)'
schema:
type: string
format: date
- name: order_by
in: query
description: 'Sort order: `block_timestamp,asc` or `block_timestamp,desc` (default).'
schema:
type: string
responses:
'200':
description: '200'
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
type: object
properties:
internal_tx_id:
type: string
description: The unique identifier (ID) for the internal transaction.
data:
type: object
properties:
note:
type: string
description: The type of instruction, such as `call`, `create`, `suicide`, `freezeBalanceV2ForEnergy`, `freezeBalanceV2ForBandwidth`, or `unfreezeBalanceV2ForBandwidth`.
rejected:
type: boolean
description: Whether the internal transaction failed during execution. `true` means the execution failed.
call_value:
type: array
description: Transfer amounts.
items:
type: object
properties:
call_value:
type: integer
format: int64
description: 'Transfer amount. (Unit: sun)'
token_id:
type: string
description: Token ID. `_` denotes TRX (decimals 6); otherwise a TRC-10 token ID.
block_timestamp:
type: integer
format: int64
description: 'The Unix timestamp for when the transaction was confirmed. (Unit: millisecond)'
to_address:
type: string
description: The recipient's address.
tx_id:
type: string
description: The unique identifier (ID) of the parent transaction that initiated this internal transaction.
from_address:
type: string
description: 'The sender''s address. (Format: Hex, starts with `41`.)'
success:
type: boolean
description: Whether the request was successful.
meta:
type: object
properties:
at:
type: integer
format: int64
description: 'The timestamp for when the API response was generated. (Unit: millisecond)'
page_size:
type: integer
format: int32
description: The number of items returned on the current page.
fingerprint:
type: string
description: A fingerprint of the last transaction on this page, used to fetch the next page of results.
links:
type: object
properties:
next:
type: string
description: The complete URL to request the next page of results. `null` if this is the last page.
examples:
Result:
value: '{}'
'400':
description: '400'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
deprecated: false
tags:
- Contracts
x-readme:
headers: []
explorer-enabled: true
proxy-enabled: true
x-readme-fauxas: true