Menu
Content Services

Futures Table Widget

Tabular display of futures chains with the ability to connect to the futures charting widgets.

Installation

script

Example

                              window.dtn.futures.createFuturesTableWidget({
 


                                
});
                              
                            

Types

FuturesSymbol

type FuturesSymbol = string;

This type describe futures symbol data that may be used to supply the symbol property.

VisibleFields

type VisibleFields =
  | "LAST"
  | "OPEN"
  | "CLOSE"
  | "ASK"
  | "BID"
  | "CHANGE"
  | "HIGH"
  | "LOW"
  | "CONTRACT_HIGH"
  | "CONTRACT_LOW"

This type describes all the available fields for customizing what data is shown in the table.

Configuration

apiKey

apiKey: string;

The widget access api key associated with your DTN account.

container

container: HTMLElement | string;

The container to mount the widget on. This can be a reference to an HTML element, or a valid selector string. If a string is encountered, document.querySelector will be used to search document for the container.

symbol

symbol: FuturesSymbol;

The futures symbol to render the table with.

visibleFields

visibleFields?: VisibleFields[] = ["LAST", "CHANGE", "HIGH", "LOW"];

This options allows you to customize what fields are displayed in the futures table. This is also responsible for defining the order of the columns in the table.

Methods

setSymbol

setSymbol: (
  symbol: FuturesSymbol
) => void;

Set a new symbol to populate the table with.

Callbacks

onFutureSelect

onFutureSelect: (tickerSymbol: string) => void;

This callback will be called whenever the chart button is clicked.