Jump to
Ctrl
+
/

Estimate Native Coin Transfer Compute Units Solana

POST
/blockchain-fees/solana/{network}/estimate-native-coin-transfer-compute-units

This endpoint estimates the number of compute units a simple native SOL (lamport) transfer would consume on Solana. The transaction is built and simulated against the node (without being broadcast) and the simulated compute units consumed are returned. Use this to size a ComputeBudget instruction before submitting a transaction.

Path Parameters

network string Required

Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - "mainnet" is the live network with actual data while a network like "devnet" is a test network.

Query Parameters

context string Optional

In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. context is specified by the user.

Request Body Schema application/json

context string Optional

In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. context is specified by the user.

data object Required
item object Required
amount string Required

Amount to transfer, in lamports, as a string-encoded non-negative integer (1 SOL = 1000000000 lamports).

recipient string Required

Base58 string representation of the recipient pubkey (the account receiving the transferred lamports).

sender string Required

Base58 string representation of the sender pubkey (the fee payer and source of the transferred lamports).

Response Schema

apiVersion string Required

Specifies the version of the API that incorporates this endpoint.

2024-12-12
requestId string Required

Defines the ID of the request. The requestId is generated by Crypto APIs and it's unique for every request.

601c1710034ed6d407996b30
context string Optional

In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. context is specified by the user.

yourExampleString
data object Required
item object Required
computeUnits integer Required

Amount of the simulated compute units the native coin transfer would consume.

150

Credits Cost

Blockchain protocol Credits for 1 Results
Default Cost 120
Solana 120
Was this page helpful?
Yes
No
Powered by
Language
URL

{
    "apiVersion": "2024-12-12",
    "requestId": "601c1710034ed6d407996b30",
    "context": "yourExampleString",
    "data": {
        "item": {
            "computeUnits": 150
        }
    }
}