meshtrade 1.0.0__py3-none-any.whl → 1.0.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of meshtrade might be problematic. Click here for more details.

Files changed (30) hide show
  1. meshtrade/common/__init__.py +2 -4
  2. meshtrade/common/config.py +3 -4
  3. meshtrade/compliance/client/v1/service_pb2.py +5 -5
  4. meshtrade/iam/api_user/v1/service_pb2.py +9 -9
  5. meshtrade/iam/group/v1/service_pb2.py +5 -5
  6. meshtrade/iam/role/v1/role_pb2.py +2 -2
  7. meshtrade/iam/role/v1/role_pb2.pyi +4 -0
  8. meshtrade/iam/user/v1/service_pb2.py +3 -3
  9. meshtrade/reporting/income_report/v1/__init__.py +60 -0
  10. meshtrade/reporting/income_report/v1/disclaimer_pb2.py +37 -0
  11. meshtrade/reporting/income_report/v1/disclaimer_pb2.pyi +13 -0
  12. meshtrade/reporting/income_report/v1/disclaimer_pb2_grpc.py +4 -0
  13. meshtrade/reporting/income_report/v1/entry_pb2.py +42 -0
  14. meshtrade/reporting/income_report/v1/entry_pb2.pyi +39 -0
  15. meshtrade/reporting/income_report/v1/entry_pb2_grpc.py +4 -0
  16. meshtrade/reporting/income_report/v1/income_report_pb2.py +44 -0
  17. meshtrade/reporting/income_report/v1/income_report_pb2.pyi +42 -0
  18. meshtrade/reporting/income_report/v1/income_report_pb2_grpc.py +4 -0
  19. meshtrade/reporting/income_report/v1/service_meshpy.py +169 -0
  20. meshtrade/reporting/income_report/v1/service_options_meshpy.py +65 -0
  21. meshtrade/reporting/income_report/v1/service_pb2.py +58 -0
  22. meshtrade/reporting/income_report/v1/service_pb2.pyi +37 -0
  23. meshtrade/reporting/income_report/v1/service_pb2_grpc.py +170 -0
  24. meshtrade/trading/limit_order/v1/service_pb2.py +3 -3
  25. meshtrade/trading/market_order/v1/service_pb2.py +3 -3
  26. meshtrade/wallet/account/v1/service_pb2.py +6 -6
  27. {meshtrade-1.0.0.dist-info → meshtrade-1.0.2.dist-info}/METADATA +1 -1
  28. {meshtrade-1.0.0.dist-info → meshtrade-1.0.2.dist-info}/RECORD +30 -15
  29. {meshtrade-1.0.0.dist-info → meshtrade-1.0.2.dist-info}/WHEEL +0 -0
  30. {meshtrade-1.0.0.dist-info → meshtrade-1.0.2.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,169 @@
1
+ # Code generated by protoc-gen-meshpy. DO NOT EDIT.
2
+ # source: meshtrade/reporting/income_report/v1/service.proto
3
+
4
+ """
5
+ IncomeReportService gRPC service wrapper with authentication, timeouts, and resource management.
6
+
7
+ This module provides a high-level gRPC service for the IncomeReportService service that combines
8
+ the service interface with resource management capabilities, providing authentication,
9
+ timeouts, and proper connection handling.
10
+ """
11
+
12
+ from datetime import timedelta
13
+ from typing import Optional
14
+
15
+ from meshtrade.common import BaseGRPCClient
16
+ from meshtrade.iam.api_user.v1.api_credentials import find_credentials
17
+
18
+ from .service_options_meshpy import ServiceOptions
19
+ from .service_pb2 import (
20
+ GetExcelIncomeReportRequest,
21
+ GetExcelIncomeReportResponse,
22
+ GetIncomeReportRequest,
23
+ IncomeReport,
24
+ )
25
+ from .service_pb2_grpc import IncomeReportServiceStub
26
+
27
+
28
+ def _create_incomereportservice_stub(channel):
29
+ """Factory function to create IncomeReportServiceStub from gRPC channel."""
30
+ return IncomeReportServiceStub(channel)
31
+
32
+
33
+ class IncomeReportService(BaseGRPCClient):
34
+ """IncomeReportService gRPC service with authentication, timeouts, and resource management.
35
+
36
+ This service provides a complete implementation of the IncomeReportService with proper authentication, timeout handling, and automatic resource cleanup.
37
+
38
+ Full Service documentation: https://meshtrade.github.io/api/docs/api-reference/reporting/income_report/v1
39
+
40
+ Basic service usage with default SDK Configuration:
41
+ ```python
42
+ service = IncomeReportService()
43
+
44
+ with service: # `with` ensures proper clean up of underlying connection after use
45
+ response = service.get_api_user(request)
46
+ ```
47
+
48
+ With default configuration API credentials are searched for using the standard discovery hierarchy:
49
+
50
+ 1. MESH_API_CREDENTIALS environment variable
51
+
52
+ 2. Default credential file location:
53
+
54
+ - Linux: `$XDG_CONFIG_HOME/mesh/credentials.json` or fallback to `$HOME/.config/mesh/credentials.json`
55
+ - macOS: `$HOME/Library/Application Support/mesh/credentials.json`
56
+ - Windows: `C:\\Users\\<user>\\AppData\\Roaming\\mesh\\credentials.json`
57
+
58
+ For more information on authentication: https://meshtrade.github.io/api/docs/architecture/authentication
59
+
60
+ The service may also be configured with custom options:
61
+ ```python
62
+ from .service_options_meshpy import ServiceOptions
63
+ from datetime import timedelta
64
+
65
+ options = ServiceOptions(
66
+ url="api.staging.example.com",
67
+ port=443,
68
+ api_key="your-api-key",
69
+ group="groups/your-group-id",
70
+ timeout=timedelta(seconds=60)
71
+ )
72
+
73
+ service = IncomeReportService(options)
74
+
75
+ with service: # `with` ensures proper clean up of underlying connection after use
76
+ response = service.get_api_user(request)
77
+ ```
78
+
79
+ For more information on service configuration: https://meshtrade.github.io/api/docs/architecture/sdk-configuration
80
+ """
81
+
82
+ def __init__(self, options: Optional[ServiceOptions] = None):
83
+ """Construct and initialize the IncomeReportService service.
84
+
85
+ Full Service documentation: https://meshtrade.github.io/api/docs/api-reference/reporting/income_report/v1
86
+
87
+ Args:
88
+ options: Optional ServiceOptions for configuring the service.
89
+ If None, service is constructed with default configuration.
90
+ With default configuration API credentials are searched for using the standard discovery hierarchy:
91
+
92
+ 1. MESH_API_CREDENTIALS environment variable
93
+
94
+ 2. Default credential file location:
95
+
96
+ - Linux: `$XDG_CONFIG_HOME/mesh/credentials.json` or fallback to `$HOME/.config/mesh/credentials.json`
97
+ - macOS: `$HOME/Library/Application Support/mesh/credentials.json`
98
+ - Windows: `C:\\Users\\<user>\\AppData\\Roaming\\mesh\\credentials.json`
99
+
100
+ For more information on authentication: https://meshtrade.github.io/api/docs/architecture/authentication
101
+
102
+ For more information on service configuration: https://meshtrade.github.io/api/docs/architecture/sdk-configuration
103
+
104
+ Example:
105
+ ```python
106
+ # construct with default configuration
107
+ service = IncomeReportService()
108
+
109
+ # construct with custom configuration
110
+ options = ServiceOptions(
111
+ url="api.example.com",
112
+ api_key="your-key",
113
+ group="groups/your-group"
114
+ )
115
+ service = IncomeReportService(options)
116
+ ```
117
+ """
118
+ if options is None:
119
+ options = ServiceOptions()
120
+
121
+ # Initialize the base client with all common functionality
122
+ super().__init__(
123
+ service_name="IncomeReportService",
124
+ stub_factory=_create_incomereportservice_stub,
125
+ find_credentials_func=find_credentials,
126
+ url=options.url,
127
+ port=options.port,
128
+ api_key=options.api_key,
129
+ group=options.group,
130
+ timeout=options.timeout,
131
+ tls=options.tls,
132
+ )
133
+
134
+ def get_income_report(self, request: GetIncomeReportRequest, timeout: Optional[timedelta] = None) -> IncomeReport:
135
+ """GetIncomeReport method.
136
+
137
+ Args:
138
+ request: The GetIncomeReport request message
139
+ timeout: Optional timeout override for this call
140
+
141
+ Returns:
142
+ The GetIncomeReport response message
143
+
144
+ Raises:
145
+ grpc.RpcError: If the gRPC call fails
146
+ ValueError: If authentication credentials are missing
147
+ """
148
+ return self._execute_method("GetIncomeReport", request, timeout)
149
+
150
+ def get_excel_income_report(self, request: GetExcelIncomeReportRequest, timeout: Optional[timedelta] = None) -> GetExcelIncomeReportResponse:
151
+ """GetExcelIncomeReport method.
152
+
153
+ Args:
154
+ request: The GetExcelIncomeReport request message
155
+ timeout: Optional timeout override for this call
156
+
157
+ Returns:
158
+ The GetExcelIncomeReport response message
159
+
160
+ Raises:
161
+ grpc.RpcError: If the gRPC call fails
162
+ ValueError: If authentication credentials are missing
163
+ """
164
+ return self._execute_method("GetExcelIncomeReport", request, timeout)
165
+
166
+
167
+ # Create aliases to match expected exports
168
+ IncomeReportServiceGRPCClient = IncomeReportService
169
+ IncomeReportServiceGRPCClientInterface = IncomeReportService
@@ -0,0 +1,65 @@
1
+ # Code generated by protoc-gen-meshpy. DO NOT EDIT.
2
+ # source: meshtrade/reporting/income_report/v1/service.proto
3
+
4
+ """
5
+ Configuration options for IncomeReportService gRPC service.
6
+ This module provides a clean, extensible way to configure the service with optional
7
+ parameters while maintaining backward compatibility and readability.
8
+ """
9
+
10
+ from datetime import timedelta
11
+
12
+
13
+ class ServiceOptions:
14
+ """Configuration options for IncomeReportService gRPC service.
15
+
16
+ This class provides a clean, extensible way to configure the service with optional
17
+ parameters while maintaining backward compatibility and readability.
18
+ """
19
+
20
+ def __init__(
21
+ self,
22
+ tls: bool = True,
23
+ url: str | None = None,
24
+ port: int | None = None,
25
+ api_key: str | None = None,
26
+ group: str | None = None,
27
+ timeout: timedelta = timedelta(seconds=30),
28
+ ):
29
+ """Initialize service options.
30
+
31
+ Args:
32
+ tls: Whether to use TLS encryption for the gRPC connection.
33
+ When True, establishes a secure connection using TLS.
34
+ When False, uses an insecure connection.
35
+ Default: True (secure connection)
36
+
37
+ url: The server hostname or IP address (e.g., "api.example.com", "localhost").
38
+ Default: Uses DEFAULT_GRPC_URL from common module
39
+
40
+ port: The server port number (e.g., 443 for HTTPS, 8080 for development).
41
+ Default: Uses DEFAULT_GRPC_PORT from common module
42
+
43
+ api_key: The API key string (without "Bearer " prefix) for authentication.
44
+ The API key will be sent as a Bearer token in the Authorization header.
45
+ This is the primary authentication method for service-to-service communication.
46
+
47
+ group: The group resource name in format groups/{group_id} required for all API requests.
48
+ The group determines the authorization context for operations
49
+ and is sent as an "x-group" header with every request.
50
+
51
+ timeout: The default timeout for all gRPC method calls.
52
+ This timeout applies to individual method calls and helps prevent hanging requests.
53
+ If a request takes longer than the specified timeout, it will be cancelled.
54
+ Default: 30 seconds
55
+ """
56
+ self.tls = tls
57
+ self.url = url
58
+ self.port = port
59
+ self.api_key = api_key
60
+ self.group = group
61
+ self.timeout = timeout
62
+
63
+
64
+ # Create alias to match expected exports
65
+ ClientOptions = ServiceOptions
@@ -0,0 +1,58 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: meshtrade/reporting/income_report/v1/service.proto
5
+ # Protobuf Python Version: 6.31.1
6
+ """Generated protocol buffer code."""
7
+ from google.protobuf import descriptor as _descriptor
8
+ from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
10
+ from google.protobuf import symbol_database as _symbol_database
11
+ from google.protobuf.internal import builder as _builder
12
+ _runtime_version.ValidateProtobufRuntimeVersion(
13
+ _runtime_version.Domain.PUBLIC,
14
+ 6,
15
+ 31,
16
+ 1,
17
+ '',
18
+ 'meshtrade/reporting/income_report/v1/service.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+ from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2
26
+ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
27
+ from meshtrade.reporting.income_report.v1 import income_report_pb2 as meshtrade_dot_reporting_dot_income__report_dot_v1_dot_income__report__pb2
28
+ from meshtrade.iam.role.v1 import role_pb2 as meshtrade_dot_iam_dot_role_dot_v1_dot_role__pb2
29
+ from meshtrade.option.v1 import method_type_pb2 as meshtrade_dot_option_dot_v1_dot_method__type__pb2
30
+
31
+
32
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n2meshtrade/reporting/income_report/v1/service.proto\x12$meshtrade.reporting.income_report.v1\x1a\x1b\x62uf/validate/validate.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x38meshtrade/reporting/income_report/v1/income_report.proto\x1a meshtrade/iam/role/v1/role.proto\x1a%meshtrade/option/v1/method_type.proto\"\x95\x01\n\x16GetIncomeReportRequest\x12\x1f\n\x0b\x61\x63\x63ount_num\x18\x01 \x01(\tR\naccountNum\x12.\n\x04\x66rom\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x04\x66rom\x12*\n\x02to\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x02to\"\x82\x03\n\x1bGetExcelIncomeReportRequest\x12\x84\x01\n\x0b\x61\x63\x63ount_num\x18\x01 \x01(\tBc\xbaH`r\x0f\x10\x01\x32\x0b^[0-9]{1,}$\xba\x01L\n\x14\x61\x63\x63ount_num.required\x12\x17\x61\x63\x63ount_num is required\x1a\x1bthis.matches(\'^[0-9]{1,}$\')R\naccountNum\x12q\n\x04\x66rom\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampBA\xbaH>\xba\x01;\n\rfrom.required\x12\x1c\'from\' timestamp is required\x1a\x0cthis != nullR\x04\x66rom\x12i\n\x02to\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB=\xbaH:\xba\x01\x37\n\x0bto.required\x12\x1a\'to\' timestamp is required\x1a\x0cthis != nullR\x02to\"A\n\x1cGetExcelIncomeReportResponse\x12!\n\x0c\x65xcel_base64\x18\x01 \x01(\tR\x0b\x65xcelBase642\xdb\x02\n\x13IncomeReportService\x12\x93\x01\n\x0fGetIncomeReport\x12<.meshtrade.reporting.income_report.v1.GetIncomeReportRequest\x1a\x32.meshtrade.reporting.income_report.v1.IncomeReport\"\x0e\xa0\xb5\x18\x01\xaa\xb5\x18\x06\n\x04\x81\x9b\xee\x02\x12\xad\x01\n\x14GetExcelIncomeReport\x12\x41.meshtrade.reporting.income_report.v1.GetExcelIncomeReportRequest\x1a\x42.meshtrade.reporting.income_report.v1.GetExcelIncomeReportResponse\"\x0e\xa0\xb5\x18\x01\xaa\xb5\x18\x06\n\x04\x81\x9b\xee\x02\x42u\n+co.meshtrade.api.reporting.income_report.v1ZFgithub.com/meshtrade/api/go/reporting/income_report/v1;income_reportv1b\x06proto3')
33
+
34
+ _globals = globals()
35
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
36
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtrade.reporting.income_report.v1.service_pb2', _globals)
37
+ if not _descriptor._USE_C_DESCRIPTORS:
38
+ _globals['DESCRIPTOR']._loaded_options = None
39
+ _globals['DESCRIPTOR']._serialized_options = b'\n+co.meshtrade.api.reporting.income_report.v1ZFgithub.com/meshtrade/api/go/reporting/income_report/v1;income_reportv1'
40
+ _globals['_GETEXCELINCOMEREPORTREQUEST'].fields_by_name['account_num']._loaded_options = None
41
+ _globals['_GETEXCELINCOMEREPORTREQUEST'].fields_by_name['account_num']._serialized_options = b'\272H`r\017\020\0012\013^[0-9]{1,}$\272\001L\n\024account_num.required\022\027account_num is required\032\033this.matches(\'^[0-9]{1,}$\')'
42
+ _globals['_GETEXCELINCOMEREPORTREQUEST'].fields_by_name['from']._loaded_options = None
43
+ _globals['_GETEXCELINCOMEREPORTREQUEST'].fields_by_name['from']._serialized_options = b'\272H>\272\001;\n\rfrom.required\022\034\'from\' timestamp is required\032\014this != null'
44
+ _globals['_GETEXCELINCOMEREPORTREQUEST'].fields_by_name['to']._loaded_options = None
45
+ _globals['_GETEXCELINCOMEREPORTREQUEST'].fields_by_name['to']._serialized_options = b'\272H:\272\0017\n\013to.required\022\032\'to\' timestamp is required\032\014this != null'
46
+ _globals['_INCOMEREPORTSERVICE'].methods_by_name['GetIncomeReport']._loaded_options = None
47
+ _globals['_INCOMEREPORTSERVICE'].methods_by_name['GetIncomeReport']._serialized_options = b'\240\265\030\001\252\265\030\006\n\004\201\233\356\002'
48
+ _globals['_INCOMEREPORTSERVICE'].methods_by_name['GetExcelIncomeReport']._loaded_options = None
49
+ _globals['_INCOMEREPORTSERVICE'].methods_by_name['GetExcelIncomeReport']._serialized_options = b'\240\265\030\001\252\265\030\006\n\004\201\233\356\002'
50
+ _globals['_GETINCOMEREPORTREQUEST']._serialized_start=286
51
+ _globals['_GETINCOMEREPORTREQUEST']._serialized_end=435
52
+ _globals['_GETEXCELINCOMEREPORTREQUEST']._serialized_start=438
53
+ _globals['_GETEXCELINCOMEREPORTREQUEST']._serialized_end=824
54
+ _globals['_GETEXCELINCOMEREPORTRESPONSE']._serialized_start=826
55
+ _globals['_GETEXCELINCOMEREPORTRESPONSE']._serialized_end=891
56
+ _globals['_INCOMEREPORTSERVICE']._serialized_start=894
57
+ _globals['_INCOMEREPORTSERVICE']._serialized_end=1241
58
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,37 @@
1
+ import datetime
2
+
3
+ from buf.validate import validate_pb2 as _validate_pb2
4
+ from google.protobuf import timestamp_pb2 as _timestamp_pb2
5
+ from meshtrade.reporting.income_report.v1 import income_report_pb2 as _income_report_pb2
6
+ from meshtrade.iam.role.v1 import role_pb2 as _role_pb2
7
+ from meshtrade.option.v1 import method_type_pb2 as _method_type_pb2
8
+ from google.protobuf import descriptor as _descriptor
9
+ from google.protobuf import message as _message
10
+ from collections.abc import Mapping as _Mapping
11
+ from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
12
+
13
+ DESCRIPTOR: _descriptor.FileDescriptor
14
+
15
+ class GetIncomeReportRequest(_message.Message):
16
+ __slots__ = ("account_num", "to")
17
+ ACCOUNT_NUM_FIELD_NUMBER: _ClassVar[int]
18
+ FROM_FIELD_NUMBER: _ClassVar[int]
19
+ TO_FIELD_NUMBER: _ClassVar[int]
20
+ account_num: str
21
+ to: _timestamp_pb2.Timestamp
22
+ def __init__(self, account_num: _Optional[str] = ..., to: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., **kwargs) -> None: ...
23
+
24
+ class GetExcelIncomeReportRequest(_message.Message):
25
+ __slots__ = ("account_num", "to")
26
+ ACCOUNT_NUM_FIELD_NUMBER: _ClassVar[int]
27
+ FROM_FIELD_NUMBER: _ClassVar[int]
28
+ TO_FIELD_NUMBER: _ClassVar[int]
29
+ account_num: str
30
+ to: _timestamp_pb2.Timestamp
31
+ def __init__(self, account_num: _Optional[str] = ..., to: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., **kwargs) -> None: ...
32
+
33
+ class GetExcelIncomeReportResponse(_message.Message):
34
+ __slots__ = ("excel_base64",)
35
+ EXCEL_BASE64_FIELD_NUMBER: _ClassVar[int]
36
+ excel_base64: str
37
+ def __init__(self, excel_base64: _Optional[str] = ...) -> None: ...
@@ -0,0 +1,170 @@
1
+ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2
+ """Client and server classes corresponding to protobuf-defined services."""
3
+ import grpc
4
+
5
+ from meshtrade.reporting.income_report.v1 import income_report_pb2 as meshtrade_dot_reporting_dot_income__report_dot_v1_dot_income__report__pb2
6
+ from meshtrade.reporting.income_report.v1 import service_pb2 as meshtrade_dot_reporting_dot_income__report_dot_v1_dot_service__pb2
7
+
8
+
9
+ class IncomeReportServiceStub(object):
10
+ """
11
+ IncomeReportService manages income report generation and export.
12
+
13
+ This service allows clients to retrieve structured income reports
14
+ and download them as Excel files. Reports are generated for a
15
+ specified account over a given time range and denominated in
16
+ a selected reporting currency.
17
+
18
+ All operations require access to financial reporting permissions.
19
+ """
20
+
21
+ def __init__(self, channel):
22
+ """Constructor.
23
+
24
+ Args:
25
+ channel: A grpc.Channel.
26
+ """
27
+ self.GetIncomeReport = channel.unary_unary(
28
+ '/meshtrade.reporting.income_report.v1.IncomeReportService/GetIncomeReport',
29
+ request_serializer=meshtrade_dot_reporting_dot_income__report_dot_v1_dot_service__pb2.GetIncomeReportRequest.SerializeToString,
30
+ response_deserializer=meshtrade_dot_reporting_dot_income__report_dot_v1_dot_income__report__pb2.IncomeReport.FromString,
31
+ _registered_method=True)
32
+ self.GetExcelIncomeReport = channel.unary_unary(
33
+ '/meshtrade.reporting.income_report.v1.IncomeReportService/GetExcelIncomeReport',
34
+ request_serializer=meshtrade_dot_reporting_dot_income__report_dot_v1_dot_service__pb2.GetExcelIncomeReportRequest.SerializeToString,
35
+ response_deserializer=meshtrade_dot_reporting_dot_income__report_dot_v1_dot_service__pb2.GetExcelIncomeReportResponse.FromString,
36
+ _registered_method=True)
37
+
38
+
39
+ class IncomeReportServiceServicer(object):
40
+ """
41
+ IncomeReportService manages income report generation and export.
42
+
43
+ This service allows clients to retrieve structured income reports
44
+ and download them as Excel files. Reports are generated for a
45
+ specified account over a given time range and denominated in
46
+ a selected reporting currency.
47
+
48
+ All operations require access to financial reporting permissions.
49
+ """
50
+
51
+ def GetIncomeReport(self, request, context):
52
+ """
53
+ Retrieves a structured income report for a specific account and time range.
54
+
55
+ Parameters:
56
+ - account_num: Unique account identifier
57
+ - from: Start timestamp for the report period
58
+ - to: End timestamp for the report period
59
+ - reporting_currency_token: Token in which report values are denominated
60
+
61
+ Returns:
62
+ - GetIncomeReportResponse: Structured income report with earnings breakdown
63
+ """
64
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
65
+ context.set_details('Method not implemented!')
66
+ raise NotImplementedError('Method not implemented!')
67
+
68
+ def GetExcelIncomeReport(self, request, context):
69
+ """
70
+ Exports an income report to Excel format for download.
71
+
72
+ Parameters:
73
+ - account_num: Unique account identifier
74
+ - from: Start timestamp for the report period
75
+ - to: End timestamp for the report period
76
+ - reporting_currency_token: Token in which report values are denominated
77
+
78
+ Returns:
79
+ - GetExcelIncomeReportResponse: Base64-encoded Excel file containing the report
80
+ """
81
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
82
+ context.set_details('Method not implemented!')
83
+ raise NotImplementedError('Method not implemented!')
84
+
85
+
86
+ def add_IncomeReportServiceServicer_to_server(servicer, server):
87
+ rpc_method_handlers = {
88
+ 'GetIncomeReport': grpc.unary_unary_rpc_method_handler(
89
+ servicer.GetIncomeReport,
90
+ request_deserializer=meshtrade_dot_reporting_dot_income__report_dot_v1_dot_service__pb2.GetIncomeReportRequest.FromString,
91
+ response_serializer=meshtrade_dot_reporting_dot_income__report_dot_v1_dot_income__report__pb2.IncomeReport.SerializeToString,
92
+ ),
93
+ 'GetExcelIncomeReport': grpc.unary_unary_rpc_method_handler(
94
+ servicer.GetExcelIncomeReport,
95
+ request_deserializer=meshtrade_dot_reporting_dot_income__report_dot_v1_dot_service__pb2.GetExcelIncomeReportRequest.FromString,
96
+ response_serializer=meshtrade_dot_reporting_dot_income__report_dot_v1_dot_service__pb2.GetExcelIncomeReportResponse.SerializeToString,
97
+ ),
98
+ }
99
+ generic_handler = grpc.method_handlers_generic_handler(
100
+ 'meshtrade.reporting.income_report.v1.IncomeReportService', rpc_method_handlers)
101
+ server.add_generic_rpc_handlers((generic_handler,))
102
+ server.add_registered_method_handlers('meshtrade.reporting.income_report.v1.IncomeReportService', rpc_method_handlers)
103
+
104
+
105
+ # This class is part of an EXPERIMENTAL API.
106
+ class IncomeReportService(object):
107
+ """
108
+ IncomeReportService manages income report generation and export.
109
+
110
+ This service allows clients to retrieve structured income reports
111
+ and download them as Excel files. Reports are generated for a
112
+ specified account over a given time range and denominated in
113
+ a selected reporting currency.
114
+
115
+ All operations require access to financial reporting permissions.
116
+ """
117
+
118
+ @staticmethod
119
+ def GetIncomeReport(request,
120
+ target,
121
+ options=(),
122
+ channel_credentials=None,
123
+ call_credentials=None,
124
+ insecure=False,
125
+ compression=None,
126
+ wait_for_ready=None,
127
+ timeout=None,
128
+ metadata=None):
129
+ return grpc.experimental.unary_unary(
130
+ request,
131
+ target,
132
+ '/meshtrade.reporting.income_report.v1.IncomeReportService/GetIncomeReport',
133
+ meshtrade_dot_reporting_dot_income__report_dot_v1_dot_service__pb2.GetIncomeReportRequest.SerializeToString,
134
+ meshtrade_dot_reporting_dot_income__report_dot_v1_dot_income__report__pb2.IncomeReport.FromString,
135
+ options,
136
+ channel_credentials,
137
+ insecure,
138
+ call_credentials,
139
+ compression,
140
+ wait_for_ready,
141
+ timeout,
142
+ metadata,
143
+ _registered_method=True)
144
+
145
+ @staticmethod
146
+ def GetExcelIncomeReport(request,
147
+ target,
148
+ options=(),
149
+ channel_credentials=None,
150
+ call_credentials=None,
151
+ insecure=False,
152
+ compression=None,
153
+ wait_for_ready=None,
154
+ timeout=None,
155
+ metadata=None):
156
+ return grpc.experimental.unary_unary(
157
+ request,
158
+ target,
159
+ '/meshtrade.reporting.income_report.v1.IncomeReportService/GetExcelIncomeReport',
160
+ meshtrade_dot_reporting_dot_income__report_dot_v1_dot_service__pb2.GetExcelIncomeReportRequest.SerializeToString,
161
+ meshtrade_dot_reporting_dot_income__report_dot_v1_dot_service__pb2.GetExcelIncomeReportResponse.FromString,
162
+ options,
163
+ channel_credentials,
164
+ insecure,
165
+ call_credentials,
166
+ compression,
167
+ wait_for_ready,
168
+ timeout,
169
+ metadata,
170
+ _registered_method=True)
@@ -27,7 +27,7 @@ from meshtrade.option.v1 import method_type_pb2 as meshtrade_dot_option_dot_v1_d
27
27
  from meshtrade.trading.limit_order.v1 import limit_order_pb2 as meshtrade_dot_trading_dot_limit__order_dot_v1_dot_limit__order__pb2
28
28
 
29
29
 
30
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n.meshtrade/trading/limit_order/v1/service.proto\x12 meshtrade.trading.limit_order.v1\x1a meshtrade/iam/role/v1/role.proto\x1a%meshtrade/option/v1/method_type.proto\x1a\x32meshtrade/trading/limit_order/v1/limit_order.proto\".\n\x14GetLimitOrderRequest\x12\x16\n\x06number\x18\x01 \x01(\tR\x06number2\x99\x01\n\x11LimitOrderService\x12\x83\x01\n\rGetLimitOrder\x12\x36.meshtrade.trading.limit_order.v1.GetLimitOrderRequest\x1a,.meshtrade.trading.limit_order.v1.LimitOrder\"\x0c\xa0\xb5\x18\x01\xaa\xb5\x18\x04\n\x02\t\nBj\n\'co.meshtrade.api.trading.limit_order.v1Z?github.com/meshtrade/api/go/trading/limit_order/v1;limitorderv1b\x06proto3')
30
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n.meshtrade/trading/limit_order/v1/service.proto\x12 meshtrade.trading.limit_order.v1\x1a meshtrade/iam/role/v1/role.proto\x1a%meshtrade/option/v1/method_type.proto\x1a\x32meshtrade/trading/limit_order/v1/limit_order.proto\".\n\x14GetLimitOrderRequest\x12\x16\n\x06number\x18\x01 \x01(\tR\x06number2\x9f\x01\n\x11LimitOrderService\x12\x89\x01\n\rGetLimitOrder\x12\x36.meshtrade.trading.limit_order.v1.GetLimitOrderRequest\x1a,.meshtrade.trading.limit_order.v1.LimitOrder\"\x12\xa0\xb5\x18\x01\xaa\xb5\x18\n\n\x08\xc0\x96\xb1\x02\xc1\x96\xb1\x02\x42j\n\'co.meshtrade.api.trading.limit_order.v1Z?github.com/meshtrade/api/go/trading/limit_order/v1;limitorderv1b\x06proto3')
31
31
 
32
32
  _globals = globals()
33
33
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
@@ -36,9 +36,9 @@ if not _descriptor._USE_C_DESCRIPTORS:
36
36
  _globals['DESCRIPTOR']._loaded_options = None
37
37
  _globals['DESCRIPTOR']._serialized_options = b'\n\'co.meshtrade.api.trading.limit_order.v1Z?github.com/meshtrade/api/go/trading/limit_order/v1;limitorderv1'
38
38
  _globals['_LIMITORDERSERVICE'].methods_by_name['GetLimitOrder']._loaded_options = None
39
- _globals['_LIMITORDERSERVICE'].methods_by_name['GetLimitOrder']._serialized_options = b'\240\265\030\001\252\265\030\004\n\002\t\n'
39
+ _globals['_LIMITORDERSERVICE'].methods_by_name['GetLimitOrder']._serialized_options = b'\240\265\030\001\252\265\030\n\n\010\300\226\261\002\301\226\261\002'
40
40
  _globals['_GETLIMITORDERREQUEST']._serialized_start=209
41
41
  _globals['_GETLIMITORDERREQUEST']._serialized_end=255
42
42
  _globals['_LIMITORDERSERVICE']._serialized_start=258
43
- _globals['_LIMITORDERSERVICE']._serialized_end=411
43
+ _globals['_LIMITORDERSERVICE']._serialized_end=417
44
44
  # @@protoc_insertion_point(module_scope)
@@ -27,7 +27,7 @@ from meshtrade.option.v1 import method_type_pb2 as meshtrade_dot_option_dot_v1_d
27
27
  from meshtrade.trading.market_order.v1 import market_order_pb2 as meshtrade_dot_trading_dot_market__order_dot_v1_dot_market__order__pb2
28
28
 
29
29
 
30
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n/meshtrade/trading/market_order/v1/service.proto\x12!meshtrade.trading.market_order.v1\x1a meshtrade/iam/role/v1/role.proto\x1a%meshtrade/option/v1/method_type.proto\x1a\x34meshtrade/trading/market_order/v1/market_order.proto\"/\n\x15GetMarketOrderRequest\x12\x16\n\x06number\x18\x01 \x01(\tR\x06number2\x9f\x01\n\x12MarketOrderService\x12\x88\x01\n\x0eGetMarketOrder\x12\x38.meshtrade.trading.market_order.v1.GetMarketOrderRequest\x1a..meshtrade.trading.market_order.v1.MarketOrder\"\x0c\xa0\xb5\x18\x01\xaa\xb5\x18\x04\n\x02\t\nBn\n(co.meshtrade.api.trading.market_order.v1ZBgithub.com/meshtrade/api/go/trading/market_order/v1;market_orderv1b\x06proto3')
30
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n/meshtrade/trading/market_order/v1/service.proto\x12!meshtrade.trading.market_order.v1\x1a meshtrade/iam/role/v1/role.proto\x1a%meshtrade/option/v1/method_type.proto\x1a\x34meshtrade/trading/market_order/v1/market_order.proto\"/\n\x15GetMarketOrderRequest\x12\x16\n\x06number\x18\x01 \x01(\tR\x06number2\xa5\x01\n\x12MarketOrderService\x12\x8e\x01\n\x0eGetMarketOrder\x12\x38.meshtrade.trading.market_order.v1.GetMarketOrderRequest\x1a..meshtrade.trading.market_order.v1.MarketOrder\"\x12\xa0\xb5\x18\x01\xaa\xb5\x18\n\n\x08\xc0\x96\xb1\x02\xc1\x96\xb1\x02\x42n\n(co.meshtrade.api.trading.market_order.v1ZBgithub.com/meshtrade/api/go/trading/market_order/v1;market_orderv1b\x06proto3')
31
31
 
32
32
  _globals = globals()
33
33
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
@@ -36,9 +36,9 @@ if not _descriptor._USE_C_DESCRIPTORS:
36
36
  _globals['DESCRIPTOR']._loaded_options = None
37
37
  _globals['DESCRIPTOR']._serialized_options = b'\n(co.meshtrade.api.trading.market_order.v1ZBgithub.com/meshtrade/api/go/trading/market_order/v1;market_orderv1'
38
38
  _globals['_MARKETORDERSERVICE'].methods_by_name['GetMarketOrder']._loaded_options = None
39
- _globals['_MARKETORDERSERVICE'].methods_by_name['GetMarketOrder']._serialized_options = b'\240\265\030\001\252\265\030\004\n\002\t\n'
39
+ _globals['_MARKETORDERSERVICE'].methods_by_name['GetMarketOrder']._serialized_options = b'\240\265\030\001\252\265\030\n\n\010\300\226\261\002\301\226\261\002'
40
40
  _globals['_GETMARKETORDERREQUEST']._serialized_start=213
41
41
  _globals['_GETMARKETORDERREQUEST']._serialized_end=260
42
42
  _globals['_MARKETORDERSERVICE']._serialized_start=263
43
- _globals['_MARKETORDERSERVICE']._serialized_end=422
43
+ _globals['_MARKETORDERSERVICE']._serialized_end=428
44
44
  # @@protoc_insertion_point(module_scope)
@@ -28,7 +28,7 @@ from meshtrade.type.v1 import ledger_pb2 as meshtrade_dot_type_dot_v1_dot_ledger
28
28
  from meshtrade.wallet.account.v1 import account_pb2 as meshtrade_dot_wallet_dot_account_dot_v1_dot_account__pb2
29
29
 
30
30
 
31
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n)meshtrade/wallet/account/v1/service.proto\x12\x1bmeshtrade.wallet.account.v1\x1a meshtrade/iam/role/v1/role.proto\x1a%meshtrade/option/v1/method_type.proto\x1a\x1emeshtrade/type/v1/ledger.proto\x1a)meshtrade/wallet/account/v1/account.proto\"s\n\x14\x43reateAccountRequest\x12\x14\n\x05label\x18\x01 \x01(\tR\x05label\x12\x31\n\x06ledger\x18\x02 \x01(\x0e\x32\x19.meshtrade.type.v1.LedgerR\x06ledger\x12\x12\n\x04open\x18\x03 \x01(\x08R\x04open\"+\n\x11GetAccountRequest\x12\x16\n\x06number\x18\x01 \x01(\tR\x06number\"\x15\n\x13ListAccountsRequest\"X\n\x14ListAccountsResponse\x12@\n\x08\x61\x63\x63ounts\x18\x01 \x03(\x0b\x32$.meshtrade.wallet.account.v1.AccountR\x08\x61\x63\x63ounts\"-\n\x15SearchAccountsRequest\x12\x14\n\x05label\x18\x01 \x01(\tR\x05label\"Z\n\x16SearchAccountsResponse\x12@\n\x08\x61\x63\x63ounts\x18\x01 \x03(\x0b\x32$.meshtrade.wallet.account.v1.AccountR\x08\x61\x63\x63ounts2\x87\x04\n\x0e\x41\x63\x63ountService\x12u\n\rCreateAccount\x12\x31.meshtrade.wallet.account.v1.CreateAccountRequest\x1a$.meshtrade.wallet.account.v1.Account\"\x0b\xa0\xb5\x18\x02\xaa\xb5\x18\x03\n\x01\x01\x12p\n\nGetAccount\x12..meshtrade.wallet.account.v1.GetAccountRequest\x1a$.meshtrade.wallet.account.v1.Account\"\x0c\xa0\xb5\x18\x01\xaa\xb5\x18\x04\n\x02\x01\x02\x12\x81\x01\n\x0cListAccounts\x12\x30.meshtrade.wallet.account.v1.ListAccountsRequest\x1a\x31.meshtrade.wallet.account.v1.ListAccountsResponse\"\x0c\xa0\xb5\x18\x01\xaa\xb5\x18\x04\n\x02\x01\x02\x12\x87\x01\n\x0eSearchAccounts\x12\x32.meshtrade.wallet.account.v1.SearchAccountsRequest\x1a\x33.meshtrade.wallet.account.v1.SearchAccountsResponse\"\x0c\xa0\xb5\x18\x01\xaa\xb5\x18\x04\n\x02\x01\x02\x42]\n\"co.meshtrade.api.wallet.account.v1Z7github.com/meshtrade/api/go/wallet/account/v1;accountv1b\x06proto3')
31
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n)meshtrade/wallet/account/v1/service.proto\x12\x1bmeshtrade.wallet.account.v1\x1a meshtrade/iam/role/v1/role.proto\x1a%meshtrade/option/v1/method_type.proto\x1a\x1emeshtrade/type/v1/ledger.proto\x1a)meshtrade/wallet/account/v1/account.proto\"s\n\x14\x43reateAccountRequest\x12\x14\n\x05label\x18\x01 \x01(\tR\x05label\x12\x31\n\x06ledger\x18\x02 \x01(\x0e\x32\x19.meshtrade.type.v1.LedgerR\x06ledger\x12\x12\n\x04open\x18\x03 \x01(\x08R\x04open\"+\n\x11GetAccountRequest\x12\x16\n\x06number\x18\x01 \x01(\tR\x06number\"\x15\n\x13ListAccountsRequest\"X\n\x14ListAccountsResponse\x12@\n\x08\x61\x63\x63ounts\x18\x01 \x03(\x0b\x32$.meshtrade.wallet.account.v1.AccountR\x08\x61\x63\x63ounts\"-\n\x15SearchAccountsRequest\x12\x14\n\x05label\x18\x01 \x01(\tR\x05label\"Z\n\x16SearchAccountsResponse\x12@\n\x08\x61\x63\x63ounts\x18\x01 \x03(\x0b\x32$.meshtrade.wallet.account.v1.AccountR\x08\x61\x63\x63ounts2\x95\x04\n\x0e\x41\x63\x63ountService\x12w\n\rCreateAccount\x12\x31.meshtrade.wallet.account.v1.CreateAccountRequest\x1a$.meshtrade.wallet.account.v1.Account\"\r\xa0\xb5\x18\x02\xaa\xb5\x18\x05\n\x03\xc0\x84=\x12t\n\nGetAccount\x12..meshtrade.wallet.account.v1.GetAccountRequest\x1a$.meshtrade.wallet.account.v1.Account\"\x10\xa0\xb5\x18\x01\xaa\xb5\x18\x08\n\x06\xc0\x84=\xc1\x84=\x12\x85\x01\n\x0cListAccounts\x12\x30.meshtrade.wallet.account.v1.ListAccountsRequest\x1a\x31.meshtrade.wallet.account.v1.ListAccountsResponse\"\x10\xa0\xb5\x18\x01\xaa\xb5\x18\x08\n\x06\xc0\x84=\xc1\x84=\x12\x8b\x01\n\x0eSearchAccounts\x12\x32.meshtrade.wallet.account.v1.SearchAccountsRequest\x1a\x33.meshtrade.wallet.account.v1.SearchAccountsResponse\"\x10\xa0\xb5\x18\x01\xaa\xb5\x18\x08\n\x06\xc0\x84=\xc1\x84=B]\n\"co.meshtrade.api.wallet.account.v1Z7github.com/meshtrade/api/go/wallet/account/v1;accountv1b\x06proto3')
32
32
 
