Pangea Docs

Pangea provides two key features: Real-time and Historical data

Our data is fine-grained, open and shows every swap and position on Uniswap V2 and Uniswap V3 based DEXs.

Client Access

For early access you can apply here.

Credentials setup

You will have received a username and password. The examples in these docs export the following environment variables.

export PANGEA_USERNAME=<username>
export PANGEA_PASSWORD=<password>
export PANGEA_AUTH=$(echo -n "$PANGEA_USERNAME:$PANGEA_PASSWORD" | base64 -w 0)

Get started with our API

Currently, clients consume data from the API over HTTP or WebSockets with common data formats CSV, JSON and Arrow-IPC. See, API docs to get started

Ready to get started?

API

All API examples use curl. A WebSocket client will be released soon, please get in touch for early access.

For real-time use WebSockets API and for historical use HTTP or WebSockets API.

Make a request

curl -s --location --request GET \
    "https://app.pangea.foundation/v1/api/status" \
    --header "Accept: application/jsonstream" \
    --header "Authorization: Basic $PANGEA_AUTH" | jq -s

Status is the health endpoint for chains and toolboxes that contain availability, syncing and block height.

Result

[
    {
        "type": "Chain",
        "chain": 1,
        "chain_code": "ETH",
        "chain_name": "Ethereum",
        "service": "chain",
        "entity": "block",
        "latest_block_height": 17572170,
        "timestamp": 1687886916,
        "status": "Ok"
    },
    ...
]

Query Parameters

All available chains and endpoints can be found by making a request to our /status endpoint, which should be called without any query parameters.

A chain parameter (?chain=ETH for example) is required for all other endpoints.
chain can also accept the EIP-155 chain ID 1 or our name Ethereum.

Support for multiple chains per request will be announced soon.

All requests default block filters on the latest block ?from_block=latest&to_block=latest. Set from_block to 1 to filter the whole chain ?from_block=1.

Filtering on other fields can be done directly on the field or by using a few conventions, using token0 as the example:

  • Filter directly by token0=0x....
  • Filter on a list by affixing __in comma separated by token0__in=0x1..,0x2...
  • Filter on a value greater than or equal to by affixing __gte
  • Filter on a value less than or equal to by affixing __lte

Response Format

Supported formats are JSON, JSON-LINES, CSV, Arrow-IPC

JSON is limited by block range, use JSON-LINES, CSV or Arrow-IPC for larger block ranges

Format can be specifed in two ways, by query parameter or Accept header. The query parameter takes precedence over Accept header.

?format=json_stream

--header "Accept: application/jsonstream"

Query parameter values

json, json_stream, csv, arrow

Accept headers

--header "Accept: text/csv"
--header "Accept: application/json"
--header "Accept: application/jsonstream"
--header "Accept: application/vnd.apache.arrow.stream"

Early Access

These datasets are currently in our Beta environment. If you would like early access you can apply here

Blocks

Block data is temporarily a subset of raw block data to be compatibile across EVMs. This will be updated with the introduction of new cross chain features.

curl -s --location --request GET \
    "https://app.pangea.foundation/v1/api/blocks?chains=ETH&from_block=-10&to_block=latest" \
    --header "Accept: application/jsonstream" \
    --header "Accept-Encoding: gzip" --compressed \
    --header "Authorization: Basic $PANGEA_AUTH" | jq 

Response

[
  {
    "chain": 1,
    "block_number": "0x11ab844",
    "hash": "0x3ea0b2174473f51f0717558b60eee525e3d86c7e18c4629471216d1be426bd24",
    "parent_hash": "0x0dc8dfa2d594609a23bd827f575800e2590a821438265e72ffbd90645955093d",
    "uncles_hash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "miner": "0xd4e96ef8eee8678dbff4d535e033ed1a4f7605b7",
    "state_root": "0x42c3d9e1ede9b60868e14a2c94f7efdb944300f4334e97df202021906ac10051",
    "transactions_root": "0x6345382e6ffc3dd3c06c10cb4ea27c11b7688e5e9822f61ab689346527a0ec59",
    "receipts_root": "0x2595395bea8c8ed24feb024e3eeb5bfc0e11a1ebadb52750c606931021ad14cd",
    "gas_used": "0xb86e9c",
    "gas_limit": "0x1c9c380",
    "base_fee_per_gas": "0xd3e73dac0",
    "extra_data": "0x546974616e2028746974616e6275696c6465722e78797a29",
    "logs_bloom": "0x48a720c26dac628c2cd822a0823ade6420040b298ea51b74c109611606155920228a90cdc12e856e4a7b1f624a4a6da16281b00ef84ab6080636d8ab0468410ac4cf547908288c4d6808487de524a0a5023b0843c37e08440141c1c8886018f8124030949212000705025f20d5a3ae112d160061088c5608e6aa4e92d27a21c609408152a31263480ff1a2132ba48613100045894970b038200a004126f69721aa343f70982062e41e0511b41c1024063fd64509a0b1811a9a228c02451827416114a25705890d14a452fd02003718cc50e36a40340825ba00a4434388423250ad5632d805b4029b482c160e88dda882560bfd48818c6fe8220c142927434603",
    "timestamp": 1699459631,
    "difficulty": "0x0",
    "total_difficulty": "0xc70d815d562d3cfa955",
    "size": "0x238e9",
    "mix_hash": "0x8bd7a76a9ab203c551b6f4627b79179d046d4440d28f639a27ae724c4115a952",
    "nonce": "0x0000000000000000"
  },
  ...
]

Query Parameters

v1/api/blocks

  • chains: This parameter is used to filter the data by specific blockchain networks.
  • from_block: This parameter is used to filter the data by a starting block number.
  • to_block: This parameter is used to filter the data by an ending block number.

Transactions

Fetch raw transaction data for blocks 17000000 to 17000010.

curl -s --location --request GET \
    "https://app.pangea.foundation/v1/api/transactions?chains=ETH&from_block=17000000&to_block=17000010" \
    --header "Accept: application/jsonstream" \
    --header "Accept-Encoding: gzip" --compressed \
    --header "Authorization: Basic $PANGEA_AUTH" | jq

Response

[
  ...
  {
    "chain": "ETH",
    "block_number": 17000009,
    "block_hash": "0xe284afd9d7793371fefa661de0cfe9e7eafd47c9634834d384dac97dfefc3cbf",
    "transaction_index": 92,
    "hash": "0xe63e694366cd5e029d49f4652965e4c90fa2206fe3ced48b484b0a6ceb88d20e",
    "nonce": "0x0000000000000000000000000000000000000000000000000000000000000997",
    "from": "0xce0babc8398144aa98d9210d595e3a9714910748",
    "to": "0x388c818ca8b9251b393131c08a736a67ccb19297",
    "value": "0x000000000000000000000000000000000000000000000000002c6022d97fd71f",
    "gas_price": "0x0000000000000000000000000000000000000000000000000000000596655fb8",
    "gas": "0x000000000000000000000000000000000000000000000000000000000000565f",
    "input": "0x0000",
    "v": 1,
    "r": "0x7a1bc22201e3ca6466efb735345400915abcf98b49fd6c513f6b52ff7505695f",
    "s": "0x44ab9dbbbceed9c6d2692736b298acd3298edb4176a05f8f91f7361902f9b62b",
    "raw": null,
    "type": 2,
    "max_fee_per_gas": "0x0000000000000000000000000000000000000000000000000000000596655fb8",
    "max_priority_fee_per_gas": "0x0000000000000000000000000000000000000000000000000000000000000000"
  }
]

Filter on contract deployments

curl -s --location --request GET \
    "https://app.pangea.foundation/v1/api/transactions?chains=ETH&from_block=17000000&to_block=17000010&to__in=%00" \
    --header "Accept: application/jsonstream" \
    --header "Accept-Encoding: gzip" --compressed \
    --header "Authorization: Basic $PANGEA_AUTH" | jq

Query Parameters

v1/api/transactions

  • chains: This parameter is used to filter the data by specific blockchain networks.
  • from_block: This parameter is used to filter the data by a starting block number.
  • to_block: This parameter is used to filter the data by an ending block number.
  • to__in: This parameter is used to filter the data by the to address.
  • from__in: This parameter is used to filter the data by the from address.
  • value__gte: This parameter is used to filter the value using the greater than or equal to operator.
  • value__lte: This parameter is used to filter the value using the less than or equal to operator.

Logs

Raw log data.

Filter on topic0 first hash the Event signature.

cast keccak "Transfer(address,address,uint256)"
0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef
curl -s --location --request GET \
    "https://app.pangea.foundation/v1/api/logs?chains=ETH&from_block=17000000&to_block=17000010&topic0__in=0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef" \
    --header "Accept: application/jsonstream" \
    --header "Accept-Encoding: gzip" --compressed \
    --header "Authorization: Basic $PANGEA_AUTH" | jq -s

Filter on address

curl -s --location --request GET \
    "https://app.pangea.foundation/v1/api/logs?chains=ETH&from_block=17000000&to_block=17000010&address=0xdac17f958d2ee523a2206206994597c13d831ec7&topic0__in=0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef" \
    --header "Accept: application/jsonstream" \
    --header "Accept-Encoding: gzip" --compressed \
    --header "Authorization: Basic $PANGEA_AUTH" | jq

Response

[
  ...
  {
    "chain": 1,
    "block_number": "0x103664a",
    "block_hash": "0x5bad63a542b4deebf2d8ba93bf83b98a96ac4693640dfc3c2ccec38c3adc2bf2",
    "transaction_index": 253,
    "transaction_hash": "0xae76e4d852d8a9d9ebba99787c1ba5859b68bb90a2712cb3e5ce7505a1f8898a",
    "log_index": "0x15a",
    "address": "0x7b95ec873268a6bfc6427e7a28e396db9d0ebc65",
    "topic0": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
    "topic1": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "topic2": "0x000000000000000000000000e340b00b6b622c136ffa5cff130ec8edcddcb39d",
    "topic3": null,
    "data": "0x000000000000000000000000000000000000000000000009215f570e12dcdd93",
    "removed": false
  }
]

Query Parameters

v1/api/logs

  • chains: This parameter is used to filter the logs by specific blockchain networks.
  • from_block: This parameter is used to filter the logs by a starting block number.
  • to_block: This parameter is used to filter the logs by an ending block number.
  • address__in: This parameter is used to filter the logs by a list of contract addresses.
  • topic0__in: This parameter is used to filter the logs by a list of topic0 values
  • topic1__in: This parameter is used to filter the logs by a list of topic1 values
  • topic2__in: This parameter is used to filter the logs by a list of topic2 values
  • topic3__in: This parameter is used to filter the logs by a list of topic3 values

Fuel

Fuel is a UTXO-based modular execution layer for Ethereum. Utilising the FuelVM and Sway language, Fuel achieves sub-second block times with smart contract functionality and security inherited from Ethereum.

All queries for Fuel data must use the ?chains=FUEL query parameter.

