Market
Documentation on interacting with Mexc's Market API functions through the PENDAX Javascript SDK.
Last updated
Documentation on interacting with Mexc's Market API functions through the PENDAX Javascript SDK.
Last updated
testConnectivitySpot()
import { createExchange } from "./exchanges/exchange.js";
let myMexcExchanges = createExchange({
exchange: "mexc",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "mexc"
});
async function testConnectivitySpot(exchange, options) {
try {
let result = await exchange.testConnectivitySpot(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await testConnectivitySpot(myMexcExchanges);
getServerTimeSpot()
import { createExchange } from "./exchanges/exchange.js";
let myMexcExchanges = createExchange({
exchange: "mexc",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "mexc"
});
async function getServerTimeSpot(exchange, options) {
try {
let result = await exchange.getServerTimeSpot(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getServerTimeSpot(myMexcExchanges);
getSelfSymbolsSpot()
import { createExchange } from "./exchanges/exchange.js";
let myMexcExchanges = createExchange({
exchange: "mexc",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "mexc"
});
async function getSelfSymbolsSpot(exchange, options) {
try {
let result = await exchange.getSelfSymbolsSpot(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getSelfSymbolsSpot(myMexcExchanges);
getExchangeInformationSpot()
import { createExchange } from "./exchanges/exchange.js";
let myMexcExchanges = createExchange({
exchange: "mexc",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "mexc"
});
async function getExchangeInformationSpot(exchange, options) {
try {
let result = await exchange.getExchangeInformationSpot(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getExchangeInformationSpot(myMexcExchanges, {symbol: "BTCUSDT"});
getOrderBookSpot()
import { createExchange } from "./exchanges/exchange.js";
let myMexcExchanges = createExchange({
exchange: "mexc",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "mexc"
});
async function getOrderBookSpot(exchange, options) {
try {
let result = await exchange.getOrderBookSpot(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getOrderBookSpot(myMexcExchanges,
{
symbol: "BTCUSDT"
});
getRecentTradesListSpot()
import { createExchange } from "./exchanges/exchange.js";
let myMexcExchanges = createExchange({
exchange: "mexc",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "mexc"
});
async function getRecentTradesListSpot(exchange, options) {
try {
let result = await exchange.getRecentTradesListSpot(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getRecentTradesListSpot(myMexcExchanges,
{
symbol: "BTCUSDT"
});
getAggTradesSpot()
import { createExchange } from "./exchanges/exchange.js";
let myMexcExchanges = createExchange({
exchange: "mexc",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "mexc"
});
async function getAggTradesSpot(exchange, options) {
try {
let result = await exchange.getAggTradesSpot(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getAggTradesSpot(myMexcExchanges,
{
symbol: "BTCUSDT"
});
getKlinesSpot()
import { createExchange } from "./exchanges/exchange.js";
let myMexcExchanges = createExchange({
exchange: "mexc",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "mexc"
});
async function getKlinesSpot(exchange, options) {
try {
let result = await exchange.getKlinesSpot(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getKlinesSpot(myMexcExchanges,
{
symbol: "BTCUSDT",
interval: "15m"
});
getAvgPriceSpot()
import { createExchange } from "./exchanges/exchange.js";
let myMexcExchanges = createExchange({
exchange: "mexc",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "mexc"
});
async function getAvgPriceSpot(exchange, options) {
try {
let result = await exchange.getAvgPriceSpot(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getAvgPriceSpot(myMexcExchanges,
{
symbol: "BTCUSDT"
});
get24HrTickerSpot()
import { createExchange } from "./exchanges/exchange.js";
let myMexcExchanges = createExchange({
exchange: "mexc",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "mexc"
});
async function get24HrTickerSpot(exchange, options) {
try {
let result = await exchange.get24HrTickerSpot(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await get24HrTickerSpot(myMexcExchanges);
getPriceTickerSpot()
import { createExchange } from "./exchanges/exchange.js";
let myMexcExchanges = createExchange({
exchange: "mexc",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "mexc"
});
async function getPriceTickerSpot(exchange, options) {
try {
let result = await exchange.getPriceTickerSpot(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getPriceTickerSpot(myMexcExchanges);
getBookTickerSpot()
import { createExchange } from "./exchanges/exchange.js";
let myMexcExchanges = createExchange({
exchange: "mexc",
authenticate: "true",
key: "myKey",
secret: "mySecret",
label: "mexc"
});
async function getBookTickerSpot(exchange, options) {
try {
let result = await exchange.getBookTickerSpot(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
let result = await getBookTickerSpot(myMexcExchanges);