GET /api/v1/tx

Auth X-Hub-Key from API_HUB_KEYExecute GET /run/lighter/api/v1/txCache cached 1s, never served stale past that windowCost free · weight 0 · standard rate classSource billing free

Lookup a single L2 transaction by hash or sequence index.

Parameters

nameintypedescription
byquerystr
hash | sequence_index
requiredLookup field ('hash' or 'sequence_index').
example: hash
valuequerystrrequiredTransaction hash or sequence index.
example: 56a1a6734e864c3e7c8d49ba0465a3c0cab30c66824742ef00e85990117f84d5a10c38631fd7733c

Response

type: object
pagination: none
sample: {
  "code": "int",
  "hash": "str",
  "type": "int",
  "info": "str",
  "event_info": "str",
  "status": "int",
  "transaction_index": "int",
  "l1_address": "str",
  "account_index": "int",
  "nonce": "int",
  "expire_at": "int",
  "block_height": "int",
  "queued_at": "int",
  "sequence_index": "int",
  "parent_hash": "str",
  "api_key_index": "int",
  "transaction_time": "int",
  "committed_at"

Safe request

Reads the credential from API_HUB_KEY; it never appears in the URL.

curl -sH "X-Hub-Key: $API_HUB_KEY" "https://openapihub.dev/run/lighter/api/v1/tx?by=hash&value=56a1a6734e864c3e7c8d49ba0465a3c0cab30c66824742ef00e85990117f84d5a10c38631fd7733c"