Fuel Blocks

Fetch the last 10 blocks.

curl -s --location --request GET \
    "https://app.pangea.foundation/v1/api/blocks?chains=FUEL&from_block=-10&to_block=latest" \
    --header "Accept: application/jsonstream" \
    --header "Accept-Encoding: gzip" --compressed \
    --header "Authorization: Basic $PANGEA_AUTH" | jq

Response

[
  ...
  {
    "chain": 9889,
    "block_number": "0x342931",
    "hash": "0x1f0546ba24e47491144bd3f12166c25dbd219e0cc98f0249cae66d81af264654",
    "parent_hash": "0xa649ff0c4053e2dbe1bfd01a36ec2fa641ca49051bad6a3943257865c63f8d3c",
    "da_block_number": "0x13f5814",
    "transactions_root": "0x98a06264b0e5c7b90d061c1677310efab97ca5b914eb62587c45cc450e49e929",
    "transactions_count": 1,
    "message_receipt_count": 0,
    "message_outbox_root": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
    "event_inbox_root": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
    "timestamp": 1728483989
  }
]

Query Parameters

app.pangea.foundation/v1/api/blocks?chains=FUEL

  • chains: This parameter is used to filter the data by specific blockchain networks.
  • from_block: This parameter is used to filter the data by a starting block number.
  • to_block: This parameter is used to filter the data by an ending block number.
  • from_da_block_number: This parameter is used to filter the data by a starting data availability block number.
  • to_da_block_number: This parameter is used to filter the data by an ending data availability block number.

Fuel Transactions

Fetch transactions from the last 10000 blocks.

curl -s --location --request GET \
    "https://app.pangea.foundation/v1/api/transactions?chains=FUEL&from_block=-10000&to_block=latest" \
    --header "Accept: application/jsonstream" \
    --header "Accept-Encoding: gzip" --compressed \
    --header "Authorization: Basic $PANGEA_AUTH" | jq

Response

[
  ...
  {
    "chain": 9889,
    "block_number": "0x342cee",
    "block_hash": "0xb52adfc89b9d6e0a4ecdc5b97a7be1f7ce49f75e6136861a366e5caa04c88a97",
    "transaction_index": 0,
    "hash": "0x8e0b2f9fb1d90e7713548d91b14c0f62272f552cafde86a7503235b1bf0e72e8",
    "transaction_type": "Script",
    "policies_max_fee": 201,
    "inputs": [
      {
        "input_type": "Contract",
        "utxo_id": "0xe0fb42f12a7dd4ab809804c50742671d0832245bc3f55a2c1f15d5c3186c97090000",
        "tx_pointer_block_height": "0x342bfa",
        "tx_pointer_tx_index": 0,
        "balance_root": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "state_root": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "contract_id": "0x243ef4c2301f44eecbeaf1c39fee9379664b59a2e5b75317e8c7e7f26a25ed4d"
      },
      {
        "input_type": "Contract",
        "utxo_id": "0xe0fb42f12a7dd4ab809804c50742671d0832245bc3f55a2c1f15d5c3186c97090001",
        "tx_pointer_block_height": "0x342bfa",
        "tx_pointer_tx_index": 0,
        "balance_root": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "state_root": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "contract_id": "0xfb2b92c17160f9856664bde85bec51f5839d565898d489a6ef8fcb9b73575b57"
      },
      {
        "input_type": "Contract",
        "utxo_id": "0xa1831ea168642cb23c1f1f49d3aa84c3cd61ef7b8b8d0206d07173d3dff636940006",
        "tx_pointer_block_height": "0x34278a",
        "tx_pointer_tx_index": 0,
        "balance_root": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "state_root": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "contract_id": "0x56b7d897284fefd10dc0b19631392debd7a6678486dfbe764030dec170f21245"
      },
      {
        "input_type": "Contract",
        "utxo_id": "0xe0fb42f12a7dd4ab809804c50742671d0832245bc3f55a2c1f15d5c3186c97090003",
        "tx_pointer_block_height": "0x342bfa",
        "tx_pointer_tx_index": 0,
        "balance_root": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "state_root": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "contract_id": "0x2340a412a77607108d160926222632dd427bafc6f57e185c0140c849d88b8e99"
      },
      {
        "input_type": "Contract",
        "utxo_id": "0xe0fb42f12a7dd4ab809804c50742671d0832245bc3f55a2c1f15d5c3186c97090004",
        "tx_pointer_block_height": "0x342bfa",
        "tx_pointer_tx_index": 0,
        "balance_root": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "state_root": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "contract_id": "0xd5af7d47d518a679495f5ebd6de51bc8ddffbe173f3c1775d90f7acb7e6655ad"
      },
      {
        "input_type": "CoinPredicate",
        "utxo_id": "0x51ca93cdd567f216f146894583b384a9242549e03418d13b7f3a945f1e2e3bae0002",
        "owner": "0x80ee0f69976f3fc4667f1518b01d129e63b79600f7812e21dbe10f4273ed8d0c",
        "amount": "0x18689",
        "asset_id": "0xf8f8b6283d7fa5b672b530cbb84fcccb4ff8dc40f8176ef4544ddb1f1952ad07",
        "tx_pointer_block_height": "0x32a6c9",
        "tx_pointer_tx_index": 0,
        "predicate_gas_used": "0xa7d1",
        "predicate": "0x1a403000504100301a445000ba49000032400481504100205d490000504100083240048220451300524510044a4400007cf30ca9e83e8b7e0d1e608fb6252d53a08144a65cd73031ff2fbc52614b8a6a00000000000002306fe6c8ac4882eaefe85d7bb631a75135fc0e2bb9b85dafa2cea6248ed5a0563c00000000000000018162cd4a82eadca93ce249353b367e2ccd72bad5cff1b1b3e4fac75b834a77eb00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000042414b4f000000003031323334353637383961626364656600000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000cccccccccccc00020000000000001b1000000000000019e000000000000019d8000000000000160000000000000015a8000000000000117800000000000010f80000000000001064000000000000103c0000000000000fa00000000000000c1c00000000000009080000000000000838",
        "predicate_data": "0x"
      }
    ],
    "outputs": [
      {
        "output_type": "Contract",
        "utxo_id": "0x8e0b2f9fb1d90e7713548d91b14c0f62272f552cafde86a7503235b1bf0e72e80000",
        "input_index": "0x0",
        "balance_root": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "state_root": "0x0000000000000000000000000000000000000000000000000000000000000000"
      },
      {
        "output_type": "Variable",
        "utxo_id": "0x8e0b2f9fb1d90e7713548d91b14c0f62272f552cafde86a7503235b1bf0e72e80001",
        "to": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "amount": "0x0",
        "asset_id": "0x0000000000000000000000000000000000000000000000000000000000000000"
      },
      {
        "output_type": "Variable",
        "utxo_id": "0x8e0b2f9fb1d90e7713548d91b14c0f62272f552cafde86a7503235b1bf0e72e80002",
        "to": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "amount": "0x0",
        "asset_id": "0x0000000000000000000000000000000000000000000000000000000000000000"
      },
      {
        "output_type": "Variable",
        "utxo_id": "0x8e0b2f9fb1d90e7713548d91b14c0f62272f552cafde86a7503235b1bf0e72e80003",
        "to": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "amount": "0x0",
        "asset_id": "0x0000000000000000000000000000000000000000000000000000000000000000"
      },
      {
        "output_type": "Variable",
        "utxo_id": "0x8e0b2f9fb1d90e7713548d91b14c0f62272f552cafde86a7503235b1bf0e72e80004",
        "to": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "amount": "0x0",
        "asset_id": "0x0000000000000000000000000000000000000000000000000000000000000000"
      },
      {
        "output_type": "Contract",
        "utxo_id": "0x8e0b2f9fb1d90e7713548d91b14c0f62272f552cafde86a7503235b1bf0e72e80005",
        "input_index": "0x1",
        "balance_root": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "state_root": "0x0000000000000000000000000000000000000000000000000000000000000000"
      },
      {
        "output_type": "Contract",
        "utxo_id": "0x8e0b2f9fb1d90e7713548d91b14c0f62272f552cafde86a7503235b1bf0e72e80006",
        "input_index": "0x2",
        "balance_root": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "state_root": "0x0000000000000000000000000000000000000000000000000000000000000000"
      },
      {
        "output_type": "Contract",
        "utxo_id": "0x8e0b2f9fb1d90e7713548d91b14c0f62272f552cafde86a7503235b1bf0e72e80007",
        "input_index": "0x3",
        "balance_root": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "state_root": "0x0000000000000000000000000000000000000000000000000000000000000000"
      },
      {
        "output_type": "Contract",
        "utxo_id": "0x8e0b2f9fb1d90e7713548d91b14c0f62272f552cafde86a7503235b1bf0e72e80008",
        "input_index": "0x4",
        "balance_root": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "state_root": "0x0000000000000000000000000000000000000000000000000000000000000000"
      },
      {
        "output_type": "Change",
        "utxo_id": "0x8e0b2f9fb1d90e7713548d91b14c0f62272f552cafde86a7503235b1bf0e72e80009",
        "to": "0x80ee0f69976f3fc4667f1518b01d129e63b79600f7812e21dbe10f4273ed8d0c",
        "amount": "0x1866a",
        "asset_id": "0xf8f8b6283d7fa5b672b530cbb84fcccb4ff8dc40f8176ef4544ddb1f1952ad07"
      }
    ],
    "witnesses": [
      "0x42414b4f00000000000000000f313c038df532f27d89ec68747f7d168db15ef13eae0707a726147cfbe9750c4f178ae6b78ab346a85625e8c29fd66a66fc20f33f5a83b30238cd097830728f0000000000000024000000000000003a00000000000000257b2274797065223a22776562617574686e2e676574222c226368616c6c656e6765223a22222c226f726967696e223a2268747470733a2f2f736166652e62616b6f2e676c6f62616c222c2263726f73734f726967696e223a66616c73657d5c5649a7ff0bd5ebd978da34a879b6edc6d99d2ab43f3f9b78d8831b2fb463b90500000000"
    ],
    "metadata_inputs_offset": 496,
    "metadata_outputs_offset": 2112,
    "metadata_witnesses_offset": 2912,
    "script_gas_limit": 332715,
    "script": "0x724028c0724428985d451000724828a02d41148a24040000",
    "script_data": "0x00000000000003e8f8f8b6283d7fa5b672b530cbb84fcccb4ff8dc40f8176ef4544ddb1f1952ad07243ef4c2301f44eecbeaf1c39fee9379664b59a2e5b75317e8c7e7f26a25ed4d00000000000028f00000000000002905000000000000000d657865637574655f6f72646572000000000000000080ee0f69976f3fc4667f1518b01d129e63b79600f7812e21dbe10f4273ed8d0ce71d957a5d25499f6818e4d6c762ee13e6f06a9f830224d30461637faf943023000000000000007000000000000003e8000000000000000000000000000000000000000000000000000000000000008256b7d897284fefd10dc0b19631392debd7a6678486dfbe764030dec170f21245fb2b92c17160f9856664bde85bec51f5839d565898d489a6ef8fcb9b73575b57f8f8b6283d7fa5b672b530cbb84fcccb4ff8dc40f8176ef4544ddb1f1952ad07f8f8b6283d7fa5b672b530cbb84fcccb4ff8dc40f8176ef4544ddb1f1952ad070000000000000000",
    "receipts_root": "0xe22a1e72ebf60e8dc7d2a90b3391512b453c6c0b4db579942697a1de8c4fe2ed",
    "metadata_script_data_offset": 120,
    "bytecode_witness_index": 0,
    "storage_slots": [],
    "salt": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "metadata_contract_id": null,
    "metadata_contract_root": null,
    "metadata_state_root": null,
    "tx_pointer_block_height": 0,
    "tx_pointer_tx_index": 0,
    "input_contract_utxo_id": "0x00000000000000000000000000000000000000000000000000000000000000000000",
    "input_contract_balance_root": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "input_contract_state_root": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "input_contract_tx_pointer_block_height": 0,
    "input_contract_tx_pointer_tx_index": 0,
    "input_contract_contract_id": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "output_contract_input_index": 0,
    "output_contract_balance_root": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "output_contract_state_root": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "mint_amount": 0,
    "mint_asset_id": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "upgrade_purpose_type": "StateTransition",
    "upgrade_consensus_witness_index": null,
    "upgrade_consensus_checksum": null,
    "upgrade_state_root": null,
    "upload_root": null,
    "upload_witness_index": null,
    "upload_subsection_index": null,
    "upload_subsections_number": null,
    "upload_proof_set": []
  }
]

