Skip to main content

gRPC API for My Funded trading

Project description

MyFunded gRPC API Proto Python Package

This package contains the Python-generated code from the Protocol Buffer definitions for the MyFunded gRPC API.

Installation

You can install this package using pip:

pip install my-funded-grpc-api-proto

To install a specific version:

pip install my-funded-grpc-api-proto==2023.05.15-1234567

Replace 2023.05.15-1234567 with the actual version you want to install.

Usage

After installation, you can import and use the generated classes in your Python code. Here's a basic example:

import time

from google.protobuf.timestamp_pb2 import Timestamp
from trading_account.v1 import cash_balance_pb2

message = cash_balance_pb2.TradingAccountCashBalanceMessage(
    event=cash_balance_pb2.TradingAccountCashBalanceEvent(
        event_type=cash_balance_pb2.EVENT_TYPE_CREATED,
        entity_type=cash_balance_pb2.ENTITY_TYPE_TRADING_ACCOUNT_CASH_BALANCE,
        environment=cash_balance_pb2.ENVIRONMENT_LIVE,
        stage=cash_balance_pb2.STAGE_EVALUATION,
        entity=cash_balance_pb2.TradingAccountCashBalance(
            trading_account_id="acc123",
            balance=10000.50,
            date=Timestamp().FromSeconds(int(time.time())),
            realized_pnl=500.75,
            environment=cash_balance_pb2.ENVIRONMENT_LIVE,
            stage=cash_balance_pb2.STAGE_EVALUATION,
            broker="TestBroker"
        ),
    ),
    topic="trading/cash_balance"
)

print(message)
event {
  event_type: EVENT_TYPE_CREATED
  entity_type: ENTITY_TYPE_TRADING_ACCOUNT_CASH_BALANCE
  environment: ENVIRONMENT_LIVE
  stage: STAGE_EVALUATION
  entity {
    trading_account_id: "acc123"
    balance: 10000.5
    realized_pnl: 500.75
    environment: ENVIRONMENT_LIVE
    stage: STAGE_EVALUATION
    broker: "TestBroker"
  }
}
topic: "trading/cash_balance"

Available Modules

The package includes the following modules:

  • my_funded_grpc_api_proto.v1.trading_pb2: Contains message classes
  • my_funded_grpc_api_proto.v1.trading_pb2_grpc: Contains gRPC service classes

(Add more modules as necessary)

Development

This package is automatically generated from the Protocol Buffer definitions in the MyFunded gRPC API Proto repository. If you need to make changes, please submit a pull request to that repository.

License

[Specify your license here]

Contact

For any questions or issues, please open an issue on the GitHub repository.

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

my_funded_grpc_api-0.2.1.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

my_funded_grpc_api-0.2.1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file my_funded_grpc_api-0.2.1.tar.gz.

File metadata

  • Download URL: my_funded_grpc_api-0.2.1.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.10

File hashes

Hashes for my_funded_grpc_api-0.2.1.tar.gz
Algorithm Hash digest
SHA256 fcbe79a57a152e77bca62b2461d533b05d9991b75616d08068e77882e36f679b
MD5 fa60afccb576ffc01b1df82074bf044f
BLAKE2b-256 0a376ab71423426e3d5d1f31156a9dccdc5eafac3b580de2b038ecfaf08f8a60

See more details on using hashes here.

File details

Details for the file my_funded_grpc_api-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for my_funded_grpc_api-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 806b439911e4859a38552ac2b76f8ac396e1149943f1a60ccbed2575dfa44a90
MD5 c7bc5c12004235466e8258dace92ad47
BLAKE2b-256 5fdccaadaa7e95445ef15ddf603ac3cdd3007045665d654990d066933cb2a173

See more details on using hashes here.

Supported by

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