Wallet

Documentation on interacting with Mexc's Wallet API functions through the PENDAX Javascript SDK.

Query the currency information

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

https://mxcdevelop.github.io/apidocs/spot_v3_en/#query-the-currency-information

Function Name:

getCurrencyInformationSpot()

Usage:

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

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

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

let result = await getCurrencyInformationSpot(myMexcExchanges);

Withdraw

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

https://mxcdevelop.github.io/apidocs/spot_v3_en/#withdraw

Function Name:

withdrawSpot()

Usage:

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

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

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

let result = await withdrawSpot(myMexcExchanges, 
    {
        coin: "EOS",
        address: "zzqqqqqqqqqq",
        amount: "10"
    );

Cancel withdraw

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

https://mxcdevelop.github.io/apidocs/spot_v3_en/#cancel-withdraw

Function Name:

cancelWithdrawSpot()

Usage:

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

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

async function cancelWithdrawSpot(exchange, options) {
    try {
        let result = await exchange.cancelWithdrawSpot(options);
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}
let result = await cancelWithdrawSpot(myMexcExchanges, 
    {
        id: "ca7bd51895134fb5bd749f1cf875b8af"
    );

Deposit History(supporting network)

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

https://mxcdevelop.github.io/apidocs/spot_v3_en/#deposit-history-supporting-network

Function Name:

getDepositHistorySpot()

Usage:

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

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

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

let result = await getDepositHistorySpot(myMexcExchanges);

Withdraw History (supporting network)

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

https://mxcdevelop.github.io/apidocs/spot_v3_en/#withdraw-history-supporting-network

Function Name:

getWithdrawHistorySpot()

Usage:

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

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

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

let result = await getWithdrawHistorySpot(myMexcExchanges);

Generate deposit address (supporting network)

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

https://mxcdevelop.github.io/apidocs/spot_v3_en/#generate-deposit-address-supporting-network

Function Name:

generateDepositAddressSpot()

Usage:

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

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

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

let result = await generateDepositAddressSpot(myMexcExchanges,
         {
             coin: "USDT",
             network: "TRC20"
         });

Deposit Address (supporting network)

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

https://mxcdevelop.github.io/apidocs/spot_v3_en/#deposit-address-supporting-network

Function Name:

getDepositAddressSpot()

Usage:

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

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

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

let result = await getDepositAddressSpot(myMexcExchanges,
         {
             coin: "USDT"
         });

Withdraw Address (supporting network)

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

https://mxcdevelop.github.io/apidocs/spot_v3_en/#withdraw-address-supporting-network

Function Name:

getWithdrawAddressSpot()

Usage:

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

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

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

let result = await getWithdrawAddressSpot(myMexcExchanges);

User Universal Transfer

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

https://mxcdevelop.github.io/apidocs/spot_v3_en/#user-universal-transfer

Function Name:

userUniversalTransferSpot()

Usage:

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

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

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

let result = await userUniversalTransferSpot(myMexcExchanges,
         {
             fromAccountType: "SPOT",
             toAccountType: "FUTURES",
             asset: "USDT",
             amount: "10"
         });

Query User Universal Transfer History

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

https://mxcdevelop.github.io/apidocs/spot_v3_en/#query-user-universal-transfer-history

Function Name:

getUniversalTransferHistorySpot()

Usage:

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

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

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

let result = await getUniversalTransferHistorySpot(myMexcExchanges,
         {
             toAccount: "mikwdn443ksnsadasd",
             fromAccountType: "SPOT",
             toAccountType: "SPOT"
         });

Query User Universal Transfer History (by tranId)

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

https://mxcdevelop.github.io/apidocs/spot_v3_en/#query-user-universal-transfer-history-by-tranid

Function Name:

getUniversalTransferHistoryTranIdSpot()

Usage:

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

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

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

let result = await getUniversalTransferHistoryTranIdSpot(myMexcExchanges,
         {
             tranId: "fedfdd5d23f94582a117a67118323db9"
         });

Get Assets That Can Be Converted Into MX

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

https://mxcdevelop.github.io/apidocs/spot_v3_en/#get-assets-that-can-be-converted-into-mx

Function Name:

getMxConvertableAssetsSpot()

Usage:

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

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

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

let result = await getMxConvertableAssetsSpot(myMexcExchanges);

Dust Transfer

This function is currently under construction and may fail or give unexpected behavior

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

https://mxcdevelop.github.io/apidocs/spot_v3_en/#dust-transfer

Function Name:

dustTransferSpot()

Usage:

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

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

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

DustLog

This function is currently under construction and may fail or give unexpected behavior

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

https://mxcdevelop.github.io/apidocs/spot_v3_en/#dustlog

Function Name:

getDustLogSpot()

Usage:

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

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

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

let result = await getDustLogSpot(myMexcExchanges);

Last updated