Query Parameters

app.pangea.foundation/v1/api/transactions?chains=FUEL

  • chains: This parameter is used to filter the data by specific blockchain networks.
  • from_block: This parameter is used to filter the data by a starting block number.
  • to_block: This parameter is used to filter the data by an ending block number.
  • transaction_type__in: This parameter is used to filter the data by a list of transaction type (i.e. Script, Mint, Create, Upgrade, Upload).
  • metadata_contract_id__in: This parameter is used to filter the data by a list of contract ids for contract deployed in a Create transaction type.
  • input_contract_contract_id__in: This parameter is used to filter the data by a list of input contract ids.
  • mint_asset_id__in: This parameter is used to filter the data by a list of mint asset ids.
  • mint_amount__lte: This parameter is used to filter on mint amount less than or equal to the value.
  • mint_amount__gte: This parameter is used to filter on mint amount greater than or equal to the value.
  • utxo_created__in: This parameter is used to filter the data by a list of output utxo ids.
  • utxo_spent__in: This parameter is used to filter the data by a list of input utxo ids.
  • address__in / contractid__in / identity__in: This parameter is used to filter the data by a list of addresses.
  • input_address__in: This parameter is used to filter the data by a list of input utxo owner addresses.

Fuel Transaction Outputs

Fetch transaction outputs from the last 10000 blocks for a given address which are currently unspent.

curl -s --location --request GET \
    "https://app.pangea.foundation/v1/api/transactions/outputs?chains=FUEL&from_block=-10000&unspent_at=latest&address__in=0xfe003f090b885be6f27991fef66d7d4bc0aeac94fa6dea12ab6c6eb84e471f34" \
    --header "Accept: application/jsonstream" \
    --header "Accept-Encoding: gzip" --compressed \
    --header "Authorization: Basic $PANGEA_AUTH" | jq

Response

[
...
  {
    "chain": 9889,
    "block_number": 3419263,
    "block_hash": "0xde4c50943696328d696c69636d3be33c8463745f7593e5f899ff53482fb72931",
    "transaction_hash": "0xd5590054a2ace6563293446a07139360afb967688fc243af1a87587797818a9a",
    "output_type": "Change",
    "utxo_id": "0xd5590054a2ace6563293446a07139360afb967688fc243af1a87587797818a9a0004",
    "to": "0xfe003f090b885be6f27991fef66d7d4bc0aeac94fa6dea12ab6c6eb84e471f34",
    "amount": "0xd10297",
    "asset_id": "0xf8f8b6283d7fa5b672b530cbb84fcccb4ff8dc40f8176ef4544ddb1f1952ad07",
    "input_index": null,
    "balance_root": null,
    "state_root": null,
    "contract_id": null
  }
]

Query Parameters

app.pangea.foundation/v1/api/transactions/outputs?chains=FUEL

  • chains: This parameter is used to filter the data by specific blockchain networks.
  • from_block: This parameter is used to filter the data by a starting block number.
  • to_block: This parameter is used to filter the data by an ending block number.
  • unspent_at: This parameter is used to filter the data by returning all unspent utxo at a given block height.
  • address__in / contractid__in / identity__in: This parameter is used to filter the data by a list of addresses.

Fuel Logs

Fetch logs from the last 10000 blocks.

curl -s --location --request GET \
    "https://app.pangea.foundation/v1/api/logs?chains=FUEL&from_block=-10000&to_block=latest" \
    --header "Accept: application/jsonstream" \
    --header "Accept-Encoding: gzip" --compressed \
    --header "Authorization: Basic $PANGEA_AUTH" | jq

Response

[
  ...
  {
    "chain": 9889,
    "block_number": "0x34278a",
    "block_hash": "0xaa170424b2ab2eca232e557f71573d759376b7710a0a8cf0b91dd4b385cbacbb",
    "transaction_index": 0,
    "transaction_hash": "0xa1831ea168642cb23c1f1f49d3aa84c3cd61ef7b8b8d0206d07173d3dff63694",
    "log_index": "0x2",
    "id": "0x243ef4c2301f44eecbeaf1c39fee9379664b59a2e5b75317e8c7e7f26a25ed4d",
    "ra": 0,
    "rb": 16905867214671608000,
    "pc": 54336,
    "is": 13952,
    "ptr": 67065462,
    "len": 256,
    "digest": "0x4cdb5e82a8e02910eb10c16ca93a19b5f2bc931cd2192e277f26a1970099a5ea",
    "data": "0x0000000000000001057c63d4f5931b298d5db38deff552a840eb9eb8b5553ae59911c2390d02832c6c49291704adc561074d887603c0c5e98b162b8662b746a1c945bb1c71e40f7900000000000000010000000000002710000000000000000000000000000000000000000000000000000000000000008256b7d897284fefd10dc0b19631392debd7a6678486dfbe764030dec170f21245fb2b92c17160f9856664bde85bec51f5839d565898d489a6ef8fcb9b73575b57f8f8b6283d7fa5b672b530cbb84fcccb4ff8dc40f8176ef4544ddb1f1952ad07f8f8b6283d7fa5b672b530cbb84fcccb4ff8dc40f8176ef4544ddb1f1952ad070000000000000000"
  }
]

Get logs by contract address

Filter logs by the contract address or id field using the __in operator: id__in from the last 10 blocks.

curl -s --location --request GET \
    "https://app.pangea.foundation/v1/api/logs?chains=FUEL&from_block=-10000&to_block=latest&id__in=0x773ca186f811c1655be9d6dcc84aef437cf25c2ebe8c367810529a8ee53fc92a" \
    --header "Accept: application/jsonstream" \
    --header "Accept-Encoding: gzip" --compressed \
    --header "Authorization: Basic $PANGEA_AUTH" | jq

Response

[
  ...
  {
    "chain": 9889,
    "block_number": "0x34278a",
    "block_hash": "0xaa170424b2ab2eca232e557f71573d759376b7710a0a8cf0b91dd4b385cbacbb",
    "transaction_index": 0,
    "transaction_hash": "0xa1831ea168642cb23c1f1f49d3aa84c3cd61ef7b8b8d0206d07173d3dff63694",
    "log_index": "0x1",
    "id": "0x773ca186f811c1655be9d6dcc84aef437cf25c2ebe8c367810529a8ee53fc92a",
    "ra": 0,
    "rb": 13279905576758129000,
    "pc": 133484,
    "is": 97608,
    "ptr": 67077494,
    "len": 80,
    "digest": "0xadea35948803887b3e7d22d2c9f2677d80fd72038ec97b40b4fb51bf85348ba6",
    "data": "0x0000000000000001243ef4c2301f44eecbeaf1c39fee9379664b59a2e5b75317e8c7e7f26a25ed4df8f8b6283d7fa5b672b530cbb84fcccb4ff8dc40f8176ef4544ddb1f1952ad070000000000002710"
  }
]

Query Parameters

app.pangea.foundation/v1/api/logs?chains=FUEL

  • chains: This parameter is used to filter the data by specific blockchain networks.
  • from_block: This parameter is used to filter the data by a starting block number.
  • to_block: This parameter is used to filter the data by an ending block number.
  • id__in: This parameter is used to filter the data by a list of contract ids.
  • ra__in: This parameter is used to filter the logs by a list of ra values.
  • rb__in: This parameter is used to filter the logs by a list of rb values.
  • address__in / contractid__in / identity__in: This parameter is used to filter the data by an ending data availability block number.

Fuel Receipts

Fetch receipts from the last 10000 blocks.

curl -s --location --request GET \
    "https://app.pangea.foundation/v1/api/receipts?chains=FUEL&from_block=-10000&to_block=latest" \
    --header "Accept: application/jsonstream" \
    --header "Accept-Encoding: gzip" --compressed \
    --header "Authorization: Basic $PANGEA_AUTH" | jq

Response

[
  ...
  {
    "chain": 9889,
    "block_number": "0x342c7f",
    "block_hash": "0xde4c50943696328d696c69636d3be33c8463745f7593e5f899ff53482fb72931",
    "transaction_index": 0,
    "transaction_hash": "0xd5590054a2ace6563293446a07139360afb967688fc243af1a87587797818a9a",
    "receipt_index": "0x6",
    "receipt_type": "Return",
    "id": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "pc": 10388,
    "is": 10368,
    "val": 1
  }
]

Query Parameters

app.pangea.foundation/v1/api/receipts?chains=FUEL

  • chains: This parameter is used to filter the data by specific blockchain networks.
  • from_block: This parameter is used to filter the data by a starting block number.
  • to_block: This parameter is used to filter the data by an ending block number.
  • receipt_type__in: This parameter is used to filter the data by a list of receipt types.

Fuel Messages

Fetch messages for the last 10000 blocks.

curl -s --location --request GET \
    "https://app.pangea.foundation/v1/api/messages?chains=FUEL&from_block=-10000&to_block=latest" \
    --header "Accept: application/jsonstream" \
    --header "Accept-Encoding: gzip" --compressed \
    --header "Authorization: Basic $PANGEA_AUTH" | jq

Response

