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

Please refer to the official OKX API Docs for the required parameters.

https://www.okx.com/docs-v5/en/#rest-api-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

Please refer to the official OKX API Docs for required parameters.

https://www.okx.com/docs-v5/en/#rest-api-public-data-get-delivery-exercise-history

Function Name:

Usage:

Get Open Interest

Please refer to the official OKX API Docs for required parameters.

https://www.okx.com/docs-v5/en/#rest-api-public-data-get-open-interest

Function Name:

Usage:

Get Funding Rate

Please refer to the official OKX API Docs for required parameters.

https://www.okx.com/docs-v5/en/#rest-api-public-data-get-funding-rate

Function Name:

Usage:

Get Funding Rate History

Please refer to the official OKX API Docs for required parameters.

https://www.okx.com/docs-v5/en/#rest-api-public-data-get-funding-rate-history

Function Name:

Usage:

Get Limit Price

Please refer to the official OKX API Docs for required parameters.

https://www.okx.com/docs-v5/en/#rest-api-public-data-get-limit-price

Function Name:

Usage:

Get Option Market Data

Please refer to the official OKX API Docs for required parameters.

https://www.okx.com/docs-v5/en/#rest-api-public-data-get-option-market-data

Function Name:

Usage:

Get Estimated Delivery/Exercise Price

Please refer to the official OKX API Docs for required parameters.

https://www.okx.com/docs-v5/en/#rest-api-public-data-get-estimated-delivery-exercise-price

Function Name:

Usage:

Get Discount Rate and Interest-Free Quota

Please refer to the official OKX API Docs for required parameters.

https://www.okx.com/docs-v5/en/#rest-api-public-data-get-discount-rate-and-interest-free-quota

Function Name:

Usage:

Get System Time

Please refer to the official OKX API Docs for required parameters.

https://www.okx.com/docs-v5/en/#rest-api-public-data-get-system-time

Function Name:

Usage:

Get Liquidation Orders

Please refer to the official OKX API Docs for required parameters.

https://www.okx.com/docs-v5/en/#rest-api-public-data-get-liquidation-orders

Function Name:

Usage:

Get Mark Price

Please refer to the official OKX API Docs for required parameters.

https://www.okx.com/docs-v5/en/#rest-api-public-data-get-mark-price

Function Name:

Usage:

Get Position Tiers

Please refer to the official OKX API Docs for required parameters.

https://www.okx.com/docs-v5/en/#rest-api-public-data-get-position-tiers

Function Name:

Usage:

Get Interest Rate and Loan Quota

Please refer to the official OKX API Docs for required parameters.

https://www.okx.com/docs-v5/en/#rest-api-public-data-get-interest-rate-and-loan-quota

Function Name:

Usage:

Get Interest Rate and Loan Quota for VIP Loans

Please refer to the official OKX API Docs for required parameters.

https://www.okx.com/docs-v5/en/#rest-api-public-data-get-interest-rate-and-loan-quota-for-vip-loans

Function Name:

Usage:

Get Underlying

Please refer to the official OKX API Docs for required parameters.

https://www.okx.com/docs-v5/en/#rest-api-public-data-get-underlying

Function Name:

Usage:

Get Insurance Fund

Please refer to the official OKX API Docs for required parameters.

https://www.okx.com/docs-v5/en/#rest-api-public-data-get-insurance-fund

Function Name:

Usage:

Unit Convert

Please refer to the official OKX API Docs for required parameters.

https://www.okx.com/docs-v5/en/#rest-api-public-data-unit-convert

Function Name:

Usage:

Last updated