⚠️FTX Functions
Documentation for functions available for FTX through the PENDAX SDK
Due to recent events related to FTX.com - We have decided to stop the development and documentation of FTX capabilities. They will remain in the PENDAX SDK for documentation purposes only. Please use all FTX functions and integrations with caution. Current events may result in failure of FTX servers to respond.
Create an Exchange Object
Before you can interact with PENDAX functions, you must first create an Exchange object with which to use when using PENDAX. You can create one or multiple, and reference them together or individually throughout your code.
Example Exchange Object Creation:
import { createExchange } from "./exchanges/exchange.js";
let myFtxAccount = createExchange({
exchange: "ftx",
authenticate: true,
key: "myKeys",
secret: "mySecret",
subaccount: "mySubaccountName",
label: "ftx",
});Once an Exchange object has been created you may use any of the available functions allowed by that exchange by referencing the name of the Exchange object you created.
Example using multiple Exchange Objects for executing PENDAX functions:
import { createExchange } from "./exchanges/exchange.js";
let myFtxAccount = createExchange({
exchange: "ftx",
authenticate: true,
key: "myKeys",
secret: "mySecret",
subaccount: "mySubaccountName",
label: "ftx",
});
let myOtherFtxAccount = createExchange({
exchange: "ftx",
authenticate: true,
key: "myOtherKeys",
secret: "myOtherSecret",
subaccount: "myOtherSubaccountName",
label: "ftx",
});
async function getAllSubaccounts() {
try {
const subaccounts = await myFtxAccount.getAllSubaccounts();
const subaccounts2 = await myOtherFtxAccount.getAllSubaccounts();
console.log(subaccounts);
console.log(subaccounts2);
} catch (error) {
console.log(error.message);
}
}Subaccounts
Get All Subaccounts
Example usage:
Create Subaccount
Required Parameters:
Available Parameters:
Example Usage:
Change Subaccount Name
Required Parameters:
Available Parameters:
Example Usage:
Delete Subaccount
Required Parameters:
Available Parameters:
Example Usage:
Get Subaccount Balances
Required Parameters:
Available Parameters:
Example Usage:
Transfer Between Subaccounts
Required Parameters:
Available Parameters:
Example Usage:
Last updated