[ 
  {
    "chain": 9889,
    "block_number": "0x33f3e6",
    "block_hash": "0x0bcf9fae88ea93e918bd2fc2c4c66530e2cd8d6d96ba56f38de690b55742980b",
    "da_block_number": 20927419,
    "message_type": "Incoming",
    "sender": "0x000000000000000000000000a4ca04d02bfdc3a2df56b9b6994520e69df43f67",
    "recipient": "0xe821b978bcce9abbf40c3e50ea30143e68c65fa95b9da8907fef59c02d954cec",
    "nonce": "0x00000000000000000000000000000000000000000000000000000000000000fb",
    "amount": 0,
    "data": "0x4ea6ccef1215d9479f1024dff70fc055ca538215d2c8c348beddffd54583d0e80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000000000000000000000000000000000001cf1512ba4b058ad46aff0427e71afeffd30f03a057c63d4f5931b298d5db38deff552a840eb9eb8b5553ae59911c2390d02832c00000000000000000000000000000000000000000000000000000000009896800000000000000000000000000000000000000000000000000000000000000006"
  }
]

Query Parameters

app.pangea.foundation/v1/api/messages?chains=FUEL

  • chains: This parameter is used to filter the data by specific blockchain networks.
  • from_block: This parameter is used to filter the data by a starting block number.
  • to_block: This parameter is used to filter the data by an ending block number.
  • from_da_block_number / da_block_number_gte: This parameter is used to filter the data by a starting data availability block number.
  • to_da_block_number / da_block_number_lte: This parameter is used to filter the data by a starting data availability block number.
  • sender__in: This parameter is used to filter the data by a sender address.
  • recipient__in: This parameter is used to filter the data by a recipient address.
  • amount__gte: This parameter is used to filter the data by by a value greater than or equal to the specified amount.
  • amount__lte: This parameter is used to filter the data by by a value less than or equal to the specified amount.
  • message_type__in / type__in: This parameter is used to filter the data by a message type (i.e. Incoming / Outgoing)

Early Access

These datasets are currently in our Beta environment. If you would like early access you can apply here

Early Access

These datasets are currently in our Beta environment. If you would like early access you can apply here

ERC20 Metadata

Fetch ERC20 metadata for tokens created in the last 24 hours.

curl -s --location --request GET \
    "https://app.pangea.foundation/v1/api/erc20?from_block=-8640" \
    --header "Accept: application/jsonstream" \
    --header "Accept-Encoding: gzip" --compressed \
    --header "Authorization: Basic $PANGEA_AUTH" | jq

Response

[ 
  ...
  {
    "chain": 1,
    "address": "0x765674b353d23bfba59067d1c5ed6c2dbf938d65",
    "name": "Blocksafe",
    "symbol": "Blocksafe",
    "decimals": 9
  }
]

Query Parameters

v1/api/erc20

  • chains: This parameter is used to filter the data by specific blockchain networks.
  • from_block: This parameter is used to filter the data by a starting block number.
  • to_block: This parameter is used to filter the data by an ending block number.
  • address__in: This parameter is used to filter the data by a list of addresses.
  • symbol__in: This parameter is used to filter the data by a list of token symbols.
  • name__in: This parameter is used to filter the data by a list of token names.
  • decimals__gte: This parameter is used to filter the data by a minimum value for decimals.
  • decimals__lte: This parameter is used to filter the data by a maximum value for decimals.

ERC20 Transfers

Fetch ERC20 transfers for the last 24 hours.

curl -s --location --request GET \
    "https://app.pangea.foundation/v1/api/erc20/transfers?chains=eth&from_block=-36" \
    --header "Accept: application/jsonstream" \
    --header "Accept-Encoding: gzip" --compressed \
    --header "Authorization: Basic $PANGEA_AUTH" | jq

Response

[ 
  ...
  {
    "chain": 1,
    "block_number": 18833878,
    "block_hash": "0x815afe6a4457464c3b0aede32cde214138843064b55dcadbdc82f5f9448721c3",
    "transaction_hash": "0xcbefe1346c9164b1310fe1d1770db88e5f04b9190caed22f4c420d3b04a4b482",
    "transaction_index": 53,
    "log_index": 63,
    "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
    "name": "Wrapped Ether",
    "symbol": "WETH",
    "decimals": 18,
    "from": "0x7d88b48f250830fc5a5f336cac03bae03091ebb5",
    "to": "0xf3de3c0d654fda23dad170f0f320a92172509127",
    "value": 0.416129078532441,
    "timestamp": 1703157347
  }
]

Filtering by mint/burn address

Fetch ERC20 token transfers for the last 24 hours where from address is 0x0000000000000000000000000000000000000000. Useful for tracking mint/burn events.

curl -s --location --request GET \
    "https://app.pangea.foundation/v1/api/erc20/transfers?chains=eth&from__in=0x0&from_block=-8640" \
    --header "Accept: application/jsonstream" \
    --header "Accept-Encoding: gzip" --compressed \
    --header "Authorization: Basic $PANGEA_AUTH" | jq

Values for a zero address includes falsey values:

  • 0x0
  • 0x0000000000000000000000000000000000000000

Response

[ 
  ...
  {
    "chain": 1,
    "block_number": 18834016,
    "block_hash": "0xeaf956087e4073b2fbfd12a88f64581bff39777830c41a290296b943e4ee172f",
    "transaction_hash": "0xc9aeba2f26a9e5a54ba0c4b1b46875383c8634ad66cab1c1a59fe9daf86091f9",
    "transaction_index": 154,
    "log_index": 318,
    "address": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84",
    "name": "Liquid staked Ether 2.0",
    "symbol": "stETH",
    "decimals": 18,
    "from": "0x0000000000000000000000000000000000000000",
    "to": "0x072b553efc22ae7dc9a1e4370dabd65b96c6f08e",
    "value": 0.1,
    "timestamp": 1703159003
  }
]

Query Parameters

v1/api/erc20/transfers

  • chains: This parameter is used to filter the data by specific blockchain networks.
  • from_block: This parameter is used to filter the data by a starting block number.
  • to_block: This parameter is used to filter the data by an ending block number.
  • address__in: This parameter is used to filter the data by a list of token addresses.
  • to__in: This parameter is used to filter the data by a list of to addresses.
  • from__in: This parameter is used to filter the data by a list of from addresses.
  • value__gte: This parameter is used to filter the data by a minimum value for the amount transfered.
  • value__lte: This parameter is used to filter the data by a maximum value for the amount transfered.

ERC20 Approvals

Fetch ERC20 approvals from the last 10 minutes

curl -s --location --request GET \
    "https://app.pangea.foundation/v1/api/erc20/approvals?chains=eth&from_block=-36" \
    --header "Accept: application/jsonstream" \
    --header "Accept-Encoding: gzip" --compressed \
    --header "Authorization: Basic $PANGEA_AUTH" | jq

Response

[ 
  ...
  {
    "chain": 1,
    "block_number": 18833914,
    "block_hash": "0xfaab9ae75ef071f6372c985f63a4bf1130cd1bdf93ce5d44fbd112f9b881ba72",
    "transaction_hash": "0x978eddad7453920c722a997b693ddcb5851129b9341a862a9901ba31bcadadd1",
    "transaction_index": 101,
    "log_index": 247,
    "address": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84",
    "name": "Liquid staked Ether 2.0",
    "symbol": "stETH",
    "decimals": 18,
    "owner": "0xe37e799d5077682fa0a244d46e5649f71457bd09",
    "spender": "0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0",
    "value": 103.06464599469388
  }
]

Query Parameters

v1/api/erc20/approvals

  • chains: This parameter is used to filter the data by specific blockchain networks.
  • from_block: This parameter is used to filter the data by a starting block number.
  • to_block: This parameter is used to filter the data by an ending block number.
  • address__in: This parameter is used to filter the data by a list of addresses.
  • owner__in: This parameter is used to filter the data by a list of addresses of the token owners.
  • spender__in: This parameter is used to filter the data by a list of addresses being granted approval to spend the owner's tokens.
  • value__gte: This parameter is used to filter the data by a minimum value for the amount approved.
  • value__lte: This parameter is used to filter the data by a maximum value for the amount approved.
  • symbol__in: This parameter is used to filter the data by a list of token symbols.
  • name__in: This parameter is used to filter the data by a list of token names.
  • decimals__gte: This parameter is used to filter the data by a minimum value for decimals.
  • decimals__lte: This parameter is used to filter the data by a maximum value for decimals.

SRC20 Metadata

Fetch SRC20 metadata for assets first minted in the last 10000 blocks.

curl -s --location --request GET \
    "https://app.pangea.foundation/v1/api/src20?chains=FUEL&from_block=-10000" \
    --header "Accept: application/jsonstream" \
    --header "Accept-Encoding: gzip" --compressed \
    --header "Authorization: Basic $PANGEA_AUTH" | jq

Response

[ 
  ...
  {
    "chain": 9889,
    "first_seen_block_number": 3930255,
    "first_seen_block_hash": "0xfd034e209385c4bf9bd96af47ccb20d573d58f591cbcf87c1c5a7c5273100411",
    "first_seen_transaction_hash": "0x70f4d62fae99f82235eee2960adc382171764d021e918a7eba5bb8460b810836",
    "first_seen_transaction_index": 0,
    "first_seen_receipt_index": 2,
    "contract_id": "0x62fac2f51b4a64d9f35c311ab5d846b801e19af4bc513ffc5d795451f07d2eb2",
    "asset_id": "0x96b7453266f4f1d8e519e146b2ace2e9cadbaae15741f312e0c9b2c3db51a91f",
    "name": "Constellation",
    "symbol": "CON",
    "decimals": 9
  }
]

Query Parameters

app.pangea.foundation/v1/api/src20?chains=FUEL

  • chains: This parameter is used to filter the data by specific blockchain networks.
  • from_block: This parameter is used to filter the data by a starting block number.
  • to_block: This parameter is used to filter the data by an ending block number.
  • contract_id__in: This parameter is used to filter the data by a list of contract ids.
  • asset_id__in: This parameter is used to filter the data by a list of asset ids.
  • symbol__in: This parameter is used to filter the data by a list of token symbols.
  • name__in: This parameter is used to filter the data by a list of token names.
  • decimals__gte: This parameter is used to filter the data by a minimum value for decimals.
  • decimals__lte: This parameter is used to filter the data by a maximum value for decimals.

Early Access

These datasets are currently in our Beta environment. If you would like early access you can apply here

Early Access

These datasets are currently in our Beta environment. If you would like early access you can apply here

Early Access

These datasets are currently in our Beta environment. If you would like early access you can apply here

Tokens

These APIs provide real-time and historical aggregated data about tokens.

Data from Pangea's DEX toolboxes (e.g. Uniswap V2, Uniswap V3) is aggregated into time windows, allowing users to get insights into specific intervals (e.g. Minute, Hour, Day) and to filter using UTC time.

By normalising and converting toolbox price data, users can receive aggregated USD pricing in Open-High-Low-Close (OHLC) candle format.

This data is currently limited to the past 30 days.

Token List

Returns a list of all tokens with their last updated USD price.

