Skip to main content

Nuant Quantitative System SDK

Reason this release was yanked:

insidious bug

Project description

WARNING: original source file is docs/getting_started.rst

Getting Started

Nuant Quantitative System SDK is a purpose-built SDK for decentralized finance. It enables a unified lifecycle that supports research, protocol-level simulation, backtesting, optimization, and live monitoring. Designed to empower quants, researchers, and developers, NQS makes it easy to experiment, iterate, and bring DeFi protocols and strategies from concept to execution.

This repository is the public endpoint for the nqs-sdk package, available on PyPI, providing all the tools needed to build, test, and run strategies within a single, integrated environment.

For additional examples and tests, please visit the companion repository at https://github.com/Nuant/nqs-sdk-extension/.

Prerequisites

Before installing the NQS SDK, ensure you have:

  • Python 3.12 or 3.13
  • pip package manager

Installation

Install the NQS SDK using pip:

pip install nqs-sdk

Note: This installation will also include several other packages provided by Nuant.

Environment Configuration

Get your API key from

https://agents.nuant.ai/subscribe

The following command creates a nuant-quantlib.toml file with the required proxy configuration for accessing Nuant’s GraphQL API. Make sure to replace YOUR_API_KEY.

(
echo "[proxy]"
echo 'url = "https://data.app.nuant.com/graphql"'
echo 'api-key = "YOUR_API_KEY" # <- the one, you got previously'
) > nuant-quantlib.toml

Then, export it as an environment variable:

export QUANTLIB_CONFIG=/path/to/nuant-quantlib.toml

Verify Installation

First, verify that the installation was successful:

import nqs_sdk
print(f"NQS SDK version: {nqs_sdk.__version__}")

Quick Start

Basic Use Case

Here’s a simple example to get you started with the NQS SDK:

from nqs_sdk import Simulation
from nqs_sdk.protocols import UniswapV3Factory
import json

# Initialize simulation with protocols and configuration
uniswap_v3 = UniswapV3Factory() # factory for all UniswapV3 instances
sim = Simulation([uniswap_v3], "./examples/configs/basic_config.yml")

# Run the simulation
all_observables = sim.run()

# Access results
print(f"Simulation completed with {len(all_observables)} observables")

Tips:

  • By default, the execution is quiet, and you can make it verbose to watch the execution flow.
  • Data queries to feed the simulation can be expensive; consider setting the quantlib cache to make it faster.

for both, see Useful environment variables section below.

Getting Involved

Now that you have the NQS SDK installed and understand the basics, you might want to:

Known issues and roadmap

Coming soon:

  • API stabilisation
  • API examples with arbitrageur or other multi-agent scenarios

And later:

  • Compound V2 support, more protocols will follow

  • Open Rust API to extend core interfaces directly in Rust

  • API for external data provider

    (Currently, the NQS SDK uses quantlib and data.app.nuant.com for data handling.)

  • EVM based any protocol executions

Known issues:

  • Support of Python 3.11
  • Support of Linux arm64

Useful environment variables

Variable name Example Description
QUANTLIB_CONFIG nuant-quantlib.toml Path to a config file in TOML format
QUANTLIB_CACHE ./your_dir/.cache Cache directory to optimize quantlib calls


(be sure to create the directory)

RUST_LOG debug Configure the log level of core engine

For more environment variables, see Environment variables

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

nqs_sdk-0.6.6-cp313-cp313-win_amd64.whl (12.1 MB view details)

Uploaded CPython 3.13Windows x86-64

nqs_sdk-0.6.6-cp313-cp313-manylinux_2_28_x86_64.whl (14.0 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

nqs_sdk-0.6.6-cp313-cp313-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (22.6 MB view details)

Uploaded CPython 3.13macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

nqs_sdk-0.6.6-cp312-cp312-win_amd64.whl (12.1 MB view details)

Uploaded CPython 3.12Windows x86-64

nqs_sdk-0.6.6-cp312-cp312-manylinux_2_28_x86_64.whl (14.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

nqs_sdk-0.6.6-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (22.6 MB view details)

Uploaded CPython 3.12macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

File details

Details for the file nqs_sdk-0.6.6-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: nqs_sdk-0.6.6-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 12.1 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for nqs_sdk-0.6.6-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 e5309934f8f9cb152ca0d60978cc4ae25def2bd7ca58993ba7c29157df42fa6c
MD5 7b044b690f4be089edf1387081b8d697
BLAKE2b-256 1b5daee37bfd1b40147c578b80c0a4e407c1a6e3ae5534d010edacbfdf0e31cb

See more details on using hashes here.

File details

Details for the file nqs_sdk-0.6.6-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nqs_sdk-0.6.6-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e907e49338c5049173e7e02f19a09888939f8143cefd9748e6ce90171ca9b894
MD5 d4b4d58f11279c03569a6c82efbe7c8c
BLAKE2b-256 9bda0ec1c12debf9909ede992eb18a3bad8cbcb9cd997352e6d04b70675be73d

See more details on using hashes here.

File details

Details for the file nqs_sdk-0.6.6-cp313-cp313-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for nqs_sdk-0.6.6-cp313-cp313-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 8965e10845fc222850fcf08e7d6f09ae9127ee9f642b8a18afdd78dba3d4954d
MD5 26f915321b897d14be173d66f4398e73
BLAKE2b-256 e2e11ab348d30335b1391090cf0a4d224cc94acf528a169fa24bd9dddc09306b

See more details on using hashes here.

File details

Details for the file nqs_sdk-0.6.6-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: nqs_sdk-0.6.6-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 12.1 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for nqs_sdk-0.6.6-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 c9a0bb2e3daa6441cb02470b8470b7f4629172d8407744be56a0ac15d9750b23
MD5 6a118f4f126ed871800cecc31ea84fe9
BLAKE2b-256 f048e9b1daea0b86586b485fd7b8755ef20edb06a8afb98603dcfa1d7b1f0a13

See more details on using hashes here.

File details

Details for the file nqs_sdk-0.6.6-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nqs_sdk-0.6.6-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f6b858e4c656dcdd443d2b768da8486c83521ddf0bb6fe694890c13675d7af48
MD5 99d356b67539f2c38917dc8af5c99679
BLAKE2b-256 e7173db9d03a1362db3baa0fe34f144a345748590c739ed8a04e7fe41a7f144a

See more details on using hashes here.

File details

Details for the file nqs_sdk-0.6.6-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for nqs_sdk-0.6.6-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 1074f73d429a39b15fc2263e30034faa445f5240ffc0405de7b2de4bec432088
MD5 765836732dd9730fc0d7d47f329c6afb
BLAKE2b-256 7b21bfc093a9bc5e1dbd75473d99c6001f0aa8826e9c7bb102394c32c4f771b5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page