exchanges-wrapper 1.2.9.post1__tar.gz → 1.2.10__tar.gz

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.
Files changed (29) hide show
  1. {exchanges-wrapper-1.2.9.post1 → exchanges-wrapper-1.2.10}/CHANGELOG.md +21 -0
  2. {exchanges-wrapper-1.2.9.post1 → exchanges-wrapper-1.2.10}/PKG-INFO +7 -5
  3. {exchanges-wrapper-1.2.9.post1 → exchanges-wrapper-1.2.10}/README.md +2 -1
  4. {exchanges-wrapper-1.2.9.post1 → exchanges-wrapper-1.2.10}/example/exch_client.py +47 -2
  5. {exchanges-wrapper-1.2.9.post1 → exchanges-wrapper-1.2.10}/example/ms_cfg.toml +0 -3
  6. {exchanges-wrapper-1.2.9.post1 → exchanges-wrapper-1.2.10}/exchanges_wrapper/__init__.py +6 -6
  7. {exchanges-wrapper-1.2.9.post1 → exchanges-wrapper-1.2.10}/exchanges_wrapper/api_pb2.py +74 -74
  8. {exchanges-wrapper-1.2.9.post1 → exchanges-wrapper-1.2.10}/exchanges_wrapper/api_pb2_grpc.py +33 -0
  9. {exchanges-wrapper-1.2.9.post1 → exchanges-wrapper-1.2.10}/exchanges_wrapper/bitfinex_parser.py +0 -2
  10. {exchanges-wrapper-1.2.9.post1 → exchanges-wrapper-1.2.10}/exchanges_wrapper/c_structures.py +58 -3
  11. {exchanges-wrapper-1.2.9.post1 → exchanges-wrapper-1.2.10}/exchanges_wrapper/client.py +91 -55
  12. {exchanges-wrapper-1.2.9.post1 → exchanges-wrapper-1.2.10}/exchanges_wrapper/definitions.py +0 -3
  13. {exchanges-wrapper-1.2.9.post1 → exchanges-wrapper-1.2.10}/exchanges_wrapper/errors.py +0 -3
  14. {exchanges-wrapper-1.2.9.post1 → exchanges-wrapper-1.2.10}/exchanges_wrapper/events.py +0 -3
  15. {exchanges-wrapper-1.2.9.post1 → exchanges-wrapper-1.2.10}/exchanges_wrapper/exch_srv.py +51 -19
  16. {exchanges-wrapper-1.2.9.post1 → exchanges-wrapper-1.2.10}/exchanges_wrapper/exch_srv_cfg.toml.template +26 -9
  17. {exchanges-wrapper-1.2.9.post1 → exchanges-wrapper-1.2.10}/exchanges_wrapper/http_client.py +12 -19
  18. {exchanges-wrapper-1.2.9.post1 → exchanges-wrapper-1.2.10}/exchanges_wrapper/huobi_parser.py +0 -2
  19. {exchanges-wrapper-1.2.9.post1 → exchanges-wrapper-1.2.10}/exchanges_wrapper/okx_parser.py +0 -5
  20. {exchanges-wrapper-1.2.9.post1 → exchanges-wrapper-1.2.10}/exchanges_wrapper/proto/exchanges_wrapper/api.proto +3 -0
  21. {exchanges-wrapper-1.2.9.post1 → exchanges-wrapper-1.2.10}/exchanges_wrapper/web_sockets.py +20 -80
  22. {exchanges-wrapper-1.2.9.post1 → exchanges-wrapper-1.2.10}/pyproject.toml +3 -2
  23. {exchanges-wrapper-1.2.9.post1 → exchanges-wrapper-1.2.10}/requirements.txt +3 -2
  24. {exchanges-wrapper-1.2.9.post1 → exchanges-wrapper-1.2.10}/.deepsource.toml +0 -0
  25. {exchanges-wrapper-1.2.9.post1 → exchanges-wrapper-1.2.10}/.dockerignore +0 -0
  26. {exchanges-wrapper-1.2.9.post1 → exchanges-wrapper-1.2.10}/.github/FUNDING.yml +0 -0
  27. {exchanges-wrapper-1.2.9.post1 → exchanges-wrapper-1.2.10}/.github/dependabot.yml +0 -0
  28. {exchanges-wrapper-1.2.9.post1 → exchanges-wrapper-1.2.10}/Dockerfile +0 -0
  29. {exchanges-wrapper-1.2.9.post1 → exchanges-wrapper-1.2.10}/LICENSE.md +0 -0
@@ -1,3 +1,24 @@
1
+ ## v1.2.10 - 2023-02-22
2
+ ### Added for new features
3
+ * Add method TransferToMaster():
4
+
5
+ >Send request to transfer asset from subaccount to main account
6
+ Binance, OKX: not additional settings needed
7
+ Bitfinex: for subaccount setting 2FA method, set WITHDRAWAL permission for API key,
8
+ in config for subaccount set 2FA key and master account EMail
9
+ Huobi: in config for subaccount set master_name for Main account
10
+
11
+ ### Update
12
+ * Up requirements aiohttp to 3.8.4
13
+ * Some minor improvements
14
+
15
+ ## v1.2.9-2 - 2023-02-04
16
+ ### Fixed
17
+ * Fix DogsTailFarmer/martin-binance#50
18
+
19
+ ### Update
20
+ * Remove unnecessary shebang
21
+
1
22
  ## v1.2.9-1 - 2023-01-23
2
23
  ### Update
3
24
  * Additional check for order status if its can't place during timeout period for avoid place duplicate order
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: exchanges-wrapper
3
- Version: 1.2.9.post1
4
- Summary: REST API and WebSocket asyncio wrapper with grpc powered multiplexer server for crypto exchanges
3
+ Version: 1.2.10
4
+ Summary: REST API and WebSocket asyncio wrapper with grpc powered multiplexer server
5
5
  Author-email: Thomas Marchand <thomas.marchand@tuta.io>, Jerry Fedorenko <jerry.fedorenko@yahoo.com>
6
6
  Requires-Python: >=3.8
7
7
  Description-Content-Type: text/markdown
@@ -11,11 +11,12 @@ Classifier: License :: OSI Approved :: MIT License
11
11
  Classifier: Operating System :: Unix
12
12
  Classifier: Operating System :: Microsoft :: Windows
13
13
  Classifier: Operating System :: MacOS
14
- Requires-Dist: aiohttp==3.8.1
14
+ Requires-Dist: aiohttp==3.8.4
15
15
  Requires-Dist: grpcio==1.48.1
16
16
  Requires-Dist: grpcio-tools==1.48.1
17
17
  Requires-Dist: toml==0.10.2
18
- Requires-Dist: idna==3.3
18
+ Requires-Dist: idna==3.4
19
+ Requires-Dist: pyotp~=2.8.0
19
20
  Project-URL: Source, https://github.com/DogsTailFarmer/exchanges-wrapper
20
21
 
21
22
 
@@ -36,10 +37,11 @@ Project-URL: Source, https://github.com/DogsTailFarmer/exchanges-wrapper
36
37
  <a href="https://sonarcloud.io/summary/new_code?id=DogsTailFarmer_exchanges-wrapper" target="_blank"><img alt="sonarcloud" title="sonarcloud" src="https://sonarcloud.io/api/project_badges/measure?project=DogsTailFarmer_exchanges-wrapper&metric=alert_status"/></a>
37
38
  <a href="https://pepy.tech/project/exchanges-wrapper" target="_blank"><img alt="Downloads" title="Downloads" src="https://pepy.tech/badge/exchanges-wrapper/month"/></a>
38
39
  ***
40
+ From 1.2.10 update exch_srv_cfg.toml (see CHANGELOG for details)
39
41
  ***
40
42
 
41
43
  ## exchanges-wrapper vs binance.py
42
- The main difference is the development of the project for trading with many exchanges, including DeFi platforms shortly.
44
+ The main difference is the development of the project for trading with many exchanges.
43
45
 
44
46
  Next is adding a new module ```exchanges_wrapper/exch_srv.py``` as a multiplexer layer, providing simultaneous async interaction for many accounts
45
47
  and many trading pairs through one connection. It's powered by [gRPC](https://grpc.io/about/)
@@ -16,10 +16,11 @@
16
16
  <a href="https://sonarcloud.io/summary/new_code?id=DogsTailFarmer_exchanges-wrapper" target="_blank"><img alt="sonarcloud" title="sonarcloud" src="https://sonarcloud.io/api/project_badges/measure?project=DogsTailFarmer_exchanges-wrapper&metric=alert_status"/></a>
17
17
  <a href="https://pepy.tech/project/exchanges-wrapper" target="_blank"><img alt="Downloads" title="Downloads" src="https://pepy.tech/badge/exchanges-wrapper/month"/></a>
18
18
  ***
19
+ From 1.2.10 update exch_srv_cfg.toml (see CHANGELOG for details)
19
20
  ***
20
21
 
21
22
  ## exchanges-wrapper vs binance.py
22
- The main difference is the development of the project for trading with many exchanges, including DeFi platforms shortly.
23
+ The main difference is the development of the project for trading with many exchanges.
23
24
 
24
25
  Next is adding a new module ```exchanges_wrapper/exch_srv.py``` as a multiplexer layer, providing simultaneous async interaction for many accounts
25
26
  and many trading pairs through one connection. It's powered by [gRPC](https://grpc.io/about/)
@@ -1,4 +1,4 @@
1
- #!/usr/bin/python3.8
1
+ #!/usr/bin/env python3
2
2
  # -*- coding: utf-8 -*-
3
3
  """
4
4
  Client example for exchanges-wrapper, examples of use of server methods are given
@@ -127,6 +127,22 @@ async def on_order_update(_stub, _client_id, _symbol, trade_id):
127
127
  f"client_order_id: {event.client_order_id}")
128
128
 
129
129
 
130
+ async def on_balance_update(_stub, _client_id, _symbol, trade_id):
131
+ """
132
+ Get data when asset transferred or withdrawal from account
133
+ :param _stub:
134
+ :param _client_id:
135
+ :param _symbol:
136
+ :param trade_id:
137
+ :return:
138
+ """
139
+ async for res in _stub.OnBalanceUpdate(api_pb2.MarketRequest(
140
+ trade_id=trade_id,
141
+ client_id=_client_id,
142
+ symbol=_symbol)):
143
+ print(res.balance)
144
+
145
+
130
146
  async def fetch_open_orders(_stub, _client_id, _symbol):
131
147
  """
132
148
  Get all open orders on a symbol.
