@sebspark/tradeinsight
v6.0.0
Published
TradeInsight client library with helpers for creating/parsing instrument IDs and consuming ticker feeds.
Keywords
Readme
@sebspark/tradeinsight
TradeInsight client library with helpers for creating/parsing instrument IDs and consuming ticker feeds.
Instrument IDs
Create ID
const isin = 'SE0000108656'
const mic = 'XSTO'
const currency = 'SEK'
const id = createStockId({ isin, mic, currency })
console.log(id)
// STOCK-SE0000108656;XSTO;SEKParse ID
const { type, fromCurrency, toCurrency } = parseId('FOREX-USD;EUR')
console.log(type, fromCurrency, toCurrency)
// FOREX, USD, EUR