33
33
  _globals = globals()
34
34
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
@@ -37,13 +37,13 @@ if not _descriptor._USE_C_DESCRIPTORS:
37
37
  _globals['DESCRIPTOR']._loaded_options = None
38
38
  _globals['DESCRIPTOR']._serialized_options = b'\n\"co.meshtrade.api.wallet.account.v1Z7github.com/meshtrade/api/go/wallet/account/v1;accountv1'
39
39
  _globals['_ACCOUNTSERVICE'].methods_by_name['CreateAccount']._loaded_options = None
40
- _globals['_ACCOUNTSERVICE'].methods_by_name['CreateAccount']._serialized_options = b'\240\265\030\002\252\265\030\003\n\001\001'
40
+ _globals['_ACCOUNTSERVICE'].methods_by_name['CreateAccount']._serialized_options = b'\240\265\030\002\252\265\030\005\n\003\300\204='
41
41
  _globals['_ACCOUNTSERVICE'].methods_by_name['GetAccount']._loaded_options = None
42
- _globals['_ACCOUNTSERVICE'].methods_by_name['GetAccount']._serialized_options = b'\240\265\030\001\252\265\030\004\n\002\001\002'
42
+ _globals['_ACCOUNTSERVICE'].methods_by_name['GetAccount']._serialized_options = b'\240\265\030\001\252\265\030\010\n\006\300\204=\301\204='
43
43
  _globals['_ACCOUNTSERVICE'].methods_by_name['ListAccounts']._loaded_options = None
44
- _globals['_ACCOUNTSERVICE'].methods_by_name['ListAccounts']._serialized_options = b'\240\265\030\001\252\265\030\004\n\002\001\002'
44
+ _globals['_ACCOUNTSERVICE'].methods_by_name['ListAccounts']._serialized_options = b'\240\265\030\001\252\265\030\010\n\006\300\204=\301\204='
45
45
  _globals['_ACCOUNTSERVICE'].methods_by_name['SearchAccounts']._loaded_options = None
46
- _globals['_ACCOUNTSERVICE'].methods_by_name['SearchAccounts']._serialized_options = b'\240\265\030\001\252\265\030\004\n\002\001\002'
46
+ _globals['_ACCOUNTSERVICE'].methods_by_name['SearchAccounts']._serialized_options = b'\240\265\030\001\252\265\030\010\n\006\300\204=\301\204='
47
47
  _globals['_CREATEACCOUNTREQUEST']._serialized_start=222
48
48
  _globals['_CREATEACCOUNTREQUEST']._serialized_end=337
49
49
  _globals['_GETACCOUNTREQUEST']._serialized_start=339
@@ -57,5 +57,5 @@ if not _descriptor._USE_C_DESCRIPTORS:
57
57
  _globals['_SEARCHACCOUNTSRESPONSE']._serialized_start=544
58
58
  _globals['_SEARCHACCOUNTSRESPONSE']._serialized_end=634
59
59
  _globals['_ACCOUNTSERVICE']._serialized_start=637
60
- _globals['_ACCOUNTSERVICE']._serialized_end=1156
60
+ _globals['_ACCOUNTSERVICE']._serialized_end=1170
61
61
  # @@protoc_insertion_point(module_scope)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: meshtrade
3
- Version: 1.0.0
3
+ Version: 1.0.2
4
4
  Summary: Integration SDK for Mesh API Services
5
5
  Author-email: Bernard Bussy <bernard@meshtrade.co>
6
6
  License: LicenseRef-My-Custom-License