Public Data
Documentation on interacting with a variety of OKX's Public Data API functions through the PENDAX Javascript SDK.
The API endpoints of Public Data do not require authentication.
Public Data
Get Instruments
Function Name:
getInstruments()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 getInstruments(exchange, options) {
try {
let result = await exchange.getInstruments(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
const result = await getInstruments(myOkxAccount,
{
instType: "SWAP"
});Get Delivery/Exercise Data
Function Name:
Usage:
Get Open Interest
Function Name:
Usage:
Get Funding Rate
Function Name:
Usage:
Get Funding Rate History
Function Name:
Usage:
Get Limit Price
Function Name:
Usage:
Get Option Market Data
Function Name:
Usage:
Get Estimated Delivery/Exercise Price
Function Name:
Usage:
Get Discount Rate and Interest-Free Quota
Function Name:
Usage:
Get System Time
Function Name:
Usage:
Get Liquidation Orders
Function Name:
Usage:
Get Mark Price
Function Name:
Usage:
Get Position Tiers
Function Name:
Usage:
Get Interest Rate and Loan Quota
Function Name:
Usage:
Get Interest Rate and Loan Quota for VIP Loans
Function Name:
Usage:
Get Underlying
Function Name:
Usage:
Get Insurance Fund
Function Name:
Usage:
Unit Convert
Function Name:
Usage:
Last updated