curl -s --location --request GET \
    "https://app.pangea.foundation/v1/api/markets/tokens" \
    --header "Accept: application/jsonstream" \
    --header "Accept-Encoding: gzip" --compressed \
    --header "Authorization: Basic $PANGEA_AUTH" | jq

Response

[
  ...
  {
    "symbol": "Silo",
    "name": "Silo Governance Token",
    "address": "0x6f80310ca7f2c654691d1383149fa1a57d8ab1f8",
    "usd_price": 0.06035906938920653,
    "decimals": 18,
    "last_update": 1726773248
  }
  ...
]

Query Parameters

v1/api/markets/tokens

None

Candles

Returns the aggregated volume and USD pricing in an Open-High-Low-Close (OHLC) candle format for a token for a specified time window.

curl -s --location --request GET \
    "https://app.pangea.foundation/v1/api/markets/tokens/0x2260fac5e5542a773aa44fbcfedf7c193bc2c599?start=1724408000&end=1727827200&interval=Hour" \
    --header "Accept: application/jsonstream" \
    --header "Accept-Encoding: gzip" --compressed \
    --header "Authorization: Basic $PANGEA_AUTH" | jq

Response

[
  ...
  {
    "interval": "Hour",
    "provider": "All",
    "chain": "ALL",
    "start_time": 1725001200,
    "name": "Wrapped BTC",
    "symbol": "WBTC",
    "address": "0x2260fac5e5542a773aa44fbcfedf7c193bc2c599",
    "open": 58740.63001224425,
    "high": 59251.799084892635,
    "low": 58675.686585557254,
    "close": 59114.727689365696,
    "volume": 24.94231951
  },
  ...
]

Query Parameters

v1/api/markets/tokens/<token>?start=<utc_timestamp>&end=<utc_timestamp>

  • token: A token contract address is mandatory and must be provided as a path parameter.
  • start: This mandatory parameter is used to filter the data by a starting timestamp.
  • end: This mandatory parameter is used to filter the data by an ending timestamp.
  • chain: This parameter is used to filter the data by specific blockchain networks. Defaults to All.
  • interval: This parameter is used to determine the aggregation window interval (i.e. Minute, Hour, Day, Month). Defaults to Minute.
  • provider: This parameter is used to filter the data by a data source. Currently supports uniswap-v2 and uniswap-v3. Defaults to All.

Uniswap V3 API

Uniswap V3 introduces a new approach to liquidity provision through a unique mechanism called concentrated liquidity. This mechanism grants liquidity providers the ability to choose the specific price range or tick space in which liquidity is active. When the price crosses that tick space the liquidity becomes active, moving the proportion of token0 and token1, which earns fees in return for putting tokens at risk. This causes impermanent loss and can be hedged with a good strategy. This approach impacts users in two distinct ways.

Firstly, liquidity providers must actively manage liquidity positions using an automated strategy in order to maximize profits. Secondly, for a trader to quote a swap awareness of all liquidity positions is essential, unlike the simple x * y = k constant function calculation with reserves liquidity pools.

Our Toolbox API for Uniswap V3 provides comprehensive coverage of Pools, Prices, and Liquidity. We offer detailed information on each pool, including tokens, factory, and pool creation. Our Prices feature calculates the market price with volume, and our Liquidity feature supports quotes and wallet positions.

This toolbox covers Uniswap V3 and all of its forks, cross chain.

Early Access

These datasets are currently in our Beta environment. If you would like early access you can apply here

Uniswap V3 Pools

Fetch pools containing usdc = 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48

curl -s --location --request GET \
    "https://app.pangea.foundation/v1/api/uniswap/v3/pools?chains=ETH&from_block=13605124&to_block=13616454&tokens__in=0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48" \
    --header "Accept: application/json" \
    --header "Accept-Encoding: gzip" --compressed \
    --header "Authorization: Basic $PANGEA_AUTH" | jq

Response

[
  ... 
  {
    "chain": 1,
    "block_number": 13616454,
    "block_hash": "0x7bd7e332ed6a56191e9b33cbb3407ed8b5d0826dda453e691290e8ef40c88e54",
    "transaction_hash": "0x9a773c2ab3acc47552e73d553b35e29c8fb0ca9576882f46552254232edb3cfd",
    "transaction_index": 34,
    "log_index": 27,
    "factory": "0x1f98431c8ad98523631ae4a59f267346ea31f984",
    "token0_address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
    "token0_decimals": 6,
    "token0_name": "USD Coin",
    "token0_symbol": "USDC",
    "token1_address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
    "token1_decimals": 18,
    "token1_name": "Wrapped Ether",
    "token1_symbol": "WETH",
    "pool_address": "0xe0554a476a092703abdb3ef35c80e0d76d32939f",
    "fee": 100,
    "tick_spacing": 1,
    "timestamp": 1636926269
  }
]

Fetch data for one pool by pool address:

curl -s --location --request GET \
    "https://app.pangea.foundation/v1/api/uniswap/v3/pools?chains=ETH&from_block=1&pool_address__in=0x31ac258b911af9a0d2669ebdfc4e39d92e96b772" \
    --header "Accept: application/json" \
    --header "Accept-Encoding: gzip" --compressed \
    --header "Authorization: Basic $PANGEA_AUTH" | jq

Response

[
  {
    "chain": 1,
    "block_number": 16987371,
    "block_hash": "0xf7dc333304d4a5e1909e84ae48596bbbe10f58e5b21b1dad3ee44ffa84c25234",
    "transaction_hash": "0x02857c539326ef2dceaea946c8dfe77ad4c3e65350606f90fc5debaedccb8685",
    "transaction_index": 88,
    "log_index": 306,
    "factory": "0xbaceb8ec6b9355dfc0269c18bac9d6e2bdc29c4f",
    "token0_address": "0x6b175474e89094c44da98b954eedeac495271d0f",
    "token0_decimals": 18,
    "token0_name": "Dai Stablecoin",
    "token0_symbol": "DAI",
    "token1_address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
    "token1_decimals": 6,
    "token1_name": "USD Coin",
    "token1_symbol": "USDC",
    "pool_address": "0x31ac258b911af9a0d2669ebdfc4e39d92e96b772",
    "fee": 100,
    "tick_spacing": 1,
    "timestamp": 1680756539
  }
]

Fetch all pools that trade USDC and DAI tokens using token0__in and token1__in

"token0": "0x6b175474e89094c44da98b954eedeac495271d0f",
"token1": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",

Note token0 or token1 are ordered alphabetically. This is determined by the smart contract so could be different if the implementation has been modified beyond Uniswap V3

curl -s --location --request GET \
    "https://app.pangea.foundation/v1/api/uniswap/v3/pools?chains=ETH&from_block=1&token0__in=0x6b175474e89094c44da98b954eedeac495271d0f&token1__in=0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48" \
    --header "Accept: application/json" \
    --header "Accept-Encoding: gzip" --compressed \
    --header "Authorization: Basic $PANGEA_AUTH" | jq

Response

// todo: update response when missing factory address is added

[
  ...
  {
    "chain": 1,
    "block_number": 18384222,
    "block_hash": "0xcfa28f09b60d44ac817143ed7bce4ffff6522ef54f228091e1efdb6659fccd8e",
    "transaction_hash": "0xea979b2cf4837f44b7e5331a2b62a5d1b3e16fa0f025119dace9a968051f30bb",
    "transaction_index": 0,
    "log_index": 0,
    "factory": "0xc7a590291e07b9fe9e64b86c58fd8fc764308c4a",
    "token0_address": "0x6b175474e89094c44da98b954eedeac495271d0f",
    "token0_decimals": 18,
    "token0_name": "Dai Stablecoin",
    "token0_symbol": "DAI",
    "token1_address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
    "token1_decimals": 6,
    "token1_name": "USD Coin",
    "token1_symbol": "USDC",
    "pool_address": "0xa847a0ddc1eab013d2c8f6d8b37766df99776bc6",
    "fee": 10,
    "tick_spacing": 1,
    "timestamp": 1697716643
  }
]

Fetch pools by factory address

curl -s --location --request GET \
    "https://app.pangea.foundation/v1/api/uniswap/v3/pools?chains=ETH&from_block=1&factory_address__in=0x1f98431c8ad98523631ae4a59f267346ea31f984" \
    --header "Accept: application/json" \
    --header "Accept-Encoding: gzip" --compressed \
    --header "Authorization: Basic $PANGEA_AUTH" | jq

Response

[
  ...
  {
    "chain": 1,
    "block_number": 12381836,
    "block_hash": "0x2fb2ec7b9739b4cf2810feae377f6552dcd00ba97f9de61755690f02749e564e",
    "transaction_hash": "0x3a2bcf05921f38aea75c6562e378e2334a2c368a95dac4dca654ccdc74474fcd",
    "transaction_index": 97,
    "log_index": 148,
    "factory": "0x1f98431c8ad98523631ae4a59f267346ea31f984",
    "token0_address": "0x5f183834b61bf4d0ce28033871bfa408ff97f735",
    "token0_decimals": 18,
    "token0_name": "KOCHI INU",
    "token0_symbol": "KOCHI",
    "token1_address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
    "token1_decimals": 18,
    "token1_name": "Wrapped Ether",
    "token1_symbol": "WETH",
    "pool_address": "0xdab59355190d110f9f71a5f97993511343264db3",
    "fee": 3000,
    "tick_spacing": 60,
    "timestamp": 1620319088
  }
]

Query Parameters

v1/api/uniswap/v3/pools

  • chains: This parameter is used to filter the data by specific blockchain networks.
  • from_block: This parameter is used to filter the data by a starting block number.
  • to_block: This parameter is used to filter the data by an ending block number.
  • pool_address__in: This parameter is used to filter the data by a list of pool addresses.
  • factory_address__in: This parameter is used to filter the data by a list of pool factory addresses.
  • token0__in: This parameter is used to filter the data by a list of token0 names or symbols.
  • token1__in: This parameter is used to filter the data by a list of token1 names or symbols.
  • token0_address__in: This parameter is used to filter the data by a list of token0 addresses.
  • token1_address__in: This parameter is used to filter the data by a list of token1 addresses.
  • tokens__in: This parameter is used to filter the data by a list of token addresses, which can include both token0 and token1 addresses.
  • fee__gte: This parameter is used to filter the data by a minimum value for fee greater than or equal to the specified value.
  • fee__lte: This parameter is used to filter the data by a maximum value for fee less than or equal to the specified value.
  • tick_spacing__gte: This parameter is used to filter the data by a minimum value for tick spacing greater than or equal to the specified value.
  • tick_spacing__lte: This parameter is used to filter the data by a maximum value for tick spacing less than or equal to the specified value.

Uniswap V3 Prices

Fetch 50 blocks of prices for USDC-WETH 5 bps Uniswap V3 Pool.

