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
  • Create a Sub-account(For Master Account)
  • Query Sub-account List (For Master Account)
  • Create an APIKey for a sub-account (For Master Account)
  • Query the APIKey of a sub-account (For Master Account)
  • Delete the APIKey of a sub-account (For Master Account)
  • Universal Transfer (For Master Account)
  • Query Universal Transfer History (For Master Account)
  1. PENDAX
  2. Using PENDAX SDK
  3. Mexc Functions

Sub-Account

Documentation on interacting with Mexc's Sub-Account API functions through the PENDAX Javascript SDK.

PreviousMarketNextSpot Account/Trade

Last updated 1 year ago

Create a Sub-account(For Master Account)

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

Function Name:

createSubAccountSpot()

Usage:

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

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

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

let result = await createSubAccountSpot(myMexcExchanges,
     {
         subAccount: "mikwdn443ksnsadasd",
         note: "1"
     });

Query Sub-account List (For Master Account)

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

Function Name:

getSubaccountListSpot()

Usage:

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

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

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

let result = await getSubaccountListSpot(myMexcExchanges);

Create an APIKey for a sub-account (For Master Account)

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

Function Name:

createSubaccountApiKeySpot()

Usage:

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

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

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

let result = await createSubaccountApiKeySpot(myMexcExchanges,
         {
             subAccount: "mikwdn443ksnsadasd",
             note: "meat",
             permissions: "SPOT_ACCOUNT_READ"
         });

Query the APIKey of a sub-account (For Master Account)

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

Function Name:

getSubaccountApiKeySpot()

Usage:

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

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

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


let result = await getSubaccountApiKeySpot(myMexcExchanges,
         {
             subAccount: "yourSubAccountName"
         });

Delete the APIKey of a sub-account (For Master Account)

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

Function Name:

deleteSubaccountApiKeySpot()

Usage:

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

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

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

let result = await deleteSubaccountApiKeySpot(myMexcExchanges,
         {
             subAccount: "22nj5499sn2nv",
             apiKey: "nfl4nfl34nrt3lku4nrl3in4"
         });

Universal Transfer (For Master Account)

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

Function Name:

universalTransferSpot()

Usage:

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

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

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

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

Query Universal Transfer History (For Master Account)

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

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: "22df3tg4yh45y",
             fromAccountType: "SPOT",
             toAccountType: "SPOT"
         });

⚫
💡
💻
https://mxcdevelop.github.io/apidocs/spot_v3_en/#create-a-sub-account-for-master-account
https://mxcdevelop.github.io/apidocs/spot_v3_en/#query-sub-account-list-for-master-account
https://mxcdevelop.github.io/apidocs/spot_v3_en/#create-an-apikey-for-a-sub-account-for-master-account
https://mxcdevelop.github.io/apidocs/spot_v3_en/#query-the-apikey-of-a-sub-account-for-master-account
https://mxcdevelop.github.io/apidocs/spot_v3_en/#delete-the-apikey-of-a-sub-account-for-master-account
https://mxcdevelop.github.io/apidocs/spot_v3_en/#universal-transfer-for-master-account
https://mxcdevelop.github.io/apidocs/spot_v3_en/#query-universal-transfer-history-for-master-account