Estimate Token Transfer Compute Units Solana
This endpoint estimates the number of compute units an SPL token transfer would consume on Solana. The transfer transaction is built and simulated against the node (without being broadcast) and the simulated compute units consumed are returned. If the recipient does not yet have an associated token account for the given token, the estimate includes the cost of creating it. Supports both the classic Token program and Token-2022 via the tokenStandard field. NFTs on Solana are SPL tokens under the regular Token program, so use "TOKEN" for NFT transfers.
Path Parameters
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
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
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.
The quantity of the SPL token to transfer, expressed in the token's raw base units (the on-chain integer value, before the mint's decimals are applied) — not a SOL/lamport amount. String-encoded non-negative integer. Example: for a token with 6 decimals, 1.5 tokens = "1500000".
Base58 string representation of the SPL token mint address (the token's on-chain identifier, equivalent to a token contract address on other chains).
Base58 string representation of the recipient owner pubkey (the wallet receiving the tokens; its associated token account is derived automatically).
Base58 string representation of the sender owner pubkey (the fee payer and source wallet of the tokens).
The SPL token standard the mint belongs to. Allowed values: "TOKEN" (classic Token program) or "TOKEN-2022". NFTs on Solana are regular Token-program SPL tokens, so use "TOKEN" for NFT transfers.
Response Schema
Specifies the version of the API that incorporates this endpoint.
Defines the ID of the request. The requestId is generated by Crypto APIs and it's unique for every request.
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.
Amount of the simulated compute units the SPL token transfer would consume. Includes associated-token-account creation cost when the recipient account does not yet exist.
Specifies the version of the API that incorporates this endpoint.
Defines the ID of the request. The requestId is generated by Crypto APIs and it's unique for every request.
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.
Specifies an error code, e.g. error 404.
Specifies the message of the error, i.e. why the error was returned, e.g. error 404 stands for “not found”.
Specifies an attribute of the error by name.
Specifies the details of an attribute as part from the error.
Specifies an error code, e.g. error 404.
Specifies the message of the error, i.e. why the error was returned, e.g. error 404 stands for “not found”.
Specifies an attribute of the error by name.
Specifies the details of an attribute as part from the error.
Specifies an error code, e.g. error 404.
Specifies the message of the error, i.e. why the error was returned, e.g. error 404 stands for “not found”.
Specifies an attribute of the error by name.
Specifies the details of an attribute as part from the error.
Specifies the version of the API that incorporates this endpoint.
Defines the ID of the request. The requestId is generated by Crypto APIs and it's unique for every request.
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.
Specifies an error code, e.g. error 404.
Specifies the message of the error, i.e. why the error was returned, e.g. error 404 stands for “not found”.
Specifies an attribute of the error by name.
Specifies the details of an attribute as part from the error.
Specifies an error code, e.g. error 404.
Specifies the message of the error, i.e. why the error was returned, e.g. error 404 stands for “not found”.
Specifies an attribute of the error by name.
Specifies the details of an attribute as part from the error.
Specifies the version of the API that incorporates this endpoint.
Defines the ID of the request. The requestId is generated by Crypto APIs and it's unique for every request.
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.
Specifies an error code, e.g. error 404.
Specifies the message of the error, i.e. why the error was returned, e.g. error 404 stands for “not found”.
Specifies an attribute of the error by name.
Specifies the details of an attribute as part from the error.
Specifies an error code, e.g. error 404.
Specifies the message of the error, i.e. why the error was returned, e.g. error 404 stands for “not found”.
Specifies an attribute of the error by name.
Specifies the details of an attribute as part from the error.
Specifies an error code, e.g. error 404.
Specifies the message of the error, i.e. why the error was returned, e.g. error 404 stands for “not found”.
Specifies an attribute of the error by name.
Specifies the details of an attribute as part from the error.
Specifies an error code, e.g. error 404.
Specifies the message of the error, i.e. why the error was returned, e.g. error 404 stands for “not found”.
Specifies an attribute of the error by name.
Specifies the details of an attribute as part from the error.
Specifies the version of the API that incorporates this endpoint.
Defines the ID of the request. The requestId is generated by Crypto APIs and it's unique for every request.
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.
Specifies an error code, e.g. error 404.
Specifies the message of the error, i.e. why the error was returned, e.g. error 404 stands for “not found”.
Specifies an attribute of the error by name.
Specifies the details of an attribute as part from the error.
Specifies an error code, e.g. error 404.
Specifies the message of the error, i.e. why the error was returned, e.g. error 404 stands for “not found”.
Specifies an attribute of the error by name.
Specifies the details of an attribute as part from the error.
Specifies an error code, e.g. error 404.
Specifies the message of the error, i.e. why the error was returned, e.g. error 404 stands for “not found”.
Specifies an attribute of the error by name.
Specifies the details of an attribute as part from the error.
Specifies an error code, e.g. error 404.
Specifies the message of the error, i.e. why the error was returned, e.g. error 404 stands for “not found”.
Specifies an attribute of the error by name.
Specifies the details of an attribute as part from the error.
Specifies the version of the API that incorporates this endpoint.
Defines the ID of the request. The requestId is generated by Crypto APIs and it's unique for every request.
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.
invalid_data
Specifies an error code, e.g. error 404.
Specifies the message of the error, i.e. why the error was returned, e.g. error 404 stands for “not found”.
Specifies an attribute of the error by name.
Specifies the details of an attribute as part from the error.
Specifies the version of the API that incorporates this endpoint.
Defines the ID of the request. The requestId is generated by Crypto APIs and it's unique for every request.
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.
unsupported_media_type
Specifies an error code, e.g. error 404.
Specifies the message of the error, i.e. why the error was returned, e.g. error 404 stands for “not found”.
Specifies an attribute of the error by name.
Specifies the details of an attribute as part from the error.
Specifies the version of the API that incorporates this endpoint.
Defines the ID of the request. The requestId is generated by Crypto APIs and it's unique for every request.
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.
invalid_request_body_structure
Specifies an error code, e.g. error 404.
Specifies the message of the error, i.e. why the error was returned, e.g. error 404 stands for “not found”.
Specifies an attribute of the error by name.
Specifies the details of an attribute as part from the error.
Specifies the version of the API that incorporates this endpoint.
Defines the ID of the request. The requestId is generated by Crypto APIs and it's unique for every request.
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_limit_reached
Specifies an error code, e.g. error 404.
Specifies the message of the error, i.e. why the error was returned, e.g. error 404 stands for “not found”.
Specifies an attribute of the error by name.
Specifies the details of an attribute as part from the error.
Specifies the version of the API that incorporates this endpoint.
Defines the ID of the request. The requestId is generated by Crypto APIs and it's unique for every request.
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.
unexpected_server_error
Specifies an error code, e.g. error 404.
Specifies the message of the error, i.e. why the error was returned, e.g. error 404 stands for “not found”.
Specifies an attribute of the error by name.
Specifies the details of an attribute as part from the error.
Credits Cost
| Blockchain | Credits for 1 result |
|---|---|
| Default cost | 120 |
| Solana | 120 |