Market Data

Documentation on interacting with a variety of OKX's Market Data API functions through the PENDAX Javascript SDK.

API calls for market data functions do not require account authentication/authorization.

Market Data

Get Tickers

circle-check
circle-info

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

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

Function Name:

getTickers()

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 getTickers(exchange, options) {
    try {
        let result = await exchange.getTickers(options);
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

const result = await getTickers(myOkxAccount,
{
    instType:"SWAP"
})

Get Ticker

circle-check
circle-info

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

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

Function Name:

Usage:

Get Index Tickers

circle-info

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

https://www.okx.com/docs-v5/en/#rest-api-market-data-get-index-tickersarrow-up-right

Function Name:

Usage:

Get Order Book

circle-info

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

https://www.okx.com/docs-v5/en/#rest-api-market-data-get-order-bookarrow-up-right

Function Name:

Usage:

Get Candlesticks

circle-info

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

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

Function Name:

Usage:

Get Candlesticks History

circle-info

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

https://www.okx.com/docs-v5/en/#rest-api-market-data-get-candlesticks-historyarrow-up-right

Function Name:

Usage:

Get Index Candlesticks

circle-info

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

https://www.okx.com/docs-v5/en/#rest-api-market-data-get-index-candlesticksarrow-up-right

Function Name:

Usage:

Get Mark Price Candlesticks

circle-info

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

https://www.okx.com/docs-v5/en/#rest-api-market-data-get-mark-price-candlesticksarrow-up-right

Function Name:

Usage:

Get Trades

circle-info

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

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

Function Name:

Usage:

Get Trades History

circle-info

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

https://www.okx.com/docs-v5/en/#rest-api-market-data-get-trades-historyarrow-up-right

Function Name:

Usage:

Get 24H Total Volume

circle-info

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

https://www.okx.com/docs-v5/en/#rest-api-market-data-get-24h-total-volumearrow-up-right

Function Name:

Usage:

Get Oracle

circle-info

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

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

Function Name:

Usage:

Get Exchange Rate

circle-info

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

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

Function Name:

Usage:

Get Index Components

circle-info

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

https://www.okx.com/docs-v5/en/#rest-api-market-data-get-index-componentsarrow-up-right

Function Name:

Usage:

Get Block Tickers

circle-info

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

https://www.okx.com/docs-v5/en/#rest-api-market-data-get-block-tickersarrow-up-right

Function Name:

Usage:

Get Block Ticker

circle-info

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

https://www.okx.com/docs-v5/en/#rest-api-market-data-get-block-tickerarrow-up-right

Function Name:

Usage:

Get Block Trades

circle-info

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

https://www.okx.com/docs-v5/en/#rest-api-market-data-get-block-tradesarrow-up-right

Function Name:

Usage:

Last updated