get withdraw details

API details

Retrieve detailed information about the withdrawal.

Get withdrawal details by transaction hash

get
Query parameters
TxHashstringOptional
Responses
200
OK
get
GET /v1/withdraw-details HTTP/1.1
Host: testnetopenapi.hibit.app
Accept: */*
{
  "code": 1,
  "message": "text",
  "data": {
    "txHash": "text",
    "status": 0,
    "chain": "text",
    "network": "text",
    "assetType": "text",
    "token": "text",
    "originChainTxHash": "text",
    "volume": "text",
    "fee": "text"
  }
}

Code example

import {
  hibitClient,
  HibitNetwork,
  MetaMaskWalletApi
} from '@delandlabs/hibit-sdk';

// Set up client options
hibitClient.setOptions({
  network: HibitNetwork.Testnet, // or HibitNetwork.Mainnet
  hin: BigInt('123456'), // your wallet HIN
  proxyKey: 'your_proxy_private_key_hex'
});

async function fetchWithdrawDetails() {
  const txHash = 'your_withdrawal_tx_hash_here';

  try {
    const details = await hibitClient.getWithdrawDetails(txHash);
    console.log('Withdraw details:', details);
  } catch (err) {
    console.error('Failed to fetch withdraw details:', err);
  }
}

fetchWithdrawDetails();

SDK

Source code https://github.com/Deland-Labs/hibit-sdk

References

What is HIN?

Last updated