From a9a25c647a82d34f8726b3139c4bb01c3a25c61f Mon Sep 17 00:00:00 2001 From: abel Date: Fri, 3 Nov 2023 14:43:44 -0300 Subject: [PATCH] (feat) Updated buffer gas amount for fee in all examples --- CHANGELOG.md | 1 + examples/chain_client/0_LocalOrderHash.py | 13 +- .../13_MsgIncreasePositionMargin.py | 5 +- examples/chain_client/15_MsgWithdraw.py | 19 +-- .../chain_client/16_MsgSubaccountTransfer.py | 5 +- .../chain_client/17_MsgBatchUpdateOrders.py | 5 +- examples/chain_client/18_MsgBid.py | 5 +- examples/chain_client/19_MsgGrant.py | 5 +- examples/chain_client/1_MsgSend.py | 5 +- examples/chain_client/20_MsgExec.py | 5 +- examples/chain_client/21_MsgRevoke.py | 5 +- examples/chain_client/22_MsgSendToEth.py | 5 +- .../chain_client/23_MsgRelayPriceFeedPrice.py | 5 +- examples/chain_client/24_MsgRewardsOptOut.py | 5 +- examples/chain_client/25_MsgDelegate.py | 5 +- .../26_MsgWithdrawDelegatorReward.py | 5 +- examples/chain_client/2_MsgDeposit.py | 5 +- examples/chain_client/30_ExternalTransfer.py | 5 +- .../31_MsgCreateBinaryOptionsLimitOrder.py | 7 +- .../32_MsgCreateBinaryOptionsMarketOrder.py | 5 +- .../33_MsgCancelBinaryOptionsOrder.py | 5 +- .../34_MsgAdminUpdateBinaryOptionsMarket.py | 5 +- .../35_MsgInstantBinaryOptionsMarketLaunch.py | 5 +- .../chain_client/36_MsgRelayProviderPrices.py | 5 +- .../chain_client/3_MsgCreateSpotLimitOrder.py | 5 +- .../chain_client/40_MsgExecuteContract.py | 5 +- .../chain_client/41_MsgCreateInsuranceFund.py | 5 +- examples/chain_client/42_MsgUnderwrite.py | 5 +- .../chain_client/43_MsgRequestRedemption.py | 5 +- ...8_WithdrawValidatorCommissionAndRewards.py | 5 +- .../4_MsgCreateSpotMarketOrder.py | 5 +- examples/chain_client/5_MsgCancelSpotOrder.py | 5 +- .../6_MsgCreateDerivativeLimitOrder.py | 5 +- .../7_MsgCreateDerivativeMarketOrder.py | 5 +- .../8_MsgCancelDerivativeOrder.py | 5 +- pyinjective/constant.py | 44 +----- pyinjective/core/market.py | 3 +- .../exchange/injective_campaign_rpc_pb2.py | 12 +- .../injective_campaign_rpc_pb2_grpc.py | 2 +- .../injective_derivative_exchange_rpc_pb2.py | 136 +++++++++--------- .../injective_spot_exchange_rpc_pb2.py | 100 ++++++------- .../exchange/v1beta1/query_pb2_grpc.py | 3 +- pyinjective/utils/denom.py | 41 ++++++ pyinjective/utils/metadata_validation.py | 7 +- pyproject.toml | 2 +- tests/core/test_market.py | 2 +- tests/test_composer.py | 2 +- 47 files changed, 288 insertions(+), 261 deletions(-) create mode 100644 pyinjective/utils/denom.py diff --git a/CHANGELOG.md b/CHANGELOG.md index 2aca25e5..db80fe82 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ All notable changes to this project will be documented in this file. - Migrated all proto objects dependency to support chain version 1.22 - Moved changelog from the README.md file to its own CHANGELOG.md file - Remove `aiocron` dependency. Use plain asyncio tasks to solve the timeout height synchronization +- Updated the gas fee buffer used to calculate fee consumption in all examples ## [0.9.3] * Updated TIA/USDT-30NOV2023 market id in denoms_mainnet.ini file diff --git a/examples/chain_client/0_LocalOrderHash.py b/examples/chain_client/0_LocalOrderHash.py index eed3c28b..e731be69 100644 --- a/examples/chain_client/0_LocalOrderHash.py +++ b/examples/chain_client/0_LocalOrderHash.py @@ -2,6 +2,7 @@ import uuid from pyinjective.async_client import AsyncClient +from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT, GAS_PRICE from pyinjective.core.network import Network from pyinjective.orderhash import OrderHashManager from pyinjective.transaction import Transaction @@ -101,9 +102,9 @@ async def main() -> None: .with_account_num(client.get_number()) .with_chain_id(network.chain_id) ) - gas_price = 500000000 + gas_price = GAS_PRICE base_gas = 85000 - gas_limit = base_gas + 20000 # add 20k for gas, fee computation + gas_limit = base_gas + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") fee = [ composer.Coin( @@ -138,9 +139,9 @@ async def main() -> None: .with_account_num(client.get_number()) .with_chain_id(network.chain_id) ) - gas_price = 500000000 + gas_price = GAS_PRICE base_gas = 85000 - gas_limit = base_gas + 20000 # add 20k for gas, fee computation + gas_limit = base_gas + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") fee = [ composer.Coin( @@ -228,9 +229,9 @@ async def main() -> None: .with_account_num(client.get_number()) .with_chain_id(network.chain_id) ) - gas_price = 500000000 + gas_price = GAS_PRICE base_gas = 85000 - gas_limit = base_gas + 20000 # add 20k for gas, fee computation + gas_limit = base_gas + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") fee = [ composer.Coin( diff --git a/examples/chain_client/13_MsgIncreasePositionMargin.py b/examples/chain_client/13_MsgIncreasePositionMargin.py index a2556f78..530be2b4 100644 --- a/examples/chain_client/13_MsgIncreasePositionMargin.py +++ b/examples/chain_client/13_MsgIncreasePositionMargin.py @@ -1,6 +1,7 @@ import asyncio from pyinjective.async_client import AsyncClient +from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT, GAS_PRICE from pyinjective.core.network import Network from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey @@ -53,8 +54,8 @@ async def main() -> None: return # build tx - gas_price = 500000000 - gas_limit = sim_res.gas_info.gas_used + 20000 # add 20k for gas, fee computation + gas_price = GAS_PRICE + gas_limit = sim_res.gas_info.gas_used + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") fee = [ composer.Coin( diff --git a/examples/chain_client/15_MsgWithdraw.py b/examples/chain_client/15_MsgWithdraw.py index 437d0037..83a516be 100644 --- a/examples/chain_client/15_MsgWithdraw.py +++ b/examples/chain_client/15_MsgWithdraw.py @@ -1,20 +1,7 @@ -# Copyright 2022 Injective Labs -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - import asyncio from pyinjective.async_client import AsyncClient +from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT, GAS_PRICE from pyinjective.core.network import Network from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey @@ -58,8 +45,8 @@ async def main() -> None: return # build tx - gas_price = 500000000 - gas_limit = sim_res.gas_info.gas_used + 20000 # add 20k for gas, fee computation + gas_price = GAS_PRICE + gas_limit = sim_res.gas_info.gas_used + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") fee = [ composer.Coin( diff --git a/examples/chain_client/16_MsgSubaccountTransfer.py b/examples/chain_client/16_MsgSubaccountTransfer.py index bc2e5baf..4f7b94c9 100644 --- a/examples/chain_client/16_MsgSubaccountTransfer.py +++ b/examples/chain_client/16_MsgSubaccountTransfer.py @@ -1,6 +1,7 @@ import asyncio from pyinjective.async_client import AsyncClient +from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT, GAS_PRICE from pyinjective.core.network import Network from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey @@ -51,8 +52,8 @@ async def main() -> None: return # build tx - gas_price = 500000000 - gas_limit = sim_res.gas_info.gas_used + 20000 # add 20k for gas, fee computation + gas_price = GAS_PRICE + gas_limit = sim_res.gas_info.gas_used + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") fee = [ composer.Coin( diff --git a/examples/chain_client/17_MsgBatchUpdateOrders.py b/examples/chain_client/17_MsgBatchUpdateOrders.py index b79a526b..e832197e 100644 --- a/examples/chain_client/17_MsgBatchUpdateOrders.py +++ b/examples/chain_client/17_MsgBatchUpdateOrders.py @@ -2,6 +2,7 @@ import uuid from pyinjective.async_client import AsyncClient +from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT, GAS_PRICE from pyinjective.core.network import Network from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey @@ -140,8 +141,8 @@ async def main() -> None: print(sim_res_msg) # build tx - gas_price = 500000000 - gas_limit = sim_res.gas_info.gas_used + 20000 # add 20k for gas, fee computation + gas_price = GAS_PRICE + gas_limit = sim_res.gas_info.gas_used + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") fee = [ composer.Coin( diff --git a/examples/chain_client/18_MsgBid.py b/examples/chain_client/18_MsgBid.py index 5a23f172..30274761 100644 --- a/examples/chain_client/18_MsgBid.py +++ b/examples/chain_client/18_MsgBid.py @@ -1,6 +1,7 @@ import asyncio from pyinjective.async_client import AsyncClient +from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT, GAS_PRICE from pyinjective.core.network import Network from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey @@ -43,8 +44,8 @@ async def main() -> None: return # build tx - gas_price = 500000000 - gas_limit = sim_res.gas_info.gas_used + 20000 # add 20k for gas, fee computation + gas_price = GAS_PRICE + gas_limit = sim_res.gas_info.gas_used + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") fee = [ composer.Coin( diff --git a/examples/chain_client/19_MsgGrant.py b/examples/chain_client/19_MsgGrant.py index 548af1a5..7c0630dd 100644 --- a/examples/chain_client/19_MsgGrant.py +++ b/examples/chain_client/19_MsgGrant.py @@ -1,6 +1,7 @@ import asyncio from pyinjective.async_client import AsyncClient +from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT, GAS_PRICE from pyinjective.core.network import Network from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey @@ -62,8 +63,8 @@ async def main() -> None: return # build tx - gas_price = 500000000 - gas_limit = sim_res.gas_info.gas_used + 20000 # add 20k for gas, fee computation + gas_price = GAS_PRICE + gas_limit = sim_res.gas_info.gas_used + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") fee = [ composer.Coin( diff --git a/examples/chain_client/1_MsgSend.py b/examples/chain_client/1_MsgSend.py index 1d3c28a6..e6801ea0 100644 --- a/examples/chain_client/1_MsgSend.py +++ b/examples/chain_client/1_MsgSend.py @@ -1,6 +1,7 @@ import asyncio from pyinjective.async_client import AsyncClient +from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT, GAS_PRICE from pyinjective.core.network import Network from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey @@ -48,8 +49,8 @@ async def main() -> None: return # build tx - gas_price = 500000000 - gas_limit = sim_res.gas_info.gas_used + 20000 # add 20k for gas, fee computation + gas_price = GAS_PRICE + gas_limit = sim_res.gas_info.gas_used + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") fee = [ composer.Coin( diff --git a/examples/chain_client/20_MsgExec.py b/examples/chain_client/20_MsgExec.py index 67709b3d..8da619cd 100644 --- a/examples/chain_client/20_MsgExec.py +++ b/examples/chain_client/20_MsgExec.py @@ -2,6 +2,7 @@ import uuid from pyinjective.async_client import AsyncClient +from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT, GAS_PRICE from pyinjective.core.network import Network from pyinjective.transaction import Transaction from pyinjective.wallet import Address, PrivateKey @@ -67,8 +68,8 @@ async def main() -> None: print(unpacked_msg_res) # build tx - gas_price = 500000000 - gas_limit = sim_res.gas_info.gas_used + 20000 # add 20k for gas, fee computation + gas_price = GAS_PRICE + gas_limit = sim_res.gas_info.gas_used + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") fee = [ composer.Coin( diff --git a/examples/chain_client/21_MsgRevoke.py b/examples/chain_client/21_MsgRevoke.py index 7c040810..f73a4ba5 100644 --- a/examples/chain_client/21_MsgRevoke.py +++ b/examples/chain_client/21_MsgRevoke.py @@ -1,6 +1,7 @@ import asyncio from pyinjective.async_client import AsyncClient +from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT, GAS_PRICE from pyinjective.core.network import Network from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey @@ -47,8 +48,8 @@ async def main() -> None: return # build tx - gas_price = 500000000 - gas_limit = sim_res.gas_info.gas_used + 20000 # add 20k for gas, fee computation + gas_price = GAS_PRICE + gas_limit = sim_res.gas_info.gas_used + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") fee = [ composer.Coin( diff --git a/examples/chain_client/22_MsgSendToEth.py b/examples/chain_client/22_MsgSendToEth.py index 96f6e435..f37515f8 100644 --- a/examples/chain_client/22_MsgSendToEth.py +++ b/examples/chain_client/22_MsgSendToEth.py @@ -3,6 +3,7 @@ import requests from pyinjective.async_client import AsyncClient +from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT, GAS_PRICE from pyinjective.core.network import Network from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey @@ -58,8 +59,8 @@ async def main() -> None: return # build tx - gas_price = 500000000 - gas_limit = sim_res.gas_info.gas_used + 20000 # add 20k for gas, fee computation + gas_price = GAS_PRICE + gas_limit = sim_res.gas_info.gas_used + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") fee = [ composer.Coin( diff --git a/examples/chain_client/23_MsgRelayPriceFeedPrice.py b/examples/chain_client/23_MsgRelayPriceFeedPrice.py index f55c8c72..db4c9243 100644 --- a/examples/chain_client/23_MsgRelayPriceFeedPrice.py +++ b/examples/chain_client/23_MsgRelayPriceFeedPrice.py @@ -1,6 +1,7 @@ import asyncio from pyinjective.async_client import AsyncClient +from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT, GAS_PRICE from pyinjective.core.network import Network from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey @@ -48,8 +49,8 @@ async def main() -> None: return # build tx - gas_price = 500000000 - gas_limit = sim_res.gas_info.gas_used + 20000 # add 20k for gas, fee computation + gas_price = GAS_PRICE + gas_limit = sim_res.gas_info.gas_used + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") fee = [ composer.Coin( diff --git a/examples/chain_client/24_MsgRewardsOptOut.py b/examples/chain_client/24_MsgRewardsOptOut.py index abf63829..edba421e 100644 --- a/examples/chain_client/24_MsgRewardsOptOut.py +++ b/examples/chain_client/24_MsgRewardsOptOut.py @@ -1,6 +1,7 @@ import asyncio from pyinjective.async_client import AsyncClient +from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT, GAS_PRICE from pyinjective.core.network import Network from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey @@ -43,8 +44,8 @@ async def main() -> None: return # build tx - gas_price = 500000000 - gas_limit = sim_res.gas_info.gas_used + 20000 # add 20k for gas, fee computation + gas_price = GAS_PRICE + gas_limit = sim_res.gas_info.gas_used + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") fee = [ composer.Coin( diff --git a/examples/chain_client/25_MsgDelegate.py b/examples/chain_client/25_MsgDelegate.py index 9243b6d4..f8314399 100644 --- a/examples/chain_client/25_MsgDelegate.py +++ b/examples/chain_client/25_MsgDelegate.py @@ -1,6 +1,7 @@ import asyncio from pyinjective.async_client import AsyncClient +from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT, GAS_PRICE from pyinjective.core.network import Network from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey @@ -48,8 +49,8 @@ async def main() -> None: return # build tx - gas_price = 500000000 - gas_limit = sim_res.gas_info.gas_used + 20000 # add 20k for gas, fee computation + gas_price = GAS_PRICE + gas_limit = sim_res.gas_info.gas_used + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") fee = [ composer.Coin( diff --git a/examples/chain_client/26_MsgWithdrawDelegatorReward.py b/examples/chain_client/26_MsgWithdrawDelegatorReward.py index 61b9fbef..5e6e982f 100644 --- a/examples/chain_client/26_MsgWithdrawDelegatorReward.py +++ b/examples/chain_client/26_MsgWithdrawDelegatorReward.py @@ -1,6 +1,7 @@ import asyncio from pyinjective.async_client import AsyncClient +from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT, GAS_PRICE from pyinjective.core.network import Network from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey @@ -47,8 +48,8 @@ async def main() -> None: return # build tx - gas_price = 500000000 - gas_limit = sim_res.gas_info.gas_used + 20000 # add 20k for gas, fee computation + gas_price = GAS_PRICE + gas_limit = sim_res.gas_info.gas_used + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") fee = [ composer.Coin( diff --git a/examples/chain_client/2_MsgDeposit.py b/examples/chain_client/2_MsgDeposit.py index 13febc04..8afa3d60 100644 --- a/examples/chain_client/2_MsgDeposit.py +++ b/examples/chain_client/2_MsgDeposit.py @@ -1,6 +1,7 @@ import asyncio from pyinjective.async_client import AsyncClient +from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT, GAS_PRICE from pyinjective.core.network import Network from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey @@ -44,8 +45,8 @@ async def main() -> None: return # build tx - gas_price = 500000000 - gas_limit = sim_res.gas_info.gas_used + 20000 # add 20k for gas, fee computation + gas_price = GAS_PRICE + gas_limit = sim_res.gas_info.gas_used + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") fee = [ composer.Coin( diff --git a/examples/chain_client/30_ExternalTransfer.py b/examples/chain_client/30_ExternalTransfer.py index c5dbcc53..9d98fbd1 100644 --- a/examples/chain_client/30_ExternalTransfer.py +++ b/examples/chain_client/30_ExternalTransfer.py @@ -1,6 +1,7 @@ import asyncio from pyinjective.async_client import AsyncClient +from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT, GAS_PRICE from pyinjective.core.network import Network from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey @@ -51,8 +52,8 @@ async def main() -> None: return # build tx - gas_price = 500000000 - gas_limit = sim_res.gas_info.gas_used + 20000 # add 20k for gas, fee computation + gas_price = GAS_PRICE + gas_limit = sim_res.gas_info.gas_used + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") fee = [ composer.Coin( diff --git a/examples/chain_client/31_MsgCreateBinaryOptionsLimitOrder.py b/examples/chain_client/31_MsgCreateBinaryOptionsLimitOrder.py index f2bae417..a2e6e714 100644 --- a/examples/chain_client/31_MsgCreateBinaryOptionsLimitOrder.py +++ b/examples/chain_client/31_MsgCreateBinaryOptionsLimitOrder.py @@ -2,9 +2,10 @@ import uuid from pyinjective.async_client import AsyncClient -from pyinjective.constant import Denom +from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT, GAS_PRICE from pyinjective.core.network import Network from pyinjective.transaction import Transaction +from pyinjective.utils.denom import Denom from pyinjective.wallet import PrivateKey @@ -68,8 +69,8 @@ async def main() -> None: print(sim_res_msg) # build tx - gas_price = 500000000 - gas_limit = sim_res.gas_info.gas_used + 20000 # add 20k for gas, fee computation + gas_price = GAS_PRICE + gas_limit = sim_res.gas_info.gas_used + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") fee = [ composer.Coin( diff --git a/examples/chain_client/32_MsgCreateBinaryOptionsMarketOrder.py b/examples/chain_client/32_MsgCreateBinaryOptionsMarketOrder.py index e7c0014f..98645c7f 100644 --- a/examples/chain_client/32_MsgCreateBinaryOptionsMarketOrder.py +++ b/examples/chain_client/32_MsgCreateBinaryOptionsMarketOrder.py @@ -2,6 +2,7 @@ import uuid from pyinjective.async_client import AsyncClient +from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT, GAS_PRICE from pyinjective.core.network import Network from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey @@ -62,8 +63,8 @@ async def main() -> None: print(sim_res_msg) # build tx - gas_price = 500000000 - gas_limit = sim_res.gas_info.gas_used + 20000 # add 20k for gas, fee computation + gas_price = GAS_PRICE + gas_limit = sim_res.gas_info.gas_used + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") fee = [ composer.Coin( diff --git a/examples/chain_client/33_MsgCancelBinaryOptionsOrder.py b/examples/chain_client/33_MsgCancelBinaryOptionsOrder.py index 9daaf419..9ae1d009 100644 --- a/examples/chain_client/33_MsgCancelBinaryOptionsOrder.py +++ b/examples/chain_client/33_MsgCancelBinaryOptionsOrder.py @@ -1,6 +1,7 @@ import asyncio from pyinjective.async_client import AsyncClient +from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT, GAS_PRICE from pyinjective.core.network import Network from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey @@ -53,8 +54,8 @@ async def main() -> None: print(sim_res_msg) # build tx - gas_price = 500000000 - gas_limit = sim_res.gas_info.gas_used + 20000 # add 20k for gas, fee computation + gas_price = GAS_PRICE + gas_limit = sim_res.gas_info.gas_used + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") fee = [ composer.Coin( diff --git a/examples/chain_client/34_MsgAdminUpdateBinaryOptionsMarket.py b/examples/chain_client/34_MsgAdminUpdateBinaryOptionsMarket.py index da3966e0..cf7a6356 100644 --- a/examples/chain_client/34_MsgAdminUpdateBinaryOptionsMarket.py +++ b/examples/chain_client/34_MsgAdminUpdateBinaryOptionsMarket.py @@ -1,6 +1,7 @@ import asyncio from pyinjective.async_client import AsyncClient +from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT, GAS_PRICE from pyinjective.core.network import Network from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey @@ -61,8 +62,8 @@ async def main() -> None: print(sim_res_msg) # build tx - gas_price = 500000000 - gas_limit = sim_res.gas_info.gas_used + 20000 # add 20k for gas, fee computation + gas_price = GAS_PRICE + gas_limit = sim_res.gas_info.gas_used + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") fee = [ composer.Coin( diff --git a/examples/chain_client/35_MsgInstantBinaryOptionsMarketLaunch.py b/examples/chain_client/35_MsgInstantBinaryOptionsMarketLaunch.py index 1116a669..8e043d64 100644 --- a/examples/chain_client/35_MsgInstantBinaryOptionsMarketLaunch.py +++ b/examples/chain_client/35_MsgInstantBinaryOptionsMarketLaunch.py @@ -1,6 +1,7 @@ import asyncio from pyinjective.async_client import AsyncClient +from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT, GAS_PRICE from pyinjective.core.network import Network from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey @@ -63,8 +64,8 @@ async def main() -> None: print(sim_res_msg) # build tx - gas_price = 500000000 - gas_limit = sim_res.gas_info.gas_used + 20000 # add 20k for gas, fee computation + gas_price = GAS_PRICE + gas_limit = sim_res.gas_info.gas_used + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") fee = [ composer.Coin( diff --git a/examples/chain_client/36_MsgRelayProviderPrices.py b/examples/chain_client/36_MsgRelayProviderPrices.py index 2068c572..0fe33f7f 100644 --- a/examples/chain_client/36_MsgRelayProviderPrices.py +++ b/examples/chain_client/36_MsgRelayProviderPrices.py @@ -1,6 +1,7 @@ import asyncio from pyinjective.async_client import AsyncClient +from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT, GAS_PRICE from pyinjective.core.network import Network from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey @@ -53,8 +54,8 @@ async def main() -> None: print(sim_res_msg) # build tx - gas_price = 500000000 - gas_limit = sim_res.gas_info.gas_used + 20000 # add 20k for gas, fee computation + gas_price = GAS_PRICE + gas_limit = sim_res.gas_info.gas_used + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") fee = [ composer.Coin( diff --git a/examples/chain_client/3_MsgCreateSpotLimitOrder.py b/examples/chain_client/3_MsgCreateSpotLimitOrder.py index 59ed197c..95ad7970 100644 --- a/examples/chain_client/3_MsgCreateSpotLimitOrder.py +++ b/examples/chain_client/3_MsgCreateSpotLimitOrder.py @@ -2,6 +2,7 @@ import uuid from pyinjective.async_client import AsyncClient +from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT, GAS_PRICE from pyinjective.core.network import Network from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey @@ -64,8 +65,8 @@ async def main() -> None: print(sim_res_msg) # build tx - gas_price = 500000000 - gas_limit = sim_res.gas_info.gas_used + 20000 # add 20k for gas, fee computation + gas_price = GAS_PRICE + gas_limit = sim_res.gas_info.gas_used + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") fee = [ composer.Coin( diff --git a/examples/chain_client/40_MsgExecuteContract.py b/examples/chain_client/40_MsgExecuteContract.py index 3d92b825..677d9cc2 100644 --- a/examples/chain_client/40_MsgExecuteContract.py +++ b/examples/chain_client/40_MsgExecuteContract.py @@ -1,6 +1,7 @@ import asyncio from pyinjective.async_client import AsyncClient +from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT, GAS_PRICE from pyinjective.core.network import Network from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey @@ -58,8 +59,8 @@ async def main() -> None: return # build tx - gas_price = 500000000 - gas_limit = sim_res.gas_info.gas_used + 20000 # add 20k for gas, fee computation + gas_price = GAS_PRICE + gas_limit = sim_res.gas_info.gas_used + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") fee = [ composer.Coin( diff --git a/examples/chain_client/41_MsgCreateInsuranceFund.py b/examples/chain_client/41_MsgCreateInsuranceFund.py index 86f7b0b6..d287638c 100644 --- a/examples/chain_client/41_MsgCreateInsuranceFund.py +++ b/examples/chain_client/41_MsgCreateInsuranceFund.py @@ -1,6 +1,7 @@ import asyncio from pyinjective.async_client import AsyncClient +from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT, GAS_PRICE from pyinjective.core.network import Network from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey @@ -52,8 +53,8 @@ async def main() -> None: return # build tx - gas_price = 500000000 - gas_limit = sim_res.gas_info.gas_used + 20000 # add 20k for gas, fee computation + gas_price = GAS_PRICE + gas_limit = sim_res.gas_info.gas_used + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") fee = [ composer.Coin( diff --git a/examples/chain_client/42_MsgUnderwrite.py b/examples/chain_client/42_MsgUnderwrite.py index 087aae33..6764e933 100644 --- a/examples/chain_client/42_MsgUnderwrite.py +++ b/examples/chain_client/42_MsgUnderwrite.py @@ -1,6 +1,7 @@ import asyncio from pyinjective.async_client import AsyncClient +from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT, GAS_PRICE from pyinjective.core.network import Network from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey @@ -48,8 +49,8 @@ async def main() -> None: return # build tx - gas_price = 500000000 - gas_limit = sim_res.gas_info.gas_used + 20000 # add 20k for gas, fee computation + gas_price = GAS_PRICE + gas_limit = sim_res.gas_info.gas_used + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") fee = [ composer.Coin( diff --git a/examples/chain_client/43_MsgRequestRedemption.py b/examples/chain_client/43_MsgRequestRedemption.py index 7379f055..db3f31fe 100644 --- a/examples/chain_client/43_MsgRequestRedemption.py +++ b/examples/chain_client/43_MsgRequestRedemption.py @@ -1,6 +1,7 @@ import asyncio from pyinjective.async_client import AsyncClient +from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT, GAS_PRICE from pyinjective.core.network import Network from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey @@ -48,8 +49,8 @@ async def main() -> None: return # build tx - gas_price = 500000000 - gas_limit = sim_res.gas_info.gas_used + 20000 # add 20k for gas, fee computation + gas_price = GAS_PRICE + gas_limit = sim_res.gas_info.gas_used + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") fee = [ composer.Coin( diff --git a/examples/chain_client/48_WithdrawValidatorCommissionAndRewards.py b/examples/chain_client/48_WithdrawValidatorCommissionAndRewards.py index 4ab89394..879f705a 100644 --- a/examples/chain_client/48_WithdrawValidatorCommissionAndRewards.py +++ b/examples/chain_client/48_WithdrawValidatorCommissionAndRewards.py @@ -2,6 +2,7 @@ from pyinjective.async_client import AsyncClient from pyinjective.composer import Composer as ProtoMsgComposer +from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT, GAS_PRICE from pyinjective.core.network import Network from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey @@ -52,8 +53,8 @@ async def main() -> None: return # build tx - gas_price = 500000000 - gas_limit = sim_res.gas_info.gas_used + 20000 # add 20k for gas, fee computation + gas_price = GAS_PRICE + gas_limit = sim_res.gas_info.gas_used + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") fee = [ composer.Coin( diff --git a/examples/chain_client/4_MsgCreateSpotMarketOrder.py b/examples/chain_client/4_MsgCreateSpotMarketOrder.py index 449165d3..a721fed5 100644 --- a/examples/chain_client/4_MsgCreateSpotMarketOrder.py +++ b/examples/chain_client/4_MsgCreateSpotMarketOrder.py @@ -2,6 +2,7 @@ import uuid from pyinjective.async_client import AsyncClient +from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT, GAS_PRICE from pyinjective.core.network import Network from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey @@ -62,8 +63,8 @@ async def main() -> None: print(sim_res_msg) # build tx - gas_price = 500000000 - gas_limit = sim_res.gas_info.gas_used + 20000 # add 20k for gas, fee computation + gas_price = GAS_PRICE + gas_limit = sim_res.gas_info.gas_used + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") fee = [ composer.Coin( diff --git a/examples/chain_client/5_MsgCancelSpotOrder.py b/examples/chain_client/5_MsgCancelSpotOrder.py index f94638bd..fdb43f12 100644 --- a/examples/chain_client/5_MsgCancelSpotOrder.py +++ b/examples/chain_client/5_MsgCancelSpotOrder.py @@ -1,6 +1,7 @@ import asyncio from pyinjective.async_client import AsyncClient +from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT, GAS_PRICE from pyinjective.core.network import Network from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey @@ -50,8 +51,8 @@ async def main() -> None: return # build tx - gas_price = 500000000 - gas_limit = sim_res.gas_info.gas_used + 20000 # add 20k for gas, fee computation + gas_price = GAS_PRICE + gas_limit = sim_res.gas_info.gas_used + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") fee = [ composer.Coin( diff --git a/examples/chain_client/6_MsgCreateDerivativeLimitOrder.py b/examples/chain_client/6_MsgCreateDerivativeLimitOrder.py index 8e65363f..c50e1340 100644 --- a/examples/chain_client/6_MsgCreateDerivativeLimitOrder.py +++ b/examples/chain_client/6_MsgCreateDerivativeLimitOrder.py @@ -2,6 +2,7 @@ import uuid from pyinjective.async_client import AsyncClient +from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT, GAS_PRICE from pyinjective.core.network import Network from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey @@ -64,8 +65,8 @@ async def main() -> None: print(sim_res_msg) # build tx - gas_price = 500000000 - gas_limit = sim_res.gas_info.gas_used + 20000 # add 20k for gas, fee computation + gas_price = GAS_PRICE + gas_limit = sim_res.gas_info.gas_used + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") fee = [ composer.Coin( diff --git a/examples/chain_client/7_MsgCreateDerivativeMarketOrder.py b/examples/chain_client/7_MsgCreateDerivativeMarketOrder.py index fdc458c4..b8bc6b8a 100644 --- a/examples/chain_client/7_MsgCreateDerivativeMarketOrder.py +++ b/examples/chain_client/7_MsgCreateDerivativeMarketOrder.py @@ -2,6 +2,7 @@ import uuid from pyinjective.async_client import AsyncClient +from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT, GAS_PRICE from pyinjective.core.network import Network from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey @@ -63,8 +64,8 @@ async def main() -> None: print(sim_res_msg) # build tx - gas_price = 500000000 - gas_limit = sim_res.gas_info.gas_used + 20000 # add 20k for gas, fee computation + gas_price = GAS_PRICE + gas_limit = sim_res.gas_info.gas_used + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") fee = [ composer.Coin( diff --git a/examples/chain_client/8_MsgCancelDerivativeOrder.py b/examples/chain_client/8_MsgCancelDerivativeOrder.py index f2cda909..98c648c7 100644 --- a/examples/chain_client/8_MsgCancelDerivativeOrder.py +++ b/examples/chain_client/8_MsgCancelDerivativeOrder.py @@ -1,6 +1,7 @@ import asyncio from pyinjective.async_client import AsyncClient +from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT, GAS_PRICE from pyinjective.core.network import Network from pyinjective.transaction import Transaction from pyinjective.wallet import PrivateKey @@ -50,8 +51,8 @@ async def main() -> None: return # build tx - gas_price = 500000000 - gas_limit = sim_res.gas_info.gas_used + 20000 # add 20k for gas, fee computation + gas_price = GAS_PRICE + gas_limit = sim_res.gas_info.gas_used + GAS_FEE_BUFFER_AMOUNT # add buffer for gas fee computation gas_fee = "{:.18f}".format((gas_price * gas_limit) / pow(10, 18)).rstrip("0") fee = [ composer.Coin( diff --git a/pyinjective/constant.py b/pyinjective/constant.py index 3e8d0d40..91cc4839 100644 --- a/pyinjective/constant.py +++ b/pyinjective/constant.py @@ -1,8 +1,8 @@ import os from configparser import ConfigParser -MAX_CLIENT_ID_LENGTH = 128 -MAX_DATA_SIZE = 256 +GAS_PRICE = 500_000_000 +GAS_FEE_BUFFER_AMOUNT = 25_000 MAX_MEMO_CHARACTERS = 256 ADDITIONAL_CHAIN_FORMAT_DECIMALS = 18 TICKER_TOKENS_SEPARATOR = "/" @@ -22,43 +22,3 @@ "testnet": testnet_config, "mainnet": mainnet_config, } - - -class Denom: - def __init__( - self, description: str, base: int, quote: int, min_price_tick_size: float, min_quantity_tick_size: float - ): - self.description = description - self.base = base - self.quote = quote - self.min_price_tick_size = min_price_tick_size - self.min_quantity_tick_size = min_quantity_tick_size - - @classmethod - def load_market(cls, network, market_id): - if network == "devnet": - config = devnet_config - elif network == "testnet": - config = testnet_config - else: - config = mainnet_config - - return cls( - description=config[market_id]["description"], - base=int(config[market_id]["base"]), - quote=int(config[market_id]["quote"]), - min_price_tick_size=float(config[market_id]["min_price_tick_size"]), - min_quantity_tick_size=float(config[market_id]["min_quantity_tick_size"]), - ) - - @classmethod - def load_peggy_denom(cls, network, symbol): - if network == "devnet": - config = devnet_config - elif network == "local": - config = devnet_config - elif network == "testnet": - config = testnet_config - else: - config = mainnet_config - return config[symbol]["peggy_denom"], int(config[symbol]["decimals"]) diff --git a/pyinjective/core/market.py b/pyinjective/core/market.py index 58e648bb..228a3a52 100644 --- a/pyinjective/core/market.py +++ b/pyinjective/core/market.py @@ -2,8 +2,9 @@ from decimal import Decimal from typing import Optional -from pyinjective.constant import ADDITIONAL_CHAIN_FORMAT_DECIMALS, Denom +from pyinjective.constant import ADDITIONAL_CHAIN_FORMAT_DECIMALS from pyinjective.core.token import Token +from pyinjective.utils.denom import Denom @dataclass(eq=True, frozen=True) diff --git a/pyinjective/proto/exchange/injective_campaign_rpc_pb2.py b/pyinjective/proto/exchange/injective_campaign_rpc_pb2.py index 8966dc64..0fb99310 100644 --- a/pyinjective/proto/exchange/injective_campaign_rpc_pb2.py +++ b/pyinjective/proto/exchange/injective_campaign_rpc_pb2.py @@ -13,7 +13,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n%exchange/injective_campaign_rpc.proto\x12\x16injective_campaign_rpc\"n\n\x0eRankingRequest\x12\x13\n\x0b\x63\x61mpaign_id\x18\x01 \x01(\t\x12\x11\n\tmarket_id\x18\x02 \x01(\t\x12\x17\n\x0f\x61\x63\x63ount_address\x18\x03 \x01(\t\x12\r\n\x05limit\x18\x04 \x01(\x11\x12\x0c\n\x04skip\x18\x05 \x01(\x04\"\xaa\x01\n\x0fRankingResponse\x12\x32\n\x08\x63\x61mpaign\x18\x01 \x01(\x0b\x32 .injective_campaign_rpc.Campaign\x12\x33\n\x05users\x18\x02 \x03(\x0b\x32$.injective_campaign_rpc.CampaignUser\x12.\n\x06paging\x18\x03 \x01(\x0b\x32\x1e.injective_campaign_rpc.Paging\"\x99\x01\n\x08\x43\x61mpaign\x12\x13\n\x0b\x63\x61mpaign_id\x18\x01 \x01(\t\x12\x11\n\tmarket_id\x18\x02 \x01(\t\x12\x13\n\x0btotal_score\x18\x04 \x01(\t\x12\x14\n\x0clast_updated\x18\x05 \x01(\x12\x12\x12\n\nstart_date\x18\x06 \x01(\x12\x12\x10\n\x08\x65nd_date\x18\x07 \x01(\x12\x12\x14\n\x0cis_claimable\x18\x08 \x01(\x08\"\xa2\x01\n\x0c\x43\x61mpaignUser\x12\x13\n\x0b\x63\x61mpaign_id\x18\x01 \x01(\t\x12\x11\n\tmarket_id\x18\x02 \x01(\t\x12\x17\n\x0f\x61\x63\x63ount_address\x18\x03 \x01(\t\x12\r\n\x05score\x18\x04 \x01(\t\x12\x18\n\x10\x63ontract_updated\x18\x05 \x01(\x08\x12\x14\n\x0c\x62lock_height\x18\x06 \x01(\x12\x12\x12\n\nblock_time\x18\x07 \x01(\x12\"\\\n\x06Paging\x12\r\n\x05total\x18\x01 \x01(\x12\x12\x0c\n\x04\x66rom\x18\x02 \x01(\x11\x12\n\n\x02to\x18\x03 \x01(\x11\x12\x1b\n\x13\x63ount_by_subaccount\x18\x04 \x01(\x12\x12\x0c\n\x04next\x18\x05 \x03(\t2r\n\x14InjectiveCampaignRPC\x12Z\n\x07Ranking\x12&.injective_campaign_rpc.RankingRequest\x1a\'.injective_campaign_rpc.RankingResponseB\x1bZ\x19/injective_campaign_rpcpbb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n%exchange/injective_campaign_rpc.proto\x12\x16injective_campaign_rpc\"n\n\x0eRankingRequest\x12\x13\n\x0b\x63\x61mpaign_id\x18\x01 \x01(\t\x12\x11\n\tmarket_id\x18\x02 \x01(\t\x12\x17\n\x0f\x61\x63\x63ount_address\x18\x03 \x01(\t\x12\r\n\x05limit\x18\x04 \x01(\x11\x12\x0c\n\x04skip\x18\x05 \x01(\x04\"\xaa\x01\n\x0fRankingResponse\x12\x32\n\x08\x63\x61mpaign\x18\x01 \x01(\x0b\x32 .injective_campaign_rpc.Campaign\x12\x33\n\x05users\x18\x02 \x03(\x0b\x32$.injective_campaign_rpc.CampaignUser\x12.\n\x06paging\x18\x03 \x01(\x0b\x32\x1e.injective_campaign_rpc.Paging\"\x99\x01\n\x08\x43\x61mpaign\x12\x13\n\x0b\x63\x61mpaign_id\x18\x01 \x01(\t\x12\x11\n\tmarket_id\x18\x02 \x01(\t\x12\x13\n\x0btotal_score\x18\x04 \x01(\t\x12\x14\n\x0clast_updated\x18\x05 \x01(\x12\x12\x12\n\nstart_date\x18\x06 \x01(\x12\x12\x10\n\x08\x65nd_date\x18\x07 \x01(\x12\x12\x14\n\x0cis_claimable\x18\x08 \x01(\x08\"\xd3\x01\n\x0c\x43\x61mpaignUser\x12\x13\n\x0b\x63\x61mpaign_id\x18\x01 \x01(\t\x12\x11\n\tmarket_id\x18\x02 \x01(\t\x12\x17\n\x0f\x61\x63\x63ount_address\x18\x03 \x01(\t\x12\r\n\x05score\x18\x04 \x01(\t\x12\x18\n\x10\x63ontract_updated\x18\x05 \x01(\x08\x12\x14\n\x0c\x62lock_height\x18\x06 \x01(\x12\x12\x12\n\nblock_time\x18\x07 \x01(\x12\x12\x18\n\x10purchased_amount\x18\x08 \x01(\t\x12\x15\n\rgalxe_updated\x18\t \x01(\x08\"\\\n\x06Paging\x12\r\n\x05total\x18\x01 \x01(\x12\x12\x0c\n\x04\x66rom\x18\x02 \x01(\x11\x12\n\n\x02to\x18\x03 \x01(\x11\x12\x1b\n\x13\x63ount_by_subaccount\x18\x04 \x01(\x12\x12\x0c\n\x04next\x18\x05 \x03(\t2r\n\x14InjectiveCampaignRPC\x12Z\n\x07Ranking\x12&.injective_campaign_rpc.RankingRequest\x1a\'.injective_campaign_rpc.RankingResponseB\x1bZ\x19/injective_campaign_rpcpbb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -29,9 +29,9 @@ _globals['_CAMPAIGN']._serialized_start=351 _globals['_CAMPAIGN']._serialized_end=504 _globals['_CAMPAIGNUSER']._serialized_start=507 - _globals['_CAMPAIGNUSER']._serialized_end=669 - _globals['_PAGING']._serialized_start=671 - _globals['_PAGING']._serialized_end=763 - _globals['_INJECTIVECAMPAIGNRPC']._serialized_start=765 - _globals['_INJECTIVECAMPAIGNRPC']._serialized_end=879 + _globals['_CAMPAIGNUSER']._serialized_end=718 + _globals['_PAGING']._serialized_start=720 + _globals['_PAGING']._serialized_end=812 + _globals['_INJECTIVECAMPAIGNRPC']._serialized_start=814 + _globals['_INJECTIVECAMPAIGNRPC']._serialized_end=928 # @@protoc_insertion_point(module_scope) diff --git a/pyinjective/proto/exchange/injective_campaign_rpc_pb2_grpc.py b/pyinjective/proto/exchange/injective_campaign_rpc_pb2_grpc.py index c467e6fc..d0649e67 100644 --- a/pyinjective/proto/exchange/injective_campaign_rpc_pb2_grpc.py +++ b/pyinjective/proto/exchange/injective_campaign_rpc_pb2_grpc.py @@ -27,7 +27,7 @@ class InjectiveCampaignRPCServicer(object): """ def Ranking(self, request, context): - """Lists all trading strategies + """Lists all participants in campaign """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') diff --git a/pyinjective/proto/exchange/injective_derivative_exchange_rpc_pb2.py b/pyinjective/proto/exchange/injective_derivative_exchange_rpc_pb2.py index c5f6caf2..470b01bb 100644 --- a/pyinjective/proto/exchange/injective_derivative_exchange_rpc_pb2.py +++ b/pyinjective/proto/exchange/injective_derivative_exchange_rpc_pb2.py @@ -13,7 +13,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n0exchange/injective_derivative_exchange_rpc.proto\x12!injective_derivative_exchange_rpc\"U\n\x0eMarketsRequest\x12\x15\n\rmarket_status\x18\x01 \x01(\t\x12\x13\n\x0bquote_denom\x18\x02 \x01(\t\x12\x17\n\x0fmarket_statuses\x18\x03 \x03(\t\"[\n\x0fMarketsResponse\x12H\n\x07markets\x18\x01 \x03(\x0b\x32\x37.injective_derivative_exchange_rpc.DerivativeMarketInfo\"\xff\x05\n\x14\x44\x65rivativeMarketInfo\x12\x11\n\tmarket_id\x18\x01 \x01(\t\x12\x15\n\rmarket_status\x18\x02 \x01(\t\x12\x0e\n\x06ticker\x18\x03 \x01(\t\x12\x13\n\x0boracle_base\x18\x04 \x01(\t\x12\x14\n\x0coracle_quote\x18\x05 \x01(\t\x12\x13\n\x0boracle_type\x18\x06 \x01(\t\x12\x1b\n\x13oracle_scale_factor\x18\x07 \x01(\r\x12\x1c\n\x14initial_margin_ratio\x18\x08 \x01(\t\x12 \n\x18maintenance_margin_ratio\x18\t \x01(\t\x12\x13\n\x0bquote_denom\x18\n \x01(\t\x12\x46\n\x10quote_token_meta\x18\x0b \x01(\x0b\x32,.injective_derivative_exchange_rpc.TokenMeta\x12\x16\n\x0emaker_fee_rate\x18\x0c \x01(\t\x12\x16\n\x0etaker_fee_rate\x18\r \x01(\t\x12\x1c\n\x14service_provider_fee\x18\x0e \x01(\t\x12\x14\n\x0cis_perpetual\x18\x0f \x01(\x08\x12\x1b\n\x13min_price_tick_size\x18\x10 \x01(\t\x12\x1e\n\x16min_quantity_tick_size\x18\x11 \x01(\t\x12U\n\x15perpetual_market_info\x18\x12 \x01(\x0b\x32\x36.injective_derivative_exchange_rpc.PerpetualMarketInfo\x12[\n\x18perpetual_market_funding\x18\x13 \x01(\x0b\x32\x39.injective_derivative_exchange_rpc.PerpetualMarketFunding\x12^\n\x1a\x65xpiry_futures_market_info\x18\x14 \x01(\x0b\x32:.injective_derivative_exchange_rpc.ExpiryFuturesMarketInfo\"n\n\tTokenMeta\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07\x61\x64\x64ress\x18\x02 \x01(\t\x12\x0e\n\x06symbol\x18\x03 \x01(\t\x12\x0c\n\x04logo\x18\x04 \x01(\t\x12\x10\n\x08\x64\x65\x63imals\x18\x05 \x01(\x11\x12\x12\n\nupdated_at\x18\x06 \x01(\x12\"\x8e\x01\n\x13PerpetualMarketInfo\x12\x1f\n\x17hourly_funding_rate_cap\x18\x01 \x01(\t\x12\x1c\n\x14hourly_interest_rate\x18\x02 \x01(\t\x12\x1e\n\x16next_funding_timestamp\x18\x03 \x01(\x12\x12\x18\n\x10\x66unding_interval\x18\x04 \x01(\x12\"f\n\x16PerpetualMarketFunding\x12\x1a\n\x12\x63umulative_funding\x18\x01 \x01(\t\x12\x18\n\x10\x63umulative_price\x18\x02 \x01(\t\x12\x16\n\x0elast_timestamp\x18\x03 \x01(\x12\"Q\n\x17\x45xpiryFuturesMarketInfo\x12\x1c\n\x14\x65xpiration_timestamp\x18\x01 \x01(\x12\x12\x18\n\x10settlement_price\x18\x02 \x01(\t\"\"\n\rMarketRequest\x12\x11\n\tmarket_id\x18\x01 \x01(\t\"Y\n\x0eMarketResponse\x12G\n\x06market\x18\x01 \x01(\x0b\x32\x37.injective_derivative_exchange_rpc.DerivativeMarketInfo\")\n\x13StreamMarketRequest\x12\x12\n\nmarket_ids\x18\x01 \x03(\t\"\x8a\x01\n\x14StreamMarketResponse\x12G\n\x06market\x18\x01 \x01(\x0b\x32\x37.injective_derivative_exchange_rpc.DerivativeMarketInfo\x12\x16\n\x0eoperation_type\x18\x02 \x01(\t\x12\x11\n\ttimestamp\x18\x03 \x01(\x12\"f\n\x1b\x42inaryOptionsMarketsRequest\x12\x15\n\rmarket_status\x18\x01 \x01(\t\x12\x13\n\x0bquote_denom\x18\x02 \x01(\t\x12\x0c\n\x04skip\x18\x03 \x01(\x04\x12\r\n\x05limit\x18\x04 \x01(\x11\"\xa6\x01\n\x1c\x42inaryOptionsMarketsResponse\x12K\n\x07markets\x18\x01 \x03(\x0b\x32:.injective_derivative_exchange_rpc.BinaryOptionsMarketInfo\x12\x39\n\x06paging\x18\x02 \x01(\x0b\x32).injective_derivative_exchange_rpc.Paging\"\xf3\x03\n\x17\x42inaryOptionsMarketInfo\x12\x11\n\tmarket_id\x18\x01 \x01(\t\x12\x15\n\rmarket_status\x18\x02 \x01(\t\x12\x0e\n\x06ticker\x18\x03 \x01(\t\x12\x15\n\roracle_symbol\x18\x04 \x01(\t\x12\x17\n\x0foracle_provider\x18\x05 \x01(\t\x12\x13\n\x0boracle_type\x18\x06 \x01(\t\x12\x1b\n\x13oracle_scale_factor\x18\x07 \x01(\r\x12\x1c\n\x14\x65xpiration_timestamp\x18\x08 \x01(\x12\x12\x1c\n\x14settlement_timestamp\x18\t \x01(\x12\x12\x13\n\x0bquote_denom\x18\n \x01(\t\x12\x46\n\x10quote_token_meta\x18\x0b \x01(\x0b\x32,.injective_derivative_exchange_rpc.TokenMeta\x12\x16\n\x0emaker_fee_rate\x18\x0c \x01(\t\x12\x16\n\x0etaker_fee_rate\x18\r \x01(\t\x12\x1c\n\x14service_provider_fee\x18\x0e \x01(\t\x12\x1b\n\x13min_price_tick_size\x18\x0f \x01(\t\x12\x1e\n\x16min_quantity_tick_size\x18\x10 \x01(\t\x12\x18\n\x10settlement_price\x18\x11 \x01(\t\"\\\n\x06Paging\x12\r\n\x05total\x18\x01 \x01(\x12\x12\x0c\n\x04\x66rom\x18\x02 \x01(\x11\x12\n\n\x02to\x18\x03 \x01(\x11\x12\x1b\n\x13\x63ount_by_subaccount\x18\x04 \x01(\x12\x12\x0c\n\x04next\x18\x05 \x03(\t\"/\n\x1a\x42inaryOptionsMarketRequest\x12\x11\n\tmarket_id\x18\x01 \x01(\t\"i\n\x1b\x42inaryOptionsMarketResponse\x12J\n\x06market\x18\x01 \x01(\x0b\x32:.injective_derivative_exchange_rpc.BinaryOptionsMarketInfo\"\'\n\x12OrderbookV2Request\x12\x11\n\tmarket_id\x18\x01 \x01(\t\"g\n\x13OrderbookV2Response\x12P\n\torderbook\x18\x01 \x01(\x0b\x32=.injective_derivative_exchange_rpc.DerivativeLimitOrderbookV2\"\xbc\x01\n\x1a\x44\x65rivativeLimitOrderbookV2\x12;\n\x04\x62uys\x18\x01 \x03(\x0b\x32-.injective_derivative_exchange_rpc.PriceLevel\x12<\n\x05sells\x18\x02 \x03(\x0b\x32-.injective_derivative_exchange_rpc.PriceLevel\x12\x10\n\x08sequence\x18\x03 \x01(\x04\x12\x11\n\ttimestamp\x18\x04 \x01(\x12\"@\n\nPriceLevel\x12\r\n\x05price\x18\x01 \x01(\t\x12\x10\n\x08quantity\x18\x02 \x01(\t\x12\x11\n\ttimestamp\x18\x03 \x01(\x12\")\n\x13OrderbooksV2Request\x12\x12\n\nmarket_ids\x18\x01 \x03(\t\"o\n\x14OrderbooksV2Response\x12W\n\norderbooks\x18\x01 \x03(\x0b\x32\x43.injective_derivative_exchange_rpc.SingleDerivativeLimitOrderbookV2\"\x87\x01\n SingleDerivativeLimitOrderbookV2\x12\x11\n\tmarket_id\x18\x01 \x01(\t\x12P\n\torderbook\x18\x02 \x01(\x0b\x32=.injective_derivative_exchange_rpc.DerivativeLimitOrderbookV2\".\n\x18StreamOrderbookV2Request\x12\x12\n\nmarket_ids\x18\x01 \x03(\t\"\xab\x01\n\x19StreamOrderbookV2Response\x12P\n\torderbook\x18\x01 \x01(\x0b\x32=.injective_derivative_exchange_rpc.DerivativeLimitOrderbookV2\x12\x16\n\x0eoperation_type\x18\x02 \x01(\t\x12\x11\n\ttimestamp\x18\x03 \x01(\x12\x12\x11\n\tmarket_id\x18\x04 \x01(\t\"2\n\x1cStreamOrderbookUpdateRequest\x12\x12\n\nmarket_ids\x18\x01 \x03(\t\"\xb8\x01\n\x1dStreamOrderbookUpdateResponse\x12Y\n\x17orderbook_level_updates\x18\x01 \x01(\x0b\x32\x38.injective_derivative_exchange_rpc.OrderbookLevelUpdates\x12\x16\n\x0eoperation_type\x18\x02 \x01(\t\x12\x11\n\ttimestamp\x18\x03 \x01(\x12\x12\x11\n\tmarket_id\x18\x04 \x01(\t\"\xd7\x01\n\x15OrderbookLevelUpdates\x12\x11\n\tmarket_id\x18\x01 \x01(\t\x12\x10\n\x08sequence\x18\x02 \x01(\x04\x12\x41\n\x04\x62uys\x18\x03 \x03(\x0b\x32\x33.injective_derivative_exchange_rpc.PriceLevelUpdate\x12\x42\n\x05sells\x18\x04 \x03(\x0b\x32\x33.injective_derivative_exchange_rpc.PriceLevelUpdate\x12\x12\n\nupdated_at\x18\x05 \x01(\x12\"Y\n\x10PriceLevelUpdate\x12\r\n\x05price\x18\x01 \x01(\t\x12\x10\n\x08quantity\x18\x02 \x01(\t\x12\x11\n\tis_active\x18\x03 \x01(\x08\x12\x11\n\ttimestamp\x18\x04 \x01(\x12\"\x9d\x02\n\rOrdersRequest\x12\x11\n\tmarket_id\x18\x01 \x01(\t\x12\x12\n\norder_side\x18\x02 \x01(\t\x12\x15\n\rsubaccount_id\x18\x03 \x01(\t\x12\x0c\n\x04skip\x18\x04 \x01(\x04\x12\r\n\x05limit\x18\x05 \x01(\x11\x12\x12\n\nstart_time\x18\x06 \x01(\x12\x12\x10\n\x08\x65nd_time\x18\x07 \x01(\x12\x12\x12\n\nmarket_ids\x18\x08 \x03(\t\x12\x16\n\x0eis_conditional\x18\t \x01(\t\x12\x12\n\norder_type\x18\n \x01(\t\x12\x18\n\x10include_inactive\x18\x0b \x01(\x08\x12\x1f\n\x17subaccount_total_orders\x18\x0c \x01(\x08\x12\x10\n\x08trade_id\x18\r \x01(\t\"\x94\x01\n\x0eOrdersResponse\x12G\n\x06orders\x18\x01 \x03(\x0b\x32\x37.injective_derivative_exchange_rpc.DerivativeLimitOrder\x12\x39\n\x06paging\x18\x02 \x01(\x0b\x32).injective_derivative_exchange_rpc.Paging\"\xcb\x03\n\x14\x44\x65rivativeLimitOrder\x12\x12\n\norder_hash\x18\x01 \x01(\t\x12\x12\n\norder_side\x18\x02 \x01(\t\x12\x11\n\tmarket_id\x18\x03 \x01(\t\x12\x15\n\rsubaccount_id\x18\x04 \x01(\t\x12\x16\n\x0eis_reduce_only\x18\x05 \x01(\x08\x12\x0e\n\x06margin\x18\x06 \x01(\t\x12\r\n\x05price\x18\x07 \x01(\t\x12\x10\n\x08quantity\x18\x08 \x01(\t\x12\x19\n\x11unfilled_quantity\x18\t \x01(\t\x12\x15\n\rtrigger_price\x18\n \x01(\t\x12\x15\n\rfee_recipient\x18\x0b \x01(\t\x12\r\n\x05state\x18\x0c \x01(\t\x12\x12\n\ncreated_at\x18\r \x01(\x12\x12\x12\n\nupdated_at\x18\x0e \x01(\x12\x12\x14\n\x0corder_number\x18\x0f \x01(\x12\x12\x12\n\norder_type\x18\x10 \x01(\t\x12\x16\n\x0eis_conditional\x18\x11 \x01(\x08\x12\x12\n\ntrigger_at\x18\x12 \x01(\x04\x12\x19\n\x11placed_order_hash\x18\x13 \x01(\t\x12\x16\n\x0e\x65xecution_type\x18\x14 \x01(\t\x12\x0f\n\x07tx_hash\x18\x15 \x01(\t\"\xca\x01\n\x10PositionsRequest\x12\x15\n\rsubaccount_id\x18\x01 \x01(\t\x12\x11\n\tmarket_id\x18\x02 \x01(\t\x12\x0c\n\x04skip\x18\x03 \x01(\x04\x12\r\n\x05limit\x18\x04 \x01(\x11\x12\x12\n\nstart_time\x18\x05 \x01(\x12\x12\x10\n\x08\x65nd_time\x18\x06 \x01(\x12\x12\x12\n\nmarket_ids\x18\x07 \x03(\t\x12\x11\n\tdirection\x18\x08 \x01(\t\x12\"\n\x1asubaccount_total_positions\x18\t \x01(\x08\"\x98\x01\n\x11PositionsResponse\x12H\n\tpositions\x18\x01 \x03(\x0b\x32\x35.injective_derivative_exchange_rpc.DerivativePosition\x12\x39\n\x06paging\x18\x02 \x01(\x0b\x32).injective_derivative_exchange_rpc.Paging\"\x97\x02\n\x12\x44\x65rivativePosition\x12\x0e\n\x06ticker\x18\x01 \x01(\t\x12\x11\n\tmarket_id\x18\x02 \x01(\t\x12\x15\n\rsubaccount_id\x18\x03 \x01(\t\x12\x11\n\tdirection\x18\x04 \x01(\t\x12\x10\n\x08quantity\x18\x05 \x01(\t\x12\x13\n\x0b\x65ntry_price\x18\x06 \x01(\t\x12\x0e\n\x06margin\x18\x07 \x01(\t\x12\x19\n\x11liquidation_price\x18\x08 \x01(\t\x12\x12\n\nmark_price\x18\t \x01(\t\x12&\n\x1e\x61ggregate_reduce_only_quantity\x18\x0b \x01(\t\x12\x12\n\nupdated_at\x18\x0c \x01(\x12\x12\x12\n\ncreated_at\x18\r \x01(\x12\"L\n\x1aLiquidablePositionsRequest\x12\x11\n\tmarket_id\x18\x01 \x01(\t\x12\x0c\n\x04skip\x18\x02 \x01(\x04\x12\r\n\x05limit\x18\x03 \x01(\x11\"g\n\x1bLiquidablePositionsResponse\x12H\n\tpositions\x18\x01 \x03(\x0b\x32\x35.injective_derivative_exchange_rpc.DerivativePosition\"\x85\x01\n\x16\x46undingPaymentsRequest\x12\x15\n\rsubaccount_id\x18\x01 \x01(\t\x12\x11\n\tmarket_id\x18\x02 \x01(\t\x12\x0c\n\x04skip\x18\x03 \x01(\x04\x12\r\n\x05limit\x18\x04 \x01(\x11\x12\x10\n\x08\x65nd_time\x18\x05 \x01(\x12\x12\x12\n\nmarket_ids\x18\x06 \x03(\t\"\x99\x01\n\x17\x46undingPaymentsResponse\x12\x43\n\x08payments\x18\x01 \x03(\x0b\x32\x31.injective_derivative_exchange_rpc.FundingPayment\x12\x39\n\x06paging\x18\x02 \x01(\x0b\x32).injective_derivative_exchange_rpc.Paging\"]\n\x0e\x46undingPayment\x12\x11\n\tmarket_id\x18\x01 \x01(\t\x12\x15\n\rsubaccount_id\x18\x02 \x01(\t\x12\x0e\n\x06\x61mount\x18\x03 \x01(\t\x12\x11\n\ttimestamp\x18\x04 \x01(\x12\"W\n\x13\x46undingRatesRequest\x12\x11\n\tmarket_id\x18\x01 \x01(\t\x12\x0c\n\x04skip\x18\x02 \x01(\x04\x12\r\n\x05limit\x18\x03 \x01(\x11\x12\x10\n\x08\x65nd_time\x18\x04 \x01(\x12\"\x98\x01\n\x14\x46undingRatesResponse\x12\x45\n\rfunding_rates\x18\x01 \x03(\x0b\x32..injective_derivative_exchange_rpc.FundingRate\x12\x39\n\x06paging\x18\x02 \x01(\x0b\x32).injective_derivative_exchange_rpc.Paging\"A\n\x0b\x46undingRate\x12\x11\n\tmarket_id\x18\x01 \x01(\t\x12\x0c\n\x04rate\x18\x02 \x01(\t\x12\x11\n\ttimestamp\x18\x03 \x01(\x12\"n\n\x16StreamPositionsRequest\x12\x15\n\rsubaccount_id\x18\x01 \x01(\t\x12\x11\n\tmarket_id\x18\x02 \x01(\t\x12\x12\n\nmarket_ids\x18\x03 \x03(\t\x12\x16\n\x0esubaccount_ids\x18\x04 \x03(\t\"u\n\x17StreamPositionsResponse\x12G\n\x08position\x18\x01 \x01(\x0b\x32\x35.injective_derivative_exchange_rpc.DerivativePosition\x12\x11\n\ttimestamp\x18\x02 \x01(\x12\"\xa3\x02\n\x13StreamOrdersRequest\x12\x11\n\tmarket_id\x18\x01 \x01(\t\x12\x12\n\norder_side\x18\x02 \x01(\t\x12\x15\n\rsubaccount_id\x18\x03 \x01(\t\x12\x0c\n\x04skip\x18\x04 \x01(\x04\x12\r\n\x05limit\x18\x05 \x01(\x11\x12\x12\n\nstart_time\x18\x06 \x01(\x12\x12\x10\n\x08\x65nd_time\x18\x07 \x01(\x12\x12\x12\n\nmarket_ids\x18\x08 \x03(\t\x12\x16\n\x0eis_conditional\x18\t \x01(\t\x12\x12\n\norder_type\x18\n \x01(\t\x12\x18\n\x10include_inactive\x18\x0b \x01(\x08\x12\x1f\n\x17subaccount_total_orders\x18\x0c \x01(\x08\x12\x10\n\x08trade_id\x18\r \x01(\t\"\x89\x01\n\x14StreamOrdersResponse\x12\x46\n\x05order\x18\x01 \x01(\x0b\x32\x37.injective_derivative_exchange_rpc.DerivativeLimitOrder\x12\x16\n\x0eoperation_type\x18\x02 \x01(\t\x12\x11\n\ttimestamp\x18\x03 \x01(\x12\"\x97\x02\n\rTradesRequest\x12\x11\n\tmarket_id\x18\x01 \x01(\t\x12\x16\n\x0e\x65xecution_side\x18\x02 \x01(\t\x12\x11\n\tdirection\x18\x03 \x01(\t\x12\x15\n\rsubaccount_id\x18\x04 \x01(\t\x12\x0c\n\x04skip\x18\x05 \x01(\x04\x12\r\n\x05limit\x18\x06 \x01(\x11\x12\x12\n\nstart_time\x18\x07 \x01(\x12\x12\x10\n\x08\x65nd_time\x18\x08 \x01(\x12\x12\x12\n\nmarket_ids\x18\t \x03(\t\x12\x16\n\x0esubaccount_ids\x18\n \x03(\t\x12\x17\n\x0f\x65xecution_types\x18\x0b \x03(\t\x12\x10\n\x08trade_id\x18\x0c \x01(\t\x12\x17\n\x0f\x61\x63\x63ount_address\x18\r \x01(\t\"\x8f\x01\n\x0eTradesResponse\x12\x42\n\x06trades\x18\x01 \x03(\x0b\x32\x32.injective_derivative_exchange_rpc.DerivativeTrade\x12\x39\n\x06paging\x18\x02 \x01(\x0b\x32).injective_derivative_exchange_rpc.Paging\"\xc2\x02\n\x0f\x44\x65rivativeTrade\x12\x12\n\norder_hash\x18\x01 \x01(\t\x12\x15\n\rsubaccount_id\x18\x02 \x01(\t\x12\x11\n\tmarket_id\x18\x03 \x01(\t\x12\x1c\n\x14trade_execution_type\x18\x04 \x01(\t\x12\x16\n\x0eis_liquidation\x18\x05 \x01(\x08\x12H\n\x0eposition_delta\x18\x06 \x01(\x0b\x32\x30.injective_derivative_exchange_rpc.PositionDelta\x12\x0e\n\x06payout\x18\x07 \x01(\t\x12\x0b\n\x03\x66\x65\x65\x18\x08 \x01(\t\x12\x13\n\x0b\x65xecuted_at\x18\t \x01(\x12\x12\x15\n\rfee_recipient\x18\n \x01(\t\x12\x10\n\x08trade_id\x18\x0b \x01(\t\x12\x16\n\x0e\x65xecution_side\x18\x0c \x01(\t\"w\n\rPositionDelta\x12\x17\n\x0ftrade_direction\x18\x01 \x01(\t\x12\x17\n\x0f\x65xecution_price\x18\x02 \x01(\t\x12\x1a\n\x12\x65xecution_quantity\x18\x03 \x01(\t\x12\x18\n\x10\x65xecution_margin\x18\x04 \x01(\t\"\x9d\x02\n\x13StreamTradesRequest\x12\x11\n\tmarket_id\x18\x01 \x01(\t\x12\x16\n\x0e\x65xecution_side\x18\x02 \x01(\t\x12\x11\n\tdirection\x18\x03 \x01(\t\x12\x15\n\rsubaccount_id\x18\x04 \x01(\t\x12\x0c\n\x04skip\x18\x05 \x01(\x04\x12\r\n\x05limit\x18\x06 \x01(\x11\x12\x12\n\nstart_time\x18\x07 \x01(\x12\x12\x10\n\x08\x65nd_time\x18\x08 \x01(\x12\x12\x12\n\nmarket_ids\x18\t \x03(\t\x12\x16\n\x0esubaccount_ids\x18\n \x03(\t\x12\x17\n\x0f\x65xecution_types\x18\x0b \x03(\t\x12\x10\n\x08trade_id\x18\x0c \x01(\t\x12\x17\n\x0f\x61\x63\x63ount_address\x18\r \x01(\t\"\x84\x01\n\x14StreamTradesResponse\x12\x41\n\x05trade\x18\x01 \x01(\x0b\x32\x32.injective_derivative_exchange_rpc.DerivativeTrade\x12\x16\n\x0eoperation_type\x18\x02 \x01(\t\x12\x11\n\ttimestamp\x18\x03 \x01(\x12\"d\n\x1bSubaccountOrdersListRequest\x12\x15\n\rsubaccount_id\x18\x01 \x01(\t\x12\x11\n\tmarket_id\x18\x02 \x01(\t\x12\x0c\n\x04skip\x18\x03 \x01(\x04\x12\r\n\x05limit\x18\x04 \x01(\x11\"\xa2\x01\n\x1cSubaccountOrdersListResponse\x12G\n\x06orders\x18\x01 \x03(\x0b\x32\x37.injective_derivative_exchange_rpc.DerivativeLimitOrder\x12\x39\n\x06paging\x18\x02 \x01(\x0b\x32).injective_derivative_exchange_rpc.Paging\"\x8f\x01\n\x1bSubaccountTradesListRequest\x12\x15\n\rsubaccount_id\x18\x01 \x01(\t\x12\x11\n\tmarket_id\x18\x02 \x01(\t\x12\x16\n\x0e\x65xecution_type\x18\x03 \x01(\t\x12\x11\n\tdirection\x18\x04 \x01(\t\x12\x0c\n\x04skip\x18\x05 \x01(\x04\x12\r\n\x05limit\x18\x06 \x01(\x11\"b\n\x1cSubaccountTradesListResponse\x12\x42\n\x06trades\x18\x01 \x03(\x0b\x32\x32.injective_derivative_exchange_rpc.DerivativeTrade\"\xc2\x02\n\x14OrdersHistoryRequest\x12\x15\n\rsubaccount_id\x18\x01 \x01(\t\x12\x11\n\tmarket_id\x18\x02 \x01(\t\x12\x0c\n\x04skip\x18\x03 \x01(\x04\x12\r\n\x05limit\x18\x04 \x01(\x11\x12\x13\n\x0border_types\x18\x05 \x03(\t\x12\x11\n\tdirection\x18\x06 \x01(\t\x12\x12\n\nstart_time\x18\x07 \x01(\x12\x12\x10\n\x08\x65nd_time\x18\x08 \x01(\x12\x12\x16\n\x0eis_conditional\x18\t \x01(\t\x12\x12\n\norder_type\x18\n \x01(\t\x12\r\n\x05state\x18\x0b \x01(\t\x12\x17\n\x0f\x65xecution_types\x18\x0c \x03(\t\x12\x12\n\nmarket_ids\x18\r \x03(\t\x12\x10\n\x08trade_id\x18\x0e \x01(\t\x12\x1b\n\x13\x61\x63tive_markets_only\x18\x0f \x01(\x08\"\x9d\x01\n\x15OrdersHistoryResponse\x12I\n\x06orders\x18\x01 \x03(\x0b\x32\x39.injective_derivative_exchange_rpc.DerivativeOrderHistory\x12\x39\n\x06paging\x18\x02 \x01(\x0b\x32).injective_derivative_exchange_rpc.Paging\"\xb0\x03\n\x16\x44\x65rivativeOrderHistory\x12\x12\n\norder_hash\x18\x01 \x01(\t\x12\x11\n\tmarket_id\x18\x02 \x01(\t\x12\x11\n\tis_active\x18\x03 \x01(\x08\x12\x15\n\rsubaccount_id\x18\x04 \x01(\t\x12\x16\n\x0e\x65xecution_type\x18\x05 \x01(\t\x12\x12\n\norder_type\x18\x06 \x01(\t\x12\r\n\x05price\x18\x07 \x01(\t\x12\x15\n\rtrigger_price\x18\x08 \x01(\t\x12\x10\n\x08quantity\x18\t \x01(\t\x12\x17\n\x0f\x66illed_quantity\x18\n \x01(\t\x12\r\n\x05state\x18\x0b \x01(\t\x12\x12\n\ncreated_at\x18\x0c \x01(\x12\x12\x12\n\nupdated_at\x18\r \x01(\x12\x12\x16\n\x0eis_reduce_only\x18\x0e \x01(\x08\x12\x11\n\tdirection\x18\x0f \x01(\t\x12\x16\n\x0eis_conditional\x18\x10 \x01(\x08\x12\x12\n\ntrigger_at\x18\x11 \x01(\x04\x12\x19\n\x11placed_order_hash\x18\x12 \x01(\t\x12\x0e\n\x06margin\x18\x13 \x01(\t\x12\x0f\n\x07tx_hash\x18\x14 \x01(\t\"\x96\x01\n\x1aStreamOrdersHistoryRequest\x12\x15\n\rsubaccount_id\x18\x01 \x01(\t\x12\x11\n\tmarket_id\x18\x02 \x01(\t\x12\x13\n\x0border_types\x18\x03 \x03(\t\x12\x11\n\tdirection\x18\x04 \x01(\t\x12\r\n\x05state\x18\x05 \x01(\t\x12\x17\n\x0f\x65xecution_types\x18\x06 \x03(\t\"\x92\x01\n\x1bStreamOrdersHistoryResponse\x12H\n\x05order\x18\x01 \x01(\x0b\x32\x39.injective_derivative_exchange_rpc.DerivativeOrderHistory\x12\x16\n\x0eoperation_type\x18\x02 \x01(\t\x12\x11\n\ttimestamp\x18\x03 \x01(\x12\x32\xc7\x17\n\x1eInjectiveDerivativeExchangeRPC\x12p\n\x07Markets\x12\x31.injective_derivative_exchange_rpc.MarketsRequest\x1a\x32.injective_derivative_exchange_rpc.MarketsResponse\x12m\n\x06Market\x12\x30.injective_derivative_exchange_rpc.MarketRequest\x1a\x31.injective_derivative_exchange_rpc.MarketResponse\x12\x81\x01\n\x0cStreamMarket\x12\x36.injective_derivative_exchange_rpc.StreamMarketRequest\x1a\x37.injective_derivative_exchange_rpc.StreamMarketResponse0\x01\x12\x97\x01\n\x14\x42inaryOptionsMarkets\x12>.injective_derivative_exchange_rpc.BinaryOptionsMarketsRequest\x1a?.injective_derivative_exchange_rpc.BinaryOptionsMarketsResponse\x12\x94\x01\n\x13\x42inaryOptionsMarket\x12=.injective_derivative_exchange_rpc.BinaryOptionsMarketRequest\x1a>.injective_derivative_exchange_rpc.BinaryOptionsMarketResponse\x12|\n\x0bOrderbookV2\x12\x35.injective_derivative_exchange_rpc.OrderbookV2Request\x1a\x36.injective_derivative_exchange_rpc.OrderbookV2Response\x12\x7f\n\x0cOrderbooksV2\x12\x36.injective_derivative_exchange_rpc.OrderbooksV2Request\x1a\x37.injective_derivative_exchange_rpc.OrderbooksV2Response\x12\x90\x01\n\x11StreamOrderbookV2\x12;.injective_derivative_exchange_rpc.StreamOrderbookV2Request\x1a<.injective_derivative_exchange_rpc.StreamOrderbookV2Response0\x01\x12\x9c\x01\n\x15StreamOrderbookUpdate\x12?.injective_derivative_exchange_rpc.StreamOrderbookUpdateRequest\x1a@.injective_derivative_exchange_rpc.StreamOrderbookUpdateResponse0\x01\x12m\n\x06Orders\x12\x30.injective_derivative_exchange_rpc.OrdersRequest\x1a\x31.injective_derivative_exchange_rpc.OrdersResponse\x12v\n\tPositions\x12\x33.injective_derivative_exchange_rpc.PositionsRequest\x1a\x34.injective_derivative_exchange_rpc.PositionsResponse\x12\x94\x01\n\x13LiquidablePositions\x12=.injective_derivative_exchange_rpc.LiquidablePositionsRequest\x1a>.injective_derivative_exchange_rpc.LiquidablePositionsResponse\x12\x88\x01\n\x0f\x46undingPayments\x12\x39.injective_derivative_exchange_rpc.FundingPaymentsRequest\x1a:.injective_derivative_exchange_rpc.FundingPaymentsResponse\x12\x7f\n\x0c\x46undingRates\x12\x36.injective_derivative_exchange_rpc.FundingRatesRequest\x1a\x37.injective_derivative_exchange_rpc.FundingRatesResponse\x12\x8a\x01\n\x0fStreamPositions\x12\x39.injective_derivative_exchange_rpc.StreamPositionsRequest\x1a:.injective_derivative_exchange_rpc.StreamPositionsResponse0\x01\x12\x81\x01\n\x0cStreamOrders\x12\x36.injective_derivative_exchange_rpc.StreamOrdersRequest\x1a\x37.injective_derivative_exchange_rpc.StreamOrdersResponse0\x01\x12m\n\x06Trades\x12\x30.injective_derivative_exchange_rpc.TradesRequest\x1a\x31.injective_derivative_exchange_rpc.TradesResponse\x12\x81\x01\n\x0cStreamTrades\x12\x36.injective_derivative_exchange_rpc.StreamTradesRequest\x1a\x37.injective_derivative_exchange_rpc.StreamTradesResponse0\x01\x12\x97\x01\n\x14SubaccountOrdersList\x12>.injective_derivative_exchange_rpc.SubaccountOrdersListRequest\x1a?.injective_derivative_exchange_rpc.SubaccountOrdersListResponse\x12\x97\x01\n\x14SubaccountTradesList\x12>.injective_derivative_exchange_rpc.SubaccountTradesListRequest\x1a?.injective_derivative_exchange_rpc.SubaccountTradesListResponse\x12\x82\x01\n\rOrdersHistory\x12\x37.injective_derivative_exchange_rpc.OrdersHistoryRequest\x1a\x38.injective_derivative_exchange_rpc.OrdersHistoryResponse\x12\x96\x01\n\x13StreamOrdersHistory\x12=.injective_derivative_exchange_rpc.StreamOrdersHistoryRequest\x1a>.injective_derivative_exchange_rpc.StreamOrdersHistoryResponse0\x01\x42&Z$/injective_derivative_exchange_rpcpbb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n0exchange/injective_derivative_exchange_rpc.proto\x12!injective_derivative_exchange_rpc\"U\n\x0eMarketsRequest\x12\x15\n\rmarket_status\x18\x01 \x01(\t\x12\x13\n\x0bquote_denom\x18\x02 \x01(\t\x12\x17\n\x0fmarket_statuses\x18\x03 \x03(\t\"[\n\x0fMarketsResponse\x12H\n\x07markets\x18\x01 \x03(\x0b\x32\x37.injective_derivative_exchange_rpc.DerivativeMarketInfo\"\xff\x05\n\x14\x44\x65rivativeMarketInfo\x12\x11\n\tmarket_id\x18\x01 \x01(\t\x12\x15\n\rmarket_status\x18\x02 \x01(\t\x12\x0e\n\x06ticker\x18\x03 \x01(\t\x12\x13\n\x0boracle_base\x18\x04 \x01(\t\x12\x14\n\x0coracle_quote\x18\x05 \x01(\t\x12\x13\n\x0boracle_type\x18\x06 \x01(\t\x12\x1b\n\x13oracle_scale_factor\x18\x07 \x01(\r\x12\x1c\n\x14initial_margin_ratio\x18\x08 \x01(\t\x12 \n\x18maintenance_margin_ratio\x18\t \x01(\t\x12\x13\n\x0bquote_denom\x18\n \x01(\t\x12\x46\n\x10quote_token_meta\x18\x0b \x01(\x0b\x32,.injective_derivative_exchange_rpc.TokenMeta\x12\x16\n\x0emaker_fee_rate\x18\x0c \x01(\t\x12\x16\n\x0etaker_fee_rate\x18\r \x01(\t\x12\x1c\n\x14service_provider_fee\x18\x0e \x01(\t\x12\x14\n\x0cis_perpetual\x18\x0f \x01(\x08\x12\x1b\n\x13min_price_tick_size\x18\x10 \x01(\t\x12\x1e\n\x16min_quantity_tick_size\x18\x11 \x01(\t\x12U\n\x15perpetual_market_info\x18\x12 \x01(\x0b\x32\x36.injective_derivative_exchange_rpc.PerpetualMarketInfo\x12[\n\x18perpetual_market_funding\x18\x13 \x01(\x0b\x32\x39.injective_derivative_exchange_rpc.PerpetualMarketFunding\x12^\n\x1a\x65xpiry_futures_market_info\x18\x14 \x01(\x0b\x32:.injective_derivative_exchange_rpc.ExpiryFuturesMarketInfo\"n\n\tTokenMeta\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07\x61\x64\x64ress\x18\x02 \x01(\t\x12\x0e\n\x06symbol\x18\x03 \x01(\t\x12\x0c\n\x04logo\x18\x04 \x01(\t\x12\x10\n\x08\x64\x65\x63imals\x18\x05 \x01(\x11\x12\x12\n\nupdated_at\x18\x06 \x01(\x12\"\x8e\x01\n\x13PerpetualMarketInfo\x12\x1f\n\x17hourly_funding_rate_cap\x18\x01 \x01(\t\x12\x1c\n\x14hourly_interest_rate\x18\x02 \x01(\t\x12\x1e\n\x16next_funding_timestamp\x18\x03 \x01(\x12\x12\x18\n\x10\x66unding_interval\x18\x04 \x01(\x12\"f\n\x16PerpetualMarketFunding\x12\x1a\n\x12\x63umulative_funding\x18\x01 \x01(\t\x12\x18\n\x10\x63umulative_price\x18\x02 \x01(\t\x12\x16\n\x0elast_timestamp\x18\x03 \x01(\x12\"Q\n\x17\x45xpiryFuturesMarketInfo\x12\x1c\n\x14\x65xpiration_timestamp\x18\x01 \x01(\x12\x12\x18\n\x10settlement_price\x18\x02 \x01(\t\"\"\n\rMarketRequest\x12\x11\n\tmarket_id\x18\x01 \x01(\t\"Y\n\x0eMarketResponse\x12G\n\x06market\x18\x01 \x01(\x0b\x32\x37.injective_derivative_exchange_rpc.DerivativeMarketInfo\")\n\x13StreamMarketRequest\x12\x12\n\nmarket_ids\x18\x01 \x03(\t\"\x8a\x01\n\x14StreamMarketResponse\x12G\n\x06market\x18\x01 \x01(\x0b\x32\x37.injective_derivative_exchange_rpc.DerivativeMarketInfo\x12\x16\n\x0eoperation_type\x18\x02 \x01(\t\x12\x11\n\ttimestamp\x18\x03 \x01(\x12\"f\n\x1b\x42inaryOptionsMarketsRequest\x12\x15\n\rmarket_status\x18\x01 \x01(\t\x12\x13\n\x0bquote_denom\x18\x02 \x01(\t\x12\x0c\n\x04skip\x18\x03 \x01(\x04\x12\r\n\x05limit\x18\x04 \x01(\x11\"\xa6\x01\n\x1c\x42inaryOptionsMarketsResponse\x12K\n\x07markets\x18\x01 \x03(\x0b\x32:.injective_derivative_exchange_rpc.BinaryOptionsMarketInfo\x12\x39\n\x06paging\x18\x02 \x01(\x0b\x32).injective_derivative_exchange_rpc.Paging\"\xf3\x03\n\x17\x42inaryOptionsMarketInfo\x12\x11\n\tmarket_id\x18\x01 \x01(\t\x12\x15\n\rmarket_status\x18\x02 \x01(\t\x12\x0e\n\x06ticker\x18\x03 \x01(\t\x12\x15\n\roracle_symbol\x18\x04 \x01(\t\x12\x17\n\x0foracle_provider\x18\x05 \x01(\t\x12\x13\n\x0boracle_type\x18\x06 \x01(\t\x12\x1b\n\x13oracle_scale_factor\x18\x07 \x01(\r\x12\x1c\n\x14\x65xpiration_timestamp\x18\x08 \x01(\x12\x12\x1c\n\x14settlement_timestamp\x18\t \x01(\x12\x12\x13\n\x0bquote_denom\x18\n \x01(\t\x12\x46\n\x10quote_token_meta\x18\x0b \x01(\x0b\x32,.injective_derivative_exchange_rpc.TokenMeta\x12\x16\n\x0emaker_fee_rate\x18\x0c \x01(\t\x12\x16\n\x0etaker_fee_rate\x18\r \x01(\t\x12\x1c\n\x14service_provider_fee\x18\x0e \x01(\t\x12\x1b\n\x13min_price_tick_size\x18\x0f \x01(\t\x12\x1e\n\x16min_quantity_tick_size\x18\x10 \x01(\t\x12\x18\n\x10settlement_price\x18\x11 \x01(\t\"\\\n\x06Paging\x12\r\n\x05total\x18\x01 \x01(\x12\x12\x0c\n\x04\x66rom\x18\x02 \x01(\x11\x12\n\n\x02to\x18\x03 \x01(\x11\x12\x1b\n\x13\x63ount_by_subaccount\x18\x04 \x01(\x12\x12\x0c\n\x04next\x18\x05 \x03(\t\"/\n\x1a\x42inaryOptionsMarketRequest\x12\x11\n\tmarket_id\x18\x01 \x01(\t\"i\n\x1b\x42inaryOptionsMarketResponse\x12J\n\x06market\x18\x01 \x01(\x0b\x32:.injective_derivative_exchange_rpc.BinaryOptionsMarketInfo\"\'\n\x12OrderbookV2Request\x12\x11\n\tmarket_id\x18\x01 \x01(\t\"g\n\x13OrderbookV2Response\x12P\n\torderbook\x18\x01 \x01(\x0b\x32=.injective_derivative_exchange_rpc.DerivativeLimitOrderbookV2\"\xbc\x01\n\x1a\x44\x65rivativeLimitOrderbookV2\x12;\n\x04\x62uys\x18\x01 \x03(\x0b\x32-.injective_derivative_exchange_rpc.PriceLevel\x12<\n\x05sells\x18\x02 \x03(\x0b\x32-.injective_derivative_exchange_rpc.PriceLevel\x12\x10\n\x08sequence\x18\x03 \x01(\x04\x12\x11\n\ttimestamp\x18\x04 \x01(\x12\"@\n\nPriceLevel\x12\r\n\x05price\x18\x01 \x01(\t\x12\x10\n\x08quantity\x18\x02 \x01(\t\x12\x11\n\ttimestamp\x18\x03 \x01(\x12\")\n\x13OrderbooksV2Request\x12\x12\n\nmarket_ids\x18\x01 \x03(\t\"o\n\x14OrderbooksV2Response\x12W\n\norderbooks\x18\x01 \x03(\x0b\x32\x43.injective_derivative_exchange_rpc.SingleDerivativeLimitOrderbookV2\"\x87\x01\n SingleDerivativeLimitOrderbookV2\x12\x11\n\tmarket_id\x18\x01 \x01(\t\x12P\n\torderbook\x18\x02 \x01(\x0b\x32=.injective_derivative_exchange_rpc.DerivativeLimitOrderbookV2\".\n\x18StreamOrderbookV2Request\x12\x12\n\nmarket_ids\x18\x01 \x03(\t\"\xab\x01\n\x19StreamOrderbookV2Response\x12P\n\torderbook\x18\x01 \x01(\x0b\x32=.injective_derivative_exchange_rpc.DerivativeLimitOrderbookV2\x12\x16\n\x0eoperation_type\x18\x02 \x01(\t\x12\x11\n\ttimestamp\x18\x03 \x01(\x12\x12\x11\n\tmarket_id\x18\x04 \x01(\t\"2\n\x1cStreamOrderbookUpdateRequest\x12\x12\n\nmarket_ids\x18\x01 \x03(\t\"\xb8\x01\n\x1dStreamOrderbookUpdateResponse\x12Y\n\x17orderbook_level_updates\x18\x01 \x01(\x0b\x32\x38.injective_derivative_exchange_rpc.OrderbookLevelUpdates\x12\x16\n\x0eoperation_type\x18\x02 \x01(\t\x12\x11\n\ttimestamp\x18\x03 \x01(\x12\x12\x11\n\tmarket_id\x18\x04 \x01(\t\"\xd7\x01\n\x15OrderbookLevelUpdates\x12\x11\n\tmarket_id\x18\x01 \x01(\t\x12\x10\n\x08sequence\x18\x02 \x01(\x04\x12\x41\n\x04\x62uys\x18\x03 \x03(\x0b\x32\x33.injective_derivative_exchange_rpc.PriceLevelUpdate\x12\x42\n\x05sells\x18\x04 \x03(\x0b\x32\x33.injective_derivative_exchange_rpc.PriceLevelUpdate\x12\x12\n\nupdated_at\x18\x05 \x01(\x12\"Y\n\x10PriceLevelUpdate\x12\r\n\x05price\x18\x01 \x01(\t\x12\x10\n\x08quantity\x18\x02 \x01(\t\x12\x11\n\tis_active\x18\x03 \x01(\x08\x12\x11\n\ttimestamp\x18\x04 \x01(\x12\"\xaa\x02\n\rOrdersRequest\x12\x11\n\tmarket_id\x18\x01 \x01(\t\x12\x12\n\norder_side\x18\x02 \x01(\t\x12\x15\n\rsubaccount_id\x18\x03 \x01(\t\x12\x0c\n\x04skip\x18\x04 \x01(\x04\x12\r\n\x05limit\x18\x05 \x01(\x11\x12\x12\n\nstart_time\x18\x06 \x01(\x12\x12\x10\n\x08\x65nd_time\x18\x07 \x01(\x12\x12\x12\n\nmarket_ids\x18\x08 \x03(\t\x12\x16\n\x0eis_conditional\x18\t \x01(\t\x12\x12\n\norder_type\x18\n \x01(\t\x12\x18\n\x10include_inactive\x18\x0b \x01(\x08\x12\x1f\n\x17subaccount_total_orders\x18\x0c \x01(\x08\x12\x10\n\x08trade_id\x18\r \x01(\t\x12\x0b\n\x03\x63id\x18\x0e \x01(\t\"\x94\x01\n\x0eOrdersResponse\x12G\n\x06orders\x18\x01 \x03(\x0b\x32\x37.injective_derivative_exchange_rpc.DerivativeLimitOrder\x12\x39\n\x06paging\x18\x02 \x01(\x0b\x32).injective_derivative_exchange_rpc.Paging\"\xd8\x03\n\x14\x44\x65rivativeLimitOrder\x12\x12\n\norder_hash\x18\x01 \x01(\t\x12\x12\n\norder_side\x18\x02 \x01(\t\x12\x11\n\tmarket_id\x18\x03 \x01(\t\x12\x15\n\rsubaccount_id\x18\x04 \x01(\t\x12\x16\n\x0eis_reduce_only\x18\x05 \x01(\x08\x12\x0e\n\x06margin\x18\x06 \x01(\t\x12\r\n\x05price\x18\x07 \x01(\t\x12\x10\n\x08quantity\x18\x08 \x01(\t\x12\x19\n\x11unfilled_quantity\x18\t \x01(\t\x12\x15\n\rtrigger_price\x18\n \x01(\t\x12\x15\n\rfee_recipient\x18\x0b \x01(\t\x12\r\n\x05state\x18\x0c \x01(\t\x12\x12\n\ncreated_at\x18\r \x01(\x12\x12\x12\n\nupdated_at\x18\x0e \x01(\x12\x12\x14\n\x0corder_number\x18\x0f \x01(\x12\x12\x12\n\norder_type\x18\x10 \x01(\t\x12\x16\n\x0eis_conditional\x18\x11 \x01(\x08\x12\x12\n\ntrigger_at\x18\x12 \x01(\x04\x12\x19\n\x11placed_order_hash\x18\x13 \x01(\t\x12\x16\n\x0e\x65xecution_type\x18\x14 \x01(\t\x12\x0f\n\x07tx_hash\x18\x15 \x01(\t\x12\x0b\n\x03\x63id\x18\x16 \x01(\t\"\xca\x01\n\x10PositionsRequest\x12\x15\n\rsubaccount_id\x18\x01 \x01(\t\x12\x11\n\tmarket_id\x18\x02 \x01(\t\x12\x0c\n\x04skip\x18\x03 \x01(\x04\x12\r\n\x05limit\x18\x04 \x01(\x11\x12\x12\n\nstart_time\x18\x05 \x01(\x12\x12\x10\n\x08\x65nd_time\x18\x06 \x01(\x12\x12\x12\n\nmarket_ids\x18\x07 \x03(\t\x12\x11\n\tdirection\x18\x08 \x01(\t\x12\"\n\x1asubaccount_total_positions\x18\t \x01(\x08\"\x98\x01\n\x11PositionsResponse\x12H\n\tpositions\x18\x01 \x03(\x0b\x32\x35.injective_derivative_exchange_rpc.DerivativePosition\x12\x39\n\x06paging\x18\x02 \x01(\x0b\x32).injective_derivative_exchange_rpc.Paging\"\x97\x02\n\x12\x44\x65rivativePosition\x12\x0e\n\x06ticker\x18\x01 \x01(\t\x12\x11\n\tmarket_id\x18\x02 \x01(\t\x12\x15\n\rsubaccount_id\x18\x03 \x01(\t\x12\x11\n\tdirection\x18\x04 \x01(\t\x12\x10\n\x08quantity\x18\x05 \x01(\t\x12\x13\n\x0b\x65ntry_price\x18\x06 \x01(\t\x12\x0e\n\x06margin\x18\x07 \x01(\t\x12\x19\n\x11liquidation_price\x18\x08 \x01(\t\x12\x12\n\nmark_price\x18\t \x01(\t\x12&\n\x1e\x61ggregate_reduce_only_quantity\x18\x0b \x01(\t\x12\x12\n\nupdated_at\x18\x0c \x01(\x12\x12\x12\n\ncreated_at\x18\r \x01(\x12\"L\n\x1aLiquidablePositionsRequest\x12\x11\n\tmarket_id\x18\x01 \x01(\t\x12\x0c\n\x04skip\x18\x02 \x01(\x04\x12\r\n\x05limit\x18\x03 \x01(\x11\"g\n\x1bLiquidablePositionsResponse\x12H\n\tpositions\x18\x01 \x03(\x0b\x32\x35.injective_derivative_exchange_rpc.DerivativePosition\"\x85\x01\n\x16\x46undingPaymentsRequest\x12\x15\n\rsubaccount_id\x18\x01 \x01(\t\x12\x11\n\tmarket_id\x18\x02 \x01(\t\x12\x0c\n\x04skip\x18\x03 \x01(\x04\x12\r\n\x05limit\x18\x04 \x01(\x11\x12\x10\n\x08\x65nd_time\x18\x05 \x01(\x12\x12\x12\n\nmarket_ids\x18\x06 \x03(\t\"\x99\x01\n\x17\x46undingPaymentsResponse\x12\x43\n\x08payments\x18\x01 \x03(\x0b\x32\x31.injective_derivative_exchange_rpc.FundingPayment\x12\x39\n\x06paging\x18\x02 \x01(\x0b\x32).injective_derivative_exchange_rpc.Paging\"]\n\x0e\x46undingPayment\x12\x11\n\tmarket_id\x18\x01 \x01(\t\x12\x15\n\rsubaccount_id\x18\x02 \x01(\t\x12\x0e\n\x06\x61mount\x18\x03 \x01(\t\x12\x11\n\ttimestamp\x18\x04 \x01(\x12\"W\n\x13\x46undingRatesRequest\x12\x11\n\tmarket_id\x18\x01 \x01(\t\x12\x0c\n\x04skip\x18\x02 \x01(\x04\x12\r\n\x05limit\x18\x03 \x01(\x11\x12\x10\n\x08\x65nd_time\x18\x04 \x01(\x12\"\x98\x01\n\x14\x46undingRatesResponse\x12\x45\n\rfunding_rates\x18\x01 \x03(\x0b\x32..injective_derivative_exchange_rpc.FundingRate\x12\x39\n\x06paging\x18\x02 \x01(\x0b\x32).injective_derivative_exchange_rpc.Paging\"A\n\x0b\x46undingRate\x12\x11\n\tmarket_id\x18\x01 \x01(\t\x12\x0c\n\x04rate\x18\x02 \x01(\t\x12\x11\n\ttimestamp\x18\x03 \x01(\x12\"n\n\x16StreamPositionsRequest\x12\x15\n\rsubaccount_id\x18\x01 \x01(\t\x12\x11\n\tmarket_id\x18\x02 \x01(\t\x12\x12\n\nmarket_ids\x18\x03 \x03(\t\x12\x16\n\x0esubaccount_ids\x18\x04 \x03(\t\"u\n\x17StreamPositionsResponse\x12G\n\x08position\x18\x01 \x01(\x0b\x32\x35.injective_derivative_exchange_rpc.DerivativePosition\x12\x11\n\ttimestamp\x18\x02 \x01(\x12\"\xb0\x02\n\x13StreamOrdersRequest\x12\x11\n\tmarket_id\x18\x01 \x01(\t\x12\x12\n\norder_side\x18\x02 \x01(\t\x12\x15\n\rsubaccount_id\x18\x03 \x01(\t\x12\x0c\n\x04skip\x18\x04 \x01(\x04\x12\r\n\x05limit\x18\x05 \x01(\x11\x12\x12\n\nstart_time\x18\x06 \x01(\x12\x12\x10\n\x08\x65nd_time\x18\x07 \x01(\x12\x12\x12\n\nmarket_ids\x18\x08 \x03(\t\x12\x16\n\x0eis_conditional\x18\t \x01(\t\x12\x12\n\norder_type\x18\n \x01(\t\x12\x18\n\x10include_inactive\x18\x0b \x01(\x08\x12\x1f\n\x17subaccount_total_orders\x18\x0c \x01(\x08\x12\x10\n\x08trade_id\x18\r \x01(\t\x12\x0b\n\x03\x63id\x18\x0e \x01(\t\"\x89\x01\n\x14StreamOrdersResponse\x12\x46\n\x05order\x18\x01 \x01(\x0b\x32\x37.injective_derivative_exchange_rpc.DerivativeLimitOrder\x12\x16\n\x0eoperation_type\x18\x02 \x01(\t\x12\x11\n\ttimestamp\x18\x03 \x01(\x12\"\x97\x02\n\rTradesRequest\x12\x11\n\tmarket_id\x18\x01 \x01(\t\x12\x16\n\x0e\x65xecution_side\x18\x02 \x01(\t\x12\x11\n\tdirection\x18\x03 \x01(\t\x12\x15\n\rsubaccount_id\x18\x04 \x01(\t\x12\x0c\n\x04skip\x18\x05 \x01(\x04\x12\r\n\x05limit\x18\x06 \x01(\x11\x12\x12\n\nstart_time\x18\x07 \x01(\x12\x12\x10\n\x08\x65nd_time\x18\x08 \x01(\x12\x12\x12\n\nmarket_ids\x18\t \x03(\t\x12\x16\n\x0esubaccount_ids\x18\n \x03(\t\x12\x17\n\x0f\x65xecution_types\x18\x0b \x03(\t\x12\x10\n\x08trade_id\x18\x0c \x01(\t\x12\x17\n\x0f\x61\x63\x63ount_address\x18\r \x01(\t\"\x8f\x01\n\x0eTradesResponse\x12\x42\n\x06trades\x18\x01 \x03(\x0b\x32\x32.injective_derivative_exchange_rpc.DerivativeTrade\x12\x39\n\x06paging\x18\x02 \x01(\x0b\x32).injective_derivative_exchange_rpc.Paging\"\xc2\x02\n\x0f\x44\x65rivativeTrade\x12\x12\n\norder_hash\x18\x01 \x01(\t\x12\x15\n\rsubaccount_id\x18\x02 \x01(\t\x12\x11\n\tmarket_id\x18\x03 \x01(\t\x12\x1c\n\x14trade_execution_type\x18\x04 \x01(\t\x12\x16\n\x0eis_liquidation\x18\x05 \x01(\x08\x12H\n\x0eposition_delta\x18\x06 \x01(\x0b\x32\x30.injective_derivative_exchange_rpc.PositionDelta\x12\x0e\n\x06payout\x18\x07 \x01(\t\x12\x0b\n\x03\x66\x65\x65\x18\x08 \x01(\t\x12\x13\n\x0b\x65xecuted_at\x18\t \x01(\x12\x12\x15\n\rfee_recipient\x18\n \x01(\t\x12\x10\n\x08trade_id\x18\x0b \x01(\t\x12\x16\n\x0e\x65xecution_side\x18\x0c \x01(\t\"w\n\rPositionDelta\x12\x17\n\x0ftrade_direction\x18\x01 \x01(\t\x12\x17\n\x0f\x65xecution_price\x18\x02 \x01(\t\x12\x1a\n\x12\x65xecution_quantity\x18\x03 \x01(\t\x12\x18\n\x10\x65xecution_margin\x18\x04 \x01(\t\"\x9d\x02\n\x13StreamTradesRequest\x12\x11\n\tmarket_id\x18\x01 \x01(\t\x12\x16\n\x0e\x65xecution_side\x18\x02 \x01(\t\x12\x11\n\tdirection\x18\x03 \x01(\t\x12\x15\n\rsubaccount_id\x18\x04 \x01(\t\x12\x0c\n\x04skip\x18\x05 \x01(\x04\x12\r\n\x05limit\x18\x06 \x01(\x11\x12\x12\n\nstart_time\x18\x07 \x01(\x12\x12\x10\n\x08\x65nd_time\x18\x08 \x01(\x12\x12\x12\n\nmarket_ids\x18\t \x03(\t\x12\x16\n\x0esubaccount_ids\x18\n \x03(\t\x12\x17\n\x0f\x65xecution_types\x18\x0b \x03(\t\x12\x10\n\x08trade_id\x18\x0c \x01(\t\x12\x17\n\x0f\x61\x63\x63ount_address\x18\r \x01(\t\"\x84\x01\n\x14StreamTradesResponse\x12\x41\n\x05trade\x18\x01 \x01(\x0b\x32\x32.injective_derivative_exchange_rpc.DerivativeTrade\x12\x16\n\x0eoperation_type\x18\x02 \x01(\t\x12\x11\n\ttimestamp\x18\x03 \x01(\x12\"d\n\x1bSubaccountOrdersListRequest\x12\x15\n\rsubaccount_id\x18\x01 \x01(\t\x12\x11\n\tmarket_id\x18\x02 \x01(\t\x12\x0c\n\x04skip\x18\x03 \x01(\x04\x12\r\n\x05limit\x18\x04 \x01(\x11\"\xa2\x01\n\x1cSubaccountOrdersListResponse\x12G\n\x06orders\x18\x01 \x03(\x0b\x32\x37.injective_derivative_exchange_rpc.DerivativeLimitOrder\x12\x39\n\x06paging\x18\x02 \x01(\x0b\x32).injective_derivative_exchange_rpc.Paging\"\x8f\x01\n\x1bSubaccountTradesListRequest\x12\x15\n\rsubaccount_id\x18\x01 \x01(\t\x12\x11\n\tmarket_id\x18\x02 \x01(\t\x12\x16\n\x0e\x65xecution_type\x18\x03 \x01(\t\x12\x11\n\tdirection\x18\x04 \x01(\t\x12\x0c\n\x04skip\x18\x05 \x01(\x04\x12\r\n\x05limit\x18\x06 \x01(\x11\"b\n\x1cSubaccountTradesListResponse\x12\x42\n\x06trades\x18\x01 \x03(\x0b\x32\x32.injective_derivative_exchange_rpc.DerivativeTrade\"\xcf\x02\n\x14OrdersHistoryRequest\x12\x15\n\rsubaccount_id\x18\x01 \x01(\t\x12\x11\n\tmarket_id\x18\x02 \x01(\t\x12\x0c\n\x04skip\x18\x03 \x01(\x04\x12\r\n\x05limit\x18\x04 \x01(\x11\x12\x13\n\x0border_types\x18\x05 \x03(\t\x12\x11\n\tdirection\x18\x06 \x01(\t\x12\x12\n\nstart_time\x18\x07 \x01(\x12\x12\x10\n\x08\x65nd_time\x18\x08 \x01(\x12\x12\x16\n\x0eis_conditional\x18\t \x01(\t\x12\x12\n\norder_type\x18\n \x01(\t\x12\r\n\x05state\x18\x0b \x01(\t\x12\x17\n\x0f\x65xecution_types\x18\x0c \x03(\t\x12\x12\n\nmarket_ids\x18\r \x03(\t\x12\x10\n\x08trade_id\x18\x0e \x01(\t\x12\x1b\n\x13\x61\x63tive_markets_only\x18\x0f \x01(\x08\x12\x0b\n\x03\x63id\x18\x10 \x01(\t\"\x9d\x01\n\x15OrdersHistoryResponse\x12I\n\x06orders\x18\x01 \x03(\x0b\x32\x39.injective_derivative_exchange_rpc.DerivativeOrderHistory\x12\x39\n\x06paging\x18\x02 \x01(\x0b\x32).injective_derivative_exchange_rpc.Paging\"\xbd\x03\n\x16\x44\x65rivativeOrderHistory\x12\x12\n\norder_hash\x18\x01 \x01(\t\x12\x11\n\tmarket_id\x18\x02 \x01(\t\x12\x11\n\tis_active\x18\x03 \x01(\x08\x12\x15\n\rsubaccount_id\x18\x04 \x01(\t\x12\x16\n\x0e\x65xecution_type\x18\x05 \x01(\t\x12\x12\n\norder_type\x18\x06 \x01(\t\x12\r\n\x05price\x18\x07 \x01(\t\x12\x15\n\rtrigger_price\x18\x08 \x01(\t\x12\x10\n\x08quantity\x18\t \x01(\t\x12\x17\n\x0f\x66illed_quantity\x18\n \x01(\t\x12\r\n\x05state\x18\x0b \x01(\t\x12\x12\n\ncreated_at\x18\x0c \x01(\x12\x12\x12\n\nupdated_at\x18\r \x01(\x12\x12\x16\n\x0eis_reduce_only\x18\x0e \x01(\x08\x12\x11\n\tdirection\x18\x0f \x01(\t\x12\x16\n\x0eis_conditional\x18\x10 \x01(\x08\x12\x12\n\ntrigger_at\x18\x11 \x01(\x04\x12\x19\n\x11placed_order_hash\x18\x12 \x01(\t\x12\x0e\n\x06margin\x18\x13 \x01(\t\x12\x0f\n\x07tx_hash\x18\x14 \x01(\t\x12\x0b\n\x03\x63id\x18\x15 \x01(\t\"\x96\x01\n\x1aStreamOrdersHistoryRequest\x12\x15\n\rsubaccount_id\x18\x01 \x01(\t\x12\x11\n\tmarket_id\x18\x02 \x01(\t\x12\x13\n\x0border_types\x18\x03 \x03(\t\x12\x11\n\tdirection\x18\x04 \x01(\t\x12\r\n\x05state\x18\x05 \x01(\t\x12\x17\n\x0f\x65xecution_types\x18\x06 \x03(\t\"\x92\x01\n\x1bStreamOrdersHistoryResponse\x12H\n\x05order\x18\x01 \x01(\x0b\x32\x39.injective_derivative_exchange_rpc.DerivativeOrderHistory\x12\x16\n\x0eoperation_type\x18\x02 \x01(\t\x12\x11\n\ttimestamp\x18\x03 \x01(\x12\x32\xc7\x17\n\x1eInjectiveDerivativeExchangeRPC\x12p\n\x07Markets\x12\x31.injective_derivative_exchange_rpc.MarketsRequest\x1a\x32.injective_derivative_exchange_rpc.MarketsResponse\x12m\n\x06Market\x12\x30.injective_derivative_exchange_rpc.MarketRequest\x1a\x31.injective_derivative_exchange_rpc.MarketResponse\x12\x81\x01\n\x0cStreamMarket\x12\x36.injective_derivative_exchange_rpc.StreamMarketRequest\x1a\x37.injective_derivative_exchange_rpc.StreamMarketResponse0\x01\x12\x97\x01\n\x14\x42inaryOptionsMarkets\x12>.injective_derivative_exchange_rpc.BinaryOptionsMarketsRequest\x1a?.injective_derivative_exchange_rpc.BinaryOptionsMarketsResponse\x12\x94\x01\n\x13\x42inaryOptionsMarket\x12=.injective_derivative_exchange_rpc.BinaryOptionsMarketRequest\x1a>.injective_derivative_exchange_rpc.BinaryOptionsMarketResponse\x12|\n\x0bOrderbookV2\x12\x35.injective_derivative_exchange_rpc.OrderbookV2Request\x1a\x36.injective_derivative_exchange_rpc.OrderbookV2Response\x12\x7f\n\x0cOrderbooksV2\x12\x36.injective_derivative_exchange_rpc.OrderbooksV2Request\x1a\x37.injective_derivative_exchange_rpc.OrderbooksV2Response\x12\x90\x01\n\x11StreamOrderbookV2\x12;.injective_derivative_exchange_rpc.StreamOrderbookV2Request\x1a<.injective_derivative_exchange_rpc.StreamOrderbookV2Response0\x01\x12\x9c\x01\n\x15StreamOrderbookUpdate\x12?.injective_derivative_exchange_rpc.StreamOrderbookUpdateRequest\x1a@.injective_derivative_exchange_rpc.StreamOrderbookUpdateResponse0\x01\x12m\n\x06Orders\x12\x30.injective_derivative_exchange_rpc.OrdersRequest\x1a\x31.injective_derivative_exchange_rpc.OrdersResponse\x12v\n\tPositions\x12\x33.injective_derivative_exchange_rpc.PositionsRequest\x1a\x34.injective_derivative_exchange_rpc.PositionsResponse\x12\x94\x01\n\x13LiquidablePositions\x12=.injective_derivative_exchange_rpc.LiquidablePositionsRequest\x1a>.injective_derivative_exchange_rpc.LiquidablePositionsResponse\x12\x88\x01\n\x0f\x46undingPayments\x12\x39.injective_derivative_exchange_rpc.FundingPaymentsRequest\x1a:.injective_derivative_exchange_rpc.FundingPaymentsResponse\x12\x7f\n\x0c\x46undingRates\x12\x36.injective_derivative_exchange_rpc.FundingRatesRequest\x1a\x37.injective_derivative_exchange_rpc.FundingRatesResponse\x12\x8a\x01\n\x0fStreamPositions\x12\x39.injective_derivative_exchange_rpc.StreamPositionsRequest\x1a:.injective_derivative_exchange_rpc.StreamPositionsResponse0\x01\x12\x81\x01\n\x0cStreamOrders\x12\x36.injective_derivative_exchange_rpc.StreamOrdersRequest\x1a\x37.injective_derivative_exchange_rpc.StreamOrdersResponse0\x01\x12m\n\x06Trades\x12\x30.injective_derivative_exchange_rpc.TradesRequest\x1a\x31.injective_derivative_exchange_rpc.TradesResponse\x12\x81\x01\n\x0cStreamTrades\x12\x36.injective_derivative_exchange_rpc.StreamTradesRequest\x1a\x37.injective_derivative_exchange_rpc.StreamTradesResponse0\x01\x12\x97\x01\n\x14SubaccountOrdersList\x12>.injective_derivative_exchange_rpc.SubaccountOrdersListRequest\x1a?.injective_derivative_exchange_rpc.SubaccountOrdersListResponse\x12\x97\x01\n\x14SubaccountTradesList\x12>.injective_derivative_exchange_rpc.SubaccountTradesListRequest\x1a?.injective_derivative_exchange_rpc.SubaccountTradesListResponse\x12\x82\x01\n\rOrdersHistory\x12\x37.injective_derivative_exchange_rpc.OrdersHistoryRequest\x1a\x38.injective_derivative_exchange_rpc.OrdersHistoryResponse\x12\x96\x01\n\x13StreamOrdersHistory\x12=.injective_derivative_exchange_rpc.StreamOrdersHistoryRequest\x1a>.injective_derivative_exchange_rpc.StreamOrdersHistoryResponse0\x01\x42&Z$/injective_derivative_exchange_rpcpbb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -83,71 +83,71 @@ _globals['_PRICELEVELUPDATE']._serialized_start=4193 _globals['_PRICELEVELUPDATE']._serialized_end=4282 _globals['_ORDERSREQUEST']._serialized_start=4285 - _globals['_ORDERSREQUEST']._serialized_end=4570 - _globals['_ORDERSRESPONSE']._serialized_start=4573 - _globals['_ORDERSRESPONSE']._serialized_end=4721 - _globals['_DERIVATIVELIMITORDER']._serialized_start=4724 - _globals['_DERIVATIVELIMITORDER']._serialized_end=5183 - _globals['_POSITIONSREQUEST']._serialized_start=5186 - _globals['_POSITIONSREQUEST']._serialized_end=5388 - _globals['_POSITIONSRESPONSE']._serialized_start=5391 - _globals['_POSITIONSRESPONSE']._serialized_end=5543 - _globals['_DERIVATIVEPOSITION']._serialized_start=5546 - _globals['_DERIVATIVEPOSITION']._serialized_end=5825 - _globals['_LIQUIDABLEPOSITIONSREQUEST']._serialized_start=5827 - _globals['_LIQUIDABLEPOSITIONSREQUEST']._serialized_end=5903 - _globals['_LIQUIDABLEPOSITIONSRESPONSE']._serialized_start=5905 - _globals['_LIQUIDABLEPOSITIONSRESPONSE']._serialized_end=6008 - _globals['_FUNDINGPAYMENTSREQUEST']._serialized_start=6011 - _globals['_FUNDINGPAYMENTSREQUEST']._serialized_end=6144 - _globals['_FUNDINGPAYMENTSRESPONSE']._serialized_start=6147 - _globals['_FUNDINGPAYMENTSRESPONSE']._serialized_end=6300 - _globals['_FUNDINGPAYMENT']._serialized_start=6302 - _globals['_FUNDINGPAYMENT']._serialized_end=6395 - _globals['_FUNDINGRATESREQUEST']._serialized_start=6397 - _globals['_FUNDINGRATESREQUEST']._serialized_end=6484 - _globals['_FUNDINGRATESRESPONSE']._serialized_start=6487 - _globals['_FUNDINGRATESRESPONSE']._serialized_end=6639 - _globals['_FUNDINGRATE']._serialized_start=6641 - _globals['_FUNDINGRATE']._serialized_end=6706 - _globals['_STREAMPOSITIONSREQUEST']._serialized_start=6708 - _globals['_STREAMPOSITIONSREQUEST']._serialized_end=6818 - _globals['_STREAMPOSITIONSRESPONSE']._serialized_start=6820 - _globals['_STREAMPOSITIONSRESPONSE']._serialized_end=6937 - _globals['_STREAMORDERSREQUEST']._serialized_start=6940 - _globals['_STREAMORDERSREQUEST']._serialized_end=7231 - _globals['_STREAMORDERSRESPONSE']._serialized_start=7234 - _globals['_STREAMORDERSRESPONSE']._serialized_end=7371 - _globals['_TRADESREQUEST']._serialized_start=7374 - _globals['_TRADESREQUEST']._serialized_end=7653 - _globals['_TRADESRESPONSE']._serialized_start=7656 - _globals['_TRADESRESPONSE']._serialized_end=7799 - _globals['_DERIVATIVETRADE']._serialized_start=7802 - _globals['_DERIVATIVETRADE']._serialized_end=8124 - _globals['_POSITIONDELTA']._serialized_start=8126 - _globals['_POSITIONDELTA']._serialized_end=8245 - _globals['_STREAMTRADESREQUEST']._serialized_start=8248 - _globals['_STREAMTRADESREQUEST']._serialized_end=8533 - _globals['_STREAMTRADESRESPONSE']._serialized_start=8536 - _globals['_STREAMTRADESRESPONSE']._serialized_end=8668 - _globals['_SUBACCOUNTORDERSLISTREQUEST']._serialized_start=8670 - _globals['_SUBACCOUNTORDERSLISTREQUEST']._serialized_end=8770 - _globals['_SUBACCOUNTORDERSLISTRESPONSE']._serialized_start=8773 - _globals['_SUBACCOUNTORDERSLISTRESPONSE']._serialized_end=8935 - _globals['_SUBACCOUNTTRADESLISTREQUEST']._serialized_start=8938 - _globals['_SUBACCOUNTTRADESLISTREQUEST']._serialized_end=9081 - _globals['_SUBACCOUNTTRADESLISTRESPONSE']._serialized_start=9083 - _globals['_SUBACCOUNTTRADESLISTRESPONSE']._serialized_end=9181 - _globals['_ORDERSHISTORYREQUEST']._serialized_start=9184 - _globals['_ORDERSHISTORYREQUEST']._serialized_end=9506 - _globals['_ORDERSHISTORYRESPONSE']._serialized_start=9509 - _globals['_ORDERSHISTORYRESPONSE']._serialized_end=9666 - _globals['_DERIVATIVEORDERHISTORY']._serialized_start=9669 - _globals['_DERIVATIVEORDERHISTORY']._serialized_end=10101 - _globals['_STREAMORDERSHISTORYREQUEST']._serialized_start=10104 - _globals['_STREAMORDERSHISTORYREQUEST']._serialized_end=10254 - _globals['_STREAMORDERSHISTORYRESPONSE']._serialized_start=10257 - _globals['_STREAMORDERSHISTORYRESPONSE']._serialized_end=10403 - _globals['_INJECTIVEDERIVATIVEEXCHANGERPC']._serialized_start=10406 - _globals['_INJECTIVEDERIVATIVEEXCHANGERPC']._serialized_end=13421 + _globals['_ORDERSREQUEST']._serialized_end=4583 + _globals['_ORDERSRESPONSE']._serialized_start=4586 + _globals['_ORDERSRESPONSE']._serialized_end=4734 + _globals['_DERIVATIVELIMITORDER']._serialized_start=4737 + _globals['_DERIVATIVELIMITORDER']._serialized_end=5209 + _globals['_POSITIONSREQUEST']._serialized_start=5212 + _globals['_POSITIONSREQUEST']._serialized_end=5414 + _globals['_POSITIONSRESPONSE']._serialized_start=5417 + _globals['_POSITIONSRESPONSE']._serialized_end=5569 + _globals['_DERIVATIVEPOSITION']._serialized_start=5572 + _globals['_DERIVATIVEPOSITION']._serialized_end=5851 + _globals['_LIQUIDABLEPOSITIONSREQUEST']._serialized_start=5853 + _globals['_LIQUIDABLEPOSITIONSREQUEST']._serialized_end=5929 + _globals['_LIQUIDABLEPOSITIONSRESPONSE']._serialized_start=5931 + _globals['_LIQUIDABLEPOSITIONSRESPONSE']._serialized_end=6034 + _globals['_FUNDINGPAYMENTSREQUEST']._serialized_start=6037 + _globals['_FUNDINGPAYMENTSREQUEST']._serialized_end=6170 + _globals['_FUNDINGPAYMENTSRESPONSE']._serialized_start=6173 + _globals['_FUNDINGPAYMENTSRESPONSE']._serialized_end=6326 + _globals['_FUNDINGPAYMENT']._serialized_start=6328 + _globals['_FUNDINGPAYMENT']._serialized_end=6421 + _globals['_FUNDINGRATESREQUEST']._serialized_start=6423 + _globals['_FUNDINGRATESREQUEST']._serialized_end=6510 + _globals['_FUNDINGRATESRESPONSE']._serialized_start=6513 + _globals['_FUNDINGRATESRESPONSE']._serialized_end=6665 + _globals['_FUNDINGRATE']._serialized_start=6667 + _globals['_FUNDINGRATE']._serialized_end=6732 + _globals['_STREAMPOSITIONSREQUEST']._serialized_start=6734 + _globals['_STREAMPOSITIONSREQUEST']._serialized_end=6844 + _globals['_STREAMPOSITIONSRESPONSE']._serialized_start=6846 + _globals['_STREAMPOSITIONSRESPONSE']._serialized_end=6963 + _globals['_STREAMORDERSREQUEST']._serialized_start=6966 + _globals['_STREAMORDERSREQUEST']._serialized_end=7270 + _globals['_STREAMORDERSRESPONSE']._serialized_start=7273 + _globals['_STREAMORDERSRESPONSE']._serialized_end=7410 + _globals['_TRADESREQUEST']._serialized_start=7413 + _globals['_TRADESREQUEST']._serialized_end=7692 + _globals['_TRADESRESPONSE']._serialized_start=7695 + _globals['_TRADESRESPONSE']._serialized_end=7838 + _globals['_DERIVATIVETRADE']._serialized_start=7841 + _globals['_DERIVATIVETRADE']._serialized_end=8163 + _globals['_POSITIONDELTA']._serialized_start=8165 + _globals['_POSITIONDELTA']._serialized_end=8284 + _globals['_STREAMTRADESREQUEST']._serialized_start=8287 + _globals['_STREAMTRADESREQUEST']._serialized_end=8572 + _globals['_STREAMTRADESRESPONSE']._serialized_start=8575 + _globals['_STREAMTRADESRESPONSE']._serialized_end=8707 + _globals['_SUBACCOUNTORDERSLISTREQUEST']._serialized_start=8709 + _globals['_SUBACCOUNTORDERSLISTREQUEST']._serialized_end=8809 + _globals['_SUBACCOUNTORDERSLISTRESPONSE']._serialized_start=8812 + _globals['_SUBACCOUNTORDERSLISTRESPONSE']._serialized_end=8974 + _globals['_SUBACCOUNTTRADESLISTREQUEST']._serialized_start=8977 + _globals['_SUBACCOUNTTRADESLISTREQUEST']._serialized_end=9120 + _globals['_SUBACCOUNTTRADESLISTRESPONSE']._serialized_start=9122 + _globals['_SUBACCOUNTTRADESLISTRESPONSE']._serialized_end=9220 + _globals['_ORDERSHISTORYREQUEST']._serialized_start=9223 + _globals['_ORDERSHISTORYREQUEST']._serialized_end=9558 + _globals['_ORDERSHISTORYRESPONSE']._serialized_start=9561 + _globals['_ORDERSHISTORYRESPONSE']._serialized_end=9718 + _globals['_DERIVATIVEORDERHISTORY']._serialized_start=9721 + _globals['_DERIVATIVEORDERHISTORY']._serialized_end=10166 + _globals['_STREAMORDERSHISTORYREQUEST']._serialized_start=10169 + _globals['_STREAMORDERSHISTORYREQUEST']._serialized_end=10319 + _globals['_STREAMORDERSHISTORYRESPONSE']._serialized_start=10322 + _globals['_STREAMORDERSHISTORYRESPONSE']._serialized_end=10468 + _globals['_INJECTIVEDERIVATIVEEXCHANGERPC']._serialized_start=10471 + _globals['_INJECTIVEDERIVATIVEEXCHANGERPC']._serialized_end=13486 # @@protoc_insertion_point(module_scope) diff --git a/pyinjective/proto/exchange/injective_spot_exchange_rpc_pb2.py b/pyinjective/proto/exchange/injective_spot_exchange_rpc_pb2.py index e0ca7343..941ba933 100644 --- a/pyinjective/proto/exchange/injective_spot_exchange_rpc_pb2.py +++ b/pyinjective/proto/exchange/injective_spot_exchange_rpc_pb2.py @@ -13,7 +13,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n*exchange/injective_spot_exchange_rpc.proto\x12\x1binjective_spot_exchange_rpc\"i\n\x0eMarketsRequest\x12\x15\n\rmarket_status\x18\x01 \x01(\t\x12\x12\n\nbase_denom\x18\x02 \x01(\t\x12\x13\n\x0bquote_denom\x18\x03 \x01(\t\x12\x17\n\x0fmarket_statuses\x18\x04 \x03(\t\"O\n\x0fMarketsResponse\x12<\n\x07markets\x18\x01 \x03(\x0b\x32+.injective_spot_exchange_rpc.SpotMarketInfo\"\x81\x03\n\x0eSpotMarketInfo\x12\x11\n\tmarket_id\x18\x01 \x01(\t\x12\x15\n\rmarket_status\x18\x02 \x01(\t\x12\x0e\n\x06ticker\x18\x03 \x01(\t\x12\x12\n\nbase_denom\x18\x04 \x01(\t\x12?\n\x0f\x62\x61se_token_meta\x18\x05 \x01(\x0b\x32&.injective_spot_exchange_rpc.TokenMeta\x12\x13\n\x0bquote_denom\x18\x06 \x01(\t\x12@\n\x10quote_token_meta\x18\x07 \x01(\x0b\x32&.injective_spot_exchange_rpc.TokenMeta\x12\x16\n\x0emaker_fee_rate\x18\x08 \x01(\t\x12\x16\n\x0etaker_fee_rate\x18\t \x01(\t\x12\x1c\n\x14service_provider_fee\x18\n \x01(\t\x12\x1b\n\x13min_price_tick_size\x18\x0b \x01(\t\x12\x1e\n\x16min_quantity_tick_size\x18\x0c \x01(\t\"n\n\tTokenMeta\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07\x61\x64\x64ress\x18\x02 \x01(\t\x12\x0e\n\x06symbol\x18\x03 \x01(\t\x12\x0c\n\x04logo\x18\x04 \x01(\t\x12\x10\n\x08\x64\x65\x63imals\x18\x05 \x01(\x11\x12\x12\n\nupdated_at\x18\x06 \x01(\x12\"\"\n\rMarketRequest\x12\x11\n\tmarket_id\x18\x01 \x01(\t\"M\n\x0eMarketResponse\x12;\n\x06market\x18\x01 \x01(\x0b\x32+.injective_spot_exchange_rpc.SpotMarketInfo\"*\n\x14StreamMarketsRequest\x12\x12\n\nmarket_ids\x18\x01 \x03(\t\"\x7f\n\x15StreamMarketsResponse\x12;\n\x06market\x18\x01 \x01(\x0b\x32+.injective_spot_exchange_rpc.SpotMarketInfo\x12\x16\n\x0eoperation_type\x18\x02 \x01(\t\x12\x11\n\ttimestamp\x18\x03 \x01(\x12\"\'\n\x12OrderbookV2Request\x12\x11\n\tmarket_id\x18\x01 \x01(\t\"[\n\x13OrderbookV2Response\x12\x44\n\torderbook\x18\x01 \x01(\x0b\x32\x31.injective_spot_exchange_rpc.SpotLimitOrderbookV2\"\xaa\x01\n\x14SpotLimitOrderbookV2\x12\x35\n\x04\x62uys\x18\x01 \x03(\x0b\x32\'.injective_spot_exchange_rpc.PriceLevel\x12\x36\n\x05sells\x18\x02 \x03(\x0b\x32\'.injective_spot_exchange_rpc.PriceLevel\x12\x10\n\x08sequence\x18\x03 \x01(\x04\x12\x11\n\ttimestamp\x18\x04 \x01(\x12\"@\n\nPriceLevel\x12\r\n\x05price\x18\x01 \x01(\t\x12\x10\n\x08quantity\x18\x02 \x01(\t\x12\x11\n\ttimestamp\x18\x03 \x01(\x12\")\n\x13OrderbooksV2Request\x12\x12\n\nmarket_ids\x18\x01 \x03(\t\"c\n\x14OrderbooksV2Response\x12K\n\norderbooks\x18\x01 \x03(\x0b\x32\x37.injective_spot_exchange_rpc.SingleSpotLimitOrderbookV2\"u\n\x1aSingleSpotLimitOrderbookV2\x12\x11\n\tmarket_id\x18\x01 \x01(\t\x12\x44\n\torderbook\x18\x02 \x01(\x0b\x32\x31.injective_spot_exchange_rpc.SpotLimitOrderbookV2\".\n\x18StreamOrderbookV2Request\x12\x12\n\nmarket_ids\x18\x01 \x03(\t\"\x9f\x01\n\x19StreamOrderbookV2Response\x12\x44\n\torderbook\x18\x01 \x01(\x0b\x32\x31.injective_spot_exchange_rpc.SpotLimitOrderbookV2\x12\x16\n\x0eoperation_type\x18\x02 \x01(\t\x12\x11\n\ttimestamp\x18\x03 \x01(\x12\x12\x11\n\tmarket_id\x18\x04 \x01(\t\"2\n\x1cStreamOrderbookUpdateRequest\x12\x12\n\nmarket_ids\x18\x01 \x03(\t\"\xb2\x01\n\x1dStreamOrderbookUpdateResponse\x12S\n\x17orderbook_level_updates\x18\x01 \x01(\x0b\x32\x32.injective_spot_exchange_rpc.OrderbookLevelUpdates\x12\x16\n\x0eoperation_type\x18\x02 \x01(\t\x12\x11\n\ttimestamp\x18\x03 \x01(\x12\x12\x11\n\tmarket_id\x18\x04 \x01(\t\"\xcb\x01\n\x15OrderbookLevelUpdates\x12\x11\n\tmarket_id\x18\x01 \x01(\t\x12\x10\n\x08sequence\x18\x02 \x01(\x04\x12;\n\x04\x62uys\x18\x03 \x03(\x0b\x32-.injective_spot_exchange_rpc.PriceLevelUpdate\x12<\n\x05sells\x18\x04 \x03(\x0b\x32-.injective_spot_exchange_rpc.PriceLevelUpdate\x12\x12\n\nupdated_at\x18\x05 \x01(\x12\"Y\n\x10PriceLevelUpdate\x12\r\n\x05price\x18\x01 \x01(\t\x12\x10\n\x08quantity\x18\x02 \x01(\t\x12\x11\n\tis_active\x18\x03 \x01(\x08\x12\x11\n\ttimestamp\x18\x04 \x01(\x12\"\xf1\x01\n\rOrdersRequest\x12\x11\n\tmarket_id\x18\x01 \x01(\t\x12\x12\n\norder_side\x18\x02 \x01(\t\x12\x15\n\rsubaccount_id\x18\x03 \x01(\t\x12\x0c\n\x04skip\x18\x04 \x01(\x04\x12\r\n\x05limit\x18\x05 \x01(\x11\x12\x12\n\nstart_time\x18\x06 \x01(\x12\x12\x10\n\x08\x65nd_time\x18\x07 \x01(\x12\x12\x12\n\nmarket_ids\x18\x08 \x03(\t\x12\x18\n\x10include_inactive\x18\t \x01(\x08\x12\x1f\n\x17subaccount_total_orders\x18\n \x01(\x08\x12\x10\n\x08trade_id\x18\x0b \x01(\t\"\x82\x01\n\x0eOrdersResponse\x12;\n\x06orders\x18\x01 \x03(\x0b\x32+.injective_spot_exchange_rpc.SpotLimitOrder\x12\x33\n\x06paging\x18\x02 \x01(\x0b\x32#.injective_spot_exchange_rpc.Paging\"\x94\x02\n\x0eSpotLimitOrder\x12\x12\n\norder_hash\x18\x01 \x01(\t\x12\x12\n\norder_side\x18\x02 \x01(\t\x12\x11\n\tmarket_id\x18\x03 \x01(\t\x12\x15\n\rsubaccount_id\x18\x04 \x01(\t\x12\r\n\x05price\x18\x05 \x01(\t\x12\x10\n\x08quantity\x18\x06 \x01(\t\x12\x19\n\x11unfilled_quantity\x18\x07 \x01(\t\x12\x15\n\rtrigger_price\x18\x08 \x01(\t\x12\x15\n\rfee_recipient\x18\t \x01(\t\x12\r\n\x05state\x18\n \x01(\t\x12\x12\n\ncreated_at\x18\x0b \x01(\x12\x12\x12\n\nupdated_at\x18\x0c \x01(\x12\x12\x0f\n\x07tx_hash\x18\r \x01(\t\"\\\n\x06Paging\x12\r\n\x05total\x18\x01 \x01(\x12\x12\x0c\n\x04\x66rom\x18\x02 \x01(\x11\x12\n\n\x02to\x18\x03 \x01(\x11\x12\x1b\n\x13\x63ount_by_subaccount\x18\x04 \x01(\x12\x12\x0c\n\x04next\x18\x05 \x03(\t\"\xf7\x01\n\x13StreamOrdersRequest\x12\x11\n\tmarket_id\x18\x01 \x01(\t\x12\x12\n\norder_side\x18\x02 \x01(\t\x12\x15\n\rsubaccount_id\x18\x03 \x01(\t\x12\x0c\n\x04skip\x18\x04 \x01(\x04\x12\r\n\x05limit\x18\x05 \x01(\x11\x12\x12\n\nstart_time\x18\x06 \x01(\x12\x12\x10\n\x08\x65nd_time\x18\x07 \x01(\x12\x12\x12\n\nmarket_ids\x18\x08 \x03(\t\x12\x18\n\x10include_inactive\x18\t \x01(\x08\x12\x1f\n\x17subaccount_total_orders\x18\n \x01(\x08\x12\x10\n\x08trade_id\x18\x0b \x01(\t\"}\n\x14StreamOrdersResponse\x12:\n\x05order\x18\x01 \x01(\x0b\x32+.injective_spot_exchange_rpc.SpotLimitOrder\x12\x16\n\x0eoperation_type\x18\x02 \x01(\t\x12\x11\n\ttimestamp\x18\x03 \x01(\x12\"\x97\x02\n\rTradesRequest\x12\x11\n\tmarket_id\x18\x01 \x01(\t\x12\x16\n\x0e\x65xecution_side\x18\x02 \x01(\t\x12\x11\n\tdirection\x18\x03 \x01(\t\x12\x15\n\rsubaccount_id\x18\x04 \x01(\t\x12\x0c\n\x04skip\x18\x05 \x01(\x04\x12\r\n\x05limit\x18\x06 \x01(\x11\x12\x12\n\nstart_time\x18\x07 \x01(\x12\x12\x10\n\x08\x65nd_time\x18\x08 \x01(\x12\x12\x12\n\nmarket_ids\x18\t \x03(\t\x12\x16\n\x0esubaccount_ids\x18\n \x03(\t\x12\x17\n\x0f\x65xecution_types\x18\x0b \x03(\t\x12\x10\n\x08trade_id\x18\x0c \x01(\t\x12\x17\n\x0f\x61\x63\x63ount_address\x18\r \x01(\t\"}\n\x0eTradesResponse\x12\x36\n\x06trades\x18\x01 \x03(\x0b\x32&.injective_spot_exchange_rpc.SpotTrade\x12\x33\n\x06paging\x18\x02 \x01(\x0b\x32#.injective_spot_exchange_rpc.Paging\"\x9b\x02\n\tSpotTrade\x12\x12\n\norder_hash\x18\x01 \x01(\t\x12\x15\n\rsubaccount_id\x18\x02 \x01(\t\x12\x11\n\tmarket_id\x18\x03 \x01(\t\x12\x1c\n\x14trade_execution_type\x18\x04 \x01(\t\x12\x17\n\x0ftrade_direction\x18\x05 \x01(\t\x12\x36\n\x05price\x18\x06 \x01(\x0b\x32\'.injective_spot_exchange_rpc.PriceLevel\x12\x0b\n\x03\x66\x65\x65\x18\x07 \x01(\t\x12\x13\n\x0b\x65xecuted_at\x18\x08 \x01(\x12\x12\x15\n\rfee_recipient\x18\t \x01(\t\x12\x10\n\x08trade_id\x18\n \x01(\t\x12\x16\n\x0e\x65xecution_side\x18\x0b \x01(\t\"\x9d\x02\n\x13StreamTradesRequest\x12\x11\n\tmarket_id\x18\x01 \x01(\t\x12\x16\n\x0e\x65xecution_side\x18\x02 \x01(\t\x12\x11\n\tdirection\x18\x03 \x01(\t\x12\x15\n\rsubaccount_id\x18\x04 \x01(\t\x12\x0c\n\x04skip\x18\x05 \x01(\x04\x12\r\n\x05limit\x18\x06 \x01(\x11\x12\x12\n\nstart_time\x18\x07 \x01(\x12\x12\x10\n\x08\x65nd_time\x18\x08 \x01(\x12\x12\x12\n\nmarket_ids\x18\t \x03(\t\x12\x16\n\x0esubaccount_ids\x18\n \x03(\t\x12\x17\n\x0f\x65xecution_types\x18\x0b \x03(\t\x12\x10\n\x08trade_id\x18\x0c \x01(\t\x12\x17\n\x0f\x61\x63\x63ount_address\x18\r \x01(\t\"x\n\x14StreamTradesResponse\x12\x35\n\x05trade\x18\x01 \x01(\x0b\x32&.injective_spot_exchange_rpc.SpotTrade\x12\x16\n\x0eoperation_type\x18\x02 \x01(\t\x12\x11\n\ttimestamp\x18\x03 \x01(\x12\"d\n\x1bSubaccountOrdersListRequest\x12\x15\n\rsubaccount_id\x18\x01 \x01(\t\x12\x11\n\tmarket_id\x18\x02 \x01(\t\x12\x0c\n\x04skip\x18\x03 \x01(\x04\x12\r\n\x05limit\x18\x04 \x01(\x11\"\x90\x01\n\x1cSubaccountOrdersListResponse\x12;\n\x06orders\x18\x01 \x03(\x0b\x32+.injective_spot_exchange_rpc.SpotLimitOrder\x12\x33\n\x06paging\x18\x02 \x01(\x0b\x32#.injective_spot_exchange_rpc.Paging\"\x8f\x01\n\x1bSubaccountTradesListRequest\x12\x15\n\rsubaccount_id\x18\x01 \x01(\t\x12\x11\n\tmarket_id\x18\x02 \x01(\t\x12\x16\n\x0e\x65xecution_type\x18\x03 \x01(\t\x12\x11\n\tdirection\x18\x04 \x01(\t\x12\x0c\n\x04skip\x18\x05 \x01(\x04\x12\r\n\x05limit\x18\x06 \x01(\x11\"V\n\x1cSubaccountTradesListResponse\x12\x36\n\x06trades\x18\x01 \x03(\x0b\x32&.injective_spot_exchange_rpc.SpotTrade\"\x96\x02\n\x14OrdersHistoryRequest\x12\x15\n\rsubaccount_id\x18\x01 \x01(\t\x12\x11\n\tmarket_id\x18\x02 \x01(\t\x12\x0c\n\x04skip\x18\x03 \x01(\x04\x12\r\n\x05limit\x18\x04 \x01(\x11\x12\x13\n\x0border_types\x18\x05 \x03(\t\x12\x11\n\tdirection\x18\x06 \x01(\t\x12\x12\n\nstart_time\x18\x07 \x01(\x12\x12\x10\n\x08\x65nd_time\x18\x08 \x01(\x12\x12\r\n\x05state\x18\t \x01(\t\x12\x17\n\x0f\x65xecution_types\x18\n \x03(\t\x12\x12\n\nmarket_ids\x18\x0b \x03(\t\x12\x10\n\x08trade_id\x18\x0c \x01(\t\x12\x1b\n\x13\x61\x63tive_markets_only\x18\r \x01(\x08\"\x8b\x01\n\x15OrdersHistoryResponse\x12=\n\x06orders\x18\x01 \x03(\x0b\x32-.injective_spot_exchange_rpc.SpotOrderHistory\x12\x33\n\x06paging\x18\x02 \x01(\x0b\x32#.injective_spot_exchange_rpc.Paging\"\xbb\x02\n\x10SpotOrderHistory\x12\x12\n\norder_hash\x18\x01 \x01(\t\x12\x11\n\tmarket_id\x18\x02 \x01(\t\x12\x11\n\tis_active\x18\x03 \x01(\x08\x12\x15\n\rsubaccount_id\x18\x04 \x01(\t\x12\x16\n\x0e\x65xecution_type\x18\x05 \x01(\t\x12\x12\n\norder_type\x18\x06 \x01(\t\x12\r\n\x05price\x18\x07 \x01(\t\x12\x15\n\rtrigger_price\x18\x08 \x01(\t\x12\x10\n\x08quantity\x18\t \x01(\t\x12\x17\n\x0f\x66illed_quantity\x18\n \x01(\t\x12\r\n\x05state\x18\x0b \x01(\t\x12\x12\n\ncreated_at\x18\x0c \x01(\x12\x12\x12\n\nupdated_at\x18\r \x01(\x12\x12\x11\n\tdirection\x18\x0e \x01(\t\x12\x0f\n\x07tx_hash\x18\x0f \x01(\t\"\x96\x01\n\x1aStreamOrdersHistoryRequest\x12\x15\n\rsubaccount_id\x18\x01 \x01(\t\x12\x11\n\tmarket_id\x18\x02 \x01(\t\x12\x13\n\x0border_types\x18\x03 \x03(\t\x12\x11\n\tdirection\x18\x04 \x01(\t\x12\r\n\x05state\x18\x05 \x01(\t\x12\x17\n\x0f\x65xecution_types\x18\x06 \x03(\t\"\x86\x01\n\x1bStreamOrdersHistoryResponse\x12<\n\x05order\x18\x01 \x01(\x0b\x32-.injective_spot_exchange_rpc.SpotOrderHistory\x12\x16\n\x0eoperation_type\x18\x02 \x01(\t\x12\x11\n\ttimestamp\x18\x03 \x01(\x12\"\x8a\x01\n\x18\x41tomicSwapHistoryRequest\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\t\x12\x18\n\x10\x63ontract_address\x18\x02 \x01(\t\x12\x0c\n\x04skip\x18\x03 \x01(\x11\x12\r\n\x05limit\x18\x04 \x01(\x11\x12\x13\n\x0b\x66rom_number\x18\x05 \x01(\x11\x12\x11\n\tto_number\x18\x06 \x01(\x11\"\x87\x01\n\x19\x41tomicSwapHistoryResponse\x12\x33\n\x06paging\x18\x01 \x01(\x0b\x32#.injective_spot_exchange_rpc.Paging\x12\x35\n\x04\x64\x61ta\x18\x02 \x03(\x0b\x32\'.injective_spot_exchange_rpc.AtomicSwap\"\xdc\x02\n\nAtomicSwap\x12\x0e\n\x06sender\x18\x01 \x01(\t\x12\r\n\x05route\x18\x02 \x01(\t\x12\x36\n\x0bsource_coin\x18\x03 \x01(\x0b\x32!.injective_spot_exchange_rpc.Coin\x12\x34\n\tdest_coin\x18\x04 \x01(\x0b\x32!.injective_spot_exchange_rpc.Coin\x12/\n\x04\x66\x65\x65s\x18\x05 \x03(\x0b\x32!.injective_spot_exchange_rpc.Coin\x12\x18\n\x10\x63ontract_address\x18\x06 \x01(\t\x12\x17\n\x0findex_by_sender\x18\x07 \x01(\x11\x12 \n\x18index_by_sender_contract\x18\x08 \x01(\x11\x12\x0f\n\x07tx_hash\x18\t \x01(\t\x12\x13\n\x0b\x65xecuted_at\x18\n \x01(\x12\x12\x15\n\rrefund_amount\x18\x0b \x01(\t\"%\n\x04\x43oin\x12\r\n\x05\x64\x65nom\x18\x01 \x01(\t\x12\x0e\n\x06\x61mount\x18\x02 \x01(\t2\xb8\x0f\n\x18InjectiveSpotExchangeRPC\x12\x64\n\x07Markets\x12+.injective_spot_exchange_rpc.MarketsRequest\x1a,.injective_spot_exchange_rpc.MarketsResponse\x12\x61\n\x06Market\x12*.injective_spot_exchange_rpc.MarketRequest\x1a+.injective_spot_exchange_rpc.MarketResponse\x12x\n\rStreamMarkets\x12\x31.injective_spot_exchange_rpc.StreamMarketsRequest\x1a\x32.injective_spot_exchange_rpc.StreamMarketsResponse0\x01\x12p\n\x0bOrderbookV2\x12/.injective_spot_exchange_rpc.OrderbookV2Request\x1a\x30.injective_spot_exchange_rpc.OrderbookV2Response\x12s\n\x0cOrderbooksV2\x12\x30.injective_spot_exchange_rpc.OrderbooksV2Request\x1a\x31.injective_spot_exchange_rpc.OrderbooksV2Response\x12\x84\x01\n\x11StreamOrderbookV2\x12\x35.injective_spot_exchange_rpc.StreamOrderbookV2Request\x1a\x36.injective_spot_exchange_rpc.StreamOrderbookV2Response0\x01\x12\x90\x01\n\x15StreamOrderbookUpdate\x12\x39.injective_spot_exchange_rpc.StreamOrderbookUpdateRequest\x1a:.injective_spot_exchange_rpc.StreamOrderbookUpdateResponse0\x01\x12\x61\n\x06Orders\x12*.injective_spot_exchange_rpc.OrdersRequest\x1a+.injective_spot_exchange_rpc.OrdersResponse\x12u\n\x0cStreamOrders\x12\x30.injective_spot_exchange_rpc.StreamOrdersRequest\x1a\x31.injective_spot_exchange_rpc.StreamOrdersResponse0\x01\x12\x61\n\x06Trades\x12*.injective_spot_exchange_rpc.TradesRequest\x1a+.injective_spot_exchange_rpc.TradesResponse\x12u\n\x0cStreamTrades\x12\x30.injective_spot_exchange_rpc.StreamTradesRequest\x1a\x31.injective_spot_exchange_rpc.StreamTradesResponse0\x01\x12\x8b\x01\n\x14SubaccountOrdersList\x12\x38.injective_spot_exchange_rpc.SubaccountOrdersListRequest\x1a\x39.injective_spot_exchange_rpc.SubaccountOrdersListResponse\x12\x8b\x01\n\x14SubaccountTradesList\x12\x38.injective_spot_exchange_rpc.SubaccountTradesListRequest\x1a\x39.injective_spot_exchange_rpc.SubaccountTradesListResponse\x12v\n\rOrdersHistory\x12\x31.injective_spot_exchange_rpc.OrdersHistoryRequest\x1a\x32.injective_spot_exchange_rpc.OrdersHistoryResponse\x12\x8a\x01\n\x13StreamOrdersHistory\x12\x37.injective_spot_exchange_rpc.StreamOrdersHistoryRequest\x1a\x38.injective_spot_exchange_rpc.StreamOrdersHistoryResponse0\x01\x12\x82\x01\n\x11\x41tomicSwapHistory\x12\x35.injective_spot_exchange_rpc.AtomicSwapHistoryRequest\x1a\x36.injective_spot_exchange_rpc.AtomicSwapHistoryResponseB Z\x1e/injective_spot_exchange_rpcpbb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n*exchange/injective_spot_exchange_rpc.proto\x12\x1binjective_spot_exchange_rpc\"i\n\x0eMarketsRequest\x12\x15\n\rmarket_status\x18\x01 \x01(\t\x12\x12\n\nbase_denom\x18\x02 \x01(\t\x12\x13\n\x0bquote_denom\x18\x03 \x01(\t\x12\x17\n\x0fmarket_statuses\x18\x04 \x03(\t\"O\n\x0fMarketsResponse\x12<\n\x07markets\x18\x01 \x03(\x0b\x32+.injective_spot_exchange_rpc.SpotMarketInfo\"\x81\x03\n\x0eSpotMarketInfo\x12\x11\n\tmarket_id\x18\x01 \x01(\t\x12\x15\n\rmarket_status\x18\x02 \x01(\t\x12\x0e\n\x06ticker\x18\x03 \x01(\t\x12\x12\n\nbase_denom\x18\x04 \x01(\t\x12?\n\x0f\x62\x61se_token_meta\x18\x05 \x01(\x0b\x32&.injective_spot_exchange_rpc.TokenMeta\x12\x13\n\x0bquote_denom\x18\x06 \x01(\t\x12@\n\x10quote_token_meta\x18\x07 \x01(\x0b\x32&.injective_spot_exchange_rpc.TokenMeta\x12\x16\n\x0emaker_fee_rate\x18\x08 \x01(\t\x12\x16\n\x0etaker_fee_rate\x18\t \x01(\t\x12\x1c\n\x14service_provider_fee\x18\n \x01(\t\x12\x1b\n\x13min_price_tick_size\x18\x0b \x01(\t\x12\x1e\n\x16min_quantity_tick_size\x18\x0c \x01(\t\"n\n\tTokenMeta\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07\x61\x64\x64ress\x18\x02 \x01(\t\x12\x0e\n\x06symbol\x18\x03 \x01(\t\x12\x0c\n\x04logo\x18\x04 \x01(\t\x12\x10\n\x08\x64\x65\x63imals\x18\x05 \x01(\x11\x12\x12\n\nupdated_at\x18\x06 \x01(\x12\"\"\n\rMarketRequest\x12\x11\n\tmarket_id\x18\x01 \x01(\t\"M\n\x0eMarketResponse\x12;\n\x06market\x18\x01 \x01(\x0b\x32+.injective_spot_exchange_rpc.SpotMarketInfo\"*\n\x14StreamMarketsRequest\x12\x12\n\nmarket_ids\x18\x01 \x03(\t\"\x7f\n\x15StreamMarketsResponse\x12;\n\x06market\x18\x01 \x01(\x0b\x32+.injective_spot_exchange_rpc.SpotMarketInfo\x12\x16\n\x0eoperation_type\x18\x02 \x01(\t\x12\x11\n\ttimestamp\x18\x03 \x01(\x12\"\'\n\x12OrderbookV2Request\x12\x11\n\tmarket_id\x18\x01 \x01(\t\"[\n\x13OrderbookV2Response\x12\x44\n\torderbook\x18\x01 \x01(\x0b\x32\x31.injective_spot_exchange_rpc.SpotLimitOrderbookV2\"\xaa\x01\n\x14SpotLimitOrderbookV2\x12\x35\n\x04\x62uys\x18\x01 \x03(\x0b\x32\'.injective_spot_exchange_rpc.PriceLevel\x12\x36\n\x05sells\x18\x02 \x03(\x0b\x32\'.injective_spot_exchange_rpc.PriceLevel\x12\x10\n\x08sequence\x18\x03 \x01(\x04\x12\x11\n\ttimestamp\x18\x04 \x01(\x12\"@\n\nPriceLevel\x12\r\n\x05price\x18\x01 \x01(\t\x12\x10\n\x08quantity\x18\x02 \x01(\t\x12\x11\n\ttimestamp\x18\x03 \x01(\x12\")\n\x13OrderbooksV2Request\x12\x12\n\nmarket_ids\x18\x01 \x03(\t\"c\n\x14OrderbooksV2Response\x12K\n\norderbooks\x18\x01 \x03(\x0b\x32\x37.injective_spot_exchange_rpc.SingleSpotLimitOrderbookV2\"u\n\x1aSingleSpotLimitOrderbookV2\x12\x11\n\tmarket_id\x18\x01 \x01(\t\x12\x44\n\torderbook\x18\x02 \x01(\x0b\x32\x31.injective_spot_exchange_rpc.SpotLimitOrderbookV2\".\n\x18StreamOrderbookV2Request\x12\x12\n\nmarket_ids\x18\x01 \x03(\t\"\x9f\x01\n\x19StreamOrderbookV2Response\x12\x44\n\torderbook\x18\x01 \x01(\x0b\x32\x31.injective_spot_exchange_rpc.SpotLimitOrderbookV2\x12\x16\n\x0eoperation_type\x18\x02 \x01(\t\x12\x11\n\ttimestamp\x18\x03 \x01(\x12\x12\x11\n\tmarket_id\x18\x04 \x01(\t\"2\n\x1cStreamOrderbookUpdateRequest\x12\x12\n\nmarket_ids\x18\x01 \x03(\t\"\xb2\x01\n\x1dStreamOrderbookUpdateResponse\x12S\n\x17orderbook_level_updates\x18\x01 \x01(\x0b\x32\x32.injective_spot_exchange_rpc.OrderbookLevelUpdates\x12\x16\n\x0eoperation_type\x18\x02 \x01(\t\x12\x11\n\ttimestamp\x18\x03 \x01(\x12\x12\x11\n\tmarket_id\x18\x04 \x01(\t\"\xcb\x01\n\x15OrderbookLevelUpdates\x12\x11\n\tmarket_id\x18\x01 \x01(\t\x12\x10\n\x08sequence\x18\x02 \x01(\x04\x12;\n\x04\x62uys\x18\x03 \x03(\x0b\x32-.injective_spot_exchange_rpc.PriceLevelUpdate\x12<\n\x05sells\x18\x04 \x03(\x0b\x32-.injective_spot_exchange_rpc.PriceLevelUpdate\x12\x12\n\nupdated_at\x18\x05 \x01(\x12\"Y\n\x10PriceLevelUpdate\x12\r\n\x05price\x18\x01 \x01(\t\x12\x10\n\x08quantity\x18\x02 \x01(\t\x12\x11\n\tis_active\x18\x03 \x01(\x08\x12\x11\n\ttimestamp\x18\x04 \x01(\x12\"\xfe\x01\n\rOrdersRequest\x12\x11\n\tmarket_id\x18\x01 \x01(\t\x12\x12\n\norder_side\x18\x02 \x01(\t\x12\x15\n\rsubaccount_id\x18\x03 \x01(\t\x12\x0c\n\x04skip\x18\x04 \x01(\x04\x12\r\n\x05limit\x18\x05 \x01(\x11\x12\x12\n\nstart_time\x18\x06 \x01(\x12\x12\x10\n\x08\x65nd_time\x18\x07 \x01(\x12\x12\x12\n\nmarket_ids\x18\x08 \x03(\t\x12\x18\n\x10include_inactive\x18\t \x01(\x08\x12\x1f\n\x17subaccount_total_orders\x18\n \x01(\x08\x12\x10\n\x08trade_id\x18\x0b \x01(\t\x12\x0b\n\x03\x63id\x18\x0c \x01(\t\"\x82\x01\n\x0eOrdersResponse\x12;\n\x06orders\x18\x01 \x03(\x0b\x32+.injective_spot_exchange_rpc.SpotLimitOrder\x12\x33\n\x06paging\x18\x02 \x01(\x0b\x32#.injective_spot_exchange_rpc.Paging\"\xa1\x02\n\x0eSpotLimitOrder\x12\x12\n\norder_hash\x18\x01 \x01(\t\x12\x12\n\norder_side\x18\x02 \x01(\t\x12\x11\n\tmarket_id\x18\x03 \x01(\t\x12\x15\n\rsubaccount_id\x18\x04 \x01(\t\x12\r\n\x05price\x18\x05 \x01(\t\x12\x10\n\x08quantity\x18\x06 \x01(\t\x12\x19\n\x11unfilled_quantity\x18\x07 \x01(\t\x12\x15\n\rtrigger_price\x18\x08 \x01(\t\x12\x15\n\rfee_recipient\x18\t \x01(\t\x12\r\n\x05state\x18\n \x01(\t\x12\x12\n\ncreated_at\x18\x0b \x01(\x12\x12\x12\n\nupdated_at\x18\x0c \x01(\x12\x12\x0f\n\x07tx_hash\x18\r \x01(\t\x12\x0b\n\x03\x63id\x18\x0e \x01(\t\"\\\n\x06Paging\x12\r\n\x05total\x18\x01 \x01(\x12\x12\x0c\n\x04\x66rom\x18\x02 \x01(\x11\x12\n\n\x02to\x18\x03 \x01(\x11\x12\x1b\n\x13\x63ount_by_subaccount\x18\x04 \x01(\x12\x12\x0c\n\x04next\x18\x05 \x03(\t\"\x84\x02\n\x13StreamOrdersRequest\x12\x11\n\tmarket_id\x18\x01 \x01(\t\x12\x12\n\norder_side\x18\x02 \x01(\t\x12\x15\n\rsubaccount_id\x18\x03 \x01(\t\x12\x0c\n\x04skip\x18\x04 \x01(\x04\x12\r\n\x05limit\x18\x05 \x01(\x11\x12\x12\n\nstart_time\x18\x06 \x01(\x12\x12\x10\n\x08\x65nd_time\x18\x07 \x01(\x12\x12\x12\n\nmarket_ids\x18\x08 \x03(\t\x12\x18\n\x10include_inactive\x18\t \x01(\x08\x12\x1f\n\x17subaccount_total_orders\x18\n \x01(\x08\x12\x10\n\x08trade_id\x18\x0b \x01(\t\x12\x0b\n\x03\x63id\x18\x0c \x01(\t\"}\n\x14StreamOrdersResponse\x12:\n\x05order\x18\x01 \x01(\x0b\x32+.injective_spot_exchange_rpc.SpotLimitOrder\x12\x16\n\x0eoperation_type\x18\x02 \x01(\t\x12\x11\n\ttimestamp\x18\x03 \x01(\x12\"\x97\x02\n\rTradesRequest\x12\x11\n\tmarket_id\x18\x01 \x01(\t\x12\x16\n\x0e\x65xecution_side\x18\x02 \x01(\t\x12\x11\n\tdirection\x18\x03 \x01(\t\x12\x15\n\rsubaccount_id\x18\x04 \x01(\t\x12\x0c\n\x04skip\x18\x05 \x01(\x04\x12\r\n\x05limit\x18\x06 \x01(\x11\x12\x12\n\nstart_time\x18\x07 \x01(\x12\x12\x10\n\x08\x65nd_time\x18\x08 \x01(\x12\x12\x12\n\nmarket_ids\x18\t \x03(\t\x12\x16\n\x0esubaccount_ids\x18\n \x03(\t\x12\x17\n\x0f\x65xecution_types\x18\x0b \x03(\t\x12\x10\n\x08trade_id\x18\x0c \x01(\t\x12\x17\n\x0f\x61\x63\x63ount_address\x18\r \x01(\t\"}\n\x0eTradesResponse\x12\x36\n\x06trades\x18\x01 \x03(\x0b\x32&.injective_spot_exchange_rpc.SpotTrade\x12\x33\n\x06paging\x18\x02 \x01(\x0b\x32#.injective_spot_exchange_rpc.Paging\"\x9b\x02\n\tSpotTrade\x12\x12\n\norder_hash\x18\x01 \x01(\t\x12\x15\n\rsubaccount_id\x18\x02 \x01(\t\x12\x11\n\tmarket_id\x18\x03 \x01(\t\x12\x1c\n\x14trade_execution_type\x18\x04 \x01(\t\x12\x17\n\x0ftrade_direction\x18\x05 \x01(\t\x12\x36\n\x05price\x18\x06 \x01(\x0b\x32\'.injective_spot_exchange_rpc.PriceLevel\x12\x0b\n\x03\x66\x65\x65\x18\x07 \x01(\t\x12\x13\n\x0b\x65xecuted_at\x18\x08 \x01(\x12\x12\x15\n\rfee_recipient\x18\t \x01(\t\x12\x10\n\x08trade_id\x18\n \x01(\t\x12\x16\n\x0e\x65xecution_side\x18\x0b \x01(\t\"\x9d\x02\n\x13StreamTradesRequest\x12\x11\n\tmarket_id\x18\x01 \x01(\t\x12\x16\n\x0e\x65xecution_side\x18\x02 \x01(\t\x12\x11\n\tdirection\x18\x03 \x01(\t\x12\x15\n\rsubaccount_id\x18\x04 \x01(\t\x12\x0c\n\x04skip\x18\x05 \x01(\x04\x12\r\n\x05limit\x18\x06 \x01(\x11\x12\x12\n\nstart_time\x18\x07 \x01(\x12\x12\x10\n\x08\x65nd_time\x18\x08 \x01(\x12\x12\x12\n\nmarket_ids\x18\t \x03(\t\x12\x16\n\x0esubaccount_ids\x18\n \x03(\t\x12\x17\n\x0f\x65xecution_types\x18\x0b \x03(\t\x12\x10\n\x08trade_id\x18\x0c \x01(\t\x12\x17\n\x0f\x61\x63\x63ount_address\x18\r \x01(\t\"x\n\x14StreamTradesResponse\x12\x35\n\x05trade\x18\x01 \x01(\x0b\x32&.injective_spot_exchange_rpc.SpotTrade\x12\x16\n\x0eoperation_type\x18\x02 \x01(\t\x12\x11\n\ttimestamp\x18\x03 \x01(\x12\"d\n\x1bSubaccountOrdersListRequest\x12\x15\n\rsubaccount_id\x18\x01 \x01(\t\x12\x11\n\tmarket_id\x18\x02 \x01(\t\x12\x0c\n\x04skip\x18\x03 \x01(\x04\x12\r\n\x05limit\x18\x04 \x01(\x11\"\x90\x01\n\x1cSubaccountOrdersListResponse\x12;\n\x06orders\x18\x01 \x03(\x0b\x32+.injective_spot_exchange_rpc.SpotLimitOrder\x12\x33\n\x06paging\x18\x02 \x01(\x0b\x32#.injective_spot_exchange_rpc.Paging\"\x8f\x01\n\x1bSubaccountTradesListRequest\x12\x15\n\rsubaccount_id\x18\x01 \x01(\t\x12\x11\n\tmarket_id\x18\x02 \x01(\t\x12\x16\n\x0e\x65xecution_type\x18\x03 \x01(\t\x12\x11\n\tdirection\x18\x04 \x01(\t\x12\x0c\n\x04skip\x18\x05 \x01(\x04\x12\r\n\x05limit\x18\x06 \x01(\x11\"V\n\x1cSubaccountTradesListResponse\x12\x36\n\x06trades\x18\x01 \x03(\x0b\x32&.injective_spot_exchange_rpc.SpotTrade\"\xa3\x02\n\x14OrdersHistoryRequest\x12\x15\n\rsubaccount_id\x18\x01 \x01(\t\x12\x11\n\tmarket_id\x18\x02 \x01(\t\x12\x0c\n\x04skip\x18\x03 \x01(\x04\x12\r\n\x05limit\x18\x04 \x01(\x11\x12\x13\n\x0border_types\x18\x05 \x03(\t\x12\x11\n\tdirection\x18\x06 \x01(\t\x12\x12\n\nstart_time\x18\x07 \x01(\x12\x12\x10\n\x08\x65nd_time\x18\x08 \x01(\x12\x12\r\n\x05state\x18\t \x01(\t\x12\x17\n\x0f\x65xecution_types\x18\n \x03(\t\x12\x12\n\nmarket_ids\x18\x0b \x03(\t\x12\x10\n\x08trade_id\x18\x0c \x01(\t\x12\x1b\n\x13\x61\x63tive_markets_only\x18\r \x01(\x08\x12\x0b\n\x03\x63id\x18\x0e \x01(\t\"\x8b\x01\n\x15OrdersHistoryResponse\x12=\n\x06orders\x18\x01 \x03(\x0b\x32-.injective_spot_exchange_rpc.SpotOrderHistory\x12\x33\n\x06paging\x18\x02 \x01(\x0b\x32#.injective_spot_exchange_rpc.Paging\"\xc8\x02\n\x10SpotOrderHistory\x12\x12\n\norder_hash\x18\x01 \x01(\t\x12\x11\n\tmarket_id\x18\x02 \x01(\t\x12\x11\n\tis_active\x18\x03 \x01(\x08\x12\x15\n\rsubaccount_id\x18\x04 \x01(\t\x12\x16\n\x0e\x65xecution_type\x18\x05 \x01(\t\x12\x12\n\norder_type\x18\x06 \x01(\t\x12\r\n\x05price\x18\x07 \x01(\t\x12\x15\n\rtrigger_price\x18\x08 \x01(\t\x12\x10\n\x08quantity\x18\t \x01(\t\x12\x17\n\x0f\x66illed_quantity\x18\n \x01(\t\x12\r\n\x05state\x18\x0b \x01(\t\x12\x12\n\ncreated_at\x18\x0c \x01(\x12\x12\x12\n\nupdated_at\x18\r \x01(\x12\x12\x11\n\tdirection\x18\x0e \x01(\t\x12\x0f\n\x07tx_hash\x18\x0f \x01(\t\x12\x0b\n\x03\x63id\x18\x10 \x01(\t\"\x96\x01\n\x1aStreamOrdersHistoryRequest\x12\x15\n\rsubaccount_id\x18\x01 \x01(\t\x12\x11\n\tmarket_id\x18\x02 \x01(\t\x12\x13\n\x0border_types\x18\x03 \x03(\t\x12\x11\n\tdirection\x18\x04 \x01(\t\x12\r\n\x05state\x18\x05 \x01(\t\x12\x17\n\x0f\x65xecution_types\x18\x06 \x03(\t\"\x86\x01\n\x1bStreamOrdersHistoryResponse\x12<\n\x05order\x18\x01 \x01(\x0b\x32-.injective_spot_exchange_rpc.SpotOrderHistory\x12\x16\n\x0eoperation_type\x18\x02 \x01(\t\x12\x11\n\ttimestamp\x18\x03 \x01(\x12\"\x8a\x01\n\x18\x41tomicSwapHistoryRequest\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\t\x12\x18\n\x10\x63ontract_address\x18\x02 \x01(\t\x12\x0c\n\x04skip\x18\x03 \x01(\x11\x12\r\n\x05limit\x18\x04 \x01(\x11\x12\x13\n\x0b\x66rom_number\x18\x05 \x01(\x11\x12\x11\n\tto_number\x18\x06 \x01(\x11\"\x87\x01\n\x19\x41tomicSwapHistoryResponse\x12\x33\n\x06paging\x18\x01 \x01(\x0b\x32#.injective_spot_exchange_rpc.Paging\x12\x35\n\x04\x64\x61ta\x18\x02 \x03(\x0b\x32\'.injective_spot_exchange_rpc.AtomicSwap\"\xdc\x02\n\nAtomicSwap\x12\x0e\n\x06sender\x18\x01 \x01(\t\x12\r\n\x05route\x18\x02 \x01(\t\x12\x36\n\x0bsource_coin\x18\x03 \x01(\x0b\x32!.injective_spot_exchange_rpc.Coin\x12\x34\n\tdest_coin\x18\x04 \x01(\x0b\x32!.injective_spot_exchange_rpc.Coin\x12/\n\x04\x66\x65\x65s\x18\x05 \x03(\x0b\x32!.injective_spot_exchange_rpc.Coin\x12\x18\n\x10\x63ontract_address\x18\x06 \x01(\t\x12\x17\n\x0findex_by_sender\x18\x07 \x01(\x11\x12 \n\x18index_by_sender_contract\x18\x08 \x01(\x11\x12\x0f\n\x07tx_hash\x18\t \x01(\t\x12\x13\n\x0b\x65xecuted_at\x18\n \x01(\x12\x12\x15\n\rrefund_amount\x18\x0b \x01(\t\"%\n\x04\x43oin\x12\r\n\x05\x64\x65nom\x18\x01 \x01(\t\x12\x0e\n\x06\x61mount\x18\x02 \x01(\t2\xb8\x0f\n\x18InjectiveSpotExchangeRPC\x12\x64\n\x07Markets\x12+.injective_spot_exchange_rpc.MarketsRequest\x1a,.injective_spot_exchange_rpc.MarketsResponse\x12\x61\n\x06Market\x12*.injective_spot_exchange_rpc.MarketRequest\x1a+.injective_spot_exchange_rpc.MarketResponse\x12x\n\rStreamMarkets\x12\x31.injective_spot_exchange_rpc.StreamMarketsRequest\x1a\x32.injective_spot_exchange_rpc.StreamMarketsResponse0\x01\x12p\n\x0bOrderbookV2\x12/.injective_spot_exchange_rpc.OrderbookV2Request\x1a\x30.injective_spot_exchange_rpc.OrderbookV2Response\x12s\n\x0cOrderbooksV2\x12\x30.injective_spot_exchange_rpc.OrderbooksV2Request\x1a\x31.injective_spot_exchange_rpc.OrderbooksV2Response\x12\x84\x01\n\x11StreamOrderbookV2\x12\x35.injective_spot_exchange_rpc.StreamOrderbookV2Request\x1a\x36.injective_spot_exchange_rpc.StreamOrderbookV2Response0\x01\x12\x90\x01\n\x15StreamOrderbookUpdate\x12\x39.injective_spot_exchange_rpc.StreamOrderbookUpdateRequest\x1a:.injective_spot_exchange_rpc.StreamOrderbookUpdateResponse0\x01\x12\x61\n\x06Orders\x12*.injective_spot_exchange_rpc.OrdersRequest\x1a+.injective_spot_exchange_rpc.OrdersResponse\x12u\n\x0cStreamOrders\x12\x30.injective_spot_exchange_rpc.StreamOrdersRequest\x1a\x31.injective_spot_exchange_rpc.StreamOrdersResponse0\x01\x12\x61\n\x06Trades\x12*.injective_spot_exchange_rpc.TradesRequest\x1a+.injective_spot_exchange_rpc.TradesResponse\x12u\n\x0cStreamTrades\x12\x30.injective_spot_exchange_rpc.StreamTradesRequest\x1a\x31.injective_spot_exchange_rpc.StreamTradesResponse0\x01\x12\x8b\x01\n\x14SubaccountOrdersList\x12\x38.injective_spot_exchange_rpc.SubaccountOrdersListRequest\x1a\x39.injective_spot_exchange_rpc.SubaccountOrdersListResponse\x12\x8b\x01\n\x14SubaccountTradesList\x12\x38.injective_spot_exchange_rpc.SubaccountTradesListRequest\x1a\x39.injective_spot_exchange_rpc.SubaccountTradesListResponse\x12v\n\rOrdersHistory\x12\x31.injective_spot_exchange_rpc.OrdersHistoryRequest\x1a\x32.injective_spot_exchange_rpc.OrdersHistoryResponse\x12\x8a\x01\n\x13StreamOrdersHistory\x12\x37.injective_spot_exchange_rpc.StreamOrdersHistoryRequest\x1a\x38.injective_spot_exchange_rpc.StreamOrdersHistoryResponse0\x01\x12\x82\x01\n\x11\x41tomicSwapHistory\x12\x35.injective_spot_exchange_rpc.AtomicSwapHistoryRequest\x1a\x36.injective_spot_exchange_rpc.AtomicSwapHistoryResponseB Z\x1e/injective_spot_exchange_rpcpbb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -65,53 +65,53 @@ _globals['_PRICELEVELUPDATE']._serialized_start=2336 _globals['_PRICELEVELUPDATE']._serialized_end=2425 _globals['_ORDERSREQUEST']._serialized_start=2428 - _globals['_ORDERSREQUEST']._serialized_end=2669 - _globals['_ORDERSRESPONSE']._serialized_start=2672 - _globals['_ORDERSRESPONSE']._serialized_end=2802 - _globals['_SPOTLIMITORDER']._serialized_start=2805 - _globals['_SPOTLIMITORDER']._serialized_end=3081 - _globals['_PAGING']._serialized_start=3083 - _globals['_PAGING']._serialized_end=3175 - _globals['_STREAMORDERSREQUEST']._serialized_start=3178 - _globals['_STREAMORDERSREQUEST']._serialized_end=3425 - _globals['_STREAMORDERSRESPONSE']._serialized_start=3427 - _globals['_STREAMORDERSRESPONSE']._serialized_end=3552 - _globals['_TRADESREQUEST']._serialized_start=3555 - _globals['_TRADESREQUEST']._serialized_end=3834 - _globals['_TRADESRESPONSE']._serialized_start=3836 - _globals['_TRADESRESPONSE']._serialized_end=3961 - _globals['_SPOTTRADE']._serialized_start=3964 - _globals['_SPOTTRADE']._serialized_end=4247 - _globals['_STREAMTRADESREQUEST']._serialized_start=4250 - _globals['_STREAMTRADESREQUEST']._serialized_end=4535 - _globals['_STREAMTRADESRESPONSE']._serialized_start=4537 - _globals['_STREAMTRADESRESPONSE']._serialized_end=4657 - _globals['_SUBACCOUNTORDERSLISTREQUEST']._serialized_start=4659 - _globals['_SUBACCOUNTORDERSLISTREQUEST']._serialized_end=4759 - _globals['_SUBACCOUNTORDERSLISTRESPONSE']._serialized_start=4762 - _globals['_SUBACCOUNTORDERSLISTRESPONSE']._serialized_end=4906 - _globals['_SUBACCOUNTTRADESLISTREQUEST']._serialized_start=4909 - _globals['_SUBACCOUNTTRADESLISTREQUEST']._serialized_end=5052 - _globals['_SUBACCOUNTTRADESLISTRESPONSE']._serialized_start=5054 - _globals['_SUBACCOUNTTRADESLISTRESPONSE']._serialized_end=5140 - _globals['_ORDERSHISTORYREQUEST']._serialized_start=5143 - _globals['_ORDERSHISTORYREQUEST']._serialized_end=5421 - _globals['_ORDERSHISTORYRESPONSE']._serialized_start=5424 - _globals['_ORDERSHISTORYRESPONSE']._serialized_end=5563 - _globals['_SPOTORDERHISTORY']._serialized_start=5566 - _globals['_SPOTORDERHISTORY']._serialized_end=5881 - _globals['_STREAMORDERSHISTORYREQUEST']._serialized_start=5884 - _globals['_STREAMORDERSHISTORYREQUEST']._serialized_end=6034 - _globals['_STREAMORDERSHISTORYRESPONSE']._serialized_start=6037 - _globals['_STREAMORDERSHISTORYRESPONSE']._serialized_end=6171 - _globals['_ATOMICSWAPHISTORYREQUEST']._serialized_start=6174 - _globals['_ATOMICSWAPHISTORYREQUEST']._serialized_end=6312 - _globals['_ATOMICSWAPHISTORYRESPONSE']._serialized_start=6315 - _globals['_ATOMICSWAPHISTORYRESPONSE']._serialized_end=6450 - _globals['_ATOMICSWAP']._serialized_start=6453 - _globals['_ATOMICSWAP']._serialized_end=6801 - _globals['_COIN']._serialized_start=6803 - _globals['_COIN']._serialized_end=6840 - _globals['_INJECTIVESPOTEXCHANGERPC']._serialized_start=6843 - _globals['_INJECTIVESPOTEXCHANGERPC']._serialized_end=8819 + _globals['_ORDERSREQUEST']._serialized_end=2682 + _globals['_ORDERSRESPONSE']._serialized_start=2685 + _globals['_ORDERSRESPONSE']._serialized_end=2815 + _globals['_SPOTLIMITORDER']._serialized_start=2818 + _globals['_SPOTLIMITORDER']._serialized_end=3107 + _globals['_PAGING']._serialized_start=3109 + _globals['_PAGING']._serialized_end=3201 + _globals['_STREAMORDERSREQUEST']._serialized_start=3204 + _globals['_STREAMORDERSREQUEST']._serialized_end=3464 + _globals['_STREAMORDERSRESPONSE']._serialized_start=3466 + _globals['_STREAMORDERSRESPONSE']._serialized_end=3591 + _globals['_TRADESREQUEST']._serialized_start=3594 + _globals['_TRADESREQUEST']._serialized_end=3873 + _globals['_TRADESRESPONSE']._serialized_start=3875 + _globals['_TRADESRESPONSE']._serialized_end=4000 + _globals['_SPOTTRADE']._serialized_start=4003 + _globals['_SPOTTRADE']._serialized_end=4286 + _globals['_STREAMTRADESREQUEST']._serialized_start=4289 + _globals['_STREAMTRADESREQUEST']._serialized_end=4574 + _globals['_STREAMTRADESRESPONSE']._serialized_start=4576 + _globals['_STREAMTRADESRESPONSE']._serialized_end=4696 + _globals['_SUBACCOUNTORDERSLISTREQUEST']._serialized_start=4698 + _globals['_SUBACCOUNTORDERSLISTREQUEST']._serialized_end=4798 + _globals['_SUBACCOUNTORDERSLISTRESPONSE']._serialized_start=4801 + _globals['_SUBACCOUNTORDERSLISTRESPONSE']._serialized_end=4945 + _globals['_SUBACCOUNTTRADESLISTREQUEST']._serialized_start=4948 + _globals['_SUBACCOUNTTRADESLISTREQUEST']._serialized_end=5091 + _globals['_SUBACCOUNTTRADESLISTRESPONSE']._serialized_start=5093 + _globals['_SUBACCOUNTTRADESLISTRESPONSE']._serialized_end=5179 + _globals['_ORDERSHISTORYREQUEST']._serialized_start=5182 + _globals['_ORDERSHISTORYREQUEST']._serialized_end=5473 + _globals['_ORDERSHISTORYRESPONSE']._serialized_start=5476 + _globals['_ORDERSHISTORYRESPONSE']._serialized_end=5615 + _globals['_SPOTORDERHISTORY']._serialized_start=5618 + _globals['_SPOTORDERHISTORY']._serialized_end=5946 + _globals['_STREAMORDERSHISTORYREQUEST']._serialized_start=5949 + _globals['_STREAMORDERSHISTORYREQUEST']._serialized_end=6099 + _globals['_STREAMORDERSHISTORYRESPONSE']._serialized_start=6102 + _globals['_STREAMORDERSHISTORYRESPONSE']._serialized_end=6236 + _globals['_ATOMICSWAPHISTORYREQUEST']._serialized_start=6239 + _globals['_ATOMICSWAPHISTORYREQUEST']._serialized_end=6377 + _globals['_ATOMICSWAPHISTORYRESPONSE']._serialized_start=6380 + _globals['_ATOMICSWAPHISTORYRESPONSE']._serialized_end=6515 + _globals['_ATOMICSWAP']._serialized_start=6518 + _globals['_ATOMICSWAP']._serialized_end=6866 + _globals['_COIN']._serialized_start=6868 + _globals['_COIN']._serialized_end=6905 + _globals['_INJECTIVESPOTEXCHANGERPC']._serialized_start=6908 + _globals['_INJECTIVESPOTEXCHANGERPC']._serialized_end=8884 # @@protoc_insertion_point(module_scope) diff --git a/pyinjective/proto/injective/exchange/v1beta1/query_pb2_grpc.py b/pyinjective/proto/injective/exchange/v1beta1/query_pb2_grpc.py index eddf29a9..f894823a 100644 --- a/pyinjective/proto/injective/exchange/v1beta1/query_pb2_grpc.py +++ b/pyinjective/proto/injective/exchange/v1beta1/query_pb2_grpc.py @@ -653,7 +653,8 @@ def MitoVaultInfos(self, request, context): raise NotImplementedError('Method not implemented!') def QueryMarketIDFromVault(self, request, context): - """QueryMarketIDFromVault returns the market ID for a given vault subaccount ID + """QueryMarketIDFromVault returns the market ID for a given vault subaccount + ID """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') diff --git a/pyinjective/utils/denom.py b/pyinjective/utils/denom.py new file mode 100644 index 00000000..2a890c13 --- /dev/null +++ b/pyinjective/utils/denom.py @@ -0,0 +1,41 @@ +from pyinjective.constant import devnet_config, mainnet_config, testnet_config + + +class Denom: + def __init__( + self, description: str, base: int, quote: int, min_price_tick_size: float, min_quantity_tick_size: float + ): + self.description = description + self.base = base + self.quote = quote + self.min_price_tick_size = min_price_tick_size + self.min_quantity_tick_size = min_quantity_tick_size + + @classmethod + def load_market(cls, network, market_id): + if network == "devnet": + config = devnet_config + elif network == "testnet": + config = testnet_config + else: + config = mainnet_config + + return cls( + description=config[market_id]["description"], + base=int(config[market_id]["base"]), + quote=int(config[market_id]["quote"]), + min_price_tick_size=float(config[market_id]["min_price_tick_size"]), + min_quantity_tick_size=float(config[market_id]["min_quantity_tick_size"]), + ) + + @classmethod + def load_peggy_denom(cls, network, symbol): + if network == "devnet": + config = devnet_config + elif network == "local": + config = devnet_config + elif network == "testnet": + config = testnet_config + else: + config = mainnet_config + return config[symbol]["peggy_denom"], int(config[symbol]["decimals"]) diff --git a/pyinjective/utils/metadata_validation.py b/pyinjective/utils/metadata_validation.py index 892ef8d5..4c913315 100644 --- a/pyinjective/utils/metadata_validation.py +++ b/pyinjective/utils/metadata_validation.py @@ -3,6 +3,7 @@ from typing import Any, List, Tuple import pyinjective.constant as constant +import pyinjective.utils.denom from pyinjective.async_client import AsyncClient from pyinjective.core.market import BinaryOptionMarket, DerivativeMarket, SpotMarket from pyinjective.core.network import Network @@ -24,7 +25,7 @@ def find_metadata_inconsistencies(network: Network) -> Tuple[List[Any]]: for config_key in ini_config: if config_key.startswith("0x"): - denom = constant.Denom.load_market(network=network.string(), market_id=config_key) + denom = pyinjective.utils.denom.Denom.load_market(network=network.string(), market_id=config_key) if config_key in spot_markets: market: SpotMarket = spot_markets[config_key] if ( @@ -107,7 +108,9 @@ def find_metadata_inconsistencies(network: Network) -> Tuple[List[Any]]: continue else: # the configuration is a token - peggy_denom, decimals = constant.Denom.load_peggy_denom(network=network.string(), symbol=config_key) + peggy_denom, decimals = pyinjective.utils.denom.Denom.load_peggy_denom( + network=network.string(), symbol=config_key + ) if config_key in all_tokens: token = all_tokens[config_key] if token.denom != peggy_denom or token.decimals != decimals: diff --git a/pyproject.toml b/pyproject.toml index cb21938d..0104d0df 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "injective-py" -version = "1.0" +version = "1.0-rc1" description = "Injective Python SDK, with Exchange API Client" authors = ["Injective Labs "] license = "Apache-2.0" diff --git a/tests/core/test_market.py b/tests/core/test_market.py index 003f39a2..93d958df 100644 --- a/tests/core/test_market.py +++ b/tests/core/test_market.py @@ -1,7 +1,7 @@ from decimal import Decimal -from pyinjective.constant import Denom from pyinjective.core.market import BinaryOptionMarket, DerivativeMarket, SpotMarket +from pyinjective.utils.denom import Denom from tests.model_fixtures.markets_fixtures import btc_usdt_perp_market # noqa: F401 from tests.model_fixtures.markets_fixtures import first_match_bet_market # noqa: F401 from tests.model_fixtures.markets_fixtures import inj_token # noqa: F401 diff --git a/tests/test_composer.py b/tests/test_composer.py index c36eb5c5..f3a9bdc2 100644 --- a/tests/test_composer.py +++ b/tests/test_composer.py @@ -3,10 +3,10 @@ import pytest from pyinjective.composer import Composer -from pyinjective.constant import Denom from pyinjective.core.market import BinaryOptionMarket, DerivativeMarket, SpotMarket from pyinjective.core.network import Network from pyinjective.proto.injective.exchange.v1beta1 import exchange_pb2 +from pyinjective.utils.denom import Denom from tests.model_fixtures.markets_fixtures import btc_usdt_perp_market # noqa: F401 from tests.model_fixtures.markets_fixtures import first_match_bet_market # noqa: F401 from tests.model_fixtures.markets_fixtures import inj_token # noqa: F401