Skip to main content

Nuant Quantitative System SDK

Project description

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.

Prerequisites

Before installing the NQS SDK, ensure you have:

  • Python 3.12 (currently supported version; more versions coming soon)
  • 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

This 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:

import nqs_sdk.preload  # noqa: F401 # should be always on top
from nqs_sdk import Simulation, ProtocolManager
import json

# Create protocol managers
uniswap = ProtocolManager("uniswap_v3_rust")

# Initialize simulation with protocols and configuration
# You can use the example config or create your own with create_config.py
sim = Simulation([uniswap], "./examples/configs/basic_config.yml")

# Run the simulation
all_observables_str = sim.run() # this intermediate step will be fixed soon
all_observables = json.loads(all_observables_str)

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

Getting Involved

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

Known issues and roadmap

Coming soon:

  • Programmatic API to manage simulation and backtest directly in Python
  • API stabilisation

And later:

  • Compound V2 support, more protocols will follow
  • EVM based any protocol executions

Known issues:

  • Support of Python 3.13
  • Improve protocol naming to reflect implementation variants (e.g. uniswap_v3_rust)
  • Replace default String sim.run() output by a native Python dict

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 Distribution

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

nqs_sdk-0.4.0-py3-none-any.whl (260.1 kB view details)

Uploaded Python 3

File details

Details for the file nqs_sdk-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: nqs_sdk-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 260.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for nqs_sdk-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 311b69aa74c1273a2c3710f3c5bcefb6e8900c33ff799ce503c7a208da25405c
MD5 35bb0b0d9583757e54bfe7194c8ce583
BLAKE2b-256 75df3a78f807a1e5bf6475d4d65766cf8019d22af7a9494d55e6f68a2f52f3a1

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