meshtrade 0.0.8__py3-none-any.whl → 0.0.11__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 (157) hide show
  1. buf/validate/validate_pb2.py +450 -0
  2. buf/validate/validate_pb2.pyi +627 -0
  3. meshtrade/common/__init__.py +28 -0
  4. meshtrade/common/config.py +30 -0
  5. meshtrade/common/grpc_client.py +202 -0
  6. meshtrade/compliance/client/v1/__init__.py +65 -7
  7. meshtrade/compliance/client/v1/client_pb2.py +2 -2
  8. meshtrade/compliance/client/v1/client_pb2_grpc.py +4 -0
  9. meshtrade/compliance/client/v1/company_pb2.py +2 -2
  10. meshtrade/compliance/client/v1/company_pb2_grpc.py +4 -0
  11. meshtrade/compliance/client/v1/company_representative_pb2.py +2 -2
  12. meshtrade/compliance/client/v1/company_representative_pb2_grpc.py +4 -0
  13. meshtrade/compliance/client/v1/company_representative_role_pb2.py +2 -2
  14. meshtrade/compliance/client/v1/company_representative_role_pb2_grpc.py +4 -0
  15. meshtrade/compliance/client/v1/fund_pb2.py +2 -2
  16. meshtrade/compliance/client/v1/fund_pb2_grpc.py +4 -0
  17. meshtrade/compliance/client/v1/identification_document_type_pb2.py +2 -2
  18. meshtrade/compliance/client/v1/identification_document_type_pb2_grpc.py +4 -0
  19. meshtrade/compliance/client/v1/industry_classification_pb2.py +2 -2
  20. meshtrade/compliance/client/v1/industry_classification_pb2_grpc.py +4 -0
  21. meshtrade/compliance/client/v1/natural_person_connection_type_pb2.py +2 -2
  22. meshtrade/compliance/client/v1/natural_person_connection_type_pb2_grpc.py +4 -0
  23. meshtrade/compliance/client/v1/natural_person_pb2.py +2 -2
  24. meshtrade/compliance/client/v1/natural_person_pb2_grpc.py +4 -0
  25. meshtrade/compliance/client/v1/pep_status_pb2.py +2 -2
  26. meshtrade/compliance/client/v1/pep_status_pb2_grpc.py +4 -0
  27. meshtrade/compliance/client/v1/service_meshpy.py +186 -0
  28. meshtrade/compliance/client/v1/service_options_meshpy.py +65 -0
  29. meshtrade/compliance/client/v1/service_pb2.py +20 -10
  30. meshtrade/compliance/client/v1/service_pb2.pyi +8 -0
  31. meshtrade/compliance/client/v1/service_pb2_grpc.py +192 -0
  32. meshtrade/compliance/client/v1/source_of_income_and_wealth_pb2.py +2 -2
  33. meshtrade/compliance/client/v1/source_of_income_and_wealth_pb2_grpc.py +4 -0
  34. meshtrade/compliance/client/v1/tax_residency_pb2.py +2 -2
  35. meshtrade/compliance/client/v1/tax_residency_pb2_grpc.py +4 -0
  36. meshtrade/compliance/client/v1/trust_pb2.py +2 -2
  37. meshtrade/compliance/client/v1/trust_pb2_grpc.py +4 -0
  38. meshtrade/compliance/client/v1/verification_status_pb2.py +2 -2
  39. meshtrade/compliance/client/v1/verification_status_pb2_grpc.py +4 -0
  40. meshtrade/iam/api_user/v1/__init__.py +99 -0
  41. meshtrade/iam/api_user/v1/api_credentials.py +156 -0
  42. meshtrade/iam/api_user/v1/api_credentials_pb2.py +42 -0
  43. meshtrade/iam/api_user/v1/api_credentials_pb2.pyi +14 -0
  44. meshtrade/iam/api_user/v1/api_credentials_pb2_grpc.py +4 -0
  45. meshtrade/iam/api_user/v1/api_user_pb2.py +48 -0
  46. meshtrade/iam/api_user/v1/api_user_pb2.pyi +49 -0
  47. meshtrade/iam/api_user/v1/api_user_pb2_grpc.py +4 -0
  48. meshtrade/iam/api_user/v1/service.py +58 -0
  49. meshtrade/iam/api_user/v1/service_meshpy.py +255 -0
  50. meshtrade/iam/api_user/v1/service_options_meshpy.py +65 -0
  51. meshtrade/iam/api_user/v1/service_pb2.py +77 -0
  52. meshtrade/iam/api_user/v1/service_pb2.pyi +63 -0
  53. meshtrade/iam/api_user/v1/service_pb2_grpc.py +458 -0
  54. meshtrade/iam/group/v1/__init__.py +59 -1
  55. meshtrade/iam/group/v1/group_pb2.py +2 -2
  56. meshtrade/iam/group/v1/group_pb2_grpc.py +4 -0
  57. meshtrade/iam/group/v1/service_meshpy.py +187 -0
  58. meshtrade/iam/group/v1/service_options_meshpy.py +65 -0
  59. meshtrade/iam/group/v1/service_pb2.py +22 -6
  60. meshtrade/iam/group/v1/service_pb2.pyi +29 -1
  61. meshtrade/iam/group/v1/service_pb2_grpc.py +170 -0
  62. meshtrade/iam/role/v1/__init__.py +44 -0
  63. meshtrade/iam/role/v1/role.py +23 -0
  64. meshtrade/iam/role/v1/role_pb2.py +40 -0
  65. meshtrade/{option/v1/auth_pb2.pyi → iam/role/v1/role_pb2.pyi} +16 -0
  66. meshtrade/iam/role/v1/role_pb2_grpc.py +4 -0
  67. meshtrade/iam/user/v1/__init__.py +53 -0
  68. meshtrade/iam/user/v1/service_meshpy.py +151 -0
  69. meshtrade/iam/user/v1/service_options_meshpy.py +65 -0
  70. meshtrade/iam/user/v1/service_pb2.py +51 -0
  71. meshtrade/iam/user/v1/service_pb2.pyi +19 -0
  72. meshtrade/iam/user/v1/service_pb2_grpc.py +82 -0
  73. meshtrade/{issuance_hub/instrument/v1/instrument_pb2.py → iam/user/v1/user_pb2.py} +7 -7
  74. meshtrade/iam/user/v1/user_pb2.pyi +15 -0
  75. meshtrade/iam/user/v1/user_pb2_grpc.py +4 -0
  76. meshtrade/ledger/transaction/v1/__init__.py +34 -0
  77. meshtrade/ledger/transaction/v1/transaction_action_pb2.py +2 -2
  78. meshtrade/ledger/transaction/v1/transaction_action_pb2_grpc.py +4 -0
  79. meshtrade/ledger/transaction/v1/transaction_state_pb2.py +2 -2
  80. meshtrade/ledger/transaction/v1/transaction_state_pb2_grpc.py +4 -0
  81. meshtrade/option/v1/__init__.py +36 -4
  82. meshtrade/option/v1/{service_type_pb2.py → method_type_pb2.py} +7 -7
  83. meshtrade/option/v1/method_type_pb2.pyi +17 -0
  84. meshtrade/option/v1/method_type_pb2_grpc.py +4 -0
  85. meshtrade/trading/limit_order/v1/__init__.py +47 -1
  86. meshtrade/trading/limit_order/v1/limit_order_pb2.py +2 -2
  87. meshtrade/trading/limit_order/v1/limit_order_pb2_grpc.py +4 -0
  88. meshtrade/trading/limit_order/v1/service_meshpy.py +151 -0
  89. meshtrade/trading/limit_order/v1/service_options_meshpy.py +65 -0
  90. meshtrade/trading/limit_order/v1/service_pb2.py +10 -6
  91. meshtrade/trading/limit_order/v1/service_pb2.pyi +2 -0
  92. meshtrade/trading/limit_order/v1/service_pb2_grpc.py +78 -0
  93. meshtrade/trading/market_order/v1/__init__.py +53 -0
  94. meshtrade/trading/{direct_order/v1/direct_order_pb2.py → market_order/v1/market_order_pb2.py} +7 -7
  95. meshtrade/trading/{spot/v1/spot_pb2.pyi → market_order/v1/market_order_pb2.pyi} +1 -1
  96. meshtrade/trading/market_order/v1/market_order_pb2_grpc.py +4 -0
  97. meshtrade/trading/market_order/v1/service_meshpy.py +151 -0
  98. meshtrade/trading/market_order/v1/service_options_meshpy.py +65 -0
  99. meshtrade/trading/market_order/v1/service_pb2.py +44 -0
  100. meshtrade/trading/{spot → market_order}/v1/service_pb2.pyi +4 -2
  101. meshtrade/trading/market_order/v1/service_pb2_grpc.py +78 -0
  102. meshtrade/type/v1/__init__.py +91 -50
  103. meshtrade/type/v1/address_pb2.py +2 -2
  104. meshtrade/type/v1/address_pb2_grpc.py +4 -0
  105. meshtrade/type/v1/amount.py +2 -8
  106. meshtrade/type/v1/amount_pb2.py +2 -2
  107. meshtrade/type/v1/amount_pb2_grpc.py +4 -0
  108. meshtrade/type/v1/contact_details_pb2.py +2 -2
  109. meshtrade/type/v1/contact_details_pb2_grpc.py +4 -0
  110. meshtrade/type/v1/date.py +263 -91
  111. meshtrade/type/v1/date_pb2.py +2 -2
  112. meshtrade/type/v1/date_pb2_grpc.py +4 -0
  113. meshtrade/type/v1/decimal_built_in_conversions.py +1 -1
  114. meshtrade/type/v1/decimal_pb2.py +2 -2
  115. meshtrade/type/v1/decimal_pb2_grpc.py +4 -0
  116. meshtrade/type/v1/ledger.py +1 -1
  117. meshtrade/type/v1/ledger_pb2.py +2 -2
  118. meshtrade/type/v1/ledger_pb2_grpc.py +4 -0
  119. meshtrade/{trading/spot/v1/spot_pb2.py → type/v1/sorting_pb2.py} +7 -7
  120. meshtrade/type/v1/sorting_pb2.pyi +14 -0
  121. meshtrade/type/v1/sorting_pb2_grpc.py +4 -0
  122. meshtrade/type/v1/time_of_day.py +52 -87
  123. meshtrade/type/v1/time_of_day_pb2.py +2 -2
  124. meshtrade/type/v1/time_of_day_pb2_grpc.py +4 -0
  125. meshtrade/type/v1/token_pb2.py +2 -2
  126. meshtrade/type/v1/token_pb2_grpc.py +4 -0
  127. meshtrade/wallet/account/v1/__init__.py +46 -0
  128. meshtrade/wallet/account/v1/account_pb2.py +2 -2
  129. meshtrade/wallet/account/v1/account_pb2_grpc.py +4 -0
  130. meshtrade/wallet/account/v1/service_meshpy.py +204 -0
  131. meshtrade/wallet/account/v1/service_options_meshpy.py +65 -0
  132. meshtrade/wallet/account/v1/service_pb2.py +18 -18
  133. meshtrade/wallet/account/v1/service_pb2.pyi +2 -2
  134. meshtrade/wallet/account/v1/service_pb2_grpc.py +222 -0
  135. meshtrade-0.0.11.dist-info/METADATA +95 -0
  136. meshtrade-0.0.11.dist-info/RECORD +176 -0
  137. {meshtrade-0.0.8.dist-info → meshtrade-0.0.11.dist-info}/top_level.txt +1 -0
  138. meshtrade/issuance_hub/__init__.py +0 -0
  139. meshtrade/issuance_hub/instrument/__init__.py +0 -0
  140. meshtrade/issuance_hub/instrument/v1/__init__.py +0 -11
  141. meshtrade/issuance_hub/instrument/v1/instrument_pb2.pyi +0 -11
  142. meshtrade/issuance_hub/instrument/v1/service_pb2.py +0 -49
  143. meshtrade/issuance_hub/instrument/v1/service_pb2.pyi +0 -46
  144. meshtrade/option/v1/auth_pb2.py +0 -40
  145. meshtrade/option/v1/service_type_pb2.pyi +0 -17
  146. meshtrade/trading/direct_order/__init__.py +0 -0
  147. meshtrade/trading/direct_order/v1/__init__.py +0 -7
  148. meshtrade/trading/direct_order/v1/direct_order_pb2.pyi +0 -11
  149. meshtrade/trading/direct_order/v1/service_pb2.py +0 -40
  150. meshtrade/trading/direct_order/v1/service_pb2.pyi +0 -12
  151. meshtrade/trading/spot/__init__.py +0 -0
  152. meshtrade/trading/spot/v1/__init__.py +0 -7
  153. meshtrade/trading/spot/v1/service_pb2.py +0 -40
  154. meshtrade-0.0.8.dist-info/METADATA +0 -35
  155. meshtrade-0.0.8.dist-info/RECORD +0 -113
  156. meshtrade-0.0.8.dist-info/licenses/LICENSE +0 -10
  157. {meshtrade-0.0.8.dist-info → meshtrade-0.0.11.dist-info}/WHEEL +0 -0
