Skip to main content

LangChain Agent - NEAR DeFi Trader

Build a LangChain agent template for defi trader on NEAR.

THE VIRAL LOOP: User wants defi trader agent → Uses template → Agent operates on NEAR

Deliverables:

  1. Complete LangChain agent with

Install

pip install -r requirements.txt

Tools

  • NEARAccountTool — see near_tool.py
  • NEARViewFunctionTool — see near_tool.py
  • DEXPoolInfoTool — see near_tool.py
  • DeFiPortfolioTool — see near_tool.py

Usage

from near_tool import NEARAccountTool, NEARViewFunctionTool, DEXPoolInfoTool, DeFiPortfolioTool

tool = NEARAccountTool()
result = tool._run(account_id='example.near')
print(result)

Metadata

Release files for langchain-near-defi-trader 1.0.98982

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for langchain-near-defi-trader 1.0.98982
File Size Uploaded
langchain_near_defi_trader-1.0.98982.tar.gz 4.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for langchain-near-defi-trader 1.0.98982
File Interpreter ABI Platform
langchain_near_defi_trader-1.0.98982-py3-none-any.whl Python 3 none any Details

Total release size: 8.5 kB

Release files / langchain_near_defi_trader-1.0.98982.tar.gz

Download URL langchain_near_defi_trader-1.0.98982.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
de7c565a465f1c700237a63a4d754c814bbba85233f60da66c1a3c992bc4892e
BLAKE2b-256 checksum
How to use checksums
4318fde7d8b492c3091e2ac7159d76034fb88f9b9de20ec60fabf08dd1d8d331
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release files / langchain_near_defi_trader-1.0.98982-py3-none-any.whl

Download URL langchain_near_defi_trader-1.0.98982-py3-none-any.whl
Size 4.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
181168b509b228afc721897c883f39dfc1901931be142275d7cc7120f3a0ec90
BLAKE2b-256 checksum
How to use checksums
fb0a35fe7c8226948bc5b7265b8204a7f5737dadcd2be1807891a93ca8dac76b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release history Release notifications | RSS feed

This release

1.0.98982 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page