Api/NodeRPCApi
// Set your API Keys š here
$sdk = new \Tatum\Sdk();
// MainNet API Call
$sdk->mainnet()->api()->nodeRPC();
// TestNet API Call
$sdk->testnet()->api()->nodeRPC();
Methods
Method | Description |
---|---|
nodeJsonPostRpcDriver() | Connect to the blockchain node through an RPC driver |
nodeJsonRpcGetDriver() | Connect to the blockchain node through an RPC driver |
nodeJsonRpcPutDriver() | Connect to the blockchain node through an RPC driver |
nodeJsonPostRpcDriver()
Example
#ļøā£ Execute command in terminal
Request
POST
/v3/blockchain/node/{chain}/{xApiKey}/{rpcPath}
Type signature
(new \Tatum\Sdk())->{mainnet/testnet}()->api()->nodeRPC()->nodeJsonPostRpcDriver(
string $chain,
object $body,
[ string $x_api_key, ]
[ string $node_type, ]
[ string $testnet_type = 'ethereum-sepolia', ]
[ string $chain_type = 'avax-c', ]
[ string $rpc_path ]
): object
Parameters
Name | Type | Description | Notes |
---|---|---|---|
$chain | string | Blockchain to communicate with. | Ā |
$body | object | Ā | Ā |
$x_api_key | string | Tatum X-API-Key used for authorization. You can omit this path parameter and either use the X-Api-Key header, or the API key tied to your IP address without any header. | [optional] |
$node_type | string | Type of the node to access for Algorand. | [optional] |
$testnet_type | string | Type of Ethereum testnet. Defaults to ethereum-sepolia. | [optional] [default to 'ethereum-sepolia'] |
$chain_type | string | Type of Avalanche network. Defaults to Avalanche C-Chain. | [optional] [default to 'avax-c'] |
$rpc_path | string | Optional path of rpc call for non EVM nodes, e.g. Algorand or Stellar. | [optional] |
Return type
object
Description
Connect to the blockchain node through an RPC driver
The number of credits consumed depends on the number of methods submitted in an API call: * 50 credits per debug*_/trace* method (for EVM-based blockchains) * 50 credits per EOS Trace API methods * 5 credits per eth_call method (for EVM-based blockchains) * 2 credits per any other RPC method
Connect directly to the blockchain node provided by Tatum.
The POST
method is used. The API endpoint URL acts as an HTTP-based RPC driver.
In the request body, provide valid Web3 RPC method content, for example:
` { ājsonrpcā: ā2.0ā, āidā: 1, āmethodā: āmethod_nameā, āparamsā: [] } `
For the blockchains using the JSON-RPC 2.0 specification, you can submit multiple RPC methods in one API call:
` [ { ājsonrpcā: ā2.0ā, āidā: 1, āmethodā: āmethod_1_nameā, āparamsā: [] }, { ājsonrpcā: ā2.0ā, āidā: 2, āmethodā: āmethod_2_nameā, āparamsā: [] }, ā¦ ] `
This API is supported for the following blockchains:
- Algorand
- Arbitrum
- Aurora
- Avalanche C-Chain
- Avalanche P-Chain
- Avalanche X-Chain
- Bitcoin
- Bitcoin Cash
- BNB Beacon Chain
- BNB Smart Chain
- Cardano
- Celo
- Cronos
- Dogecoin
- Elrond
- EOSIO
- Ethereum
- Fantom
- Flow
- Gnosis
- Harmony
- Klaytn
- KuCoin Community Chain
- Kusama
- Lisk
- Litecoin
- NEAR
- Neo
- Oasis Network
- Optimism
- Palm
- Polkadot
- Polygon
- RSK
- Solana
- Stellar
- Tezos
- TRON
- VeChain
- XinFin
- XRP
- ZCash
- Zilliqa
nodeJsonRpcGetDriver()
Example
#ļøā£ Execute command in terminal
Request
GET
/v3/blockchain/node/{chain}/{xApiKey}/{rpcPath}
Type signature
(new \Tatum\Sdk())->{mainnet/testnet}()->api()->nodeRPC()->nodeJsonRpcGetDriver(
string $chain,
[ string $x_api_key, ]
[ string $node_type, ]
[ string $rpc_path ]
): object
Parameters
Name | Type | Description | Notes |
---|---|---|---|
$chain | string | Blockchain to communicate with. | Ā |
$x_api_key | string | Tatum X-API-Key used for authorization. You can omit this path parameter and either use the X-Api-Key header, or the API key tied to your IP address without any header. | [optional] |
$node_type | string | Type of the node to access for Algorand. | [optional] |
$rpc_path | string | Optional path of rpc call for non EVM nodes, e.g. Algorand or Stellar. | [optional] |
Return type
object
Description
Connect to the blockchain node through an RPC driver
2 credits per RPC method in an API call
Connect directly to the blockchain node provided by Tatum.
The GET
method is used. The API endpoint URL acts as an HTTP-based RPC driver.
This API is supported for the following blockchains:
nodeJsonRpcPutDriver()
Example
#ļøā£ Execute command in terminal
Request
PUT
/v3/blockchain/node/{chain}/{xApiKey}/{rpcPath}
Type signature
(new \Tatum\Sdk())->{mainnet/testnet}()->api()->nodeRPC()->nodeJsonRpcPutDriver(
string $chain,
object $body,
[ string $x_api_key, ]
[ string $node_type, ]
[ string $rpc_path ]
): object
Parameters
Name | Type | Description | Notes |
---|---|---|---|
$chain | string | Blockchain to communicate with. | Ā |
$body | object | Ā | Ā |
$x_api_key | string | Tatum X-API-Key used for authorization. You can omit this path parameter and either use the X-Api-Key header, or the API key tied to your IP address without any header. | [optional] |
$node_type | string | Type of the node to access for Algorand. | [optional] |
$rpc_path | string | Optional path of rpc call for non EVM nodes, e.g. Algorand or Stellar. | [optional] |
Return type
object
Description
Connect to the blockchain node through an RPC driver
2 credits per RPC method in an API call
Connect directly to the blockchain node provided by Tatum.
The PUT
method is used. The API endpoint URL acts as an HTTP-based RPC driver.
In the request body, provide valid Web3 RPC method content, for example:
` { ājsonrpcā: ā2.0ā, āidā: 1, āmethodā: āmethod_nameā, āparamsā: [] } `
For the blockchains using the JSON-RPC 2.0 specification, you can submit multiple RPC methods in one API call:
` [ { ājsonrpcā: ā2.0ā, āidā: 1, āmethodā: āmethod_1_nameā, āparamsā: [] }, { ājsonrpcā: ā2.0ā, āidā: 2, āmethodā: āmethod_2_nameā, āparamsā: [] }, ā¦ ] `
This API is supported for the following blockchains: