GraphQL

Developer Documents
Phoenix Intelligence Center

Develop and Build on top of Phoenix

Join the forefront of blockchain innovation by developing on the Phoenix Blockchain. With low transaction fees, high-speed processing, and EVM support.
Join Our Telegram
Phoenix GraphQL API Documentation
Welcome to the Phoenix GraphQL API Documentation. This API supports querying blockchain data using GraphQL, providing a flexible and efficient way to access transaction details, block information, and more.

[ Base URL: https://phoenixplorer.com/graphiql ]
[ WebSocket URL: wss://phoenixplorer.com/socket ]

Example Usage

Getting Started

To start using the Phoenix GraphQL API, you can access the GraphiQL interface at https://phoenixplorer.com/graphiql. This interface allows you to write, test, and execute your GraphQL queries. For real-time data updates, use the WebSocket URL wss://phoenixplorer.com/socket.

Example Query

Retrieve Transaction Details

To retrieve details of a specific transaction, use the following GraphQL query:

				
					{
  transaction(hash: "0x69e3923eef50eada197c3336d546936d0c994211492c9f947a24c02827568f9f") {
    hash,
    blockNumber,
    value,
    gasUsed
  }
}

				
			

Query Parameters

Transaction

Endpoint:
transaction(hash: String): Transaction

Parameters:

  • hash: The hash of the transaction you want to query.

Response Fields:

  • hash: The transaction hash.
  • blockNumber: The block number in which the transaction was included.
  • value: The value transferred in the transaction.
  • gasUsed: The amount of gas used by the transaction.

Example:

				
					{
  transaction(hash: "0x69e3923eef50eada197c3336d546936d0c994211492c9f947a24c02827568f9f") {
    hash,
    blockNumber,
    value,
    gasUsed
  }
}

				
			

WebSocket for Real-Time Data

To subscribe to real-time updates, connect to the WebSocket URL wss://phoenixplorer.com/socket.

Headers

Ensure you include any necessary headers for authentication and proper request handling. Typically, this might include:

				
					{
  "Content-Type": "application/json"
}

				
			

Accessing Documentation

You can access detailed documentation and explore available queries and mutations through the GraphiQL interface at https://phoenixplorer.com/graphiql. This interface provides a comprehensive guide to all available API endpoints and their usage.

What is the URL for the Phoenix GraphQL API?
Is there a WebSocket URL for real-time data?
How do I query transaction details using the GraphQL API?
Use the following query:

{
transaction(hash: "0x69e3923eef50eada197c3336d546936d0c994211492c9f947a24c02827568f9f") {
hash,
blockNumber,
value,
gasUsed
}
}
What headers do I need to include in my GraphQL requests?
How do I access the API documentation?
Can I perform multiple queries in a single request?
What kind of data can I retrieve with the Phoenix GraphQL API?

Phoenix Blockchain: Revolutionizing crypto with low fees, high speed, and unparalleled versatility! 
Get Started