Solana

Solana is a blockchain network focused on fast transactions and high throughput. It uses a unique method of ordering transactions to improve its speed. Users can pay their transaction fees and interact with smart contracts with SOL, the network's native cryptocurrency.
For now, Solana is in BETA and there is a rate limitation applied for all projects for Solana to 40 req/s on the platform.
Tatum supports 2 chains:

  • Mainnet BETA - a regular live chain
  • Devnet - a chain used for testing purposes. Coins on the test chain have no value and can be obtained from a faucet, e.g. https://solfaucet.com/

Generate Solana wallet

1 credit per API call.


Generate Solana private key and account address.

SecurityX-API-Key
Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

500

Internal server error. There was an error on the server during the processing of the request.

get/v3/solana/wallet
Request samples
curl -i -X GET \
  https://api-eu1.tatum.io/v3/solana/wallet \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "address": "FykfMwA9WNShzPJbbb9DNXsfgDgS3XZzWiFgrVXfWoPJ",
  • "privateKey": "zgsAKfjuXrAxEyuYRxbbxPM3rdsPbJPnGreaGMbcdUApJ6wHnCqQnf9b1RNPdeZxsRMkezh4VgXQ7YrbpndGtEv"
}

JSON RPC HTTP driverDeprecated

2 credits per API call

This endpoint is deprecated. Use the HTTP-based JSON RPC driver instead.


Use this endpoint URL as a http-based JSON RPC driver to connect directly to the Solana node provided by Tatum. To learn more about Solana JSON RPC, visit the Solana developer's guide.

Request
path Parameters
xApiKey
required
string

Tatum X-API-Key used for authorization.

Example: asdlkfjnqunalkwjfnq2oi303294857k
Request Body schema: application/json
object

Any valid JSON RPC method content body.

Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

500

Internal server error. There was an error on the server during the processing of the request.

post/v3/solana/web3/{xApiKey}
Request samples
application/json
{
  • "jsonrpc": "2.0",
  • "method": "getVersion",
  • "params": [ ],
  • "id": 2
}
Response samples
application/json
{
  • "jsonrpc": "2.0",
  • "result": {
    },
  • "id": 1
}

Get current block number

1 credit per API call.


Get Solana current block number. This is the number of the latest block in the blockchain.

SecurityX-API-Key
Responses
200

OK

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

500

Internal server error. There was an error on the server during the processing of the request.

get/v3/solana/block/current
Request samples
curl -i -X GET \
  https://api-eu1.tatum.io/v3/solana/block/current \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
application/json
6491272

Get Solana block by number

1 credit per API call.


Get Solana block by block hash or block number.
You can find full data description here - https://docs.solana.com/developing/clients/jsonrpc-api#getblock

SecurityX-API-Key
Request
path Parameters
height
required
number

Block number

Example: 6470657
Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

500

Internal server error. There was an error on the server during the processing of the request.

get/v3/solana/block/{height}
Request samples
curl -i -X GET \
  'https://api-eu1.tatum.io/v3/solana/block/{height}' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "blockHeight": 94778421,
  • "blockTime": 1638279333,
  • "blockhash": "Ch7qVhCkSqEvhWE8xzJZbJKRcsH6wtTjfiMJdt9eKiD7",
  • "parentSlot": 97742681,
  • "previousBlockhash": "C3vsoVwVWx7yPRhsNoKpcm2CJTrnVcvimdC4bd3jTPbj",
  • "rewards": [
    ],
  • "transactions": [
    ]
}

Get Solana Account balance

1 credit per API call.


Get Solana account balance in SOL. This method does not prints any balance of the SPL or NFT tokens on the account.

SecurityX-API-Key
Request
path Parameters
address
required
string

Account address you want to get balance of

Example: FykfMwA9WNShzPJbbb9DNXsfgDgS3XZzWiFgrVXfWoPJ
Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

500

Internal server error. There was an error on the server during the processing of the request.

