Skip to content

feat: add Python SDK (agent-trading-sdk) patterns and tool#2

Open
arthur-orderly wants to merge 1 commit into
OrderlyNetwork:masterfrom
arthur-orderly:feature/python-sdk-patterns
Open

feat: add Python SDK (agent-trading-sdk) patterns and tool#2
arthur-orderly wants to merge 1 commit into
OrderlyNetwork:masterfrom
arthur-orderly:feature/python-sdk-patterns

Conversation

@arthur-orderly

Copy link
Copy Markdown

What

Adds Python SDK support to the MCP server, enabling AI assistants to help developers build Python trading bots and AI agents on Orderly Network.

New tool: get_python_sdk_pattern

Search and retrieve code examples for the agent-trading-sdk (Arthur SDK).

New resource: orderly://sdk/python

Browsable reference of all Python SDK patterns with search support.

Patterns included

Category Patterns
Quick Start Arthur, Arthur.from_credentials_file
Trading buy, sell, close, close_all
Position Management positions, position, pnl
Account & Market Data balance, equity, price
Risk Management set_leverage, set_stop_loss
Withdrawals withdraw
Error Handling error_handling
Strategy Examples rsi_strategy, ai_agent_strategy, grid_strategy, portfolio_rebalance

Why

The existing MCP server covers the TypeScript/React SDK thoroughly but has no Python support. Python is the dominant language for trading bots and AI agents — this fills that gap.

pip install agent-trading-sdk

Testing

  • yarn build passes ✅
  • Tool follows the same Fuse.js fuzzy search pattern as get_sdk_pattern
  • Resource handler follows the same searchable pattern as other resources

Add get_python_sdk_pattern tool and orderly://sdk/python resource for the
Arthur SDK (agent-trading-sdk on PyPI), enabling AI assistants to help
developers build Python trading bots and AI agents on Orderly Network.

Includes patterns for:
- Quick start and initialization
- Trading (buy, sell, close, close_all)
- Position management and PnL tracking
- Account and market data queries
- Risk management (leverage, stop loss)
- Withdrawals
- Error handling
- Strategy examples (RSI, AI agent, grid, portfolio rebalance)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant