MCP server for Snowball Securities (雪盈证券) trading API
Project description
chnyangjie-snbpy-mcp
MCP server for Snowball Securities (雪盈证券) trading API. Lets AI agents place orders, check balances, and manage positions.
Features
- Place, cancel, and query trade orders
- Check account balance and positions
- Query transaction history
- Support for US/HK/CN stocks, options, futures, and more
Quick Start
Option 1: uvx (Recommended - Zero Install)
No installation needed. Just configure Claude Desktop:
{
"mcpServers": {
"chnyangjie-snbpy": {
"command": "uvx",
"args": ["chnyangjie-snbpy-mcp"],
"env": {
"SNB_ACCOUNT": "YOUR_ACCOUNT",
"SNB_KEY": "YOUR_KEY"
}
}
}
}
Option 2: pip install
pip install chnyangjie-snbpy-mcp
# Auto-configure Claude Desktop
export SNB_ACCOUNT=your_account
export SNB_KEY=your_key
snbpy-install
# Restart Claude Desktop
Environment Variables
| Variable | Required | Default | Description |
|---|---|---|---|
SNB_ACCOUNT |
Yes | - | Account ID |
SNB_KEY |
Yes | - | API secret key |
SNB_SERVER |
No | sandbox.snbsecurities.com |
API server |
SNB_PORT |
No | 443 |
Port |
SNB_SCHEMA |
No | https |
HTTP schema |
SNB_TIMEOUT |
No | 10000 |
Timeout (ms) |
Tools
| Tool | Description |
|---|---|
login |
Verify API credentials |
place_order |
Place a trade order |
cancel_order |
Cancel an order |
get_order_by_id |
Query single order |
get_order_list |
Query orders (paginated) |
get_transaction_list |
Query fills (paginated) |
get_balance |
Query account balance |
get_position_list |
Query positions |
Development
# Clone the repo
git clone https://github.com/chnyangjie/snbpy-mcp.git
cd snbpy-mcp
# Install in editable mode
pip install -e .
# Run with MCP Inspector
SNB_ACCOUNT=xxx SNB_KEY=yyy mcp dev src/snbpy_mcp/server.py
# Run directly
SNB_ACCOUNT=xxx SNB_KEY=yyy snbpy-mcp
Publishing
# Build
python -m build
# Upload to PyPI
twine upload dist/*
License
MIT
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 chnyangjie_snbpy_mcp-0.1.2.tar.gz.
File metadata
- Download URL: chnyangjie_snbpy_mcp-0.1.2.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc862293ef19c5d7b2c65cf2a4c6c716d95b8e6f790f513f1444640dd7574793
|
|
| MD5 |
c36cdf4710ee78473547fe703340fd55
|
|
| BLAKE2b-256 |
3abe80721d39e704027e4ad2269dbeb848ade2cbba60b97a0fd674c6db918e35
|
File details
Details for the file chnyangjie_snbpy_mcp-0.1.2-py3-none-any.whl.
File metadata
- Download URL: chnyangjie_snbpy_mcp-0.1.2-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
83c3ecb7291cc60cdcdb724cbc7442ec2354192fcc43f793ac0b55665b48a3ec
|
|
| MD5 |
8ace4431cce57e82abea27bfcbfce99c
|
|
| BLAKE2b-256 |
97e673ae7257fff171dd9cef799e4a8aaf0032f7c46c79662cbec6da0189e051
|