@@ -306,6 +322,35 @@ async def fetch_account_trade_list(_stub, _client_id, _symbol, _limit, _start_ti
306
322
  print(f"fetch_account_trade_list.trades: {trades}")
307
323
 
308
324
 
325
+ # noinspection PyUnresolvedReferences
326
+ async def transfer2master(_stub, symbol: str, amount: str):
327
+ """
328
+ Send request to transfer asset from subaccount to main account
329
+ Binance, OKX: not additional settings needed
330
+ Bitfinex: for subaccount setting 2FA method, set WITHDRAWAL permission for API key,
331
+ in config for subaccount set 2FA key and master account EMail
332
+ Huobi: in config for subaccount set master_name for Main account
333
+ :param _stub:
334
+ :param symbol:
335
+ :param amount:
336
+ :return:
337
+ """
338
+ try:
339
+ res = await _stub.TransferToMaster(api_pb2.MarketRequest, symbol=symbol, amount=amount)
340
+ except asyncio.CancelledError:
341
+ pass # Task cancellation should not be logged as an error
342
+ except grpc.RpcError as ex:
343
+ status_code = ex.code()
344
+ print(f"Exception transfer {symbol} to main account: {status_code.name}, {ex.details()}")
345
+ except Exception as _ex:
346
+ print(f"Exception transfer {symbol} to main account: {_ex}")
347
+ else:
348
+ if res.success:
349
+ print(f"Sent {amount} {symbol} to main account")
350
+ else:
351
+ print(f"Not sent {amount} {symbol} to main account\n,{res.result}")
352
+
353
+
309
354
  # Server exception handling example for methods where it's realized
310
355
  # noinspection PyUnresolvedReferences
311
356
  async def create_limit_order(_stub, _client_id, _symbol, _id: int, buy: bool, amount: str, price: str):
@@ -314,7 +359,7 @@ async def create_limit_order(_stub, _client_id, _symbol, _id: int, buy: bool, am
314
359
  :param _stub:
315
360
  :param _client_id:
316
361
  :param _symbol:
317
- :param _id: A unique id among open orders. Automatically generated if not sent.
362
+ :param _id: A unique id among open orders. Automatically generated if not sent
318
363
  :param buy: True id BUY_side else False
319
364
  :param amount: Base asset quantity
320
365
  :param price:
@@ -1,6 +1,3 @@
1
1
  # Example parameters for exchanges_wrapper/exch_client.py
2
2
  # Accounts name wold be identically accounts.name from exch_srv_cfg.toml
3
3
  exchange = "Demo - Binance"
4
- # exchange = "Binance"
5
- # exchange = "FTX"
6
- # exchange = "FTX_sub_01"
@@ -1,10 +1,10 @@
1
- #!/usr/bin/python3
1
+ #!/usr/bin/env python3
2
2
  # -*- coding: utf-8 -*-
3
3
  """
4
- REST API and WebSocket asyncio wrapper with grpc powered multiplexer server for crypto exchanges
5
- (Binance, FTX, Bitfinex,)
6
- Utilizes one connection for many accounts and trading pairs.
7
- For SPOT market only
4
+ REST API and WebSocket asyncio wrapper with grpc powered multiplexer server
5
+ for crypto exchanges (Binance, Bitfinex, OKX, Huobi,)
6
+ Utilizes one connection for many accounts and trading pairs.
7
+ For SPOT market only
8
8
  """
9
9
  __authors__ = ["Th0rgal", "Jerry Fedorenko"]
10
10
  __license__ = "MIT"
@@ -12,7 +12,7 @@ __maintainer__ = "Jerry Fedorenko"
12
12
  __contact__ = "https://github.com/DogsTailFarmer"
13
13
  __email__ = "jerry.fedorenko@yahoo.com"
14
14
  __credits__ = ["https://github.com/DanyaSWorlD"]
15
- __version__ = "1.2.9-1"
15
+ __version__ = "1.2.10"
16
16
 
17
17
  from pathlib import Path
18
18
  import shutil
@@ -14,7 +14,7 @@ _sym_db = _symbol_database.Default()
14
14
 
15
15
 
16
16
 
17
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1b\x65xchanges_wrapper/api.proto\x12\x06martin\"*\n\x17OnBalanceUpdateResponse\x12\x0f\n\x07\x62\x61lance\x18\x01 \x01(\t\"\x83\x01\n\x19\x46\x65tchFundingWalletRequest\x12\x11\n\tclient_id\x18\x01 \x01(\x03\x12\x10\n\x08trade_id\x18\x02 \x01(\t\x12\r\n\x05\x61sset\x18\x03 \x01(\t\x12\x1a\n\x12need_btc_valuation\x18\x04 \x01(\x08\x12\x16\n\x0ereceive_window\x18\x05 \x01(\x03\"\xd0\x01\n\x1a\x46\x65tchFundingWalletResponse\x12=\n\x08\x62\x61lances\x18\x01 \x03(\x0b\x32+.martin.FetchFundingWalletResponse.Balances\x1as\n\x08\x42\x61lances\x12\r\n\x05\x61sset\x18\x01 \x01(\t\x12\x0c\n\x04\x66ree\x18\x02 \x01(\t\x12\x0e\n\x06locked\x18\x03 \x01(\t\x12\x0e\n\x06\x66reeze\x18\x04 \x01(\t\x12\x13\n\x0bwithdrawing\x18\x05 \x01(\t\x12\x15\n\rbtc_valuation\x18\x06 \x01(\t\"\xc7\x02\n\x13\x43\x61ncelOrderResponse\x12\x0e\n\x06symbol\x18\x01 \x01(\t\x12\x19\n\x11origClientOrderId\x18\x02 \x01(\t\x12\x0f\n\x07orderId\x18\x03 \x01(\x04\x12\x13\n\x0borderListId\x18\x04 \x01(\x05\x12\x15\n\rclientOrderId\x18\x05 \x01(\t\x12\x14\n\x0ctransactTime\x18\x06 \x01(\x04\x12\r\n\x05price\x18\x07 \x01(\t\x12\x0f\n\x07origQty\x18\x08 \x01(\t\x12\x13\n\x0b\x65xecutedQty\x18\t \x01(\t\x12\x1b\n\x13\x63ummulativeQuoteQty\x18\n \x01(\t\x12\x0e\n\x06status\x18\x0b \x01(\t\x12\x13\n\x0btimeInForce\x18\x0c \x01(\t\x12\x0c\n\x04type\x18\r \x01(\t\x12\x0c\n\x04side\x18\x0e \x01(\t\x12\x1f\n\x17selfTradePreventionMode\x18\x0f \x01(\t\"[\n\x12\x43\x61ncelOrderRequest\x12\x11\n\tclient_id\x18\x01 \x01(\x03\x12\x10\n\x08trade_id\x18\x02 \x01(\t\x12\x0e\n\x06symbol\x18\x03 \x01(\t\x12\x10\n\x08order_id\x18\x04 \x01(\x03\"\xf0\x02\n\x18\x43reateLimitOrderResponse\x12\x0e\n\x06symbol\x18\x01 \x01(\t\x12\x0f\n\x07orderId\x18\x02 \x01(\x04\x12\x13\n\x0borderListId\x18\x03 \x01(\x11\x12\x15\n\rclientOrderId\x18\x04 \x01(\t\x12\x14\n\x0ctransactTime\x18\x05 \x01(\x04\x12\r\n\x05price\x18\x06 \x01(\t\x12\x0f\n\x07origQty\x18\x07 \x01(\t\x12\x13\n\x0b\x65xecutedQty\x18\x08 \x01(\t\x12\x1b\n\x13\x63ummulativeQuoteQty\x18\t \x01(\t\x12\x0e\n\x06status\x18\n \x01(\t\x12\x13\n\x0btimeInForce\x18\x0b \x01(\t\x12\x0c\n\x04type\x18\x0c \x01(\t\x12\x0c\n\x04side\x18\r \x01(\t\x12\x12\n\nstrategyId\x18\x0e \x01(\x04\x12\x14\n\x0cstrategyType\x18\x0f \x01(\x04\x12\x13\n\x0bworkingTime\x18\x10 \x01(\x12\x12\x1f\n\x17selfTradePreventionMode\x18\x11 \x01(\t\"\x9e\x01\n\x17\x43reateLimitOrderRequest\x12\x11\n\tclient_id\x18\x01 \x01(\x03\x12\x10\n\x08trade_id\x18\x02 \x01(\t\x12\x0e\n\x06symbol\x18\x03 \x01(\t\x12\x10\n\x08\x62uy_side\x18\x04 \x01(\x08\x12\x10\n\x08quantity\x18\x05 \x01(\t\x12\r\n\x05price\x18\x06 \x01(\t\x12\x1b\n\x13new_client_order_id\x18\x07 \x01(\x03\"\xf8\x05\n\x15OnOrderUpdateResponse\x12\x0e\n\x06symbol\x18\x01 \x01(\t\x12\x17\n\x0f\x63lient_order_id\x18\x02 \x01(\t\x12\x0c\n\x04side\x18\x03 \x01(\t\x12\x12\n\norder_type\x18\x04 \x01(\t\x12\x15\n\rtime_in_force\x18\x05 \x01(\t\x12\x16\n\x0eorder_quantity\x18\x06 \x01(\t\x12\x13\n\x0border_price\x18\x07 \x01(\t\x12\x12\n\nstop_price\x18\x08 \x01(\t\x12\x18\n\x10iceberg_quantity\x18\t \x01(\t\x12\x15\n\rorder_list_id\x18\n \x01(\x11\x12\x1a\n\x12original_client_id\x18\x0b \x01(\t\x12\x16\n\x0e\x65xecution_type\x18\x0c \x01(\t\x12\x14\n\x0corder_status\x18\r \x01(\t\x12\x1b\n\x13order_reject_reason\x18\x0e \x01(\t\x12\x10\n\x08order_id\x18\x0f \x01(\x04\x12\x1e\n\x16last_executed_quantity\x18\x10 \x01(\t\x12\"\n\x1a\x63umulative_filled_quantity\x18\x11 \x01(\t\x12\x1b\n\x13last_executed_price\x18\x12 \x01(\t\x12\x19\n\x11\x63ommission_amount\x18\x13 \x01(\t\x12\x18\n\x10\x63ommission_asset\x18\x14 \x01(\t\x12\x18\n\x10transaction_time\x18\x15 \x01(\x04\x12\x10\n\x08trade_id\x18\x16 \x01(\x12\x12\x10\n\x08ignore_a\x18\x17 \x01(\x04\x12\x15\n\rin_order_book\x18\x18 \x01(\x08\x12\x15\n\ris_maker_side\x18\x19 \x01(\x08\x12\x10\n\x08ignore_b\x18\x1a \x01(\x08\x12\x1b\n\x13order_creation_time\x18\x1b \x01(\x04\x12\x1e\n\x16quote_asset_transacted\x18\x1c \x01(\t\x12#\n\x1blast_quote_asset_transacted\x18\x1d \x01(\t\x12\x1c\n\x14quote_order_quantity\x18\x1e \x01(\t\"&\n\x15OnFundsUpdateResponse\x12\r\n\x05\x66unds\x18\x01 \x01(\t\"t\n\x14OnFundsUpdateRequest\x12\x11\n\tclient_id\x18\x01 \x01(\x03\x12\x10\n\x08trade_id\x18\x02 \x01(\t\x12\x0e\n\x06symbol\x18\x03 \x01(\t\x12\x12\n\nbase_asset\x18\x04 \x01(\t\x12\x13\n\x0bquote_asset\x18\x05 \x01(\t\"!\n\x0eSimpleResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\"e\n\x16OnTickerUpdateResponse\x12\x0e\n\x06symbol\x18\x01 \x01(\t\x12\x12\n\nopen_price\x18\x02 \x01(\t\x12\x13\n\x0b\x63lose_price\x18\x03 \x01(\t\x12\x12\n\nevent_time\x18\x04 \x01(\x04\"\xbd\x02\n\x18\x41\x63\x63ountTradeListResponse\x12\x35\n\x05items\x18\x01 \x03(\x0b\x32&.martin.AccountTradeListResponse.Trade\x1a\xe9\x01\n\x05Trade\x12\x0e\n\x06symbol\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x01(\x04\x12\x0f\n\x07orderId\x18\x03 \x01(\x04\x12\x13\n\x0borderListId\x18\x04 \x01(\x11\x12\r\n\x05price\x18\x05 \x01(\t\x12\x0b\n\x03qty\x18\x06 \x01(\t\x12\x10\n\x08quoteQty\x18\x07 \x01(\t\x12\x12\n\ncommission\x18\x08 \x01(\t\x12\x17\n\x0f\x63ommissionAsset\x18\t \x01(\t\x12\x0c\n\x04time\x18\n \x01(\x04\x12\x0f\n\x07isBuyer\x18\x0b \x01(\x08\x12\x0f\n\x07isMaker\x18\x0c \x01(\x08\x12\x13\n\x0bisBestMatch\x18\r \x01(\x08\"q\n\x17\x41\x63\x63ountTradeListRequest\x12\x11\n\tclient_id\x18\x01 \x01(\x03\x12\x10\n\x08trade_id\x18\x02 \x01(\t\x12\x0e\n\x06symbol\x18\x03 \x01(\t\x12\r\n\x05limit\x18\x04 \x01(\r\x12\x12\n\nstart_time\x18\x05 \x01(\x03\"%\n\x13\x46\x65tchKlinesResponse\x12\x0e\n\x06klines\x18\x01 \x03(\t\"J\n\x16OnKlinesUpdateResponse\x12\x0e\n\x06symbol\x18\x01 \x01(\t\x12\x10\n\x08interval\x18\x02 \x01(\t\x12\x0e\n\x06\x63\x61ndle\x18\x03 \x01(\t\"j\n\x12\x46\x65tchKlinesRequest\x12\x11\n\tclient_id\x18\x01 \x01(\x03\x12\x10\n\x08trade_id\x18\x02 \x01(\t\x12\x0e\n\x06symbol\x18\x03 \x01(\t\x12\x10\n\x08interval\x18\x04 \x01(\t\x12\r\n\x05limit\x18\x05 \x01(\r\"\xb7\x03\n(FetchTickerPriceChangeStatisticsResponse\x12\x0e\n\x06symbol\x18\x01 \x01(\t\x12\x13\n\x0bpriceChange\x18\x02 \x01(\t\x12\x1a\n\x12priceChangePercent\x18\x03 \x01(\t\x12\x18\n\x10weightedAvgPrice\x18\x04 \x01(\t\x12\x16\n\x0eprevClosePrice\x18\x05 \x01(\t\x12\x11\n\tlastPrice\x18\x06 \x01(\t\x12\x0f\n\x07lastQty\x18\x07 \x01(\t\x12\x10\n\x08\x62idPrice\x18\x08 \x01(\t\x12\x0e\n\x06\x62idQty\x18\t \x01(\t\x12\x10\n\x08\x61skPrice\x18\n \x01(\t\x12\x0e\n\x06\x61skQty\x18\x0b \x01(\t\x12\x11\n\topenPrice\x18\x0c \x01(\t\x12\x11\n\thighPrice\x18\r \x01(\t\x12\x10\n\x08lowPrice\x18\x0e \x01(\t\x12\x0e\n\x06volume\x18\x0f \x01(\t\x12\x13\n\x0bquoteVolume\x18\x10 \x01(\t\x12\x10\n\x08openTime\x18\x11 \x01(\x04\x12\x11\n\tcloseTime\x18\x12 \x01(\x04\x12\x0f\n\x07\x66irstId\x18\x13 \x01(\x04\x12\x0e\n\x06lastId\x18\x14 \x01(\x04\x12\r\n\x05\x63ount\x18\x15 \x01(\x04\"?\n\x1e\x46\x65tchSymbolPriceTickerResponse\x12\x0e\n\x06symbol\x18\x01 \x01(\t\x12\r\n\x05price\x18\x02 \x01(\t\"J\n\x16\x46\x65tchOrderBookResponse\x12\x14\n\x0clastUpdateId\x18\x01 \x01(\x04\x12\x0c\n\x04\x62ids\x18\x02 \x03(\t\x12\x0c\n\x04\x61sks\x18\x03 \x03(\t\"\x96\x01\n\x1b\x46\x65tchAccountBalanceResponse\x12>\n\x08\x62\x61lances\x18\x01 \x03(\x0b\x32,.martin.FetchAccountBalanceResponse.Balances\x1a\x37\n\x08\x42\x61lances\x12\r\n\x05\x61sset\x18\x01 \x01(\t\x12\x0c\n\x04\x66ree\x18\x02 \x01(\t\x12\x0e\n\x06locked\x18\x03 \x01(\t\"\xd8\x13\n\x1f\x46\x65tchExchangeInfoSymbolResponse\x12\x0e\n\x06symbol\x18\x01 \x01(\t\x12\x0e\n\x06status\x18\x02 \x01(\t\x12\x11\n\tbaseAsset\x18\x03 \x01(\t\x12\x1a\n\x12\x62\x61seAssetPrecision\x18\x04 \x01(\r\x12\x12\n\nquoteAsset\x18\x05 \x01(\t\x12\x16\n\x0equotePrecision\x18\x06 \x01(\r\x12\x1b\n\x13quoteAssetPrecision\x18\x07 \x01(\r\x12\x1f\n\x17\x62\x61seCommissionPrecision\x18\x08 \x01(\r\x12 \n\x18quoteCommissionPrecision\x18\t \x01(\r\x12\x12\n\norderTypes\x18\n \x03(\t\x12\x16\n\x0eicebergAllowed\x18\x0b \x01(\x08\x12\x12\n\nocoAllowed\x18\x0c \x01(\x08\x12\"\n\x1aquoteOrderQtyMarketAllowed\x18\r \x01(\x08\x12\x19\n\x11\x61llowTrailingStop\x18\x0e \x01(\x08\x12\x1c\n\x14\x63\x61ncelReplaceAllowed\x18\x0f \x01(\x08\x12\x1c\n\x14isSpotTradingAllowed\x18\x10 \x01(\x08\x12\x1e\n\x16isMarginTradingAllowed\x18\x11 \x01(\x08\x12@\n\x07\x66ilters\x18\x12 \x01(\x0b\x32/.martin.FetchExchangeInfoSymbolResponse.Filters\x12\x13\n\x0bpermissions\x18\x13 \x03(\t\x12&\n\x1e\x64\x65\x66\x61ultSelfTradePreventionMode\x18\x14 \x01(\t\x12\'\n\x1f\x61llowedSelfTradePreventionModes\x18\x15 \x03(\t\x1a\xd6\x0e\n\x07\x46ilters\x12V\n\x0cprice_filter\x18\x01 \x01(\x0b\x32;.martin.FetchExchangeInfoSymbolResponse.Filters.PriceFilterH\x00\x88\x01\x01\x12X\n\rpercent_price\x18\x02 \x01(\x0b\x32<.martin.FetchExchangeInfoSymbolResponse.Filters.PercentPriceH\x01\x88\x01\x01\x12N\n\x08lot_size\x18\x03 \x01(\x0b\x32\x37.martin.FetchExchangeInfoSymbolResponse.Filters.LotSizeH\x02\x88\x01\x01\x12V\n\x0cmin_notional\x18\x04 \x01(\x0b\x32;.martin.FetchExchangeInfoSymbolResponse.Filters.MinNotionalH\x03\x88\x01\x01\x12X\n\riceberg_parts\x18\x05 \x01(\x0b\x32<.martin.FetchExchangeInfoSymbolResponse.Filters.IcebergPartsH\x04\x88\x01\x01\x12[\n\x0fmarket_lot_size\x18\x06 \x01(\x0b\x32=.martin.FetchExchangeInfoSymbolResponse.Filters.MarketLotSizeH\x05\x88\x01\x01\x12Y\n\x0emax_num_orders\x18\x07 \x01(\x0b\x32<.martin.FetchExchangeInfoSymbolResponse.Filters.MaxNumOrdersH\x06\x88\x01\x01\x12\x62\n\x13max_num_algo_orders\x18\x08 \x01(\x0b\x32@.martin.FetchExchangeInfoSymbolResponse.Filters.MaxNumAlgoOrdersH\x07\x88\x01\x01\x12h\n\x16max_num_iceberg_orders\x18\t \x01(\x0b\x32\x43.martin.FetchExchangeInfoSymbolResponse.Filters.MaxNumIcebergOrdersH\x08\x88\x01\x01\x12V\n\x0cmax_position\x18\n \x01(\x0b\x32;.martin.FetchExchangeInfoSymbolResponse.Filters.MaxPositionH\t\x88\x01\x01\x1aW\n\x0bPriceFilter\x12\x12\n\nfilterType\x18\x01 \x01(\t\x12\x10\n\x08minPrice\x18\x02 \x01(\t\x12\x10\n\x08maxPrice\x18\x03 \x01(\t\x12\x10\n\x08tickSize\x18\x04 \x01(\t\x1a\x66\n\x0cPercentPrice\x12\x12\n\nfilterType\x18\x01 \x01(\t\x12\x14\n\x0cmultiplierUp\x18\x02 \x01(\t\x12\x16\n\x0emultiplierDown\x18\x03 \x01(\t\x12\x14\n\x0c\x61vgPriceMins\x18\x04 \x01(\r\x1aO\n\x07LotSize\x12\x12\n\nfilterType\x18\x01 \x01(\t\x12\x0e\n\x06minQty\x18\x02 \x01(\t\x12\x0e\n\x06maxQty\x18\x03 \x01(\t\x12\x10\n\x08stepSize\x18\x04 \x01(\t\x1a\x63\n\x0bMinNotional\x12\x12\n\nfilterType\x18\x01 \x01(\t\x12\x13\n\x0bminNotional\x18\x02 \x01(\t\x12\x15\n\rapplyToMarket\x18\x03 \x01(\x08\x12\x14\n\x0c\x61vgPriceMins\x18\x04 \x01(\r\x1a\x31\n\x0cIcebergParts\x12\x12\n\nfilterType\x18\x01 \x01(\t\x12\r\n\x05limit\x18\x02 \x01(\r\x1aU\n\rMarketLotSize\x12\x12\n\nfilterType\x18\x01 \x01(\t\x12\x0e\n\x06minQty\x18\x02 \x01(\t\x12\x0e\n\x06maxQty\x18\x03 \x01(\t\x12\x10\n\x08stepSize\x18\x04 \x01(\t\x1a\x38\n\x0cMaxNumOrders\x12\x12\n\nfilterType\x18\x01 \x01(\t\x12\x14\n\x0cmaxNumOrders\x18\x02 \x01(\r\x1a@\n\x10MaxNumAlgoOrders\x12\x12\n\nfilterType\x18\x01 \x01(\t\x12\x18\n\x10maxNumAlgoOrders\x18\x02 \x01(\r\x1a\x46\n\x13MaxNumIcebergOrders\x12\x12\n\nfilterType\x18\x01 \x01(\t\x12\x1b\n\x13maxNumIcebergOrders\x18\x02 \x01(\r\x1a\x36\n\x0bMaxPosition\x12\x12\n\nfilterType\x18\x01 \x01(\t\x12\x13\n\x0bmaxPosition\x18\x02 \x01(\tB\x0f\n\r_price_filterB\x10\n\x0e_percent_priceB\x0b\n\t_lot_sizeB\x0f\n\r_min_notionalB\x10\n\x0e_iceberg_partsB\x12\n\x10_market_lot_sizeB\x11\n\x0f_max_num_ordersB\x16\n\x14_max_num_algo_ordersB\x19\n\x17_max_num_iceberg_ordersB\x0f\n\r_max_position\"\x97\x03\n\x17\x43\x61ncelAllOrdersResponse\x12:\n\x05items\x18\x01 \x03(\x0b\x32+.martin.CancelAllOrdersResponse.CancelOrder\x1a\xbf\x02\n\x0b\x43\x61ncelOrder\x12\x0e\n\x06symbol\x18\x01 \x01(\t\x12\x19\n\x11origClientOrderId\x18\x02 \x01(\t\x12\x0f\n\x07orderId\x18\x03 \x01(\x04\x12\x13\n\x0borderListId\x18\x04 \x01(\x05\x12\x15\n\rclientOrderId\x18\x05 \x01(\t\x12\x14\n\x0ctransactTime\x18\x06 \x01(\x04\x12\r\n\x05price\x18\x07 \x01(\t\x12\x0f\n\x07origQty\x18\x08 \x01(\t\x12\x13\n\x0b\x65xecutedQty\x18\t \x01(\t\x12\x1b\n\x13\x63ummulativeQuoteQty\x18\n \x01(\t\x12\x0e\n\x06status\x18\x0b \x01(\t\x12\x13\n\x0btimeInForce\x18\x0c \x01(\t\x12\x0c\n\x04type\x18\r \x01(\t\x12\x0c\n\x04side\x18\x0e \x01(\t\x12\x1f\n\x17selfTradePreventionMode\x18\x0f \x01(\t\"v\n\x11\x46\x65tchOrderRequest\x12\x11\n\tclient_id\x18\x01 \x01(\x03\x12\x10\n\x08trade_id\x18\x02 \x01(\t\x12\x0e\n\x06symbol\x18\x03 \x01(\t\x12\x10\n\x08order_id\x18\x04 \x01(\x03\x12\x1a\n\x12\x66illed_update_call\x18\x05 \x01(\x08\"\xa1\x03\n\x12\x46\x65tchOrderResponse\x12\x0e\n\x06symbol\x18\x01 \x01(\t\x12\x0f\n\x07orderId\x18\x02 \x01(\x04\x12\x13\n\x0borderListId\x18\x03 \x01(\x11\x12\x15\n\rclientOrderId\x18\x04 \x01(\t\x12\r\n\x05price\x18\x05 \x01(\t\x12\x0f\n\x07origQty\x18\x06 \x01(\t\x12\x13\n\x0b\x65xecutedQty\x18\x07 \x01(\t\x12\x1b\n\x13\x63ummulativeQuoteQty\x18\x08 \x01(\t\x12\x0e\n\x06status\x18\t \x01(\t\x12\x13\n\x0btimeInForce\x18\n \x01(\t\x12\x0c\n\x04type\x18\x0b \x01(\t\x12\x0c\n\x04side\x18\x0c \x01(\t\x12\x11\n\tstopPrice\x18\r \x01(\t\x12\x12\n\nicebergQty\x18\x0e \x01(\t\x12\x0c\n\x04time\x18\x0f \x01(\x04\x12\x12\n\nupdateTime\x18\x10 \x01(\x04\x12\x11\n\tisWorking\x18\x11 \x01(\x08\x12\x13\n\x0bworkingTime\x18\x12 \x01(\x12\x12\x19\n\x11origQuoteOrderQty\x18\x13 \x01(\t\x12\x1f\n\x17selfTradePreventionMode\x18\x14 \x01(\t\"\xfc\x03\n\x17\x46\x65tchOpenOrdersResponse\x12\x14\n\x0crate_limiter\x18\x01 \x01(\x05\x12\x34\n\x05items\x18\x02 \x03(\x0b\x32%.martin.FetchOpenOrdersResponse.Order\x1a\x94\x03\n\x05Order\x12\x0e\n\x06symbol\x18\x01 \x01(\t\x12\x0f\n\x07orderId\x18\x02 \x01(\x04\x12\x13\n\x0borderListId\x18\x03 \x01(\x11\x12\x15\n\rclientOrderId\x18\x04 \x01(\t\x12\r\n\x05price\x18\x05 \x01(\t\x12\x0f\n\x07origQty\x18\x06 \x01(\t\x12\x13\n\x0b\x65xecutedQty\x18\x07 \x01(\t\x12\x1b\n\x13\x63ummulativeQuoteQty\x18\x08 \x01(\t\x12\x0e\n\x06status\x18\t \x01(\t\x12\x13\n\x0btimeInForce\x18\n \x01(\t\x12\x0c\n\x04type\x18\x0b \x01(\t\x12\x0c\n\x04side\x18\x0c \x01(\t\x12\x11\n\tstopPrice\x18\r \x01(\t\x12\x12\n\nicebergQty\x18\x0e \x01(\t\x12\x0c\n\x04time\x18\x0f \x01(\x04\x12\x12\n\nupdateTime\x18\x10 \x01(\x04\x12\x11\n\tisWorking\x18\x11 \x01(\x08\x12\x19\n\x11origQuoteOrderQty\x18\x12 \x01(\t\x12\x13\n\x0bworkingTime\x18\x13 \x01(\x12\x12\x1f\n\x17selfTradePreventionMode\x18\x14 \x01(\t\"D\n\rMarketRequest\x12\x11\n\tclient_id\x18\x01 \x01(\x03\x12\x10\n\x08trade_id\x18\x02 \x01(\t\x12\x0e\n\x06symbol\x18\x03 \x01(\t\"\x81\x01\n\x12StartStreamRequest\x12\x11\n\tclient_id\x18\x01 \x01(\x03\x12\x10\n\x08trade_id\x18\x02 \x01(\t\x12\x0e\n\x06symbol\x18\x03 \x01(\t\x12\x1b\n\x13market_stream_count\x18\x04 \x01(\x05\x12\x19\n\x11user_stream_count\x18\x05 \x01(\x05\"[\n\x1bOpenClientConnectionRequest\x12\x10\n\x08trade_id\x18\x01 \x01(\t\x12\x14\n\x0c\x61\x63\x63ount_name\x18\x02 \x01(\t\x12\x14\n\x0crate_limiter\x18\x03 \x01(\x05\"z\n\x16OpenClientConnectionId\x12\x11\n\tclient_id\x18\x01 \x01(\x03\x12\x10\n\x08trade_id\x18\x02 \x01(\t\x12\x13\n\x0bsrv_version\x18\x03 \x01(\t\x12\x14\n\x0crate_limiter\x18\x04 \x01(\x05\x12\x10\n\x08\x65xchange\x18\x05 \x01(\t\"=\n\x16\x46\x65tchServerTimeRequest\x12\x11\n\tclient_id\x18\x01 \x01(\x03\x12\x10\n\x08trade_id\x18\x02 \x01(\t\".\n\x17\x46\x65tchServerTimeResponse\x12\x13\n\x0bserver_time\x18\x01 \x01(\x04\x32\xc7\x0f\n\x06Martin\x12]\n\x14OpenClientConnection\x12#.martin.OpenClientConnectionRequest\x1a\x1e.martin.OpenClientConnectionId\"\x00\x12T\n\x0f\x46\x65tchServerTime\x12\x1e.martin.OpenClientConnectionId\x1a\x1f.martin.FetchServerTimeResponse\"\x00\x12K\n\x0f\x46\x65tchOpenOrders\x12\x15.martin.MarketRequest\x1a\x1f.martin.FetchOpenOrdersResponse\"\x00\x12K\n\x0f\x43\x61ncelAllOrders\x12\x15.martin.MarketRequest\x1a\x1f.martin.FetchOpenOrdersResponse\"\x00\x12[\n\x17\x46\x65tchExchangeInfoSymbol\x12\x15.martin.MarketRequest\x1a\'.martin.FetchExchangeInfoSymbolResponse\"\x00\x12`\n\x17\x46\x65tchAccountInformation\x12\x1e.martin.OpenClientConnectionId\x1a#.martin.FetchAccountBalanceResponse\"\x00\x12I\n\x0e\x46\x65tchOrderBook\x12\x15.martin.MarketRequest\x1a\x1e.martin.FetchOrderBookResponse\"\x00\x12Y\n\x16\x46\x65tchSymbolPriceTicker\x12\x15.martin.MarketRequest\x1a&.martin.FetchSymbolPriceTickerResponse\"\x00\x12m\n FetchTickerPriceChangeStatistics\x12\x15.martin.MarketRequest\x1a\x30.martin.FetchTickerPriceChangeStatisticsResponse\"\x00\x12H\n\x0b\x46\x65tchKlines\x12\x1a.martin.FetchKlinesRequest\x1a\x1b.martin.FetchKlinesResponse\"\x00\x12\\\n\x15\x46\x65tchAccountTradeList\x12\x1f.martin.AccountTradeListRequest\x1a .martin.AccountTradeListResponse\"\x00\x12K\n\x0eOnTickerUpdate\x12\x15.martin.MarketRequest\x1a\x1e.martin.OnTickerUpdateResponse\"\x00\x30\x01\x12N\n\x11OnOrderBookUpdate\x12\x15.martin.MarketRequest\x1a\x1e.martin.FetchOrderBookResponse\"\x00\x30\x01\x12=\n\nStopStream\x12\x15.martin.MarketRequest\x1a\x16.martin.SimpleResponse\"\x00\x12\x43\n\x0bStartStream\x12\x1a.martin.StartStreamRequest\x1a\x16.martin.SimpleResponse\"\x00\x12P\n\rOnFundsUpdate\x12\x1c.martin.OnFundsUpdateRequest\x1a\x1d.martin.OnFundsUpdateResponse\"\x00\x30\x01\x12M\n\x0fOnBalanceUpdate\x12\x15.martin.MarketRequest\x1a\x1f.martin.OnBalanceUpdateResponse\"\x00\x30\x01\x12I\n\rOnOrderUpdate\x12\x15.martin.MarketRequest\x1a\x1d.martin.OnOrderUpdateResponse\"\x00\x30\x01\x12W\n\x10\x43reateLimitOrder\x12\x1f.martin.CreateLimitOrderRequest\x1a .martin.CreateLimitOrderResponse\"\x00\x12H\n\x0b\x43\x61ncelOrder\x12\x1a.martin.CancelOrderRequest\x1a\x1b.martin.CancelOrderResponse\"\x00\x12\x45\n\nFetchOrder\x12\x19.martin.FetchOrderRequest\x1a\x1a.martin.FetchOrderResponse\"\x00\x12J\n\x0eResetRateLimit\x12\x1e.martin.OpenClientConnectionId\x1a\x16.martin.SimpleResponse\"\x00\x12P\n\x0eOnKlinesUpdate\x12\x1a.martin.FetchKlinesRequest\x1a\x1e.martin.OnKlinesUpdateResponse\"\x00\x30\x01\x12]\n\x12\x46\x65tchFundingWallet\x12!.martin.FetchFundingWalletRequest\x1a\".martin.FetchFundingWalletResponse\"\x00\x62\x06proto3')
17
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1b\x65xchanges_wrapper/api.proto\x12\x06martin\"*\n\x17OnBalanceUpdateResponse\x12\x0f\n\x07\x62\x61lance\x18\x01 \x01(\t\"\x83\x01\n\x19\x46\x65tchFundingWalletRequest\x12\x11\n\tclient_id\x18\x01 \x01(\x03\x12\x10\n\x08trade_id\x18\x02 \x01(\t\x12\r\n\x05\x61sset\x18\x03 \x01(\t\x12\x1a\n\x12need_btc_valuation\x18\x04 \x01(\x08\x12\x16\n\x0ereceive_window\x18\x05 \x01(\x03\"\xd0\x01\n\x1a\x46\x65tchFundingWalletResponse\x12=\n\x08\x62\x61lances\x18\x01 \x03(\x0b\x32+.martin.FetchFundingWalletResponse.Balances\x1as\n\x08\x42\x61lances\x12\r\n\x05\x61sset\x18\x01 \x01(\t\x12\x0c\n\x04\x66ree\x18\x02 \x01(\t\x12\x0e\n\x06locked\x18\x03 \x01(\t\x12\x0e\n\x06\x66reeze\x18\x04 \x01(\t\x12\x13\n\x0bwithdrawing\x18\x05 \x01(\t\x12\x15\n\rbtc_valuation\x18\x06 \x01(\t\"\xc7\x02\n\x13\x43\x61ncelOrderResponse\x12\x0e\n\x06symbol\x18\x01 \x01(\t\x12\x19\n\x11origClientOrderId\x18\x02 \x01(\t\x12\x0f\n\x07orderId\x18\x03 \x01(\x04\x12\x13\n\x0borderListId\x18\x04 \x01(\x05\x12\x15\n\rclientOrderId\x18\x05 \x01(\t\x12\x14\n\x0ctransactTime\x18\x06 \x01(\x04\x12\r\n\x05price\x18\x07 \x01(\t\x12\x0f\n\x07origQty\x18\x08 \x01(\t\x12\x13\n\x0b\x65xecutedQty\x18\t \x01(\t\x12\x1b\n\x13\x63ummulativeQuoteQty\x18\n \x01(\t\x12\x0e\n\x06status\x18\x0b \x01(\t\x12\x13\n\x0btimeInForce\x18\x0c \x01(\t\x12\x0c\n\x04type\x18\r \x01(\t\x12\x0c\n\x04side\x18\x0e \x01(\t\x12\x1f\n\x17selfTradePreventionMode\x18\x0f \x01(\t\"[\n\x12\x43\x61ncelOrderRequest\x12\x11\n\tclient_id\x18\x01 \x01(\x03\x12\x10\n\x08trade_id\x18\x02 \x01(\t\x12\x0e\n\x06symbol\x18\x03 \x01(\t\x12\x10\n\x08order_id\x18\x04 \x01(\x03\"\xf0\x02\n\x18\x43reateLimitOrderResponse\x12\x0e\n\x06symbol\x18\x01 \x01(\t\x12\x0f\n\x07orderId\x18\x02 \x01(\x04\x12\x13\n\x0borderListId\x18\x03 \x01(\x11\x12\x15\n\rclientOrderId\x18\x04 \x01(\t\x12\x14\n\x0ctransactTime\x18\x05 \x01(\x04\x12\r\n\x05price\x18\x06 \x01(\t\x12\x0f\n\x07origQty\x18\x07 \x01(\t\x12\x13\n\x0b\x65xecutedQty\x18\x08 \x01(\t\x12\x1b\n\x13\x63ummulativeQuoteQty\x18\t \x01(\t\x12\x0e\n\x06status\x18\n \x01(\t\x12\x13\n\x0btimeInForce\x18\x0b \x01(\t\x12\x0c\n\x04type\x18\x0c \x01(\t\x12\x0c\n\x04side\x18\r \x01(\t\x12\x12\n\nstrategyId\x18\x0e \x01(\x04\x12\x14\n\x0cstrategyType\x18\x0f \x01(\x04\x12\x13\n\x0bworkingTime\x18\x10 \x01(\x12\x12\x1f\n\x17selfTradePreventionMode\x18\x11 \x01(\t\"\x9e\x01\n\x17\x43reateLimitOrderRequest\x12\x11\n\tclient_id\x18\x01 \x01(\x03\x12\x10\n\x08trade_id\x18\x02 \x01(\t\x12\x0e\n\x06symbol\x18\x03 \x01(\t\x12\x10\n\x08\x62uy_side\x18\x04 \x01(\x08\x12\x10\n\x08quantity\x18\x05 \x01(\t\x12\r\n\x05price\x18\x06 \x01(\t\x12\x1b\n\x13new_client_order_id\x18\x07 \x01(\x03\"\xf8\x05\n\x15OnOrderUpdateResponse\x12\x0e\n\x06symbol\x18\x01 \x01(\t\x12\x17\n\x0f\x63lient_order_id\x18\x02 \x01(\t\x12\x0c\n\x04side\x18\x03 \x01(\t\x12\x12\n\norder_type\x18\x04 \x01(\t\x12\x15\n\rtime_in_force\x18\x05 \x01(\t\x12\x16\n\x0eorder_quantity\x18\x06 \x01(\t\x12\x13\n\x0border_price\x18\x07 \x01(\t\x12\x12\n\nstop_price\x18\x08 \x01(\t\x12\x18\n\x10iceberg_quantity\x18\t \x01(\t\x12\x15\n\rorder_list_id\x18\n \x01(\x11\x12\x1a\n\x12original_client_id\x18\x0b \x01(\t\x12\x16\n\x0e\x65xecution_type\x18\x0c \x01(\t\x12\x14\n\x0corder_status\x18\r \x01(\t\x12\x1b\n\x13order_reject_reason\x18\x0e \x01(\t\x12\x10\n\x08order_id\x18\x0f \x01(\x04\x12\x1e\n\x16last_executed_quantity\x18\x10 \x01(\t\x12\"\n\x1a\x63umulative_filled_quantity\x18\x11 \x01(\t\x12\x1b\n\x13last_executed_price\x18\x12 \x01(\t\x12\x19\n\x11\x63ommission_amount\x18\x13 \x01(\t\x12\x18\n\x10\x63ommission_asset\x18\x14 \x01(\t\x12\x18\n\x10transaction_time\x18\x15 \x01(\x04\x12\x10\n\x08trade_id\x18\x16 \x01(\x12\x12\x10\n\x08ignore_a\x18\x17 \x01(\x04\x12\x15\n\rin_order_book\x18\x18 \x01(\x08\x12\x15\n\ris_maker_side\x18\x19 \x01(\x08\x12\x10\n\x08ignore_b\x18\x1a \x01(\x08\x12\x1b\n\x13order_creation_time\x18\x1b \x01(\x04\x12\x1e\n\x16quote_asset_transacted\x18\x1c \x01(\t\x12#\n\x1blast_quote_asset_transacted\x18\x1d \x01(\t\x12\x1c\n\x14quote_order_quantity\x18\x1e \x01(\t\"&\n\x15OnFundsUpdateResponse\x12\r\n\x05\x66unds\x18\x01 \x01(\t\"t\n\x14OnFundsUpdateRequest\x12\x11\n\tclient_id\x18\x01 \x01(\x03\x12\x10\n\x08trade_id\x18\x02 \x01(\t\x12\x0e\n\x06symbol\x18\x03 \x01(\t\x12\x12\n\nbase_asset\x18\x04 \x01(\t\x12\x13\n\x0bquote_asset\x18\x05 \x01(\t\"1\n\x0eSimpleResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x0e\n\x06result\x18\x02 \x01(\t\"e\n\x16OnTickerUpdateResponse\x12\x0e\n\x06symbol\x18\x01 \x01(\t\x12\x12\n\nopen_price\x18\x02 \x01(\t\x12\x13\n\x0b\x63lose_price\x18\x03 \x01(\t\x12\x12\n\nevent_time\x18\x04 \x01(\x04\"\xbd\x02\n\x18\x41\x63\x63ountTradeListResponse\x12\x35\n\x05items\x18\x01 \x03(\x0b\x32&.martin.AccountTradeListResponse.Trade\x1a\xe9\x01\n\x05Trade\x12\x0e\n\x06symbol\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x01(\x04\x12\x0f\n\x07orderId\x18\x03 \x01(\x04\x12\x13\n\x0borderListId\x18\x04 \x01(\x11\x12\r\n\x05price\x18\x05 \x01(\t\x12\x0b\n\x03qty\x18\x06 \x01(\t\x12\x10\n\x08quoteQty\x18\x07 \x01(\t\x12\x12\n\ncommission\x18\x08 \x01(\t\x12\x17\n\x0f\x63ommissionAsset\x18\t \x01(\t\x12\x0c\n\x04time\x18\n \x01(\x04\x12\x0f\n\x07isBuyer\x18\x0b \x01(\x08\x12\x0f\n\x07isMaker\x18\x0c \x01(\x08\x12\x13\n\x0bisBestMatch\x18\r \x01(\x08\"q\n\x17\x41\x63\x63ountTradeListRequest\x12\x11\n\tclient_id\x18\x01 \x01(\x03\x12\x10\n\x08trade_id\x18\x02 \x01(\t\x12\x0e\n\x06symbol\x18\x03 \x01(\t\x12\r\n\x05limit\x18\x04 \x01(\r\x12\x12\n\nstart_time\x18\x05 \x01(\x03\"%\n\x13\x46\x65tchKlinesResponse\x12\x0e\n\x06klines\x18\x01 \x03(\t\"J\n\x16OnKlinesUpdateResponse\x12\x0e\n\x06symbol\x18\x01 \x01(\t\x12\x10\n\x08interval\x18\x02 \x01(\t\x12\x0e\n\x06\x63\x61ndle\x18\x03 \x01(\t\"j\n\x12\x46\x65tchKlinesRequest\x12\x11\n\tclient_id\x18\x01 \x01(\x03\x12\x10\n\x08trade_id\x18\x02 \x01(\t\x12\x0e\n\x06symbol\x18\x03 \x01(\t\x12\x10\n\x08interval\x18\x04 \x01(\t\x12\r\n\x05limit\x18\x05 \x01(\r\"\xb7\x03\n(FetchTickerPriceChangeStatisticsResponse\x12\x0e\n\x06symbol\x18\x01 \x01(\t\x12\x13\n\x0bpriceChange\x18\x02 \x01(\t\x12\x1a\n\x12priceChangePercent\x18\x03 \x01(\t\x12\x18\n\x10weightedAvgPrice\x18\x04 \x01(\t\x12\x16\n\x0eprevClosePrice\x18\x05 \x01(\t\x12\x11\n\tlastPrice\x18\x06 \x01(\t\x12\x0f\n\x07lastQty\x18\x07 \x01(\t\x12\x10\n\x08\x62idPrice\x18\x08 \x01(\t\x12\x0e\n\x06\x62idQty\x18\t \x01(\t\x12\x10\n\x08\x61skPrice\x18\n \x01(\t\x12\x0e\n\x06\x61skQty\x18\x0b \x01(\t\x12\x11\n\topenPrice\x18\x0c \x01(\t\x12\x11\n\thighPrice\x18\r \x01(\t\x12\x10\n\x08lowPrice\x18\x0e \x01(\t\x12\x0e\n\x06volume\x18\x0f \x01(\t\x12\x13\n\x0bquoteVolume\x18\x10 \x01(\t\x12\x10\n\x08openTime\x18\x11 \x01(\x04\x12\x11\n\tcloseTime\x18\x12 \x01(\x04\x12\x0f\n\x07\x66irstId\x18\x13 \x01(\x04\x12\x0e\n\x06lastId\x18\x14 \x01(\x04\x12\r\n\x05\x63ount\x18\x15 \x01(\x04\"?\n\x1e\x46\x65tchSymbolPriceTickerResponse\x12\x0e\n\x06symbol\x18\x01 \x01(\t\x12\r\n\x05price\x18\x02 \x01(\t\"J\n\x16\x46\x65tchOrderBookResponse\x12\x14\n\x0clastUpdateId\x18\x01 \x01(\x04\x12\x0c\n\x04\x62ids\x18\x02 \x03(\t\x12\x0c\n\x04\x61sks\x18\x03 \x03(\t\"\x96\x01\n\x1b\x46\x65tchAccountBalanceResponse\x12>\n\x08\x62\x61lances\x18\x01 \x03(\x0b\x32,.martin.FetchAccountBalanceResponse.Balances\x1a\x37\n\x08\x42\x61lances\x12\r\n\x05\x61sset\x18\x01 \x01(\t\x12\x0c\n\x04\x66ree\x18\x02 \x01(\t\x12\x0e\n\x06locked\x18\x03 \x01(\t\"\xd8\x13\n\x1f\x46\x65tchExchangeInfoSymbolResponse\x12\x0e\n\x06symbol\x18\x01 \x01(\t\x12\x0e\n\x06status\x18\x02 \x01(\t\x12\x11\n\tbaseAsset\x18\x03 \x01(\t\x12\x1a\n\x12\x62\x61seAssetPrecision\x18\x04 \x01(\r\x12\x12\n\nquoteAsset\x18\x05 \x01(\t\x12\x16\n\x0equotePrecision\x18\x06 \x01(\r\x12\x1b\n\x13quoteAssetPrecision\x18\x07 \x01(\r\x12\x1f\n\x17\x62\x61seCommissionPrecision\x18\x08 \x01(\r\x12 \n\x18quoteCommissionPrecision\x18\t \x01(\r\x12\x12\n\norderTypes\x18\n \x03(\t\x12\x16\n\x0eicebergAllowed\x18\x0b \x01(\x08\x12\x12\n\nocoAllowed\x18\x0c \x01(\x08\x12\"\n\x1aquoteOrderQtyMarketAllowed\x18\r \x01(\x08\x12\x19\n\x11\x61llowTrailingStop\x18\x0e \x01(\x08\x12\x1c\n\x14\x63\x61ncelReplaceAllowed\x18\x0f \x01(\x08\x12\x1c\n\x14isSpotTradingAllowed\x18\x10 \x01(\x08\x12\x1e\n\x16isMarginTradingAllowed\x18\x11 \x01(\x08\x12@\n\x07\x66ilters\x18\x12 \x01(\x0b\x32/.martin.FetchExchangeInfoSymbolResponse.Filters\x12\x13\n\x0bpermissions\x18\x13 \x03(\t\x12&\n\x1e\x64\x65\x66\x61ultSelfTradePreventionMode\x18\x14 \x01(\t\x12\'\n\x1f\x61llowedSelfTradePreventionModes\x18\x15 \x03(\t\x1a\xd6\x0e\n\x07\x46ilters\x12V\n\x0cprice_filter\x18\x01 \x01(\x0b\x32;.martin.FetchExchangeInfoSymbolResponse.Filters.PriceFilterH\x00\x88\x01\x01\x12X\n\rpercent_price\x18\x02 \x01(\x0b\x32<.martin.FetchExchangeInfoSymbolResponse.Filters.PercentPriceH\x01\x88\x01\x01\x12N\n\x08lot_size\x18\x03 \x01(\x0b\x32\x37.martin.FetchExchangeInfoSymbolResponse.Filters.LotSizeH\x02\x88\x01\x01\x12V\n\x0cmin_notional\x18\x04 \x01(\x0b\x32;.martin.FetchExchangeInfoSymbolResponse.Filters.MinNotionalH\x03\x88\x01\x01\x12X\n\riceberg_parts\x18\x05 \x01(\x0b\x32<.martin.FetchExchangeInfoSymbolResponse.Filters.IcebergPartsH\x04\x88\x01\x01\x12[\n\x0fmarket_lot_size\x18\x06 \x01(\x0b\x32=.martin.FetchExchangeInfoSymbolResponse.Filters.MarketLotSizeH\x05\x88\x01\x01\x12Y\n\x0emax_num_orders\x18\x07 \x01(\x0b\x32<.martin.FetchExchangeInfoSymbolResponse.Filters.MaxNumOrdersH\x06\x88\x01\x01\x12\x62\n\x13max_num_algo_orders\x18\x08 \x01(\x0b\x32@.martin.FetchExchangeInfoSymbolResponse.Filters.MaxNumAlgoOrdersH\x07\x88\x01\x01\x12h\n\x16max_num_iceberg_orders\x18\t \x01(\x0b\x32\x43.martin.FetchExchangeInfoSymbolResponse.Filters.MaxNumIcebergOrdersH\x08\x88\x01\x01\x12V\n\x0cmax_position\x18\n \x01(\x0b\x32;.martin.FetchExchangeInfoSymbolResponse.Filters.MaxPositionH\t\x88\x01\x01\x1aW\n\x0bPriceFilter\x12\x12\n\nfilterType\x18\x01 \x01(\t\x12\x10\n\x08minPrice\x18\x02 \x01(\t\x12\x10\n\x08maxPrice\x18\x03 \x01(\t\x12\x10\n\x08tickSize\x18\x04 \x01(\t\x1a\x66\n\x0cPercentPrice\x12\x12\n\nfilterType\x18\x01 \x01(\t\x12\x14\n\x0cmultiplierUp\x18\x02 \x01(\t\x12\x16\n\x0emultiplierDown\x18\x03 \x01(\t\x12\x14\n\x0c\x61vgPriceMins\x18\x04 \x01(\r\x1aO\n\x07LotSize\x12\x12\n\nfilterType\x18\x01 \x01(\t\x12\x0e\n\x06minQty\x18\x02 \x01(\t\x12\x0e\n\x06maxQty\x18\x03 \x01(\t\x12\x10\n\x08stepSize\x18\x04 \x01(\t\x1a\x63\n\x0bMinNotional\x12\x12\n\nfilterType\x18\x01 \x01(\t\x12\x13\n\x0bminNotional\x18\x02 \x01(\t\x12\x15\n\rapplyToMarket\x18\x03 \x01(\x08\x12\x14\n\x0c\x61vgPriceMins\x18\x04 \x01(\r\x1a\x31\n\x0cIcebergParts\x12\x12\n\nfilterType\x18\x01 \x01(\t\x12\r\n\x05limit\x18\x02 \x01(\r\x1aU\n\rMarketLotSize\x12\x12\n\nfilterType\x18\x01 \x01(\t\x12\x0e\n\x06minQty\x18\x02 \x01(\t\x12\x0e\n\x06maxQty\x18\x03 \x01(\t\x12\x10\n\x08stepSize\x18\x04 \x01(\t\x1a\x38\n\x0cMaxNumOrders\x12\x12\n\nfilterType\x18\x01 \x01(\t\x12\x14\n\x0cmaxNumOrders\x18\x02 \x01(\r\x1a@\n\x10MaxNumAlgoOrders\x12\x12\n\nfilterType\x18\x01 \x01(\t\x12\x18\n\x10maxNumAlgoOrders\x18\x02 \x01(\r\x1a\x46\n\x13MaxNumIcebergOrders\x12\x12\n\nfilterType\x18\x01 \x01(\t\x12\x1b\n\x13maxNumIcebergOrders\x18\x02 \x01(\r\x1a\x36\n\x0bMaxPosition\x12\x12\n\nfilterType\x18\x01 \x01(\t\x12\x13\n\x0bmaxPosition\x18\x02 \x01(\tB\x0f\n\r_price_filterB\x10\n\x0e_percent_priceB\x0b\n\t_lot_sizeB\x0f\n\r_min_notionalB\x10\n\x0e_iceberg_partsB\x12\n\x10_market_lot_sizeB\x11\n\x0f_max_num_ordersB\x16\n\x14_max_num_algo_ordersB\x19\n\x17_max_num_iceberg_ordersB\x0f\n\r_max_position\"\x97\x03\n\x17\x43\x61ncelAllOrdersResponse\x12:\n\x05items\x18\x01 \x03(\x0b\x32+.martin.CancelAllOrdersResponse.CancelOrder\x1a\xbf\x02\n\x0b\x43\x61ncelOrder\x12\x0e\n\x06symbol\x18\x01 \x01(\t\x12\x19\n\x11origClientOrderId\x18\x02 \x01(\t\x12\x0f\n\x07orderId\x18\x03 \x01(\x04\x12\x13\n\x0borderListId\x18\x04 \x01(\x05\x12\x15\n\rclientOrderId\x18\x05 \x01(\t\x12\x14\n\x0ctransactTime\x18\x06 \x01(\x04\x12\r\n\x05price\x18\x07 \x01(\t\x12\x0f\n\x07origQty\x18\x08 \x01(\t\x12\x13\n\x0b\x65xecutedQty\x18\t \x01(\t\x12\x1b\n\x13\x63ummulativeQuoteQty\x18\n \x01(\t\x12\x0e\n\x06status\x18\x0b \x01(\t\x12\x13\n\x0btimeInForce\x18\x0c \x01(\t\x12\x0c\n\x04type\x18\r \x01(\t\x12\x0c\n\x04side\x18\x0e \x01(\t\x12\x1f\n\x17selfTradePreventionMode\x18\x0f \x01(\t\"v\n\x11\x46\x65tchOrderRequest\x12\x11\n\tclient_id\x18\x01 \x01(\x03\x12\x10\n\x08trade_id\x18\x02 \x01(\t\x12\x0e\n\x06symbol\x18\x03 \x01(\t\x12\x10\n\x08order_id\x18\x04 \x01(\x03\x12\x1a\n\x12\x66illed_update_call\x18\x05 \x01(\x08\"\xa1\x03\n\x12\x46\x65tchOrderResponse\x12\x0e\n\x06symbol\x18\x01 \x01(\t\x12\x0f\n\x07orderId\x18\x02 \x01(\x04\x12\x13\n\x0borderListId\x18\x03 \x01(\x11\x12\x15\n\rclientOrderId\x18\x04 \x01(\t\x12\r\n\x05price\x18\x05 \x01(\t\x12\x0f\n\x07origQty\x18\x06 \x01(\t\x12\x13\n\x0b\x65xecutedQty\x18\x07 \x01(\t\x12\x1b\n\x13\x63ummulativeQuoteQty\x18\x08 \x01(\t\x12\x0e\n\x06status\x18\t \x01(\t\x12\x13\n\x0btimeInForce\x18\n \x01(\t\x12\x0c\n\x04type\x18\x0b \x01(\t\x12\x0c\n\x04side\x18\x0c \x01(\t\x12\x11\n\tstopPrice\x18\r \x01(\t\x12\x12\n\nicebergQty\x18\x0e \x01(\t\x12\x0c\n\x04time\x18\x0f \x01(\x04\x12\x12\n\nupdateTime\x18\x10 \x01(\x04\x12\x11\n\tisWorking\x18\x11 \x01(\x08\x12\x13\n\x0bworkingTime\x18\x12 \x01(\x12\x12\x19\n\x11origQuoteOrderQty\x18\x13 \x01(\t\x12\x1f\n\x17selfTradePreventionMode\x18\x14 \x01(\t\"\xfc\x03\n\x17\x46\x65tchOpenOrdersResponse\x12\x14\n\x0crate_limiter\x18\x01 \x01(\x05\x12\x34\n\x05items\x18\x02 \x03(\x0b\x32%.martin.FetchOpenOrdersResponse.Order\x1a\x94\x03\n\x05Order\x12\x0e\n\x06symbol\x18\x01 \x01(\t\x12\x0f\n\x07orderId\x18\x02 \x01(\x04\x12\x13\n\x0borderListId\x18\x03 \x01(\x11\x12\x15\n\rclientOrderId\x18\x04 \x01(\t\x12\r\n\x05price\x18\x05 \x01(\t\x12\x0f\n\x07origQty\x18\x06 \x01(\t\x12\x13\n\x0b\x65xecutedQty\x18\x07 \x01(\t\x12\x1b\n\x13\x63ummulativeQuoteQty\x18\x08 \x01(\t\x12\x0e\n\x06status\x18\t \x01(\t\x12\x13\n\x0btimeInForce\x18\n \x01(\t\x12\x0c\n\x04type\x18\x0b \x01(\t\x12\x0c\n\x04side\x18\x0c \x01(\t\x12\x11\n\tstopPrice\x18\r \x01(\t\x12\x12\n\nicebergQty\x18\x0e \x01(\t\x12\x0c\n\x04time\x18\x0f \x01(\x04\x12\x12\n\nupdateTime\x18\x10 \x01(\x04\x12\x11\n\tisWorking\x18\x11 \x01(\x08\x12\x19\n\x11origQuoteOrderQty\x18\x12 \x01(\t\x12\x13\n\x0bworkingTime\x18\x13 \x01(\x12\x12\x1f\n\x17selfTradePreventionMode\x18\x14 \x01(\t\"T\n\rMarketRequest\x12\x11\n\tclient_id\x18\x01 \x01(\x03\x12\x10\n\x08trade_id\x18\x02 \x01(\t\x12\x0e\n\x06symbol\x18\x03 \x01(\t\x12\x0e\n\x06\x61mount\x18\x04 \x01(\t\"\x81\x01\n\x12StartStreamRequest\x12\x11\n\tclient_id\x18\x01 \x01(\x03\x12\x10\n\x08trade_id\x18\x02 \x01(\t\x12\x0e\n\x06symbol\x18\x03 \x01(\t\x12\x1b\n\x13market_stream_count\x18\x04 \x01(\x05\x12\x19\n\x11user_stream_count\x18\x05 \x01(\x05\"[\n\x1bOpenClientConnectionRequest\x12\x10\n\x08trade_id\x18\x01 \x01(\t\x12\x14\n\x0c\x61\x63\x63ount_name\x18\x02 \x01(\t\x12\x14\n\x0crate_limiter\x18\x03 \x01(\x05\"z\n\x16OpenClientConnectionId\x12\x11\n\tclient_id\x18\x01 \x01(\x03\x12\x10\n\x08trade_id\x18\x02 \x01(\t\x12\x13\n\x0bsrv_version\x18\x03 \x01(\t\x12\x14\n\x0crate_limiter\x18\x04 \x01(\x05\x12\x10\n\x08\x65xchange\x18\x05 \x01(\t\"=\n\x16\x46\x65tchServerTimeRequest\x12\x11\n\tclient_id\x18\x01 \x01(\x03\x12\x10\n\x08trade_id\x18\x02 \x01(\t\".\n\x17\x46\x65tchServerTimeResponse\x12\x13\n\x0bserver_time\x18\x01 \x01(\x04\x32\x8c\x10\n\x06Martin\x12]\n\x14OpenClientConnection\x12#.martin.OpenClientConnectionRequest\x1a\x1e.martin.OpenClientConnectionId\"\x00\x12T\n\x0f\x46\x65tchServerTime\x12\x1e.martin.OpenClientConnectionId\x1a\x1f.martin.FetchServerTimeResponse\"\x00\x12K\n\x0f\x46\x65tchOpenOrders\x12\x15.martin.MarketRequest\x1a\x1f.martin.FetchOpenOrdersResponse\"\x00\x12K\n\x0f\x43\x61ncelAllOrders\x12\x15.martin.MarketRequest\x1a\x1f.martin.FetchOpenOrdersResponse\"\x00\x12[\n\x17\x46\x65tchExchangeInfoSymbol\x12\x15.martin.MarketRequest\x1a\'.martin.FetchExchangeInfoSymbolResponse\"\x00\x12`\n\x17\x46\x65tchAccountInformation\x12\x1e.martin.OpenClientConnectionId\x1a#.martin.FetchAccountBalanceResponse\"\x00\x12I\n\x0e\x46\x65tchOrderBook\x12\x15.martin.MarketRequest\x1a\x1e.martin.FetchOrderBookResponse\"\x00\x12Y\n\x16\x46\x65tchSymbolPriceTicker\x12\x15.martin.MarketRequest\x1a&.martin.FetchSymbolPriceTickerResponse\"\x00\x12m\n FetchTickerPriceChangeStatistics\x12\x15.martin.MarketRequest\x1a\x30.martin.FetchTickerPriceChangeStatisticsResponse\"\x00\x12H\n\x0b\x46\x65tchKlines\x12\x1a.martin.FetchKlinesRequest\x1a\x1b.martin.FetchKlinesResponse\"\x00\x12\\\n\x15\x46\x65tchAccountTradeList\x12\x1f.martin.AccountTradeListRequest\x1a .martin.AccountTradeListResponse\"\x00\x12K\n\x0eOnTickerUpdate\x12\x15.martin.MarketRequest\x1a\x1e.martin.OnTickerUpdateResponse\"\x00\x30\x01\x12N\n\x11OnOrderBookUpdate\x12\x15.martin.MarketRequest\x1a\x1e.martin.FetchOrderBookResponse\"\x00\x30\x01\x12=\n\nStopStream\x12\x15.martin.MarketRequest\x1a\x16.martin.SimpleResponse\"\x00\x12\x43\n\x0bStartStream\x12\x1a.martin.StartStreamRequest\x1a\x16.martin.SimpleResponse\"\x00\x12P\n\rOnFundsUpdate\x12\x1c.martin.OnFundsUpdateRequest\x1a\x1d.martin.OnFundsUpdateResponse\"\x00\x30\x01\x12M\n\x0fOnBalanceUpdate\x12\x15.martin.MarketRequest\x1a\x1f.martin.OnBalanceUpdateResponse\"\x00\x30\x01\x12I\n\rOnOrderUpdate\x12\x15.martin.MarketRequest\x1a\x1d.martin.OnOrderUpdateResponse\"\x00\x30\x01\x12W\n\x10\x43reateLimitOrder\x12\x1f.martin.CreateLimitOrderRequest\x1a .martin.CreateLimitOrderResponse\"\x00\x12H\n\x0b\x43\x61ncelOrder\x12\x1a.martin.CancelOrderRequest\x1a\x1b.martin.CancelOrderResponse\"\x00\x12\x45\n\nFetchOrder\x12\x19.martin.FetchOrderRequest\x1a\x1a.martin.FetchOrderResponse\"\x00\x12J\n\x0eResetRateLimit\x12\x1e.martin.OpenClientConnectionId\x1a\x16.martin.SimpleResponse\"\x00\x12P\n\x0eOnKlinesUpdate\x12\x1a.martin.FetchKlinesRequest\x1a\x1e.martin.OnKlinesUpdateResponse\"\x00\x30\x01\x12]\n\x12\x46\x65tchFundingWallet\x12!.martin.FetchFundingWalletRequest\x1a\".martin.FetchFundingWalletResponse\"\x00\x12\x43\n\x10TransferToMaster\x12\x15.martin.MarketRequest\x1a\x16.martin.SimpleResponse\"\x00\x62\x06proto3')
18
18
 
19
19
 
20
20
 
@@ -445,79 +445,79 @@ if _descriptor._USE_C_DESCRIPTORS == False:
445
445
  _ONFUNDSUPDATEREQUEST._serialized_start=2186
446
446
  _ONFUNDSUPDATEREQUEST._serialized_end=2302
447
447
  _SIMPLERESPONSE._serialized_start=2304
448
- _SIMPLERESPONSE._serialized_end=2337
449
- _ONTICKERUPDATERESPONSE._serialized_start=2339
450
- _ONTICKERUPDATERESPONSE._serialized_end=2440
451
- _ACCOUNTTRADELISTRESPONSE._serialized_start=2443
452
- _ACCOUNTTRADELISTRESPONSE._serialized_end=2760
453
- _ACCOUNTTRADELISTRESPONSE_TRADE._serialized_start=2527
454
- _ACCOUNTTRADELISTRESPONSE_TRADE._serialized_end=2760
455
- _ACCOUNTTRADELISTREQUEST._serialized_start=2762
456
- _ACCOUNTTRADELISTREQUEST._serialized_end=2875
457
- _FETCHKLINESRESPONSE._serialized_start=2877
458
- _FETCHKLINESRESPONSE._serialized_end=2914
459
- _ONKLINESUPDATERESPONSE._serialized_start=2916
460
- _ONKLINESUPDATERESPONSE._serialized_end=2990
461
- _FETCHKLINESREQUEST._serialized_start=2992
462
- _FETCHKLINESREQUEST._serialized_end=3098
463
- _FETCHTICKERPRICECHANGESTATISTICSRESPONSE._serialized_start=3101
464
- _FETCHTICKERPRICECHANGESTATISTICSRESPONSE._serialized_end=3540
465
- _FETCHSYMBOLPRICETICKERRESPONSE._serialized_start=3542
466
- _FETCHSYMBOLPRICETICKERRESPONSE._serialized_end=3605
467
- _FETCHORDERBOOKRESPONSE._serialized_start=3607
468
- _FETCHORDERBOOKRESPONSE._serialized_end=3681
469
- _FETCHACCOUNTBALANCERESPONSE._serialized_start=3684
470
- _FETCHACCOUNTBALANCERESPONSE._serialized_end=3834
448
+ _SIMPLERESPONSE._serialized_end=2353
449
+ _ONTICKERUPDATERESPONSE._serialized_start=2355
450
+ _ONTICKERUPDATERESPONSE._serialized_end=2456
451
+ _ACCOUNTTRADELISTRESPONSE._serialized_start=2459
452
+ _ACCOUNTTRADELISTRESPONSE._serialized_end=2776
453
+ _ACCOUNTTRADELISTRESPONSE_TRADE._serialized_start=2543
454
+ _ACCOUNTTRADELISTRESPONSE_TRADE._serialized_end=2776
455
+ _ACCOUNTTRADELISTREQUEST._serialized_start=2778
456
+ _ACCOUNTTRADELISTREQUEST._serialized_end=2891
457
+ _FETCHKLINESRESPONSE._serialized_start=2893
458
+ _FETCHKLINESRESPONSE._serialized_end=2930
459
+ _ONKLINESUPDATERESPONSE._serialized_start=2932
460
+ _ONKLINESUPDATERESPONSE._serialized_end=3006
461
+ _FETCHKLINESREQUEST._serialized_start=3008
462
+ _FETCHKLINESREQUEST._serialized_end=3114
463
+ _FETCHTICKERPRICECHANGESTATISTICSRESPONSE._serialized_start=3117
464
+ _FETCHTICKERPRICECHANGESTATISTICSRESPONSE._serialized_end=3556
465
+ _FETCHSYMBOLPRICETICKERRESPONSE._serialized_start=3558
466
+ _FETCHSYMBOLPRICETICKERRESPONSE._serialized_end=3621
467
+ _FETCHORDERBOOKRESPONSE._serialized_start=3623
468
+ _FETCHORDERBOOKRESPONSE._serialized_end=3697
469
+ _FETCHACCOUNTBALANCERESPONSE._serialized_start=3700
470
+ _FETCHACCOUNTBALANCERESPONSE._serialized_end=3850
471
471
  _FETCHACCOUNTBALANCERESPONSE_BALANCES._serialized_start=311
472
472
  _FETCHACCOUNTBALANCERESPONSE_BALANCES._serialized_end=366
473
- _FETCHEXCHANGEINFOSYMBOLRESPONSE._serialized_start=3837
474
- _FETCHEXCHANGEINFOSYMBOLRESPONSE._serialized_end=6357
475
- _FETCHEXCHANGEINFOSYMBOLRESPONSE_FILTERS._serialized_start=4479
476
- _FETCHEXCHANGEINFOSYMBOLRESPONSE_FILTERS._serialized_end=6357
477
- _FETCHEXCHANGEINFOSYMBOLRESPONSE_FILTERS_PRICEFILTER._serialized_start=5404
478
- _FETCHEXCHANGEINFOSYMBOLRESPONSE_FILTERS_PRICEFILTER._serialized_end=5491
479
- _FETCHEXCHANGEINFOSYMBOLRESPONSE_FILTERS_PERCENTPRICE._serialized_start=5493
480
- _FETCHEXCHANGEINFOSYMBOLRESPONSE_FILTERS_PERCENTPRICE._serialized_end=5595
481
- _FETCHEXCHANGEINFOSYMBOLRESPONSE_FILTERS_LOTSIZE._serialized_start=5597
482
- _FETCHEXCHANGEINFOSYMBOLRESPONSE_FILTERS_LOTSIZE._serialized_end=5676
483
- _FETCHEXCHANGEINFOSYMBOLRESPONSE_FILTERS_MINNOTIONAL._serialized_start=5678
484
- _FETCHEXCHANGEINFOSYMBOLRESPONSE_FILTERS_MINNOTIONAL._serialized_end=5777
485
- _FETCHEXCHANGEINFOSYMBOLRESPONSE_FILTERS_ICEBERGPARTS._serialized_start=5779
486
- _FETCHEXCHANGEINFOSYMBOLRESPONSE_FILTERS_ICEBERGPARTS._serialized_end=5828
487
- _FETCHEXCHANGEINFOSYMBOLRESPONSE_FILTERS_MARKETLOTSIZE._serialized_start=5830
488
- _FETCHEXCHANGEINFOSYMBOLRESPONSE_FILTERS_MARKETLOTSIZE._serialized_end=5915
489
- _FETCHEXCHANGEINFOSYMBOLRESPONSE_FILTERS_MAXNUMORDERS._serialized_start=5917
490
- _FETCHEXCHANGEINFOSYMBOLRESPONSE_FILTERS_MAXNUMORDERS._serialized_end=5973
491
- _FETCHEXCHANGEINFOSYMBOLRESPONSE_FILTERS_MAXNUMALGOORDERS._serialized_start=5975
492
- _FETCHEXCHANGEINFOSYMBOLRESPONSE_FILTERS_MAXNUMALGOORDERS._serialized_end=6039
493
- _FETCHEXCHANGEINFOSYMBOLRESPONSE_FILTERS_MAXNUMICEBERGORDERS._serialized_start=6041
494
- _FETCHEXCHANGEINFOSYMBOLRESPONSE_FILTERS_MAXNUMICEBERGORDERS._serialized_end=6111
495
- _FETCHEXCHANGEINFOSYMBOLRESPONSE_FILTERS_MAXPOSITION._serialized_start=6113
496
- _FETCHEXCHANGEINFOSYMBOLRESPONSE_FILTERS_MAXPOSITION._serialized_end=6167
497
- _CANCELALLORDERSRESPONSE._serialized_start=6360
498
- _CANCELALLORDERSRESPONSE._serialized_end=6767
499
- _CANCELALLORDERSRESPONSE_CANCELORDER._serialized_start=6448
500
- _CANCELALLORDERSRESPONSE_CANCELORDER._serialized_end=6767
501
- _FETCHORDERREQUEST._serialized_start=6769
502
- _FETCHORDERREQUEST._serialized_end=6887
503
- _FETCHORDERRESPONSE._serialized_start=6890
504
- _FETCHORDERRESPONSE._serialized_end=7307
505
- _FETCHOPENORDERSRESPONSE._serialized_start=7310
506
- _FETCHOPENORDERSRESPONSE._serialized_end=7818
507
- _FETCHOPENORDERSRESPONSE_ORDER._serialized_start=7414
508
- _FETCHOPENORDERSRESPONSE_ORDER._serialized_end=7818
509
- _MARKETREQUEST._serialized_start=7820
510
- _MARKETREQUEST._serialized_end=7888
511
- _STARTSTREAMREQUEST._serialized_start=7891
512
- _STARTSTREAMREQUEST._serialized_end=8020
513
- _OPENCLIENTCONNECTIONREQUEST._serialized_start=8022
514
- _OPENCLIENTCONNECTIONREQUEST._serialized_end=8113
515
- _OPENCLIENTCONNECTIONID._serialized_start=8115
516
- _OPENCLIENTCONNECTIONID._serialized_end=8237
517
- _FETCHSERVERTIMEREQUEST._serialized_start=8239
518
- _FETCHSERVERTIMEREQUEST._serialized_end=8300
519
- _FETCHSERVERTIMERESPONSE._serialized_start=8302
520
- _FETCHSERVERTIMERESPONSE._serialized_end=8348
521
- _MARTIN._serialized_start=8351
522
- _MARTIN._serialized_end=10342
473
+ _FETCHEXCHANGEINFOSYMBOLRESPONSE._serialized_start=3853
474
+ _FETCHEXCHANGEINFOSYMBOLRESPONSE._serialized_end=6373
475
+ _FETCHEXCHANGEINFOSYMBOLRESPONSE_FILTERS._serialized_start=4495
476
+ _FETCHEXCHANGEINFOSYMBOLRESPONSE_FILTERS._serialized_end=6373
477
+ _FETCHEXCHANGEINFOSYMBOLRESPONSE_FILTERS_PRICEFILTER._serialized_start=5420
478
+ _FETCHEXCHANGEINFOSYMBOLRESPONSE_FILTERS_PRICEFILTER._serialized_end=5507
479
+ _FETCHEXCHANGEINFOSYMBOLRESPONSE_FILTERS_PERCENTPRICE._serialized_start=5509
480
+ _FETCHEXCHANGEINFOSYMBOLRESPONSE_FILTERS_PERCENTPRICE._serialized_end=5611
481
+ _FETCHEXCHANGEINFOSYMBOLRESPONSE_FILTERS_LOTSIZE._serialized_start=5613
482
+ _FETCHEXCHANGEINFOSYMBOLRESPONSE_FILTERS_LOTSIZE._serialized_end=5692
483
+ _FETCHEXCHANGEINFOSYMBOLRESPONSE_FILTERS_MINNOTIONAL._serialized_start=5694
484
+ _FETCHEXCHANGEINFOSYMBOLRESPONSE_FILTERS_MINNOTIONAL._serialized_end=5793
485
+ _FETCHEXCHANGEINFOSYMBOLRESPONSE_FILTERS_ICEBERGPARTS._serialized_start=5795
486
+ _FETCHEXCHANGEINFOSYMBOLRESPONSE_FILTERS_ICEBERGPARTS._serialized_end=5844
487
+ _FETCHEXCHANGEINFOSYMBOLRESPONSE_FILTERS_MARKETLOTSIZE._serialized_start=5846
488
+ _FETCHEXCHANGEINFOSYMBOLRESPONSE_FILTERS_MARKETLOTSIZE._serialized_end=5931
489
+ _FETCHEXCHANGEINFOSYMBOLRESPONSE_FILTERS_MAXNUMORDERS._serialized_start=5933
490
+ _FETCHEXCHANGEINFOSYMBOLRESPONSE_FILTERS_MAXNUMORDERS._serialized_end=5989
491
+ _FETCHEXCHANGEINFOSYMBOLRESPONSE_FILTERS_MAXNUMALGOORDERS._serialized_start=5991
492
+ _FETCHEXCHANGEINFOSYMBOLRESPONSE_FILTERS_MAXNUMALGOORDERS._serialized_end=6055
493
+ _FETCHEXCHANGEINFOSYMBOLRESPONSE_FILTERS_MAXNUMICEBERGORDERS._serialized_start=6057
494
+ _FETCHEXCHANGEINFOSYMBOLRESPONSE_FILTERS_MAXNUMICEBERGORDERS._serialized_end=6127
495
+ _FETCHEXCHANGEINFOSYMBOLRESPONSE_FILTERS_MAXPOSITION._serialized_start=6129
496
+ _FETCHEXCHANGEINFOSYMBOLRESPONSE_FILTERS_MAXPOSITION._serialized_end=6183
497
+ _CANCELALLORDERSRESPONSE._serialized_start=6376
498
+ _CANCELALLORDERSRESPONSE._serialized_end=6783
499
+ _CANCELALLORDERSRESPONSE_CANCELORDER._serialized_start=6464
500
+ _CANCELALLORDERSRESPONSE_CANCELORDER._serialized_end=6783
501
+ _FETCHORDERREQUEST._serialized_start=6785
502
+ _FETCHORDERREQUEST._serialized_end=6903
503
+ _FETCHORDERRESPONSE._serialized_start=6906
504
+ _FETCHORDERRESPONSE._serialized_end=7323
505
+ _FETCHOPENORDERSRESPONSE._serialized_start=7326
506
+ _FETCHOPENORDERSRESPONSE._serialized_end=7834
507
+ _FETCHOPENORDERSRESPONSE_ORDER._serialized_start=7430
508
+ _FETCHOPENORDERSRESPONSE_ORDER._serialized_end=7834
509
+ _MARKETREQUEST._serialized_start=7836
510
+ _MARKETREQUEST._serialized_end=7920
511
+ _STARTSTREAMREQUEST._serialized_start=7923
512
+ _STARTSTREAMREQUEST._serialized_end=8052
513
+ _OPENCLIENTCONNECTIONREQUEST._serialized_start=8054
514
+ _OPENCLIENTCONNECTIONREQUEST._serialized_end=8145
515
+ _OPENCLIENTCONNECTIONID._serialized_start=8147
516
+ _OPENCLIENTCONNECTIONID._serialized_end=8269
517
+ _FETCHSERVERTIMEREQUEST._serialized_start=8271
518
+ _FETCHSERVERTIMEREQUEST._serialized_end=8332
519
+ _FETCHSERVERTIMERESPONSE._serialized_start=8334
520
+ _FETCHSERVERTIMERESPONSE._serialized_end=8380
521
+ _MARTIN._serialized_start=8383
522
+ _MARTIN._serialized_end=10443
523
523
  # @@protoc_insertion_point(module_scope)
@@ -134,6 +134,11 @@ class MartinStub(object):
134
134
  request_serializer=exchanges__wrapper_dot_api__pb2.FetchFundingWalletRequest.SerializeToString,
135
135
  response_deserializer=exchanges__wrapper_dot_api__pb2.FetchFundingWalletResponse.FromString,
136
136
  )
137
+ self.TransferToMaster = channel.unary_unary(
138
+ '/martin.Martin/TransferToMaster',
139
+ request_serializer=exchanges__wrapper_dot_api__pb2.MarketRequest.SerializeToString,
140
+ response_deserializer=exchanges__wrapper_dot_api__pb2.SimpleResponse.FromString,
141
+ )
137
142
 
138
143
 
139
144
  class MartinServicer(object):
@@ -283,6 +288,12 @@ class MartinServicer(object):
283
288
  context.set_details('Method not implemented!')
284
289
  raise NotImplementedError('Method not implemented!')
285
290
 
291
+ def TransferToMaster(self, request, context):
292
+ """Missing associated documentation comment in .proto file."""
293
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
294
+ context.set_details('Method not implemented!')
295
+ raise NotImplementedError('Method not implemented!')
296
+
286
297
 
287
298
  def add_MartinServicer_to_server(servicer, server):
288
299
  rpc_method_handlers = {
@@ -406,6 +417,11 @@ def add_MartinServicer_to_server(servicer, server):
406
417
  request_deserializer=exchanges__wrapper_dot_api__pb2.FetchFundingWalletRequest.FromString,
407
418
  response_serializer=exchanges__wrapper_dot_api__pb2.FetchFundingWalletResponse.SerializeToString,
408
419
  ),
420
+ 'TransferToMaster': grpc.unary_unary_rpc_method_handler(
421
+ servicer.TransferToMaster,
422
+ request_deserializer=exchanges__wrapper_dot_api__pb2.MarketRequest.FromString,
423
+ response_serializer=exchanges__wrapper_dot_api__pb2.SimpleResponse.SerializeToString,
424
+ ),
409
425
  }
410
426
  generic_handler = grpc.method_handlers_generic_handler(
411
427
  'martin.Martin', rpc_method_handlers)
@@ -823,3 +839,20 @@ class Martin(object):
823
839
  exchanges__wrapper_dot_api__pb2.FetchFundingWalletResponse.FromString,
824
840
  options, channel_credentials,
825
841
  insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
842
+
843
+ @staticmethod
844
+ def TransferToMaster(request,
845
+ target,
846
+ options=(),
847
+ channel_credentials=None,
848
+ call_credentials=None,
849
+ insecure=False,
850
+ compression=None,
851
+ wait_for_ready=None,
852
+ timeout=None,
853
+ metadata=None):
854
+ return grpc.experimental.unary_unary(request, target, '/martin.Martin/TransferToMaster',
855
+ exchanges__wrapper_dot_api__pb2.MarketRequest.SerializeToString,
856
+ exchanges__wrapper_dot_api__pb2.SimpleResponse.FromString,
857
+ options, channel_credentials,
858
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@@ -1,5 +1,3 @@
1
- #!/usr/bin/python3
2
- # -*- coding: utf-8 -*-
3
1
  """
4
2
  Parser for convert Bitfinex REST API/WSS response to Binance like result
5
3
  """
@@ -1,6 +1,3 @@
1
- #!/usr/bin/python3
2
- # -*- coding: utf-8 -*-
3
-
4
1
  import hmac
5
2
  import hashlib
6
3
  import base64
@@ -83,3 +80,61 @@ def generate_signature(exchange, api_secret, data):
83
80
  else:
84
81
  sig = hmac.new(api_secret.encode("utf-8"), data.encode("utf-8"), hashlib.sha256).hexdigest()
85
82
  return sig
83
+
84
+
85
+ def order(res: {}, response_type=None) -> {}:
86
+ if response_type:
87
+ binance_order = {
88
+ "symbol": res.get('symbol'),
89
+ "origClientOrderId": res.get('origClientOrderId'),
90
+ "orderId": res.get('orderId'),
91
+ "orderListId": res.get('orderListId'),
92
+ "clientOrderId": res.get('clientOrderId'),
93
+ "transactTime": res.get('time'),
94
+ "price": res.get('price'),
95
+ "origQty": res.get('origQty'),
96
+ "executedQty": res.get('executedQty'),
97
+ "cummulativeQuoteQty": res.get('cummulativeQuoteQty'),
98
+ "status": res.get('status'),
99
+ "timeInForce": res.get('timeInForce'),
100
+ "type": res.get('type'),
101
+ "side": res.get('side'),
102
+ }
103
+ elif response_type is None:
104
+ binance_order = {
105
+ "symbol": res.get('symbol'),
106
+ "orderId": res.get('orderId'),
107
+ "orderListId": res.get('orderListId'),
108
+ "clientOrderId": res.get('clientOrderId'),
109
+ "price": res.get('price'),
110
+ "origQty": res.get('origQty'),
111
+ "executedQty": res.get('executedQty'),
112
+ "cummulativeQuoteQty": res.get('cummulativeQuoteQty'),
113
+ "status": res.get('status'),
114
+ "timeInForce": res.get('timeInForce'),
115
+ "type": res.get('type'),
116
+ "side": res.get('side'),
117
+ "stopPrice": res.get('stopPrice'),
118
+ "icebergQty": res.get('icebergQty'),
119
+ "time": res.get('time'),
120
+ "updateTime": res.get('updateTime'),
121
+ "isWorking": res.get('isWorking'),
122
+ "origQuoteOrderQty": res.get('origQuoteOrderQty'),
123
+ }
124
+ else:
125
+ binance_order = {
126
+ "symbol": res.get('symbol'),
127
+ "orderId": res.get('orderId'),
128
+ "orderListId": res.get('orderListId'),
129
+ "clientOrderId": res.get('clientOrderId'),
130
+ "price": res.get('price'),
131
+ "origQty": res.get('origQty'),
132
+ "executedQty": res.get('executedQty'),
133
+ "cummulativeQuoteQty": res.get('cummulativeQuoteQty'),
134
+ "status": res.get('status'),
135
+ "timeInForce": res.get('timeInForce'),
136
+ "type": res.get('type'),
137
+ "side": res.get('side'),
138
+ }
139
+ # print(f"order.binance_order: {binance_order}")
140
+ return binance_order