Skip to main content
POST
/
v2
/
wallets
/
{id}
/
withdrawal-preview
Preview a withdrawal
curl --request POST \
  --url https://sandbox.groundtech.co/v2/wallets/{id}/withdrawal-preview \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "destinationChain": "<string>",
  "destinationToken": "<string>",
  "withdrawalAmount": 123
}
'
{
  "walletId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "computedAt": "2023-11-07T05:31:56Z",
  "withdrawalAmount": 123,
  "destinationChain": "<string>",
  "destinationToken": "<string>",
  "balance": 123,
  "pendingWithdrawals": 123,
  "availableBalance": 123,
  "positions": [
    {}
  ]
}

Authorizations

Authorization
string
header
required

API keys are prefixed ground_sandbox_ (sandbox) or ground_prod_ (production). Pass the key as a Bearer token in the Authorization header.

Path Parameters

id
string<uuid>
required

Portfolio wallet ID

Body

application/json
destinationChain
string
required

Target chain for the withdrawal (e.g. arbitrum, ethereum, base).

destinationToken
string
required

Token to withdraw (e.g. usdc).

withdrawalAmount
number

Optional withdrawal amount in USD. Omit to preview a full withdrawal.

Response

Withdrawal preview

walletId
string<uuid>
computedAt
string<date-time>
withdrawalAmount
number
destinationChain
string
destinationToken
string
balance
number

Current total balance in USD.

pendingWithdrawals
number

USD currently reserved by pending withdrawals.

availableBalance
number

USD available for withdrawal (balance minus pending).

positions
object[]

Breakdown of how the withdrawal would source funds from each position.