get/v3/solana/account/balance/{address}
Request samples
curl -i -X GET \
  'https://api-eu1.tatum.io/v3/solana/account/balance/{address}' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "balance": "10.52"
}

Get Solana Transaction

2 credit per API call.


Get Solana transaction by transaction hash.
You can find full data description here - https://docs.solana.com/developing/clients/jsonrpc-api#gettransaction

SecurityX-API-Key
Request
path Parameters
hash
required
string

Transaction hash

Example: 5oSXZkPregqGhHrTcbWhgHQJETvBHtBYssuuCMJ3qroAgHsHndsr8fyY8kY76AgwmMaZBZW8ThHAXwjDaUSweApS
Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server during the processing of the request.

get/v3/solana/transaction/{hash}
Request samples
curl -i -X GET \
  'https://api-eu1.tatum.io/v3/solana/transaction/{hash}' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "blockTime": 1638279975,
  • "meta": {
    },
  • "slot": 97744333,
  • "transaction": {
    }
}

Send SOL from account to account

2 credits per API call.


Send SOL from account to account.

This operation needs the private key of the blockchain address. Every time the funds are transferred, the transaction must be signed with the corresponding private key. No one should ever send it's own private keys to the internet because there is a strong possibility of stealing keys and loss of funds. In this method, it is possible to enter privateKey or signatureId. PrivateKey should be used only for quick development on testnet versions of blockchain when there is no risk of losing funds. In production, Tatum KMS should be used for the highest security standards, and signatureId should be present in the request. Alternatively, using the Tatum client library for supported languages.

SecurityX-API-Key
Request
Request Body schema: application/json
One of:
from
required
string = 44 characters

Blockchain address to send assets from

to
required
string = 44 characters

Blockchain address to send assets to

amount
required
string^[+]?((\d+(\.\d*)?)|(\.\d+))$

Amount to be sent in SOL.

fromPrivateKey
required
string [ 87 .. 128 ] characters

Private key of sender address. Private key, or signature Id must be present.

Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server during the processing of the request.

post/v3/solana/transaction
Request samples
application/json
{
  • "from": "FykfMwA9WNShzPJbbb9DNXsfgDgS3XZzWiFgrVXfWoPJ",
  • "to": "FZAS4mtPvswgVxbpc117SqfNgCDLTCtk5CoeAtt58FWU",
  • "amount": "100000",
  • "fromPrivateKey": "zgsAKfjuXrAxEyuYRxbbxPM3rdsPbJPnGreaGMbcdUApJ6wHnCqQnf9b1RNPdeZxsRMkezh4VgXQ7YrbpndGtEv"
}
Response samples
application/json
{
  • "txId": "c83f8818db43d9ba4accfe454aa44fc33123d47a4f89d47b314d6748eb0e9bc9",
  • "failed": false
}

Broadcast and confirm signed Solana transaction

10 credits per API call.


Broadcast signed custom transactions to Solana blockchain and waits for transaction confirmation depending on the commitment given. More information about commitment levels here

SecurityX-API-Key
Request
Request Body schema: application/json
txData
required
string [ 1 .. 500000 ] characters

Raw signed transaction to be published to network.

object

Options for sending and waiting for a transaction

commitment
string

Commitment to waiting for transaction confirmation

Enum: "confirmed" "finalized"
preflightCommitment
string

Preflight Commitment.

Enum: "confirmed" "finalized" "processed" "recent" "single" "singleGossip" "max"
Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server during the processing of the request.

post/v3/solana/broadcast/confirm
Request samples
application/json
{
  • "txData": "01de391b34567fc65080dfe9e27170e2f9ac1cd1719878719feb74bb422d1795201df71fcf7349f5",
  • "options": {
    }
}
Response samples
application/json
{
  • "txId": "5Sh63rNFg6iR9YUGPwEkbAg4kYSWnf5eRS2wcLG1Gc6psj27SGK3LNuN9jNSPKn3JoChgmq8pSirHWsPPWzy2PFw",
  • "confirmed": false
}