Deposit And Withdraw

Query deposit address information

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

https://phemex-docs.github.io#query-deposit-address-information

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.

https://phemex-docs.github.io#query-deposit-history-records

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.

https://phemex-docs.github.io#query-deposit-chain-settings

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.

https://phemex-docs.github.io#query-withdraw-history-records

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.

https://phemex-docs.github.io#create-withdraw-request

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.

https://phemex-docs.github.io#cancel-withdraw-request

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.

https://phemex-docs.github.io#query-withdraw-chain-settings

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"
     });

Last updated