Compendium Trading Tools Documentation
CompendiumPENDAXCompendexOfficial Links
  • ⭐Platform Overview
  • ⚫PENDAX
    • 🌐What is PENDAX?
    • 🖱️PENDAX Capabilities
    • 💾Installing PENDAX modules
    • 💡Using PENDAX SDK
      • 💻Common Functions
      • 💻OKX Functions
        • Trading & Orders
        • Funding
        • Convert
        • Account & Subaccount
        • Grid Trading
        • Market Data
        • Public Data
        • Trading Data
      • 💻Bitget Functions
        • Public (Spot)
        • Market (Spot)
        • Wallet (Spot)
        • Account (Spot)
        • Trade (Spot)
        • Market (Futures)
        • Account (Futures)
        • Trade (Futures)
        • CopyTrade (Futures)
        • Sub Account Interface (Broker)
        • Sub API Interface (Broker)
      • 💻ByBit Functions
        • Market
        • Trading
        • Position
        • Account
        • Asset
        • User
        • Spot Leverage Token
        • Spot Margin Trade (UTA)
        • Spot Margin Trade (Normal)
        • Institutional Lending
      • 💻Mexc Functions
        • Market
        • Sub-Account
        • Spot Account/Trade
        • Wallet
        • ETF
        • Rebate
        • Futures Market
        • Futures Account and Trading
      • 💻Phemex Functions
        • Contract
        • Hedged Contract
        • Spot
        • Margin Trading
        • Transfer
        • Convert
        • Deposit And Withdraw
      • 💻BloFin Functions
        • Websocket
        • Account
        • Affiliate
        • Public Data
        • Trading
        • User
      • 💻BingX Functions
        • Fund Account
        • Wallet Deposits and Withdrawals
        • Sub-Account Managenent
        • Market Data (USDT-M)
        • Account (USDT-M)
        • Trades (USDT-M)
        • Market Data (Coin-M)
        • Trades (Coin-M)
        • Market Data (Spot)
        • Fund Account (Spot)
        • Trades (Spot)
        • CopyTrader
      • ⚠️FTX Functions
    • 📜License Agreement
  • 🟣Compendium App
    • 📈Compendium Trading Tools
    • 🔗Connect An Exchange Account
      • 🗝️OKX.com API Keys
    • 🤖Verified Trading Bots
      • Explore The Marketplace
      • For Algo & Strategy Authors
        • Get Listed & Verified
        • Strategy Monetization
        • Sending Trading Signals
        • Simplified Signal Program
      • For Users & Subscribers
        • Subscribing To Bots
        • Managing A Subscription
    • 💫Copy Trading Groups
      • For Copy Group Leaders
        • Creating A Copy Group
        • Linking Leader Account
        • Important Trading Notes
        • Manage A Copy Group
        • Discord Webhooks Setup
      • For Users & Subscribers
        • Subscribe To Copy Group
        • Link Account To Group
    • 📶Signal Provider Groups
      • For Group Leaders
        • Creating A Signal Group
        • Managing A Signal Group
        • Sending Trading Signals
      • For Users & Subscribers
        • Subscribing To Signal Groups
        • Manage Signal Group Subscription
  • 🔵Compendex Suite
    • 🔮DeFi With Compendex
    • ☀️Solana Integrations
      • Supported Solana Wallets
      • Overview And News
      • Openbook Spot Markets
      • Smart Swap Aggregator
      • NFT Metaverse Markets
      • Solana DeFi Analytics Portal
      • Community Tools List
  • 🪙The CMFI Token Ecosystem
    • 📊Tokenomics Breakdown
    • 🍎Trade Incentive Program
    • 🌊Staking And Liquidity Pools
      • ✨Raydium Liquidity Pools
      • 🐳Orca Liquidity Whirlpools
      • 🐋Orca Liquidity Pools
    • 🐷Compendi-Pigs NFT
  • 👥Community Info
    • ✅Links And Social Pages
    • 🎨Branding Guidelines
Powered by GitBook
On this page
  • Query deposit address information
  • Query deposit history records
  • Query deposit chain settings
  • Query withdraw history records
  • Create withdraw request
  • Cancel withdraw request
  • Query withdraw chain settings
  1. PENDAX
  2. Using PENDAX SDK
  3. Phemex Functions

Deposit And Withdraw

PreviousConvertNextBloFin Functions

Last updated 1 year ago

Query deposit address information

Please refer to the official Phemex API Docs for the Required parameters.

Function Name:

getDepositAddress()

Usage:

import { createExchange } from "./exchanges/exchange.js";

   let myPhemexExchange  = createExchange({
      exchange: "phemex",
      authenticate: "true",
      key: "myKey",
      secret: "mySecret",
      label: "phemex"
  });

async function getDepositAddress(exchange, options) {
    try {
        let result = await exchange.getDepositAddress(options);
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

let result = await getDepositAddress(myPhemexExchange, {
         currency: "BTC",
         chainName: "BTC"
     });

Query deposit history records

Please refer to the official Phemex API Docs for the Required parameters.

Function Name:

getDepositHistory()

Usage:

import { createExchange } from "./exchanges/exchange.js";

   let myPhemexExchange  = createExchange({
      exchange: "phemex",
      authenticate: "true",
      key: "myKey",
      secret: "mySecret",
      label: "phemex"
  });

async function getDepositHistory(exchange, options) {
    try {
        let result = await exchange.getDepositHistory(options);
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

let result = await getDepositHistory(myPhemexExchange, {
         currency: "BTC"
     });

Query deposit chain settings

Please refer to the official Phemex API Docs for the Required parameters.

Function Name:

getDepositChainSettings()

Usage:

import { createExchange } from "./exchanges/exchange.js";

   let myPhemexExchange  = createExchange({
      exchange: "phemex",
      authenticate: "true",
      key: "myKey",
      secret: "mySecret",
      label: "phemex"
  });

async function getDepositChainSettings(exchange, options) {
    try {
        let result = await exchange.getDepositChainSettings(options);
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

let result = await getDepositChainSettings(myMainPhemexExchange, {
         currency: "USDT"
     });

Query withdraw history records

Please refer to the official Phemex API Docs for the Required parameters.

Function Name:

getWithdrawHistory()

Usage:

import { createExchange } from "./exchanges/exchange.js";

   let myPhemexExchange  = createExchange({
      exchange: "phemex",
      authenticate: "true",
      key: "myKey",
      secret: "mySecret",
      label: "phemex"
  });

async function getWithdrawHistory(exchange, options) {
    try {
        let result = await exchange.getWithdrawHistory(options);
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

let result = await getWithdrawHistory(myPhemexExchange, {
         currency: "BTC"
     });

Create withdraw request

Please refer to the official Phemex API Docs for the Required parameters.

Function Name:

withdraw()

Usage:

import { createExchange } from "./exchanges/exchange.js";

   let myPhemexExchange  = createExchange({
      exchange: "phemex",
      authenticate: "true",
      key: "myKey",
      secret: "mySecret",
      label: "phemex"
  });

async function withdraw(exchange, options) {
    try {
        let result = await exchange.withdraw(options);
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

let result = await withdraw(myMainPhemexExchange, {
        currency: "USDT",
        address: "dalwkdmn55ownd22n",
        amount: "1",
        chainName: "ETH"
     });

Cancel withdraw request

Please refer to the official Phemex API Docs for the Required parameters.

Function Name:

cancelWithdraw()

Usage:

import { createExchange } from "./exchanges/exchange.js";

   let myPhemexExchange  = createExchange({
      exchange: "phemex",
      authenticate: "true",
      key: "myKey",
      secret: "mySecret",
      label: "phemex"
  });

async function cancelWithdraw(exchange, options) {
    try {
        let result = await exchange.cancelWithdraw(options);
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

let result = await cancelWithdraw(myMainPhemexExchange, {
        id: "fkjnklnlnm3mnpinpio3333"
     });

Query withdraw chain settings

Please refer to the official Phemex API Docs for the Required parameters.

Function Name:

getWithdrawChainSettings()

Usage:

import { createExchange } from "./exchanges/exchange.js";

   let myPhemexExchange  = createExchange({
      exchange: "phemex",
      authenticate: "true",
      key: "myKey",
      secret: "mySecret",
      label: "phemex"
  });

async function getWithdrawChainSettings(exchange, options) {
    try {
        let result = await exchange.getWithdrawChainSettings(options);
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

let result = await getWithdrawChainSettings(myMainPhemexExchange, {
        currency: "USDT"
     });

⚫
💡
💻
https://phemex-docs.github.io#query-deposit-address-information
https://phemex-docs.github.io#query-deposit-history-records
https://phemex-docs.github.io#query-deposit-chain-settings
https://phemex-docs.github.io#query-withdraw-history-records
https://phemex-docs.github.io#create-withdraw-request
https://phemex-docs.github.io#cancel-withdraw-request
https://phemex-docs.github.io#query-withdraw-chain-settings