curl -s --location --request GET \
    "https://app.pangea.foundation/v1/api/uniswap/v3/prices?chains=ETH&pool_address__in=0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640&from_block=-50&to_block=latest" \
    --header "Accept: application/jsonstream" \
    --header "Accept-Encoding: gzip" --compressed \
    --header "Authorization: Basic $PANGEA_AUTH" | jq

Result

[
  ...
  {
    "chain": 1,
    "block_number": 18842690,
    "block_hash": "0x1d233d789804a97d3bb53915ed4f5d596de75f869c9a6711ab90d7e239e3da5e",
    "transaction_hash": "0x5f4bfe683768345f9f2557d2fc550761dfef888089c4c545729015a338853bca",
    "transaction_index": 144,
    "log_index": 223,
    "pool_address": "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640",
    "virtual0": 8.294887573219187e-15,
    "virtual1": 2.2507602385291289e+52,
    "price": 2313.345166196729,
    "sender": "0xdef1c0ded9bec7f1a1670819833240f027b25eff",
    "receiver": "0x60500e4c0351e96ecf38a9cd0f923cfde042525e",
    "amount0": -5230.360226,
    "amount1": 2.2620641068327454,
    "liquidity": 13663748802166678000,
    "tick": 198855,
    "token0_address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
    "token0_decimals": 6,
    "token0_name": "USD Coin",
    "token0_symbol": "USDC",
    "token1_address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
    "token1_decimals": 18,
    "token1_name": "Wrapped Ether",
    "token1_symbol": "WETH",
    "timestamp": 1703263931
  }
]

Query Parameters

v1/api/uniswap/v3/prices

  • chains: This parameter is used to filter the data by specific blockchain networks.
  • from_block: This parameter is used to filter the data by a starting block number.
  • to_block: This parameter is used to filter the data by an ending block number.
  • pool_address__in: This parameter is used to filter the data by a list of pool addresses.
  • pool_factory_address__in: This parameter is used to filter the data by a list of pool factory addresses.
  • virtual0__gte: This parameter is used to filter the data by a value greater than or equal to the minimum virtual0 value.
  • virtual0__lte: This parameter is used to filter the data by a value less than or equal to the maximum virtual0 value.
  • virtual1__gte: This parameter is used to filter the data by a value greater than or equal to the minimum virtual1 value.
  • virtual1__lte: This parameter is used to filter the data by a value less than or equal to the maximum virtual1 value.
  • price__gte: This parameter is used to filter the data by a value greater than or equal to the minimum price value.
  • price__lte: This parameter is used to filter the data by a value less than or equal to the maximum price value.
  • sender__in: This parameter is used to filter the data by a list of sender addresses.
  • receiver__in: This parameter is used to filter the data by a list of receiver addresses.
  • amount0__gte: This parameter is used to filter the data by a value greater than or equal to the minimum amount0 value.
  • amount0__lte: This parameter is used to filter the data by a value less than or equal to the maximum amount0 value.
  • amount1__gte: This parameter is used to filter the data by a value greater than or equal to the minimum amount1 value.
  • amount1__lte: This parameter is used to filter the data by a value less than or equal to the maximum amount1 value.
  • liquidity__gte: This parameter is used to filter the data by a value greater than or equal to the minimum liquidity value.
  • liquidity__lte: This parameter is used to filter the data by a value less than or equal to the maximum liquidity value.
  • tick__gte: This parameter is used to filter the data by a value greater than or equal to the minimum tick value.
  • tick__lte: This parameter is used to filter the data by a value less than or equal to the maximum tick value.
  • token0_address__in: This parameter is used to filter the data by a list of token0 addresses.
  • token0_symbol__in: This parameter is used to filter the data by a list of token0 symbols.
  • token1_address__in: This parameter is used to filter the data by a list of token1 addresses.
  • token1_symbol__in: This parameter is used to filter the data by a list of token1 symbols.
  • tokens_address__in: This parameter is used to filter the data by a list of token addresses.
  • tokens_symbol__in: This parameter is used to filter the data by a list of token symbols.
  • price__gte: This parameter is used to filter the data by a value greater than or equal to the specified price.
  • price__lte: This parameter is used to filter the data by a value less than or equal to the specified price.

Uniswap V3 Positions

Fetch mint and burn events.

curl -s --location --request GET \
    "https://app.pangea.foundation/v1/api/uniswap/v3/positions?chains=ETH&pool_address__in=0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640&from_block=-100&to_block=latest" \
    --header "Accept: application/jsonstream" \
    --header "Accept-Encoding: gzip" --compressed \
    --header "Authorization: Basic $PANGEA_AUTH" | jq

Response

[
  ...
  {
    "chain": 1,
    "block_number": 18842611,
    "block_hash": "0xc97e2a9ad3082911051ecdbe19ad00ef6585eb21fdce12062de1de2765151c03",
    "transaction_hash": "0x3e94bc7f7868fe720ffe5e00fdfe6101352bc35ed37d00846299d04a63892d81",
    "transaction_index": 10,
    "log_index": 54,
    "timestamp": 1703262947,
    "event": "Burn",
    "sender": "0x51c72848c68a965f66fa7a88855f9f7784502a7f",
    "recipient": "0x51c72848c68a965f66fa7a88855f9f7784502a7f",
    "tick_lower": 198810,
    "tick_upper": 198820,
    "amount": 435410574775573100000,
    "amount0": 7261552.486624,
    "amount1": 1390.2097598917737,
    "pool_address": "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640"
  }
]

Query Parameters

v1/api/uniswap/v3/positions

  • chains: This parameter is used to filter the data by specific blockchain networks.
  • from_block: This parameter is used to filter the data by a starting block number.
  • to_block: This parameter is used to filter the data by an ending block number.
  • pool_address__in: This parameter is used to filter the data by a list of pool addresses.
  • sender__in: This parameter is used to filter the data by a list of sender addresses.
  • recipient__in: This parameter is used to filter the data by a list of recipient addresses.
  • amount0__gte: This parameter is used to filter the data by a value greater than or equal to the minimum amount0 value.
  • amount0__lte: This parameter is used to filter the data by a value less than or equal to the maximum amount0 value.
  • amount1__gte: This parameter is used to filter the data by a value greater than or equal to the minimum amount1 value.
  • amount1__lte: This parameter is used to filter the data by a value less than or equal to the maximum amount1 value.
  • amount__gte: This parameter is used to filter the data by a value greater than or equal to the minimum amount value.
  • amount__lte: This parameter is used to filter the data by a value less than or equal to the maximum amount value.
  • tick_lower__gte: This parameter is used to filter the data by a value greater than or equal to the minimum tick_lower value.
  • tick_lower__lte: This parameter is used to filter the data by a value less than or equal to the maximum tick_lower value.
  • tick_upper__gte: This parameter is used to filter the data by a value greater than or equal to the minimum tick_upper value.
  • tick_upper__lte: This parameter is used to filter the data by a value less than or equal to the maximum tick_upper value.
  • tick__gte: This parameter is used to filter the data by a value greater than or equal to the minimum tick_lower value.
  • tick__lte: This parameter is used to filter the data by a value less than or equal to the maximum tick_upper value.

Uniswap V3 Fees

Fetch collect events.

curl -s --location --request GET \
    "https://app.pangea.foundation/v1/api/uniswap/v3/fees?chains=ETH&pool_address__in=0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640&from_block=-100&to_block=latest" \
    --header "Accept: application/jsonstream" \
    --header "Accept-Encoding: gzip" --compressed \
    --header "Authorization: Basic $PANGEA_AUTH" | jq

Response

[
  ...
  {
    "chain": 1,
    "block_number": 18842611,
    "block_hash": "0xc97e2a9ad3082911051ecdbe19ad00ef6585eb21fdce12062de1de2765151c03",
    "transaction_hash": "0x3e94bc7f7868fe720ffe5e00fdfe6101352bc35ed37d00846299d04a63892d81",
    "transaction_index": 10,
    "log_index": 57,
    "timestamp": 1703262947,
    "event": "Collect",
    "sender": "0x51c72848c68a965f66fa7a88855f9f7784502a7f",
    "recipient": "0x51c72848c68a965f66fa7a88855f9f7784502a7f",
    "tick_lower": 198810,
    "tick_upper": 198820,
    "amount0": 7261587.738074,
    "amount1": 1390.2097598917737,
    "pool_address": "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640"
  }
]

Query Parameters

v1/api/uniswap/v3/fees

  • chains: This parameter is used to filter the data by specific blockchain networks.
  • from_block: This parameter is used to filter the data by a starting block number.
  • to_block: This parameter is used to filter the data by an ending block number.
  • pool_address__in: This parameter is used to filter the data by a list of pool addresses.
  • sender__in: This parameter is used to filter the data by a list of sender addresses.
  • recipient__in: This parameter is used to filter the data by a list of recipient addresses.
  • amount0__gte: This parameter is used to filter the data by a value greater than or equal to the minimum amount0 value.
  • amount0__lte: This parameter is used to filter the data by a value less than or equal to the maximum amount0 value.
  • amount1__gte: This parameter is used to filter the data by a value greater than or equal to the minimum amount1 value.
  • amount1__lte: This parameter is used to filter the data by a value less than or equal to the maximum amount1 value.
  • tick_lower__gte: This parameter is used to filter the data by a value greater than or equal to the minimum tick_lower value.
  • tick_lower__lte: This parameter is used to filter the data by a value less than or equal to the maximum tick_lower value.
  • tick_upper__gte: This parameter is used to filter the data by a value greater than or equal to the minimum tick_upper value.
  • tick_upper__lte: This parameter is used to filter the data by a value less than or equal to the maximum tick_upper value.
  • tick__gte: This parameter is used to filter the data by a value greater than or equal to the minimum tick_lower value.
  • tick__lte: This parameter is used to filter the data by a value less than or equal to the maximum tick_upper value.

Uniswap V2 API

In the Uniswap V2 protocol, there are two contracts: Factory and Pair. The Factory is seen externally as a site like Pancakeswap or Sushiswap, while the Pair is the actual exchange between two tokens. The relationship between the two contracts ensures that the correct codebase is deployed and that fees are collected properly.

Uniswap V2 is a constant function market maker where tokens are swapped at a price on the constant function curve.

reserve0 * reserve1 = k

Liquidty providers receive an LP Token for the Pair for adding tokens in the correct proportions of reserve0 and reserve1. In return a new LP Token for the Pair is received. Fees are accumulated in reserve0 and reserve1 redeemable by LP Token holders making it a passive income strategy. Traders need to know the volumes of reserve0 and reserve1 to build a quote for a swap.

amount1 = amount0 * reserve1 / reserve0

Liquidity Providers have to pursue an active strategy to mitigate risk of impermanent loss and liquidation.

This toolbox covers Uniswap V2 and all of its forks, cross chain.

Uniswap V2 Pairs

Fetch pair created

Get pairs created between blocks 1 and latest that trade with USDC token 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48

curl -s --location --request GET \
    "https://app.pangea.foundation/v1/api/uniswap/v2/pairs?chains=ETH&from_block=1&tokens__in=0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48" \
    --header "Accept: application/jsonstream" \
    --header "Accept-Encoding: gzip" --compressed \
    --header "Authorization: Basic $PANGEA_AUTH" | jq

