Query deposit address information
Function Name:
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
Function Name:
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
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
Function Name:
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
Function Name:
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
Function Name:
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
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"
});