@client-zone/ibkr-flex
v0.2.1
Published
@client-zone/ibkr-flex
Downloads
21
Readme
@client-zone/ibkr-flex
Isomophic API client for the IBKR Flex Web Service. Documentation for how to enable the Flex Web Service can be found here.
The API docs for this library are here. Some code examples here.
Example
For example, execute a Flex Query which returns recent Corporate Actions for stocks you hold.
import IbkrFlex from '@client-zone/ibkr-flex'
const flex = new IbkrFlex()
const result = await flex.getStatement('<your token>', '<your query id>')
console.log(result)Output (in the format specified in the Client Portal Flex Query editor).
CurrencyPrimary|FXRateToBase|AssetClass|SubCategory|Symbol|Description
USD|1|STK|COMMON|KULR|KULR(US50125G1094) SPLIT 1 FOR 8 (KULR, KULR TECHNOLOGY GROUP INC, US50125G3074)Load anywhere
This library is compatible with Node.js v18+ and the Web. It can be loaded anywhere, natively without transpilation (however, IBKR servers might reject CORS requests from the browser).
Within a Node.js ECMAScript Module:
import IbkrFlex from '@client-zone/ibkr-flex'Within an modern browser ECMAScript Module:
import from './node_modules/@client-zone/ibkr-flex/dist/index.mjs'© 2023-25 Lloyd Brookes <[email protected]>.
Documented by jsdoc-to-markdown.