Result

[
  ...
  {
    "chain": 1,
    "block_number": 10979701,
    "block_hash": "0x246b405020d3af635bba059f8d48cbf3c0baf08790d2ef40346d7241dae3451b",
    "transaction_hash": "0x3689e100892fa5679b7d99a3eef8c4912eb8f0a96fed79b86610cd35d84fe6cf",
    "transaction_index": 11,
    "log_index": 37,
    "factory": "0x5c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f",
    "token0_address": "0x4e44fe174e934ff78a77bee3c2b752fd1beefdef",
    "token0_decimals": 18,
    "token0_name": "GOKU",
    "token0_symbol": "GOKU",
    "token1_address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
    "token1_decimals": 6,
    "token1_name": "USD Coin",
    "token1_symbol": "USDC",
    "pair_address": "0x691d6ac2ad2b87eabb1d4219ecee7fc0768f2201",
    "pair_index": 12615,
    "timestamp": 1601683999
  }
]

The chains parameter accepts the "chain", "chain_code" or "chain_name" as the input. In this query it is set to ETH, indicating that the information should be specific to the Ethereum blockchain. There are three possible values for Ethereum: ETH, 1 or Ethereum. These values are found on the /status endpoint for supported chains.

The from_block parameter is set to 16821500, indicating that the query should begin at block number 16821500.

The to_block parameter is set to latest, indicating that the query should continue until the latest block.

*_block parameters are set to latest by default.

The tokens__in parameter is a filter on the token field. Here it is set to 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48, indicating that the query should only return information on pairs that include the specified token0 or token1 address.

Uniswap V2 Pairs Examples

Tip: To get the latest 10 blocks of data try ?&from_block=-10&chains=ETH

Filter by Factory Address

curl -s --location --request GET \
    "https://app.pangea.foundation/v1/api/uniswap/v2/pairs?chains=ETH&from_block=-8640&factory_address__in=0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f" \
    --header "Accept: application/jsonstream" \
    --header "Accept-Encoding: gzip" --compressed \
    --header "Authorization: Basic $PANGEA_AUTH" | jq

This request specifies that we are interested in Uniswap V2 pairs on Ethereum, and that the query should start from the from_block -8640 to return results from the last 24 hours. The factory_address__in parameter is set to the Uniswap V2 factory address to ensure the query only returns pairs created by the official Uniswap V2 factory.

Filter by Factory Address and Tokens Address

curl -s --location --request GET \
    "https://app.pangea.foundation/v1/api/uniswap/v2/pairs?chains=ETH&from_block=-60480&factory_address__in=0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f&tokens__in=0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48" \
    --header "Accept: application/jsonstream" \
    --header "Accept-Encoding: gzip" --compressed \
    --header "Authorization: Basic $PANGEA_AUTH" | jq

If you need to filter by specific tokens, say USDC, you can use the token0__in, token1__in or tokens__in parameters as described in the query parameters above. This example query filters results from the last 7 days by setting from_block to 60480.

Query parameters

v1/api/uniswap/v2/pairs

  • chains: This parameter is used to filter the data by specific blockchain networks.
  • from_block: This parameter is used to filter the data by a starting block number.
  • to_block: This parameter is used to filter the data by an ending block number.
  • pair_address__in: This parameter is used to filter the data by a list of pair addresses.
  • factory_address__in: This parameter is used to filter the data by a list of pair factory addresses.
  • token0__in: This parameter is used to filter the data by a list of token0 names or symbols.
  • token1__in: This parameter is used to filter the data by a list of token1 names or symbols.
  • token0_address__in: This parameter is used to filter the data by a list of token0 addresses.
  • token1_address__in: This parameter is used to filter the data by a list of token1 addresses.
  • tokens__in: This parameter is used to filter the data by a list of token addresses, which can include both token0 and token1 addresses.

Uniswap V2 Prices

Fetch prices for a specific pair or list of pairs in the last 24hrs (8640 blocks):

curl -s --location --request GET \
    "https://app.pangea.foundation/v1/api/uniswap/v2/prices?chains=ETH&pair_address__in=0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc&from_block=-8640&to_block=latest" \
    --header "Accept: application/jsonstream" \
    --header "Accept-Encoding: gzip" --compressed \
    --header "Authorization: Basic $PANGEA_AUTH" | jq

Response

{
  ...
  {
    "chain": 1,
    "block_number": 18918998,
    "block_hash": "0x1962d15d1feaffa0c1dcaf3edebb85a2ac74014695eaf297d5c0e296cc52057c",
    "transaction_hash": "0x354d31eb4f34135addda837f619343b170160e3ec953b8a55a67d356b3f99afa",
    "transaction_index": 139,
    "log_index": 198,
    "pair_address": "0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc",
    "event": "swap",
    "reserve0": "0x30d35961fdd5",
    "reserve1": "0x4b29ee82c04e24119f1",
    "price": 2419.9079852881446,
    "sender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
    "receiver": "0x4cb6f0ef0eeb503f8065af1a6e6d5dd46197d3d9",
    "amount0": 3028.627959,
    "amount1": 1.2552416537518787,
    "lp_amount": 0,
    "protocol_fee": null,
    "token0_address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
    "token0_decimals": 6,
    "token0_name": "USD Coin",
    "token0_symbol": "USDC",
    "token1_address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
    "token1_decimals": 18,
    "token1_name": "Wrapped Ether",
    "token1_symbol": "WETH",
    "timestamp": 1704190007
  }
}

Query parameters

v1/api/uniswap/v2/prices

  • chains: This parameter is used to filter the data by chain. Supported chains are advertised on /v1/api/status URL
  • from_block: This parameter is used to filter the data by a starting block number.
  • to_block: This parameter is used to filter the data by an ending block number.
  • pair_address__in: This parameter is used to filter the data by a list of pair addresses.
  • pair_factory_address__in: This parameter is used to filter the data by a list of pair factory addresses.
  • reserve0__gte: This parameter is used to filter on the reserve of token0 if it is greater than or equal to value.
  • reserve0__lte: This parameter is used to filter on the reserve of token0 if it is less than or equal to value.
  • reserve1__gte: This parameter is used to filter on the reserve of token1 if it is greater than or equal to value.
  • reserve1__lte: This parameter is used to filter on the reserve of token1 if it is less than or equal to value.
  • price__gte: This parameter is used to filter on price if it is greater than or equal to value.
  • price__lte: This parameter is used to filter on price if it is less than or equal to value.
  • sender__in: This parameter is used to filter the data by a list of sender addresses.
  • receiver__in: This parameter is used to filter the data by a list of receiver addresses.
  • amount0__gte: This parameter is used to filter the data if greater than or equal to value for amount0.
  • amount0__lte: This parameter is used to filter the data if less than or equal to value for amount0.
  • amount1__gte: This parameter is used to filter the data by a minimum value for amount1.
  • amount1__lte: This parameter is used to filter the data by a maximum value for amount1.
  • lp_amount__gte: This parameter is used to filter the data by a minimum value for lp_amount.
  • lp_amount__lte: This parameter is used to filter the data by a maximum value for lp_amount.
  • protocol_fee__gte: This parameter is used to filter the data by a minimum value for protocol_fee.
  • protocol_fee__lte: This parameter is used to filter the data by a maximum value for protocol_fee.
  • token0_address__in: This parameter is used to filter the data by a list of token0 addresses.
  • token0_symbol__in: This parameter is used to filter the data by a list of token0 symbols.
  • token1_address__in: This parameter is used to filter the data by a list of token1 addresses.
  • token1_symbol__in: This parameter is used to filter the data by a list of token1 symbols.
  • tokens_address__in: This parameter is used to filter the data by a list of token addresses.
  • tokens_symbol__in: This parameter is used to filter the data by a list of token symbols.

These parameters can be used in combination to create complex filters for the data returned by the API.

Curve Pools

Fetch 3pool by filtering on pool address.

curl -s --location --request GET \
    "https://app.pangea.foundation/v1/api/curve/pools?chains=ETH&pool_address__in=0xbebc44782c7db0a1a60cb6fe97d0b483032ff1c7&from_block=1" \
    --header "Accept: application/jsonstream" \
    --header "Accept-Encoding: gzip" --compressed \
    --header "Authorization: Basic $PANGEA_AUTH" | jq

Response

[
  {
  "chain": 1,
  "owner": "0xecb456ea5365865ebab8a2661b0c503410e9b347",
  "token": "0x6c3f90f043a72fa612cbac8115ee7e52bde6e490",
  "token_decimals": 18,
  "token_name": "Curve.fi DAI/USDC/USDT",
  "token_symbol": "3Crv",
  "base_pool": "",
  "fee": "0xf4240",
  "admin_fee": "0x12a05f200",
  "initial_a": "0x1388",
  "future_a": "0x7d0",
  "initial_a_time": "0x628f5009",
  "future_a_time": "0x629872cb",
  "pool_address": "0xbebc44782c7db0a1a60cb6fe97d0b483032ff1c7",
  "n_coins": 3,
  "coin0": "0x6b175474e89094c44da98b954eedeac495271d0f",
  "coin1": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
  "coin2": "0xdac17f958d2ee523a2206206994597c13d831ec7",
  "coin3": null,
  "coin4": null,
  "coin5": null,
  "coin0_decimals": 18,
  "coin1_decimals": 6,
  "coin2_decimals": 6,
  "coin3_decimals": null,
  "coin4_decimals": null,
  "coin5_decimals": null,
  "coin0_name": "Dai Stablecoin",
  "coin1_name": "USD Coin",
  "coin2_name": "Tether USD",
  "coin3_name": null,
  "coin4_name": null,
  "coin5_name": null,
  "coin0_symbol": "DAI",
  "coin1_symbol": "USDC",
  "coin2_symbol": "USDT",
  "coin3_symbol": null,
  "coin4_symbol": null,
  "coin5_symbol": null,
  "base_coin0": null,
  "base_coin1": null,
  "base_coin2": null,
  "base_coin3": null,
  "base_coin4": null,
  "base_coin5": null,
  "base_coin0_decimals": null,
  "base_coin1_decimals": null,
  "base_coin2_decimals": null,
  "base_coin3_decimals": null,
  "base_coin4_decimals": null,
  "base_coin5_decimals": null,
  "base_coin0_name": null,
  "base_coin1_name": null,
  "base_coin2_name": null,
  "base_coin3_name": null,
  "base_coin4_name": null,
  "base_coin5_name": null,
  "base_coin0_symbol": null,
  "base_coin1_symbol": null,
  "base_coin2_symbol": null,
  "base_coin3_symbol": null,
  "base_coin4_symbol": null,
  "base_coin5_symbol": null,
  "underlying_coin0": null,
  "underlying_coin1": null,
  "underlying_coin2": null,
  "underlying_coin3": null,
  "underlying_coin4": null,
  "underlying_coin5": null,
  "underlying_coin0_decimals": null,
  "underlying_coin1_decimals": null,
  "underlying_coin2_decimals": null,
  "underlying_coin3_decimals": null,
  "underlying_coin4_decimals": null,
  "underlying_coin5_decimals": null,
  "underlying_coin0_name": null,
  "underlying_coin1_name": null,
  "underlying_coin2_name": null,
  "underlying_coin3_name": null,
  "underlying_coin4_name": null,
  "underlying_coin5_name": null,
  "underlying_coin0_symbol": null,
  "underlying_coin1_symbol": null,
  "underlying_coin2_symbol": null,
  "underlying_coin3_symbol": null,
  "underlying_coin4_symbol": null,
  "underlying_coin5_symbol": null 
  }
]

Curve Pools

Fetch stETH pool by filtering on LP token.

curl -s --location --request GET \
    "https://app.pangea.foundation/v1/api/curve/pools?chains=ETH&token__in=0x06325440d014e39736583c165c2963ba99faf14e&from_block=1" \
    --header "Accept: application/jsonstream" \
    --header "Accept-Encoding: gzip" --compressed \
    --header "Authorization: Basic $PANGEA_AUTH" | jq

Response

[
  {
  "chain": 1,
  "owner": "0xecb456ea5365865ebab8a2661b0c503410e9b347",
  "token": "0x06325440d014e39736583c165c2963ba99faf14e",
  "token_decimals": 18,
  "token_name": "Curve.fi ETH/stETH",
  "token_symbol": "steCRV",
  "base_pool": "",
  "fee": "0x3d0900",
  "admin_fee": "0x12a05f200",
  "initial_a": "0x3e8",
  "future_a": "0x1388",
  "initial_a_time": "0x609d899e",
  "future_a_time": "0x60a6c356",
  "pool_address": "0xdc24316b9ae028f1497c275eb9192a3ea0f67022",
  "n_coins": 2,
  "coin0": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
  "coin1": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84",
  "coin2": null,
  "coin3": null,
  "coin4": null,
  "coin5": null,
  "coin0_decimals": 18,
  "coin1_decimals": 18,
  "coin2_decimals": null,
  "coin3_decimals": null,
  "coin4_decimals": null,
  "coin5_decimals": null,
  "coin0_name": "Ether",
  "coin1_name": "Liquid staked Ether 2.0",
  "coin2_name": null,
  "coin3_name": null,
  "coin4_name": null,
  "coin5_name": null,
  "coin0_symbol": "ETH",
  "coin1_symbol": "stETH",
  "coin2_symbol": null,
  "coin3_symbol": null,
  "coin4_symbol": null,
  "coin5_symbol": null,
  "base_coin0": null,
  "base_coin1": null,
  "base_coin2": null,
  "base_coin3": null,
  "base_coin4": null,
  "base_coin5": null,
  "base_coin0_decimals": null,
  "base_coin1_decimals": null,
  "base_coin2_decimals": null,
  "base_coin3_decimals": null,
  "base_coin4_decimals": null,
  "base_coin5_decimals": null,
  "base_coin0_name": null,
  "base_coin1_name": null,
  "base_coin2_name": null,
  "base_coin3_name": null,
  "base_coin4_name": null,
  "base_coin5_name": null,
  "base_coin0_symbol": null,
  "base_coin1_symbol": null,
  "base_coin2_symbol": null,
  "base_coin3_symbol": null,
  "base_coin4_symbol": null,
  "base_coin5_symbol": null,
  "underlying_coin0": null,
  "underlying_coin1": null,
  "underlying_coin2": null,
  "underlying_coin3": null,
  "underlying_coin4": null,
  "underlying_coin5": null,
  "underlying_coin0_decimals": null,
  "underlying_coin1_decimals": null,
  "underlying_coin2_decimals": null,
  "underlying_coin3_decimals": null,
  "underlying_coin4_decimals": null,
  "underlying_coin5_decimals": null,
  "underlying_coin0_name": null,
  "underlying_coin1_name": null,
  "underlying_coin2_name": null,
  "underlying_coin3_name": null,
  "underlying_coin4_name": null,
  "underlying_coin5_name": null,
  "underlying_coin0_symbol": null,
  "underlying_coin1_symbol": null,
  "underlying_coin2_symbol": null,
  "underlying_coin3_symbol": null,
  "underlying_coin4_symbol": null,
  "underlying_coin5_symbol": null 
  }
]

Query Parameters

v1/api/curve/pools

  • chains: This parameter is used to filter the data by specific blockchain networks.
  • from_block: This parameter is used to filter the data by a starting block number.
  • to_block: This parameter is used to filter the data by an ending block number.
  • pool_address__in: This parameter is used to filter the data by a list of pool addresses.
  • token__in: This parameter is used to filter the data by the Curve LP token address.
  • owner__in: This parameter is used to filter the data by the pool contract owner.
  • base_pool__in: This parameter is used to filter metapools by the base pool address.
  • fee__gte: This parameter is used to filter the data by a minimum value for fee.
  • fee__lte: This parameter is used to filter the data by a maximum value for fee.
  • admin_fee__gte: This parameter is used to filter the data by a minimum value for admin fee.
  • admin_fee__lte: This parameter is used to filter the data by a maximum value for admin fee.
  • initial_a__gte: This parameter is used to filter the data by a minimum value for the initial A parameter.
  • initial_a__lte: This parameter is used to filter the data by a maximum value for the initial A parameter.
  • future_a__gte: This parameter is used to filter the data by a minimum value for the future A parameter.
  • future_a__lte: This parameter is used to filter the data by a maximum value for the future A parameter.
  • initial_a_time__gte: This parameter is used to filter the data by a minimum value for the initial A ramp time.
  • initial_a_time__lte: This parameter is used to filter the data by a maximum value for the initial A ramp time.
  • future_a_time__gte: This parameter is used to filter the data by a minimum value for the future A ramp time.
  • future_a_time__lte: This parameter is used to filter the data by a maximum value for the future A ramp time.
  • n_coins__gte: This parameter is used to filter the data by a minimum value for the number of different coins in the pool.
  • n_coins__lte: This parameter is used to filter the data by a maximum value for the number of different coins in the pool.
  • coins__in: This parameter is used to filter the data by the addresses of coins in the pool.
  • base_coins__in: This parameter is used to filter the data by the addresses of the base coins in the metapool.

Curve Tokens

Fetch 3pool LP token.

curl -s --location --request GET \
    "https://app.pangea.foundation/v1/api/curve/tokens?chains=ETH&address__in=0x6c3f90f043a72fa612cbac8115ee7e52bde6e490" \
    --header "Accept: application/jsonstream" \
    --header "Accept-Encoding: gzip" --compressed \
    --header "Authorization: Basic $PANGEA_AUTH" | jq

Response

[ 
  {
    "chain": 1,
    "address": "0x6c3f90f043a72fa612cbac8115ee7e52bde6e490",
    "name": "Curve.fi DAI/USDC/USDT",
    "symbol": "3Crv",
    "decimals": 18,
    "pool_address": "0xbebc44782c7db0a1a60cb6fe97d0b483032ff1c7",
    "n_coins": 3
  }
]

Query Parameters

v1/api/curve/tokens

  • chains: This parameter is used to filter the data by specific blockchain networks.
  • from_block: This parameter is used to filter the data by a starting block number.
  • to_block: This parameter is used to filter the data by an ending block number.
  • address__in: This parameter is used to filter the data by a list of LP token addresses.
  • symbol__in: This parameter is used to filter the data by a list of LP token symbols.
  • name__in: This parameter is used to filter the data by a list of LP token names.
  • pool_address__in: This parameter is used to filter the data by a list of pool addresses.
  • decimals__gte: This parameter is used to filter the data by a minimum value for LP token decimals.
  • decimals__lte: This parameter is used to filter the data by a maximum value for LP token decimals.

Early Access

These datasets are currently in our Beta environment. If you would like early access you can apply here

Early Access

These datasets are currently in our Beta environment. If you would like early access you can apply here

Early Access

These datasets are currently in our Beta environment. If you would like early access you can apply here

Early Access

These datasets are currently in our Beta environment. If you would like early access you can apply here

Spark

Spark is a fast onchain orderbook for the Fuel Network.

Currently, Spark data is available from the Fuel Sepolia Testnet in our fuel.beta environment using the ?chains=FUELTESTNET query parameter.

Spark Orders

Get Spark orders for the last 10000 blocks.

curl -s --location --request GET \
    "https://fuel.beta.pangea.foundation/v1/api/spark/orders?chains=FUELTESTNET&from_block=-10000&to_block=latest" \
    --header "Accept: application/jsonstream" \
    --header "Accept-Encoding: gzip" --compressed \
    --header "Authorization: Basic $PANGEA_AUTH" | jq

Response

[
  {
    "chain": 2147483646,
    "block_number": 11467338,
    "block_hash": "0xfb68d3d8c7a2f74c4a7017f549af7f94927397d7275558de82b037ea6d77df56",
    "block_timestamp": 1727442592,
    "transaction_hash": "0x9f0d48a8f9a1d65a5a4c73b9bdde5e43ff277fb277b3b077b8fe2a21708d105a",
    "transaction_index": 0,
    "log_index": 11,
    "market_id": "0xb1ed073b4dccbff48e2ac1b52a49454e6a2921aa54effee89eb958dc5ddbffbe",
    "order_id": "0xf537c9adf20c96aaf9870cbf45a52440e44bf830d647272b8238baa6bd9e8818",
    "event_type": "Open",
    "asset": "0x38e4ca985b22625fff93205e997bfc5cc8453a953da638ad297ca60a9f2600bc",
    "amount": 94970,
    "order_type": "Sell",
    "price": 65724423135,
    "user": "0x96b9b56e8861700b90ba99b62e155f222c957eb85f4d2ae9c51db523ea18b342",
    "limit_type": null,
    "order_matcher": null
  }
...
]

Query Parameters

fuel.beta.pangea.foundation/v1/api/spark/orders?chains=FUELTESTNET

  • chains: This parameter is used to filter the data by specific blockchain networks.
  • from_block: This parameter is used to filter the data by a starting block number.
  • to_block: This parameter is used to filter the data by an ending block number.
  • order_id__in: This parameter is used to filter the data by a list of order ids.
  • order_type__in: This parameter is used to filter the data by a list of order types (i.e. Buy, Sell).
  • event_type__in: This parameter is used to filter the data by a list of event types (i.e. Open, Cancel, Trade).
  • limit_type_in: This parameter is used to filter the data by a list of limit types (i.e. GTC, IOC, FOK)
  • user__in: This parameter is used to filter the data by a list of user accounts.
  • asset__in: This parameter is used to filter the data by a list of asset ids.
  • market_id__in: This parameter is used to filter the data by a list of asset market ids.
  • address__in / contractid__in / identity__in: This parameter is used to filter the data by a list of addresses.