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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dpx_sdk-0.1.0.tar.gz.
File metadata
- Download URL: dpx_sdk-0.1.0.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4ee0edec469cbd6aa5789163591a869b3375d7546c44251f8028d201e19dbc0
|
|
| MD5 |
9ffa7928e5463efc2020b27e052c4fd6
|
|
| BLAKE2b-256 |
e4379c0b510d625792a082109b1dc0f53b196696773895ea90d3b14d0e81ef21
|
File details
Details for the file dpx_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: dpx_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c0116daa527c33ae894686c29b4af342f28be40040b8011d3d9770a4d98aff2b
|
|
| MD5 |
22b693d32eb3642bc549c8f9645431e0
|
|
| BLAKE2b-256 |
6d7b78cb7248fc1b56f7985d0316d8cc1b0b94dc6028f619ff7f19bb1e50d0e0
|