message QueryGetLimitOrderTrancheResponse {LimitOrderTranche limit_order_tranche =1 [(gogoproto.nullable) = true];}message LimitOrderTrancheKey {TradePairID trade_pair_id =1;int64 tick_index_taker_to_maker =2;string tranche_key =3;}message LimitOrderTranche {LimitOrderTrancheKey key =1;string reserves_maker_denom =2 [(gogoproto.moretags) = "yaml:\"reserves_maker_denom\"",(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",(gogoproto.nullable) = false,(gogoproto.jsontag) = "reserves_maker_denom" ];string reserves_taker_denom =3 [(gogoproto.moretags) = "yaml:\"reserves_taker_denom\"",(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",(gogoproto.nullable) = false,(gogoproto.jsontag) = "reserves_taker_denom" ];string total_maker_denom =4 [(gogoproto.moretags) = "yaml:\"total_maker_denom\"",(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",(gogoproto.nullable) = false,(gogoproto.jsontag) = "total_maker_denom" ];string total_taker_denom =5 [(gogoproto.moretags) = "yaml:\"total_taker_denom\"",(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",(gogoproto.nullable) = false,(gogoproto.jsontag) = "total_taker_denom" ];// expiration_time is represented as an RFC 3339 formatted date.// LimitOrders with expiration_time set are valid as long as blockTime <= expiration_time.// JIT orders also use expiration_time to handle deletion, but represent a special case.// All JIT orders have an expiration_time of 0001-01-01T00:00:00Z, and an exception is made to// still treat these orders as live. Order deletion still functions the// same, and the orders will be deleted at the end of the block.google.protobuf.Timestamp expiration_time =6 [(gogoproto.stdtime) = true,(gogoproto.nullable) = true ];string price_taker_to_maker =7 [(gogoproto.moretags) = "yaml:\"price_taker_to_maker\"",(gogoproto.customtype) = "github.com/neutron-org/neutron/v2/utils/math.PrecDec",(gogoproto.nullable) = false,(gogoproto.jsontag) = "price_taker_to_maker" ];}
Arguments
QueryGetLimitOrderTrancheRequest: Request message for the LimitOrderTranche query.
message QueryEstimateMultiHopSwapRequest {string creator =1;string receiver =2;repeatedMultiHopRoute routes =3;string amount_in =4 [(gogoproto.moretags) = "yaml:\"amount_in\"",(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",(gogoproto.nullable) = false,(gogoproto.jsontag) = "amount_in" ];string exit_limit_price =5 [(gogoproto.moretags) = "yaml:\"exit_limit_price\"",(gogoproto.customtype) = "github.com/neutron-org/neutron/v2/utils/math.PrecDec",(gogoproto.nullable) = false,(gogoproto.jsontag) = "exit_limit_price" ];// If pickBestRoute == true then all routes are run and the route with the// best price is chosen otherwise, the first succesful route is used.bool pick_best_route =6;}message MultiHopRoute {repeatedstring hops =1;}
message QueryEstimatePlaceLimitOrderResponse {// Total amount of coin used for the limit order// You can derive makerLimitInCoin using the equation: totalInCoin =// swapInCoin + makerLimitInCoincosmos.base.v1beta1.Coin total_in_coin =1 [(gogoproto.moretags) = "yaml:\"total_in_coin\"",(gogoproto.nullable) = false,(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin",(gogoproto.jsontag) = "total_in_coin" ];// Total amount of the token in that was immediately swapped for swapOutCoincosmos.base.v1beta1.Coin swap_in_coin =2 [(gogoproto.moretags) = "yaml:\"swap_in_coin\"",(gogoproto.nullable) = false,(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin",(gogoproto.jsontag) = "swap_in_coin" ];// Total amount of coin received from the taker portion of the limit order// This is the amount of coin immediately available in the users account after// executing the limit order. It does not include any future proceeds from the// maker portion which will have withdrawn in the futurecosmos.base.v1beta1.Coin swap_out_coin =3 [(gogoproto.moretags) = "yaml:\"swap_out_coin\"",(gogoproto.nullable) = false,(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin",(gogoproto.jsontag) = "swap_out_coin" ];}
Arguments
QueryEstimatePlaceLimitOrderRequest: Request message for the EstimatePlaceLimitOrder query.
Creator string (sdk.AccAddress): Account from which TokenIn is debited.
Receiver string (sdk.AccAddress): Account to which TokenOut is credited or that will be allowed to withdraw or cancel a maker order.
TokenIn (string): Token being “sold”.
TokenOut (string): Token being “bought”.
TickIndex (int64): Limit tick for a limit order, specified in terms of TokenIn to TokenOut.
AmountIn (sdk.Int): Amount of TokenIn to be traded.
OrderType (orderType): Type of limit order to be used. Must be one of: GOOD_TIL_CANCELLED, FILL_OR_KILL, IMMEDIATE_OR_CANCEL, JUST_IN_TIME, or GOOD_TIL_TIME.
ExpirationTime (time.Time): Expiration time for order. Only valid for GOOD_TIL_TIME limit orders.
Curl Command (testnet):
curl $API/neutron/dex/estimate_place_limit_order
PoolRequest
GET "/neutron/dex/pool/{pair_id}/{tick_index}/{fee}"