alphapoint-apex-api

raw JSON →
3.2.19 verified Sat Apr 25 auth: no javascript

A JavaScript library for the Alphapoint API, providing RxJS observables for real-time events and RPC over WebSocket for get requests. Current stable version is 3.2.19. Release cadence is intermittent. Key differentiators: uses observables for streaming data, supports both Node.js and browser environments, and is designed specifically for the Alphapoint financial trading platform.

error Cannot find module 'alphapoint'
cause Package not installed; requires .npmrc configuration to access private registry.
fix
Set up .npmrc with correct token and run 'npm install'.
error TypeError: apex.GetL2Snapshot is not a function
cause Incorrect import or wrong version; ensure you have required { APEX } and instantiated correctly.
fix
Use: const { APEX } = require('alphapoint'); apex = new APEX(url);
gotcha WebSocket endpoint must be wss:// with correct host; otherwise connection fails silently.
fix Ensure you use the correct wss:// URL provided by Alphapoint.
gotcha All methods return promises but some may reject with opaque errors on connection issues.
fix Wrap calls in try/catch or use .catch() to handle promise rejections.
npm install alphapoint-apex-api
yarn add alphapoint-apex-api
pnpm add alphapoint-apex-api

Creates an APEX client, fetches L2 snapshot data using GetL2Snapshot method.

const { APEX } = require('alphapoint');
const apex = new APEX('wss://api_apexqa.alphapoint.com/WSGateway/');

async function main() {
  try {
    const l2 = await apex.GetL2Snapshot({OMSId: 1, InstrumentId: 2, Depth: 100});
    console.log(l2);
  } catch (e) {
    console.error(e);
  }
}
main();