Withdrawal

TanX offers various SDKs in different languages to facilitate seamless withdrawal. This document outlines the withdrawal process through the JavaScript (JS) SDK. For additional SDK options, refer to the SDK Reference

Please visit tanX website and create an account using your wallet before proceeding with the below steps.

Withdrawal Process

1. Install the NPM Package

npm i @tanx-libs/tanx-connector

2. Create an Instance

import { Client } from '@tanx-libs/tanx-connector';

// Create an instance with either testnet or mainnet
const client = new Client();
// or
const client = new Client('testnet'); // default is mainnet

Withdrawal Options

Generally, we have two modes of withdrawal: Normal Withdrawal and Fast Withdrawal. For withdrawal methods that require a signer and provider, please refer to the deposit method mentioned above.

1. Normal Withdrawal

With Normal Withdrawal, your requested funds will be processed within a standard time frame (24 hours). This mode is suitable for users who are not in a rush to access their funds and are comfortable with the regular processing time.

Normal Withdrawal Process:

  1. Initiate Your Withdrawal Request: Call the initiateNormalWithdrawal function with the following parameters:

  2. Wait for Confirmation: Wait for up to 24 hours.

  3. Check Pending Withdrawal Balance: Use the getPendingNormalWithdrawalAmountByCoin function with the required parameters to check if the withdrawn balance is pending:

  4. Complete Withdrawal: If the pending balance is greater than 0, use the completeNormalWithdrawal function to withdraw the cumulative amount to your ETH wallet:

Get a List of Normal Withdrawals:

Retrieve a list of normal withdrawals with optional pagination:

2. Fast Withdrawal

With Fast Withdrawal, your funds will be processed in an expedited timeframe, often within a few minutes. This mode is ideal for users who require immediate access to their funds and are comfortable with paying a fee.

Get a List of Fast Withdrawals:

Retrieve a list of fast withdrawals with optional pagination:

For additional information, please refer to the SDK Reference.

Last updated

Was this helpful?