Convert
Documentation on interacting with a variety of OKX Convert and Convert History API functions through the PENDAX SDK.
The API endpoints of Convert require authentication. Please start by creating an OKX API key. Only the assets in the funding account can be used for conversion.
Convert
Get Convert Currencies
Function Name:
getConvertCurrencies()Usage:
import { createExchange } from "./exchanges/exchange.js";
let myOkxAccount = createExchange({
exchange: "okx",
authenticate: true,
key: "myKeys",
secret: "mySecret",
passphrase: "myPassphrase",
label: "okx",
marginType: "usdt"
});
async function getConvertCurrencies(exchange, options) {
try {
let result = await exchange.getConvertCurrencies(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
const result = await getConvertCurrencies(myOkxAccount)Get Convert Currency Pair
Function Name:
Usage:
Estimate Quote
Function Name:
Usage:
Convert Trade
Function Name:
Usage:
Get Convert History
Function Name:
Usage:
Last updated