{"id":18099,"library":"alphapoint-apex-api","title":"alphapoint-apex-api","description":"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.","status":"active","version":"3.2.19","language":"javascript","source_language":"en","source_url":null,"tags":["javascript"],"install":[{"cmd":"npm install alphapoint-apex-api","lang":"bash","label":"npm"},{"cmd":"yarn add alphapoint-apex-api","lang":"bash","label":"yarn"},{"cmd":"pnpm add alphapoint-apex-api","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Used for observable patterns for events","package":"rxjs","optional":false},{"reason":"WebSocket implementation for Node.js","package":"ws","optional":true}],"imports":[{"note":"CommonJS require is the documented pattern; ES imports may not work directly depending on bundler.","wrong":"import { APEX } from 'alphapoint'","symbol":"APEX","correct":"const { APEX } = require('alphapoint')"},{"note":"Default ES import works in some setups; named import as documented may be preferred.","wrong":"","symbol":"APEX","correct":"import APEX from 'alphapoint'"},{"note":"Destructuring is clearer.","wrong":"const alphapoint = require('alphapoint'); const a = new alphapoint.APEX()","symbol":"APEX","correct":"const APEX = require('alphapoint').APEX"}],"quickstart":{"code":"const { APEX } = require('alphapoint');\nconst apex = new APEX('wss://api_apexqa.alphapoint.com/WSGateway/');\n\nasync function main() {\n  try {\n    const l2 = await apex.GetL2Snapshot({OMSId: 1, InstrumentId: 2, Depth: 100});\n    console.log(l2);\n  } catch (e) {\n    console.error(e);\n  }\n}\nmain();","lang":"javascript","description":"Creates an APEX client, fetches L2 snapshot data using GetL2Snapshot method."},"warnings":[{"fix":"Ensure you use the correct wss:// URL provided by Alphapoint.","message":"WebSocket endpoint must be wss:// with correct host; otherwise connection fails silently.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Wrap calls in try/catch or use .catch() to handle promise rejections.","message":"All methods return promises but some may reject with opaque errors on connection issues.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Set up .npmrc with correct token and run 'npm install'.","cause":"Package not installed; requires .npmrc configuration to access private registry.","error":"Cannot find module 'alphapoint'"},{"fix":"Use: const { APEX } = require('alphapoint'); apex = new APEX(url);","cause":"Incorrect import or wrong version; ensure you have required { APEX } and instantiated correctly.","error":"TypeError: apex.GetL2Snapshot is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}