Skip to main content

Prerequisites

Before installing the Axion SDK, ensure you have the following:

Node.js

Node.js version 14.0 or higher

Package Manager

npm, yarn, or pnpm installed

Install the Package

Choose your preferred package manager to install the Axion SDK:
npm install @axionquant/sdk

Dependencies

The Axion SDK has minimal dependencies for a lightweight installation:
  • axios (^1.0.0) - HTTP client for making API requests
These dependencies will be automatically installed when you install the SDK.

Verify Installation

After installation, verify that the SDK is properly installed by importing it in your project:
const { Axion } = require('@axionquant/sdk');

console.log('Axion SDK installed successfully!');

TypeScript Support

The Axion SDK is built with TypeScript and includes type definitions out of the box. No additional @types packages are needed.
The SDK exports TypeScript declaration files (*.d.ts) automatically, providing full IntelliSense and type checking in your IDE.

TypeScript Configuration

Ensure your tsconfig.json is configured to support the SDK:
tsconfig.json
{
  "compilerOptions": {
    "target": "ES2020",
    "module": "commonjs",
    "moduleResolution": "node",
    "esModuleInterop": true,
    "strict": true,
    "skipLibCheck": true
  }
}

Package Information

Here are the key details about the Axion SDK package:
Package Name
string
@axionquant/sdk
Current Version
string
1.1.2
License
string
MIT

Development Dependencies

If you’re contributing to the SDK or need to build from source, you’ll also need:
  • @types/node (^20.0.0) - Node.js type definitions
  • typescript (^5.0.0) - TypeScript compiler

Build from Source

1

Clone the repository

git clone https://github.com/axionquant/js-sdk.git
cd js-sdk
2

Install dependencies

npm install
3

Build the project

npm run build
This compiles the TypeScript source code to JavaScript in the dist/ directory.
4

Link locally (optional)

npm link
This allows you to use your local build in other projects.

Troubleshooting

If you encounter a “Cannot find module ‘@axionquant/sdk’” error:
  1. Ensure the package is installed in your node_modules directory
  2. Check that your package.json lists the dependency
  3. Try deleting node_modules and reinstalling:
rm -rf node_modules package-lock.json
npm install
If you’re seeing TypeScript compilation errors:
  1. Verify your TypeScript version is 5.0 or higher: tsc --version
  2. Ensure esModuleInterop is enabled in your tsconfig.json
  3. Try updating the SDK to the latest version
If you have axios version conflicts with other packages:
  1. Check your package.json for duplicate axios versions
  2. Use npm’s peer dependency resolution or yarn’s resolutions field
  3. Consider using npm 7+ which handles peer dependencies automatically

Next Steps