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("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
├── trading.py         # Trading agent implementation
└── py.typed           # Type hints marker
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.0.4.tar.gz (59.3 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.0.4-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for emta-0.0.4.tar.gz
Algorithm Hash digest
SHA256 0f414ab45842414af1a4871a96ef42cc542ac09a8e0c81a973119e04d563ee66
MD5 b23c5bec789e4cf66ad74e70e6922ed8
BLAKE2b-256 25813f634b20979d5a91574a3e2951f4f06aae0fc1c338c9cf489e701cb58aab

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for emta-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 795cc7a599a7fb60b3b197e99019b67ecfca8e6a1965ffc6a9139c2e00d82a8b
MD5 4d5acdbb38a428740a85cc88f9c1cf00
BLAKE2b-256 1fda459253b5a37ae8bdce5e3641d92aa1bde00a7602693e661b1126c6442209

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