Skip to main content
POST
/
embedded-wallets
/
hyperliquid
/
withdraw
Withdraw
curl --request POST \
  --url https://api.copin.io/embedded-wallets/hyperliquid/withdraw \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "sourceAddress": "<string>",
  "destinationAddress": "<string>",
  "amount": 123
}
'
{
  "userId": "<string>",
  "embeddedWallet": "<string>",
  "data": {},
  "data.destinationAddress": "<string>",
  "data.chargeFeeTime": "<string>",
  "data.chargeFeeTxHash": "<string>",
  "data.withdrawTime": "<string>",
  "data.txHash": "<string>",
  "data.amount": 123,
  "data.feeAmount": 123,
  "data.hyperliquidWithdrawFeeAmount": 123,
  "data.hyperliquidTransferFeeAmount": 123,
  "data.withdrawAmount": 123,
  "data.receiveAmount": 123,
  "type": "<string>",
  "status": "<string>",
  "createdAt": "<string>"
}

Authentication

This endpoint requires authentication using a JWT token in the Authorization header.
Authorization
string
required
JWT token in the format: Authorization {token}

Request Body

sourceAddress
string
required
Address of the source wallet (embedded wallet)
destinationAddress
string
required
Address of the destination wallet to withdraw funds to
amount
number
required
Amount to withdraw

Request Example

curl --request POST \
--url "https://api.copin.io/embedded-wallets/hyperliquid/withdraw" \
--header 'Content-Type: application/json' \
--data '{
  "sourceAddress":"0x06791c29FaEDb81A87A2Ef85ce2A986fE6dDF96e",
  "destinationAddress": "0x1535484c1Eec1D203fE1A53EA11a621a884AE067",
  "amount": 10
}'

Response

The API returns withdrawal transaction details and status information.
userId
string
Identifier of the user who initiated the withdrawal
embeddedWallet
string
Address of the embedded wallet
data
object
Withdrawal transaction details
data.destinationAddress
string
Address where funds are being sent
data.chargeFeeTime
string
Timestamp when fees were charged
data.chargeFeeTxHash
string
Transaction hash for the fee charge
data.withdrawTime
string
Timestamp when the withdrawal was initiated
data.txHash
string
Transaction hash for the withdrawal
data.amount
number
Total amount requested for withdrawal
data.feeAmount
number
Total fee amount
data.hyperliquidWithdrawFeeAmount
number
Withdrawal fee charged by HyperLiquid
data.hyperliquidTransferFeeAmount
number
Transfer fee charged by HyperLiquid
data.withdrawAmount
number
Amount being withdrawn
data.receiveAmount
number
Amount that will be received after fees
type
string
Type of transaction (e.g., “WITHDRAW”)
status
string
Current status of the withdrawal (e.g., “SUCCESSFUL”)
createdAt
string
Timestamp when the withdrawal request was created

Response Example

{
  "userId": "654849d04857e1f744646cdd",
  "embeddedWallet": "0x06791c29FaEDb81A87A2Ef85ce2A986fE6dDF96e",
  "data": {
    "destinationAddress": "0x1535484c1Eec1D203fE1A53EA11a621a884AE067",
    "chargeFeeTime": "2025-04-15T08:06:57.341Z",
    "chargeFeeTxHash": "0x378fac4292a2145778ef0419d8fec0019100d73af2bf21ecacb4bc260b5b28c8",
    "withdrawTime": "2025-04-15T08:06:57.341Z",
    "txHash": "0x1988529b8b136229881b543373725e22b154b09471cf8c23b76d8f1b134bcf22",
    "amount": 10,
    "feeAmount": 1.1,
    "hyperliquidWithdrawFeeAmount": 1,
    "hyperliquidTransferFeeAmount": 1,
    "withdrawAmount": 7.9,
    "receiveAmount": 6.9
  },
  "type": "WITHDRAW",
  "status": "SUCCESSFUL",
  "createdAt": "2025-04-15T08:06:57.341Z"
}