Skip to main content

Modular, chain-agnostic SDK for crypto trading on DEXs

Project description

inlayr

A modular, chain‑agnostic SDK for building and integrating crypto quoting and trading flows on DEXs.

Status: Experimental (v0.2.1). APIs may change before 1.0.

PyPI Python License Typing


inlayr aims to provide a clean, typed interface for quoting, routing and submitting swaps across multiple chains.

  • Pluggable backends — add providers without touching the core
  • No commission — avoid wallet-level commissions
  • Integration — build your own DEX trading bots

If you just want the docs: jump to Quickstart or Installation.


Disclaimer

This project is for informational and development purposes only and does not constitute financial advice.
The software is provided “as is” without warranties, and the authors/contributors assume no responsibility or liability for any losses, damages, or outcomes resulting from its use.
Use at your own risk and comply with applicable laws.

Installation

The base install:

pip install inlayr

Supported Python: 3.9+

Quickstart

The exact API surface may evolve before 1.0.
The snippets below show the intended usage patterns while staying dependency‑light.

Verify install

import inlayr
print (inlayr.__version__)

High‑level sketch (pseudocode)

# Illustrative only. Actual class and method names may differ in your version.

# 1) Import provider interface
from inlayr.provider import get_provider

# 2) Fetch your private key
solana_pk = open(r"solana_pk").read()

# 3) Configure Chain, RPC, and Aggregator
provider = get_provider(
	chain = "solana",
	chain_params = {"wallet_pk": solana_pk},
	rpc = "solana",
	rpc_params = {"chain_id": None},
	aggregator = "jupiter",
	aggregator_params = {}
)

# 4) Perform operations (e.g. request a quote)
quote = provider.get_quote(
	source_token = "4eDf52YYzL6i6gbZ6FXqrLUPXbtP61f1gPSFM66M4XHe",
	source_amount = 1_000_000_000,
	destination_token = "So11111111111111111111111111111111111111112",
	slippage = 1_000
)

Please refer to examples for more functional use cases.

Configuration

Common runtime knobs (RPC endpoints, routing preferences, etc) are typically supplied by you at construction time.

Currently supported configurations:

  • RPCs — ankr, 1rpc, solana
  • Chains — evm, solana
  • Aggregators — 0x, 1inch, jupiter, raydium

Security

Private keys are provided only at runtime. They are never logged, transmitted, or stored by us.

Type hints

  • The package includes py.typed so type checkers (mypy, pyright) understand the public API.
  • We aim to keep public call signatures stable across minor versions; experimental pieces will be marked in docstrings where applicable.

Contributing

PRs and issues are welcome! A few guidelines:

  • Discuss larger changes in an issue first.
  • Ensure python -m build && twine check dist/* succeeds.
  • Add or update tests (pytest).

To run tests:

pip install -e '.[test]'
pytest -q

Versioning

We use Semantic Versioning. Until 1.0.0, minor bumps may include small breaking changes as we refine the API.

License

Licensed under the Apache 2.0 license. See LICENSE for details.

Links

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

inlayr-0.2.1.tar.gz (24.1 kB view details)

Uploaded Source

Built Distribution

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

inlayr-0.2.1-py3-none-any.whl (24.0 kB view details)

Uploaded Python 3

File details

Details for the file inlayr-0.2.1.tar.gz.

File metadata

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

File hashes

Hashes for inlayr-0.2.1.tar.gz
Algorithm Hash digest
SHA256 7a745ee7bbd746016293fbc513d6e570bef887a584ea8d4b85a4ded829f49a46
MD5 5770deff6ba7ec0b08a66bd3d6456527
BLAKE2b-256 94350521f6506d93deebf00c61035ef437f571c31e5463767a16002649b00af5

See more details on using hashes here.

File details

Details for the file inlayr-0.2.1-py3-none-any.whl.

File metadata

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

File hashes

Hashes for inlayr-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4c46f07381e893573b78820138a826cd8147ab929600e3831c6a89a465c26bd4
MD5 e581d9027f6559ba1c2762446ae2de70
BLAKE2b-256 239add2a6e23828ad6b7aa83c26b3b2d50b6917045aa2868d3cd30c807c70b2c

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