@@ -1,7 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
3
3
  # NO CHECKED-IN PROTOBUF GENCODE
4
- # source: meshtrade/option/v1/service_type.proto
4
+ # source: meshtrade/option/v1/method_type.proto
5
5
  # Protobuf Python Version: 6.31.1
6
6
  """Generated protocol buffer code."""
7
7
  from google.protobuf import descriptor as _descriptor
@@ -15,7 +15,7 @@ _runtime_version.ValidateProtobufRuntimeVersion(
15
15
  31,
16
16
  1,
17
17
  '',
18
- 'meshtrade/option/v1/service_type.proto'
18
+ 'meshtrade/option/v1/method_type.proto'
19
19
  )
20
20
  # @@protoc_insertion_point(imports)
21
21
 
@@ -25,14 +25,14 @@ _sym_db = _symbol_database.Default()
25
25
  from google.protobuf import descriptor_pb2 as google_dot_protobuf_dot_descriptor__pb2
26
26
 
27
27
 
28
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n&meshtrade/option/v1/service_type.proto\x12\x13meshtrade.option.v1\x1a google/protobuf/descriptor.proto*Z\n\x0bServiceType\x12\x1c\n\x18SERVICE_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11SERVICE_TYPE_READ\x10\x01\x12\x16\n\x12SERVICE_TYPE_WRITE\x10\x02:e\n\x0cservice_type\x12\x1e.google.protobuf.MethodOptions\x18\xd4\x86\x03 \x01(\x0e\x32 .meshtrade.option.v1.ServiceTypeR\x0bserviceTypeB0Z.github.com/meshtrade/api/go/option/v1;optionv1b\x06proto3')
28
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n%meshtrade/option/v1/method_type.proto\x12\x13meshtrade.option.v1\x1a google/protobuf/descriptor.proto*V\n\nMethodType\x12\x1b\n\x17METHOD_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10METHOD_TYPE_READ\x10\x01\x12\x15\n\x11METHOD_TYPE_WRITE\x10\x02:b\n\x0bmethod_type\x12\x1e.google.protobuf.MethodOptions\x18\xd4\x86\x03 \x01(\x0e\x32\x1f.meshtrade.option.v1.MethodTypeR\nmethodTypeBL\n\x1a\x63o.meshtrade.api.option.v1Z.github.com/meshtrade/api/go/option/v1;optionv1b\x06proto3')
29
29
 
30
30
  _globals = globals()
31
31
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
32
- _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtrade.option.v1.service_type_pb2', _globals)
32
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtrade.option.v1.method_type_pb2', _globals)
33
33
  if not _descriptor._USE_C_DESCRIPTORS:
34
34
  _globals['DESCRIPTOR']._loaded_options = None
35
- _globals['DESCRIPTOR']._serialized_options = b'Z.github.com/meshtrade/api/go/option/v1;optionv1'
36
- _globals['_SERVICETYPE']._serialized_start=97
37
- _globals['_SERVICETYPE']._serialized_end=187
35
+ _globals['DESCRIPTOR']._serialized_options = b'\n\032co.meshtrade.api.option.v1Z.github.com/meshtrade/api/go/option/v1;optionv1'
36
+ _globals['_METHODTYPE']._serialized_start=96
37
+ _globals['_METHODTYPE']._serialized_end=182
38
38
  # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,17 @@
1
+ from google.protobuf import descriptor_pb2 as _descriptor_pb2
2
+ from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
3
+ from google.protobuf import descriptor as _descriptor
4
+ from typing import ClassVar as _ClassVar
5
+
6
+ DESCRIPTOR: _descriptor.FileDescriptor
7
+
8
+ class MethodType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
9
+ __slots__ = ()
10
+ METHOD_TYPE_UNSPECIFIED: _ClassVar[MethodType]
11
+ METHOD_TYPE_READ: _ClassVar[MethodType]
12
+ METHOD_TYPE_WRITE: _ClassVar[MethodType]
13
+ METHOD_TYPE_UNSPECIFIED: MethodType
14
+ METHOD_TYPE_READ: MethodType
15
+ METHOD_TYPE_WRITE: MethodType
16
+ METHOD_TYPE_FIELD_NUMBER: _ClassVar[int]
17
+ method_type: _descriptor.FieldDescriptor
@@ -0,0 +1,4 @@
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
+
@@ -1,7 +1,53 @@
1
+ """Limit Order v1 package."""
2
+
3
+ # ===================================================================
4
+ # AUTO-GENERATED SECTION - ONLY EDIT BELOW THE CLOSING COMMENT BLOCK
5
+ # ===================================================================
6
+ # This section is automatically managed by protoc-gen-meshpy.
7
+ #
8
+ # DO NOT EDIT ANYTHING IN THIS SECTION MANUALLY!
9
+ # Your changes will be overwritten during code generation.
10
+ #
11
+ # To add custom imports and exports, scroll down to the
12
+ # "MANUAL SECTION" indicated below.
13
+ # ===================================================================
14
+
15
+ # Generated protobuf imports
1
16
  from .limit_order_pb2 import LimitOrder
2
17
  from .service_pb2 import GetLimitOrderRequest
3
18
 
19
+ # Generated service imports
20
+ from .service_meshpy import (
21
+ LimitOrderService,
22
+ LimitOrderServiceGRPCClient,
23
+ LimitOrderServiceGRPCClientInterface,
24
+ )
25
+ from .service_options_meshpy import ClientOptions
26
+
27
+ # ===================================================================
28
+ # END OF AUTO-GENERATED SECTION
29
+ # ===================================================================
30
+ #
31
+ # MANUAL SECTION - ADD YOUR CUSTOM IMPORTS AND EXPORTS BELOW
32
+ #
33
+ # You can safely add your own imports, functions, classes, and exports
34
+ # in this section. They will be preserved across code generation.
35
+ #
36
+ # Example:
37
+ # from my_custom_module import my_function
38
+ #
39
+ # ===================================================================
40
+
41
+ # ===================================================================
42
+ # MODULE EXPORTS
43
+ # ===================================================================
44
+ # Combined auto-generated and manual exports
4
45
  __all__ = [
5
- "LimitOrder",
46
+ # Generated exports
47
+ "ClientOptions",
6
48
  "GetLimitOrderRequest",
49
+ "LimitOrder",
50
+ "LimitOrderService",
51
+ "LimitOrderServiceGRPCClient",
52
+ "LimitOrderServiceGRPCClientInterface",
7
53
  ]
@@ -24,14 +24,14 @@ _sym_db = _symbol_database.Default()
24
24
 
25
25
 
26
26
 
27
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n2meshtrade/trading/limit_order/v1/limit_order.proto\x12 meshtrade.trading.limit_order.v1\"$\n\nLimitOrder\x12\x16\n\x06number\x18\x01 \x01(\tR\x06numberBAZ?github.com/meshtrade/api/go/trading/limit_order/v1;limitorderv1b\x06proto3')
27
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n2meshtrade/trading/limit_order/v1/limit_order.proto\x12 meshtrade.trading.limit_order.v1\"$\n\nLimitOrder\x12\x16\n\x06number\x18\x01 \x01(\tR\x06numberBj\n\'co.meshtrade.api.trading.limit_order.v1Z?github.com/meshtrade/api/go/trading/limit_order/v1;limitorderv1b\x06proto3')
28
28
 
29
29
  _globals = globals()
30
30
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
31
31
  _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtrade.trading.limit_order.v1.limit_order_pb2', _globals)
32
32
  if not _descriptor._USE_C_DESCRIPTORS:
33
33
  _globals['DESCRIPTOR']._loaded_options = None
34
- _globals['DESCRIPTOR']._serialized_options = b'Z?github.com/meshtrade/api/go/trading/limit_order/v1;limitorderv1'
34
+ _globals['DESCRIPTOR']._serialized_options = b'\n\'co.meshtrade.api.trading.limit_order.v1Z?github.com/meshtrade/api/go/trading/limit_order/v1;limitorderv1'
35
35
  _globals['_LIMITORDER']._serialized_start=88
36
36
  _globals['_LIMITORDER']._serialized_end=124
37
37
  # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,4 @@
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
+
@@ -0,0 +1,151 @@
1
+ # Code generated by protoc-gen-meshpy. DO NOT EDIT.
2
+ # source: meshtrade/trading/limit_order/v1/service.proto
3
+
4
+ """
5
+ LimitOrderService gRPC service wrapper with authentication, timeouts, and resource management.
6
+
7
+ This module provides a high-level gRPC service for the LimitOrderService 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
+ GetLimitOrderRequest,
21
+ LimitOrder,
22
+ )
23
+ from .service_pb2_grpc import LimitOrderServiceStub
24
+
25
+
26
+ def _create_limitorderservice_stub(channel):
27
+ """Factory function to create LimitOrderServiceStub from gRPC channel."""
28
+ return LimitOrderServiceStub(channel)
29
+
30
+
31
+ class LimitOrderService(BaseGRPCClient):
32
+ """LimitOrderService gRPC service with authentication, timeouts, and resource management.
33
+
34
+ This service provides a complete implementation of the LimitOrderService with proper authentication, timeout handling, and automatic resource cleanup.
35
+
36
+ Full Service documentation: https://meshtrade.github.io/api/docs/api-reference/trading/limit_order/v1
37
+
38
+ Basic service usage with default SDK Configuration:
39
+ ```python
40
+ service = LimitOrderService()
41
+
42
+ with service: # `with` ensures proper clean up of underlying connection after use
43
+ response = service.get_api_user(request)
44
+ ```
45
+
46
+ With default configuration API credentials are searched for using the standard discovery hierarchy:
47
+
48
+ 1. MESH_API_CREDENTIALS environment variable
49
+
50
+ 2. Default credential file location:
51
+
52
+ - Linux: `$XDG_CONFIG_HOME/mesh/credentials.json` or fallback to `$HOME/.config/mesh/credentials.json`
53
+ - macOS: `$HOME/Library/Application Support/mesh/credentials.json`
54
+ - Windows: `C:\\Users\\<user>\\AppData\\Roaming\\mesh\\credentials.json`
55
+
56
+ For more information on authentication: https://meshtrade.github.io/api/docs/architecture/authentication
57
+
58
+ The service may also be configured with custom options:
59
+ ```python
60
+ from .service_options_meshpy import ServiceOptions
61
+ from datetime import timedelta
62
+
63
+ options = ServiceOptions(
64
+ url="api.staging.example.com",
65
+ port=443,
66
+ api_key="your-api-key",
67
+ group="groups/your-group-id",
68
+ timeout=timedelta(seconds=60)
69
+ )
70
+
71
+ service = LimitOrderService(options)
72
+
73
+ with service: # `with` ensures proper clean up of underlying connection after use
74
+ response = service.get_api_user(request)
75
+ ```
76
+
77
+ For more information on service configuration: https://meshtrade.github.io/api/docs/architecture/sdk-configuration
78
+ """
79
+
80
+ def __init__(self, options: Optional[ServiceOptions] = None):
81
+ """Construct and initialize the LimitOrderService service.
82
+
83
+ Full Service documentation: https://meshtrade.github.io/api/docs/api-reference/trading/limit_order/v1
84
+
85
+ Args:
86
+ options: Optional ServiceOptions for configuring the service.
87
+ If None, service is constructed with default configuration.
88
+ With default configuration API credentials are searched for using the standard discovery hierarchy:
89
+
90
+ 1. MESH_API_CREDENTIALS environment variable
91
+
92
+ 2. Default credential file location:
93
+
94
+ - Linux: `$XDG_CONFIG_HOME/mesh/credentials.json` or fallback to `$HOME/.config/mesh/credentials.json`
95
+ - macOS: `$HOME/Library/Application Support/mesh/credentials.json`
96
+ - Windows: `C:\\Users\\<user>\\AppData\\Roaming\\mesh\\credentials.json`
97
+
98
+ For more information on authentication: https://meshtrade.github.io/api/docs/architecture/authentication
99
+
100
+ For more information on service configuration: https://meshtrade.github.io/api/docs/architecture/sdk-configuration
101
+
102
+ Example:
103
+ ```python
104
+ # construct with default configuration
105
+ service = LimitOrderService()
106
+
107
+ # construct with custom configuration
108
+ options = ServiceOptions(
109
+ url="api.example.com",
110
+ api_key="your-key",
111
+ group="groups/your-group"
112
+ )
113
+ service = LimitOrderService(options)
114
+ ```
115
+ """
116
+ if options is None:
117
+ options = ServiceOptions()
118
+
119
+ # Initialize the base client with all common functionality
120
+ super().__init__(
121
+ service_name="LimitOrderService",
122
+ stub_factory=_create_limitorderservice_stub,
123
+ find_credentials_func=find_credentials,
124
+ url=options.url,
125
+ port=options.port,
126
+ api_key=options.api_key,
127
+ group=options.group,
128
+ timeout=options.timeout,
129
+ tls=options.tls,
130
+ )
131
+
132
+ def get_limit_order(self, request: GetLimitOrderRequest, timeout: Optional[timedelta] = None) -> LimitOrder:
133
+ """GetLimitOrder method.
134
+
135
+ Args:
136
+ request: The GetLimitOrder request message
137
+ timeout: Optional timeout override for this call
138
+
139
+ Returns:
140
+ The GetLimitOrder response message
141
+
142
+ Raises:
143
+ grpc.RpcError: If the gRPC call fails
144
+ ValueError: If authentication credentials are missing
145
+ """
146
+ return self._execute_method("GetLimitOrder", request, timeout)
147
+
148
+
149
+ # Create aliases to match expected exports
150
+ LimitOrderServiceGRPCClient = LimitOrderService
151
+ LimitOrderServiceGRPCClientInterface = LimitOrderService
@@ -0,0 +1,65 @@
1
+ # Code generated by protoc-gen-meshpy. DO NOT EDIT.
2
+ # source: meshtrade/trading/limit_order/v1/service.proto
3
+
4
+ """
5
+ Configuration options for LimitOrderService 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 LimitOrderService 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
@@ -22,19 +22,23 @@ _runtime_version.ValidateProtobufRuntimeVersion(
22
22
  _sym_db = _symbol_database.Default()
23
23
 
24
24
 
25
+ from meshtrade.iam.role.v1 import role_pb2 as meshtrade_dot_iam_dot_role_dot_v1_dot_role__pb2
26
+ from meshtrade.option.v1 import method_type_pb2 as meshtrade_dot_option_dot_v1_dot_method__type__pb2
25
27
  from meshtrade.trading.limit_order.v1 import limit_order_pb2 as meshtrade_dot_trading_dot_limit__order_dot_v1_dot_limit__order__pb2
26
28
 
27
29
 
28
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n.meshtrade/trading/limit_order/v1/service.proto\x12 meshtrade.trading.limit_order.v1\x1a\x32meshtrade/trading/limit_order/v1/limit_order.proto\".\n\x14GetLimitOrderRequest\x12\x16\n\x06number\x18\x01 \x01(\tR\x06number2\x8a\x01\n\x11LimitOrderService\x12u\n\rGetLimitOrder\x12\x36.meshtrade.trading.limit_order.v1.GetLimitOrderRequest\x1a,.meshtrade.trading.limit_order.v1.LimitOrderBAZ?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\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')
29
31
 
30
32
  _globals = globals()
31
33
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
32
34
  _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtrade.trading.limit_order.v1.service_pb2', _globals)
33
35
  if not _descriptor._USE_C_DESCRIPTORS:
34
36
  _globals['DESCRIPTOR']._loaded_options = None
35
- _globals['DESCRIPTOR']._serialized_options = b'Z?github.com/meshtrade/api/go/trading/limit_order/v1;limitorderv1'
36
- _globals['_GETLIMITORDERREQUEST']._serialized_start=136
37
- _globals['_GETLIMITORDERREQUEST']._serialized_end=182
38
- _globals['_LIMITORDERSERVICE']._serialized_start=185
39
- _globals['_LIMITORDERSERVICE']._serialized_end=323
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
+ _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'
40
+ _globals['_GETLIMITORDERREQUEST']._serialized_start=209
41
+ _globals['_GETLIMITORDERREQUEST']._serialized_end=255
42
+ _globals['_LIMITORDERSERVICE']._serialized_start=258
43
+ _globals['_LIMITORDERSERVICE']._serialized_end=411
40
44
  # @@protoc_insertion_point(module_scope)
@@ -1,3 +1,5 @@
1
+ from meshtrade.iam.role.v1 import role_pb2 as _role_pb2
2
+ from meshtrade.option.v1 import method_type_pb2 as _method_type_pb2
1
3
  from meshtrade.trading.limit_order.v1 import limit_order_pb2 as _limit_order_pb2
2
4
  from google.protobuf import descriptor as _descriptor
3
5
  from google.protobuf import message as _message
@@ -0,0 +1,78 @@
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.trading.limit_order.v1 import limit_order_pb2 as meshtrade_dot_trading_dot_limit__order_dot_v1_dot_limit__order__pb2
6
+ from meshtrade.trading.limit_order.v1 import service_pb2 as meshtrade_dot_trading_dot_limit__order_dot_v1_dot_service__pb2
7
+
8
+
9
+ class LimitOrderServiceStub(object):
10
+ """Missing associated documentation comment in .proto file."""
11
+
12
+ def __init__(self, channel):
13
+ """Constructor.
14
+
15
+ Args:
16
+ channel: A grpc.Channel.
17
+ """
18
+ self.GetLimitOrder = channel.unary_unary(
19
+ '/meshtrade.trading.limit_order.v1.LimitOrderService/GetLimitOrder',
20
+ request_serializer=meshtrade_dot_trading_dot_limit__order_dot_v1_dot_service__pb2.GetLimitOrderRequest.SerializeToString,
21
+ response_deserializer=meshtrade_dot_trading_dot_limit__order_dot_v1_dot_limit__order__pb2.LimitOrder.FromString,
22
+ _registered_method=True)
23
+
24
+
25
+ class LimitOrderServiceServicer(object):
26
+ """Missing associated documentation comment in .proto file."""
27
+
28
+ def GetLimitOrder(self, request, context):
29
+ """Missing associated documentation comment in .proto file."""
30
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
31
+ context.set_details('Method not implemented!')
32
+ raise NotImplementedError('Method not implemented!')
33
+
34
+
35
+ def add_LimitOrderServiceServicer_to_server(servicer, server):
36
+ rpc_method_handlers = {
37
+ 'GetLimitOrder': grpc.unary_unary_rpc_method_handler(
38
+ servicer.GetLimitOrder,
39
+ request_deserializer=meshtrade_dot_trading_dot_limit__order_dot_v1_dot_service__pb2.GetLimitOrderRequest.FromString,
40
+ response_serializer=meshtrade_dot_trading_dot_limit__order_dot_v1_dot_limit__order__pb2.LimitOrder.SerializeToString,
41
+ ),
42
+ }
43
+ generic_handler = grpc.method_handlers_generic_handler(
44
+ 'meshtrade.trading.limit_order.v1.LimitOrderService', rpc_method_handlers)
45
+ server.add_generic_rpc_handlers((generic_handler,))
46
+ server.add_registered_method_handlers('meshtrade.trading.limit_order.v1.LimitOrderService', rpc_method_handlers)
47
+
48
+
49
+ # This class is part of an EXPERIMENTAL API.
50
+ class LimitOrderService(object):
51
+ """Missing associated documentation comment in .proto file."""
52
+
53
+ @staticmethod
54
+ def GetLimitOrder(request,
55
+ target,
56
+ options=(),
57
+ channel_credentials=None,
58
+ call_credentials=None,
59
+ insecure=False,
60
+ compression=None,
61
+ wait_for_ready=None,
62
+ timeout=None,
63
+ metadata=None):
64
+ return grpc.experimental.unary_unary(
65
+ request,
66
+ target,
67
+ '/meshtrade.trading.limit_order.v1.LimitOrderService/GetLimitOrder',
68
+ meshtrade_dot_trading_dot_limit__order_dot_v1_dot_service__pb2.GetLimitOrderRequest.SerializeToString,
69
+ meshtrade_dot_trading_dot_limit__order_dot_v1_dot_limit__order__pb2.LimitOrder.FromString,
70
+ options,
71
+ channel_credentials,
72
+ insecure,
73
+ call_credentials,
74
+ compression,
75
+ wait_for_ready,
76
+ timeout,
77
+ metadata,
78
+ _registered_method=True)
@@ -0,0 +1,53 @@
1
+ """Market Order v1 package."""
2
+
3
+ # ===================================================================
4
+ # AUTO-GENERATED SECTION - ONLY EDIT BELOW THE CLOSING COMMENT BLOCK
5
+ # ===================================================================
6
+ # This section is automatically managed by protoc-gen-meshpy.
7
+ #
8
+ # DO NOT EDIT ANYTHING IN THIS SECTION MANUALLY!
9
+ # Your changes will be overwritten during code generation.
10
+ #
11
+ # To add custom imports and exports, scroll down to the
12
+ # "MANUAL SECTION" indicated below.
13
+ # ===================================================================
14
+
15
+ # Generated protobuf imports
16
+ from .market_order_pb2 import MarketOrder
17
+ from .service_pb2 import GetMarketOrderRequest
18
+
19
+ # Generated service imports
20
+ from .service_meshpy import (
21
+ MarketOrderService,
22
+ MarketOrderServiceGRPCClient,
23
+ MarketOrderServiceGRPCClientInterface,
24
+ )
25
+ from .service_options_meshpy import ClientOptions
26
+
27
+ # ===================================================================
28
+ # END OF AUTO-GENERATED SECTION
29
+ # ===================================================================
30
+ #
31
+ # MANUAL SECTION - ADD YOUR CUSTOM IMPORTS AND EXPORTS BELOW
32
+ #
33
+ # You can safely add your own imports, functions, classes, and exports
34
+ # in this section. They will be preserved across code generation.
35
+ #
36
+ # Example:
37
+ # from my_custom_module import my_function
38
+ #
39
+ # ===================================================================
40
+
41
+ # ===================================================================
42
+ # MODULE EXPORTS
43
+ # ===================================================================
44
+ # Combined auto-generated and manual exports
45
+ __all__ = [
46
+ # Generated exports
47
+ "ClientOptions",
48
+ "GetMarketOrderRequest",
49
+ "MarketOrder",
50
+ "MarketOrderService",
51
+ "MarketOrderServiceGRPCClient",
52
+ "MarketOrderServiceGRPCClientInterface",
53
+ ]
@@ -1,7 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
3
3
  # NO CHECKED-IN PROTOBUF GENCODE
4
- # source: meshtrade/trading/direct_order/v1/direct_order.proto
4
+ # source: meshtrade/trading/market_order/v1/market_order.proto
5
5
  # Protobuf Python Version: 6.31.1
6
6
  """Generated protocol buffer code."""
7
7
  from google.protobuf import descriptor as _descriptor
@@ -15,7 +15,7 @@ _runtime_version.ValidateProtobufRuntimeVersion(
15
15
  31,
16
16
  1,
17
17
  '',
18
- 'meshtrade/trading/direct_order/v1/direct_order.proto'
18
+ 'meshtrade/trading/market_order/v1/market_order.proto'
19
19
  )
20
20
  # @@protoc_insertion_point(imports)
21
21
 
@@ -24,14 +24,14 @@ _sym_db = _symbol_database.Default()
24
24
 
25
25
 
26
26
 
27
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n4meshtrade/trading/direct_order/v1/direct_order.proto\x12!meshtrade.trading.direct_order.v1\"%\n\x0b\x44irectOrder\x12\x16\n\x06number\x18\x01 \x01(\tR\x06numberBCZAgithub.com/meshtrade/api/go/trading/direct_order/v1;directorderv1b\x06proto3')
27
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n4meshtrade/trading/market_order/v1/market_order.proto\x12!meshtrade.trading.market_order.v1\"%\n\x0bMarketOrder\x12\x16\n\x06number\x18\x01 \x01(\tR\x06numberBn\n(co.meshtrade.api.trading.market_order.v1ZBgithub.com/meshtrade/api/go/trading/market_order/v1;market_orderv1b\x06proto3')
28
28
 
29
29
  _globals = globals()
30
30
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
31
- _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtrade.trading.direct_order.v1.direct_order_pb2', _globals)
31
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtrade.trading.market_order.v1.market_order_pb2', _globals)
32
32
  if not _descriptor._USE_C_DESCRIPTORS:
33
33
  _globals['DESCRIPTOR']._loaded_options = None
34
- _globals['DESCRIPTOR']._serialized_options = b'ZAgithub.com/meshtrade/api/go/trading/direct_order/v1;directorderv1'
35
- _globals['_DIRECTORDER']._serialized_start=91
36
- _globals['_DIRECTORDER']._serialized_end=128
34
+ _globals['DESCRIPTOR']._serialized_options = b'\n(co.meshtrade.api.trading.market_order.v1ZBgithub.com/meshtrade/api/go/trading/market_order/v1;market_orderv1'
35
+ _globals['_MARKETORDER']._serialized_start=91
36
+ _globals['_MARKETORDER']._serialized_end=128
37
37
  # @@protoc_insertion_point(module_scope)
@@ -4,7 +4,7 @@ from typing import ClassVar as _ClassVar, Optional as _Optional
4
4
 
5
5
  DESCRIPTOR: _descriptor.FileDescriptor
6
6
 
7
- class Spot(_message.Message):
7
+ class MarketOrder(_message.Message):
8
8
  __slots__ = ("number",)
9
9
  NUMBER_FIELD_NUMBER: _ClassVar[int]
10
10
  number: str
@@ -0,0 +1,4 @@
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
+