Skip to main content

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("600000", OrderType.BUY, 100, 12.5)

    # Get market data
    market_data = agent.get_market_data("600000")

    # 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

emta-0.4.0.tar.gz (65.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

emta-0.4.0-py3-none-any.whl (16.7 kB view details)

Uploaded Python 3

File details

Details for the file emta-0.4.0.tar.gz.

File metadata

  • Download URL: emta-0.4.0.tar.gz
  • Upload date:
  • Size: 65.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.15

File hashes

Hashes for emta-0.4.0.tar.gz
Algorithm Hash digest
SHA256 d965a4ed3756d74f2af2df685c311b73fe0f605adac072fb659dc16022206ccb
MD5 8a93a405018d18d1c845d1461050e9c7
BLAKE2b-256 c445125f4997bed77960d4fb2e7098058d95d90e1217fda1ebbd43f1dbb3f55b

See more details on using hashes here.

File details

Details for the file emta-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: emta-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 16.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.15

File hashes

Hashes for emta-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 08ba09a242de072f84c8d0453c4a506950f88219ee0696d47c1f7a29175cdddf
MD5 cdbef86df37a6c34f86f2c5b57165256
BLAKE2b-256 89e0d73e2b64eb0a56f64ac480c944187b9752eb61f488293f2cd17b39412b0d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page