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

circle-info

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

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

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

circle-info

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-historyarrow-up-right

Function Name:

Usage:

Get Open Interest

circle-info

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

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

Function Name:

Usage:

Get Funding Rate

circle-info

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

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

Function Name:

Usage:

Get Funding Rate History

circle-info

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-historyarrow-up-right

Function Name:

Usage:

Get Limit Price

circle-info

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

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

Function Name:

Usage:

Get Option Market Data

circle-info

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-dataarrow-up-right

Function Name:

Usage:

Get Estimated Delivery/Exercise Price

circle-info

Function Name:

Usage:

Get Discount Rate and Interest-Free Quota

circle-info

Function Name:

Usage:

Get System Time

circle-info

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

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

Function Name:

Usage:

Get Liquidation Orders

circle-info

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

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

Function Name:

Usage:

Get Mark Price

circle-info

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

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

Function Name:

Usage:

Get Position Tiers

circle-info

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

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

Function Name:

Usage:

Get Interest Rate and Loan Quota

circle-info

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-quotaarrow-up-right

Function Name:

Usage:

Get Interest Rate and Loan Quota for VIP Loans

circle-info

Function Name:

Usage:

Get Underlying

circle-info

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

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

Function Name:

Usage:

Get Insurance Fund

circle-info

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

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

Function Name:

Usage:

Unit Convert

circle-info

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

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

Function Name:

Usage:

Last updated