Skip to main content

A friendly, Pythonic wrapper for the Nado Protocol SDK

Project description

Pynado

A friendly, Pythonic wrapper for the Nado Protocol SDK. Pynado simplifies the interaction with the Nado Protocol by abstracting low-level details and handling unit conversions automatically.

Installation

pip install pynado

Usage

1. Setup

Create a .env file in your project root to store your private key securely:

NADO_PRIVATE_KEY='your_private_key_here'

2. Basic Example

Initialize the client and check your account details:

from pynado import Nado

# Initialize the client (defaults to TESTNET and loads key from .env)
client = Nado()

# Access properties directly
print(f"Wallet Address: {client.address}")
print(f"USDT Balance:   {client.balance:,.2f}")

3. Trading (Market Orders)

Pynado handles symbol resolution (Spot vs. Perp) and unit scaling (to_x18) automatically.

# Market Buy 0.01 BTC (Spot)
client.buy("BTC", 0.01)

# Market Sell 0.5 ETH (Perp)
client.sell("ETH-PERP", 0.5)

4. Checking Positions

You can easily check specific positions or get an overview of your entire account.

# Get a specific position
pos = client.get_position("BTC-PERP")
print(f"Amount: {pos['amount']}, Entry Price: {pos['average_entry_price']}")

# Get all active positions
all_pos = client.get_all_positions()
for p in all_pos:
    print(f"{p['symbol']}: {p['amount']}")

Features

  • Simple Interface: One class (Nado) to rule them all.
  • Automatic Scaling: Handles 18-decimal scaling for you (returns float for balances, accepts float for orders).
  • Symbol Resolution: Supports both Spot ("BTC") and Perp ("BTC-PERP") symbols.
  • Position Management: Friendly methods to retrieve current holdings and average entry prices.
  • Environment Friendly: Native support for .env files.

Project details


Download files

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

Source Distribution

pynado-0.1.3.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

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

pynado-0.1.3-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file pynado-0.1.3.tar.gz.

File metadata

  • Download URL: pynado-0.1.3.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for pynado-0.1.3.tar.gz
Algorithm Hash digest
SHA256 4cff92cdb6378dfe7bd7b30ecfa4fee7f9bb4f0323bff8cc4baee4212d723ba2
MD5 6286221d43e5288d5b58fd315291ff8a
BLAKE2b-256 8e42c9eecf647cb751264a258986797d8f8a3626960d3e1dc136d63e728eb73f

See more details on using hashes here.

File details

Details for the file pynado-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: pynado-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for pynado-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 316f850a9ed50ccc2ad98912e7b5a82667f07154f0a5f581078175c0f98873d2
MD5 c68b7c17dfe7a196374f89f5a7beebca
BLAKE2b-256 992c2a23910a191a4750b61d21cdc715c7412180fda24de079e15c728123f6a2

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