Skip to main content

Python SDK for the DPX Protocol — compliance-grade stablecoin settlement rail with LangChain and LlamaIndex toolkits

Project description

dpx-sdk

Python SDK for DPX Protocol — compliance-grade stablecoin settlement rail with native LangChain and LlamaIndex toolkits.

pip install dpx-sdk                      # core client
pip install "dpx-sdk[langchain]"         # + LangChain toolkit
pip install "dpx-sdk[llamaindex]"        # + LlamaIndex ToolSpec
pip install "dpx-sdk[all]"              # everything

Quick start

from dpx_sdk import DPX

with DPX() as dpx:
    # Check oracle before settling
    oracle = dpx.oracle_status()
    print(oracle.status, oracle.recommendation)  # STABLE  PROCEED

    # Get a binding quote
    quote = dpx.quote(amount_usd=500_000, has_fx=True, esg_score=75)
    print(f"Net: ${quote.net_amount_usd:,.2f}  Fee: {quote.total_fee_pct:.3f}%")

    # Execute in sandbox (safe default)
    result = dpx.settle(
        amount=500_000,
        source_currency="USD",
        destination_currency="EUR",
        recipient_address="0xYourRecipientAddress",
        sandbox=True,  # set False for live execution
    )
    print(result.status, result.settlement_id)

LangChain

from dpx_sdk.tools import DPXToolkit
from langchain.agents import initialize_agent, AgentType
from langchain_openai import ChatOpenAI

tools = DPXToolkit().get_tools()
agent = initialize_agent(tools, ChatOpenAI(), agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION)
agent.run("Check oracle stability, get a quote for $1M USD→EUR, and screen the counterparty 0x123...")

Available tools: dpx_oracle_status · dpx_esg_score · dpx_compliance_screen · dpx_quote · dpx_settle

LangChain Hub: untitledfinancial/dpx-toolkit

LlamaIndex

from dpx_sdk.tools import DPXToolSpec
from llama_index.agent.openai import OpenAIAgent

tools = DPXToolSpec().to_tool_list()
agent = OpenAIAgent.from_tools(tools, verbose=True)
agent.chat("Get a quote for $500K USD to EUR and execute in sandbox mode")

Available functions: get_settlement_quote · execute_settlement · get_oracle_status · get_esg_score · screen_compliance

LlamaIndex Hub: untitledfinancial/dpx-tool-spec

MCP (Claude / Cursor)

npx @untitledfinancial/dpx-mcp

32 MCP tools for Claude Desktop and Cursor. Setup →

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

dpx_sdk-0.2.0.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

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

dpx_sdk-0.2.0-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file dpx_sdk-0.2.0.tar.gz.

File metadata

  • Download URL: dpx_sdk-0.2.0.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for dpx_sdk-0.2.0.tar.gz
Algorithm Hash digest
SHA256 cfeefc93dcf90d5117562d6ae2e502996603d3eb23755d706982ba366c25dcd7
MD5 eb099e23d40a3faf6d0ff4b758b56929
BLAKE2b-256 5ec77d2da8edf06d834e6687c0b75b9eeda4010499a16dd33c09b8e3627dc235

See more details on using hashes here.

File details

Details for the file dpx_sdk-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: dpx_sdk-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 11.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for dpx_sdk-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f662ffec03a242949f8770c9c16bea9b663536c9c7f221f500cfe416061e7b6b
MD5 2f1712c0f57220f07cfe215c1e698210
BLAKE2b-256 8be45448d075a31150ee272320bb1a8565a85c52c665f5d99f85eb1c5e450683

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