Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Endpoints required for Charting Library: 1: Symbol Info for each symbol on IBKR #9

Closed
tararjawad opened this issue Aug 15, 2022 · 2 comments

Comments

@tararjawad
Copy link

Symbol Info:

Example Request: /api/markets?ticker=BINANCE:BNBBTC
Request Format: /api/markets?ticker={EXCHANGE}:{SYMBOL}

mentioned in the curly braces {} are the variables same as the objects in the response example

Example Response:

{
"id": "62eb98a0359dcce08fca66db",
"symbol": "BNBBTC",
"exchange": "BINANCE",
"type": "SPOT",
// Possible types are: stock index forex
"description": "BNB/BTC SPOT", // Description of a symbol. Will be displayed in the chart legend for this symbol.
"pricescale": 100000000, // pricescale defines the number of decimal places. It is 10^number-of-decimal-places. If a price is displayed as 1.01, pricescale is 100; If it is displayed as 1.005, pricescale is 1000.
"ticker": "BINANCE_SPOT:BNBBTC", // ticker is the unique identifier of the symbol that is used only inside the Library. Your users will never be able to see it.
"session": "0930-1600"// A trading session defines the hours in a week when a symbol is actively traded on an exchange. The trading session of a symbol is passed to the Charting Library : tip: use this parser to test http://tradingview.github.io/checksession.html
"session_holidays": [20181105,20181107,20181112] , //List of holidays for this symbol. These dates are not displayed on the chart. It's a string in the following format:
YYYYMMDD[,YYYYMMDD].
"timezone": "US/Mountain", // Timezone of the listed exchange in olsondb format
has_intraday: true,
has_seconds: true,
has_no_volume: false,

volume_precision: 2, // Integer showing typical volume value decimal places for a particular symbol. 0 means volume is always an integer. 1 means that there might be 1 numeric character after the comma.
}

If you have access to Trading view charting library check for further fields you can possibly add in symbol info object from the IBKR api. Here:
https://github.com/tradingview/charting_library/wiki/Symbology#symbolinfo-structure

We need this info for each symbol that we show the data for. Because we need to tell tradingview library these things, for example, has_intraday true implies that this symbol supports intra day timeframe, which means we can provide the data for seconds, minutes and hours timeframes.
Another example, sessions: we need to tell the library what trading sessions the symbol is traded on, so the library shows the green or red icon of the trading status e.t.c.

@drixie
Copy link
Owner

drixie commented Aug 15, 2022

@tararjawad Can you share an example that uses a stock?

@tararjawad
Copy link
Author

{
"id": "62eb98a0359dcce08fca66db",
"symbol": "AAPL",
"exchange": "NASDAQ",
"type": "stock", // Possible types are: stock index forex
"description": "Apple Inc.", // Description of a symbol. Will be displayed in the chart legend for this symbol.
"pricescale": 100000000, // pricescale defines the number of decimal places. It is 10^number-of-decimal-places. If a price is displayed as 1.01, pricescale is 100; If it is displayed as 1.005, pricescale is 1000.
"ticker": "AAPL", // ticker is the unique identifier of the symbol that is used only inside the Library. Your users will never be able to see it.
"session": "0930-1600"// A trading session defines the hours in a week when a symbol is actively traded on an exchange. The trading session of a symbol is passed to the Charting Library : tip: use this parser to test http://tradingview.github.io/checksession.html
"session_holidays": [20181105,20181107,20181112] , //List of holidays for this symbol. These dates are not displayed on the chart. It's a string in the following format:
YYYYMMDD[,YYYYMMDD].
"timezone": "US/Mountain", // Timezone of the listed exchange in olsondb format
has_intraday: true,
has_seconds: true,
has_no_volume: false,
volume_precision: 2, // Integer showing typical volume value decimal places for a particular symbol. 0 means volume is always an integer. 1 means that there might be 1 numeric character after the comma.
"data_status" : "streaming", // Supported statuses are: streaming, endofday, pulsed, delayed_streaming

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants