0.0.9 • Published 2 years ago

@stoqey/aurum-broker-spec v0.0.9

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Features:

  • Broker events
  • Broker methods

Broker methods

MethodDescription
initImportant method called to start start the broker, it's recommended to call this method after all events have been registered
getAccountSummaryshould return account details like accountId, account balance e.t.c
getOpenOrdersGet all open order, not including filled orders
getAllPositionsGet all portfolios that are currently invested in
enterPositionStart a new position/portfolio
exitPositionExit an existing position
searchSymbolSearch for a symbol
quoteSymbolGet quote
getMarketDataGet historical data
getPriceUpdateGet realtime price updates
getScreenerGet screener method

Broker events

onReady

this method should be called when broker is ready to accept/process requests.

onReady: (data: any) => Promise<any>;

onPortfolios

Called when portfolios change/requested, the application developer should save portfolios from this, because there is no guarantee that the broker saved, or worse-case e.g like when disconnected from broker e.t.c

onPortfolios: (portfolios: any[]) => Promise<any>;

onOrder

Called when an action has been made on a order, order status updated, filled, or returned when order lists are requested.

// order for buy/sell trades
onOrder: (order: any) => Promise<any>;

onMarketData

Returns historical data from calling getMarketData method

onMarketData: (data: any) => Promise<any>;

onPriceUpdate

Streams real-time price updates from any symbols added for watch list

onPriceUpdate: (data: any) => Promise<any>;

Changelog

23-05-2020 Version 0.0.8

  • Add getScreener to broker
  • Optional startDate

Current implementations

STOQEY INC

0.0.9

2 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago