Easy Money Trading Agent
Project description
emta
Overview
Unofficial EasyMoney Trading Library
Technology Stack
- Use UV to manage development environments and third-party dependencies.
- Use Pytest testing ensures the correctness of each module and function.
Features
- login to eastmoney
- Modular code structure
- Error handling
- Trading agent with order placement and management
- Market data retrieval
Installation
Ensure you are using Python 3.11 or later (but less than 4.0).
pip install emta
Usage
from emta import TradingAgent, OrderType
# Create a trading agent
agent = TradingAgent("your_username", "your_password")
# Login to Eastmoney
if agent.login():
# Place a buy order
order_id = agent.place_order("SH600000", OrderType.BUY, 100, 12.5)
# Get market data
market_data = agent.get_market_data("SH600000")
# Logout
agent.logout()
See examples/trading_example.py for a complete example.
Testing
Tests for the app are included using pytest. To run the tests, simply execute:
uv run pytest
Project Structure
src/emta/ # Main source code
├── __init__.py # Package initialization
├── py.typed # Type hints marker
├── core/ # Core trading agent implementation
│ └── agent.py # Main trading agent class
├── models/ # Data models and exceptions
│ ├── trading.py # Trading data models
│ └── exceptions.py # Exception classes
├── auth/ # Authentication module
│ └── client.py # Authentication client
├── api/ # API client for trading operations
│ └── client.py # API client implementation
└── utils/ # Utility functions
├── encryption.py # Password encryption utilities
└── captcha.py # Captcha recognition utilities
tests/ # Test files
examples/ # Example usage scripts
Contributing
Contributions are welcome! If you have ideas for improvements, bug fixes, or additional features, feel free to open an issue or submit a pull request.
License
This App is open-source software released under the MIT License.
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 emta-0.2.0.tar.gz.
File metadata
- Download URL: emta-0.2.0.tar.gz
- Upload date:
- Size: 66.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4731efd86db7cbf8027429b9d0be6c7fcd8c9b929088ac4191c28ac35d1dec7d
|
|
| MD5 |
f7621713943b3ce3b380fe2971215dae
|
|
| BLAKE2b-256 |
88169eaa5dcf2184149f768b41497f96518d3ff93637aab141f98fd8bf801719
|
File details
Details for the file emta-0.2.0-py3-none-any.whl.
File metadata
- Download URL: emta-0.2.0-py3-none-any.whl
- Upload date:
- Size: 16.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
686a7e49c91dc3e69ff0c87a1779cde805f7d155f13f641a491c6295dcb0908c
|
|
| MD5 |
47d7a3336f6c1def3a6c8f7bab60a961
|
|
| BLAKE2b-256 |
0f15f01d0125c1a66a71dab0b4c73b606711aef132bbb74aef3d4a8b225b6b26
|