Skip to main content
POST
/
crypto
/
estimate-withdrawal-fee
Estimate crypto withdrawal fee
curl --request POST \
  --url https://api.lightspark.com/grid/2025-10-13/crypto/estimate-withdrawal-fee \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "internalAccountId": "InternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123",
  "currency": "USDC",
  "cryptoNetwork": "SOLANA_MAINNET",
  "amount": 1000000,
  "destinationAddress": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU"
}
'
{
  "networkFee": 5000,
  "networkFeeAsset": "SOL",
  "applicationFee": 0,
  "totalFee": 5000,
  "netAmount": 995000
}

Authorizations

Authorization
string
header
required

API token authentication using format <api token id>:<api client secret>

Body

application/json
internalAccountId
string
required

The ID of the crypto internal account to withdraw from.

Example:

"InternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123"

currency
string
required

The currency code of the asset to withdraw (e.g. USDC).

Example:

"USDC"

cryptoNetwork
string
required

The blockchain network for the withdrawal. Example values: SOLANA_MAINNET, SOLANA_DEVNET, ETHEREUM_MAINNET, POLYGON_MAINNET, TRON_MAINNET.

Example:

"SOLANA_MAINNET"

amount
integer
required

The amount to withdraw in the smallest unit of the currency.

Example:

1000000

destinationAddress
string
required

The blockchain address to withdraw funds to.

Example:

"7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU"

Response

Fee estimation returned successfully

networkFee
integer
required

The estimated network (gas) fee in the smallest unit of the network fee asset (e.g. lamports for SOL). This is provided for informational purposes to show the raw on-chain cost. Note that this value is denominated in networkFeeAsset, not in the withdrawal currency — it cannot be directly added to applicationFee or compared to totalFee.

Example:

5000

networkFeeAsset
string
required

The asset used to pay the network fee (e.g. SOL for Solana transactions).

Example:

"SOL"

applicationFee
integer
required

The application fee charged by the platform in the smallest unit of the withdrawal currency. Zero if no application fee applies.

Example:

0

totalFee
integer
required

The total cost of the withdrawal in the smallest unit of the withdrawal currency. This equals the network fee converted to the withdrawal currency at current rates plus the application fee. This is the amount deducted from the withdrawal in addition to netAmount.

Example:

5000

netAmount
integer
required

The net amount the recipient will receive after fees, in the smallest unit of the withdrawal currency.

Example:

995000