{ "$schema": "http://json-schema.org/draft-07/schema#", "title": "NeutronQuery", "description": "The queries to interact with neutron specific blockchain modules.", "oneOf": [ { "description": "Query a result of registered interchain query on remote chain", "type": "object", "required": [ "interchain_query_result" ], "properties": { "interchain_query_result": { "type": "object", "required": [ "query_id" ], "properties": { "query_id": { "description": "*query_id** is an ID registered interchain query", "type": "integer", "format": "uint64", "minimum": 0.0 } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Query a registered interchain account address for a specific connection_id Every contract may have as many interchain accounts as necessary.", "type": "object", "required": [ "interchain_account_address" ], "properties": { "interchain_account_address": { "type": "object", "required": [ "connection_id", "interchain_account_id", "owner_address" ], "properties": { "connection_id": { "description": "*connection_id** is an IBC connection identifier between Neutron and remote chain", "type": "string" }, "interchain_account_id": { "description": "**interchain_account_id** is an identifier of your interchain account. Can be any string This identifier allows contracts to have multiple interchain accounts on remote chains", "type": "string" }, "owner_address": { "description": "*owner_address** is an address of contract which registered interchain account", "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Query all registered interchain queries on all remote chains", "type": "object", "required": [ "registered_interchain_queries" ], "properties": { "registered_interchain_queries": { "type": "object", "required": [ "connection_id", "owners", "pagination" ], "properties": { "connection_id": { "type": "string" }, "owners": { "type": "array", "items": { "type": "string" } }, "pagination": { "$ref": "#/definitions/PageRequest" } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Query registered interchain query with a specific query_id", "type": "object", "required": [ "registered_interchain_query" ], "properties": { "registered_interchain_query": { "type": "object", "required": [ "query_id" ], "properties": { "query_id": { "description": "*query_id** is an ID registered interchain query", "type": "integer", "format": "uint64", "minimum": 0.0 } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Query total amount of burned neutron fees", "type": "object", "required": [ "total_burned_neutrons_amount" ], "properties": { "total_burned_neutrons_amount": { "type": "object", "additionalProperties": false } }, "additionalProperties": false }, { "description": "Query minimum IBC fee", "type": "object", "required": [ "min_ibc_fee" ], "properties": { "min_ibc_fee": { "type": "object", "additionalProperties": false } }, "additionalProperties": false }, { "description": "TokenFactory query. Given a subdenom minted by a contract via [`NeutronMsg::MintTokens`](crate::bindings::msg::NeutronMsg::MintTokens), returns the full denom as used by [`BankMsg::Send`](cosmwasm_std::BankMsg::Send).", "type": "object", "required": [ "full_denom" ], "properties": { "full_denom": { "type": "object", "required": [ "creator_addr", "subdenom" ], "properties": { "creator_addr": { "type": "string" }, "subdenom": { "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "TokenFactory query. Returns the admin of a denom, if the denom is a TokenFactory denom.", "type": "object", "required": [ "denom_admin" ], "properties": { "denom_admin": { "type": "object", "required": [ "subdenom" ], "properties": { "subdenom": { "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "TokenFactory query. Returns the before send hook address of a denom, if the denom is a TokenFactory denom.", "type": "object", "required": [ "before_send_hook" ], "properties": { "before_send_hook": { "type": "object", "required": [ "denom" ], "properties": { "denom": { "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Contractmanager query. Returns the failures for a particular contract address.", "type": "object", "required": [ "failures" ], "properties": { "failures": { "type": "object", "required": [ "address", "pagination" ], "properties": { "address": { "type": "string" }, "pagination": { "$ref": "#/definitions/PageRequest" } }, "additionalProperties": false } }, "additionalProperties": false }, { "type": "object", "required": [ "dex" ], "properties": { "dex": { "$ref": "#/definitions/DexQuery" } }, "additionalProperties": false }, { "type": "object", "required": [ "market_map" ], "properties": { "market_map": { "$ref": "#/definitions/MarketMapQuery" } }, "additionalProperties": false }, { "type": "object", "required": [ "oracle" ], "properties": { "oracle": { "$ref": "#/definitions/OracleQuery" } }, "additionalProperties": false } ], "definitions": { "Binary": { "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec. See also .", "type": "string" }, "CurrencyPair": { "type": "object", "required": [ "Base", "Quote" ], "properties": { "Base": { "type": "string" }, "Quote": { "type": "string" } }, "additionalProperties": false }, "DexQuery": { "oneOf": [ { "description": "Parameters queries the parameters of the module.", "type": "object", "required": [ "params" ], "properties": { "params": { "type": "object", "additionalProperties": false } }, "additionalProperties": false }, { "description": "Queries a LimitOrderTrancheUser by index.", "type": "object", "required": [ "limit_order_tranche_user" ], "properties": { "limit_order_tranche_user": { "type": "object", "required": [ "address", "tranche_key" ], "properties": { "address": { "type": "string" }, "tranche_key": { "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Queries a list of LimitOrderTrancheMap items.", "type": "object", "required": [ "limit_order_tranche_user_all" ], "properties": { "limit_order_tranche_user_all": { "type": "object", "properties": { "pagination": { "anyOf": [ { "$ref": "#/definitions/PageRequest" }, { "type": "null" } ] } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Queries a list of LimitOrderTrancheUser items for a given address.", "type": "object", "required": [ "limit_order_tranche_user_all_by_address" ], "properties": { "limit_order_tranche_user_all_by_address": { "type": "object", "required": [ "address" ], "properties": { "address": { "type": "string" }, "pagination": { "anyOf": [ { "$ref": "#/definitions/PageRequest" }, { "type": "null" } ] } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Queries a LimitOrderTranche by index.", "type": "object", "required": [ "limit_order_tranche" ], "properties": { "limit_order_tranche": { "type": "object", "required": [ "pair_id", "tick_index", "token_in", "tranche_key" ], "properties": { "pair_id": { "type": "string" }, "tick_index": { "type": "integer", "format": "int64" }, "token_in": { "type": "string" }, "tranche_key": { "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Queries a list of LimitOrderTranche items for a given pairID / TokenIn combination.", "type": "object", "required": [ "limit_order_tranche_all" ], "properties": { "limit_order_tranche_all": { "type": "object", "required": [ "pair_id", "token_in" ], "properties": { "pagination": { "anyOf": [ { "$ref": "#/definitions/PageRequest" }, { "type": "null" } ] }, "pair_id": { "type": "string" }, "token_in": { "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Queries a list of UserDeposits items.", "type": "object", "required": [ "user_deposit_all" ], "properties": { "user_deposit_all": { "type": "object", "required": [ "address", "include_pool_data" ], "properties": { "address": { "type": "string" }, "include_pool_data": { "type": "boolean" }, "pagination": { "anyOf": [ { "$ref": "#/definitions/PageRequest" }, { "type": "null" } ] } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Queries a list of TickLiquidity items.", "type": "object", "required": [ "tick_liquidity_all" ], "properties": { "tick_liquidity_all": { "type": "object", "required": [ "pair_id", "token_in" ], "properties": { "pagination": { "anyOf": [ { "$ref": "#/definitions/PageRequest" }, { "type": "null" } ] }, "pair_id": { "type": "string" }, "token_in": { "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Queries a InactiveLimitOrderTranche by index.", "type": "object", "required": [ "inactive_limit_order_tranche" ], "properties": { "inactive_limit_order_tranche": { "type": "object", "required": [ "pair_id", "tick_index", "token_in", "tranche_key" ], "properties": { "pair_id": { "type": "string" }, "tick_index": { "type": "integer", "format": "int64" }, "token_in": { "type": "string" }, "tranche_key": { "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Queries a list of InactiveLimitOrderTranche items.", "type": "object", "required": [ "inactive_limit_order_tranche_all" ], "properties": { "inactive_limit_order_tranche_all": { "type": "object", "properties": { "pagination": { "anyOf": [ { "$ref": "#/definitions/PageRequest" }, { "type": "null" } ] } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Queries a list of PoolReserves items.", "type": "object", "required": [ "pool_reserves_all" ], "properties": { "pool_reserves_all": { "type": "object", "required": [ "pair_id", "token_in" ], "properties": { "pagination": { "anyOf": [ { "$ref": "#/definitions/PageRequest" }, { "type": "null" } ] }, "pair_id": { "type": "string" }, "token_in": { "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Queries a PoolReserve by index", "type": "object", "required": [ "pool_reserves" ], "properties": { "pool_reserves": { "type": "object", "required": [ "fee", "pair_id", "tick_index", "token_in" ], "properties": { "fee": { "type": "integer", "format": "uint64", "minimum": 0.0 }, "pair_id": { "type": "string" }, "tick_index": { "type": "integer", "format": "int64" }, "token_in": { "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Queries the simulated result of a multihop swap", "type": "object", "required": [ "estimate_multi_hop_swap" ], "properties": { "estimate_multi_hop_swap": { "type": "object", "required": [ "amount_in", "creator", "exit_limit_price", "pick_best_route", "receiver", "routes" ], "properties": { "amount_in": { "$ref": "#/definitions/Int128" }, "creator": { "type": "string" }, "exit_limit_price": { "$ref": "#/definitions/PrecDec" }, "pick_best_route": { "type": "boolean" }, "receiver": { "type": "string" }, "routes": { "type": "array", "items": { "$ref": "#/definitions/MultiHopRoute" } } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Queries the simulated result of a PlaceLimit order", "type": "object", "required": [ "estimate_place_limit_order" ], "properties": { "estimate_place_limit_order": { "type": "object", "required": [ "amount_in", "creator", "order_type", "receiver", "tick_index_in_to_out", "token_in", "token_out" ], "properties": { "amount_in": { "$ref": "#/definitions/Int128" }, "creator": { "type": "string" }, "expiration_time": { "type": [ "integer", "null" ], "format": "uint64", "minimum": 0.0 }, "max_amount_out": { "anyOf": [ { "$ref": "#/definitions/Int128" }, { "type": "null" } ] }, "order_type": { "$ref": "#/definitions/LimitOrderType" }, "receiver": { "type": "string" }, "tick_index_in_to_out": { "type": "integer", "format": "int64" }, "token_in": { "type": "string" }, "token_out": { "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Queries a pool by pair, tick and fee", "type": "object", "required": [ "pool" ], "properties": { "pool": { "type": "object", "required": [ "fee", "pair_id", "tick_index" ], "properties": { "fee": { "type": "integer", "format": "uint64", "minimum": 0.0 }, "pair_id": { "type": "string" }, "tick_index": { "type": "integer", "format": "int64" } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Queries a pool by ID", "type": "object", "required": [ "pool_by_id" ], "properties": { "pool_by_id": { "type": "object", "required": [ "pool_id" ], "properties": { "pool_id": { "type": "integer", "format": "uint64", "minimum": 0.0 } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Queries a PoolMetadata by ID", "type": "object", "required": [ "pool_metadata" ], "properties": { "pool_metadata": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "uint64", "minimum": 0.0 } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Queries a list of PoolMetadata items.", "type": "object", "required": [ "pool_metadata_all" ], "properties": { "pool_metadata_all": { "type": "object", "properties": { "pagination": { "anyOf": [ { "$ref": "#/definitions/PageRequest" }, { "type": "null" } ] } }, "additionalProperties": false } }, "additionalProperties": false } ] }, "Int128": { "description": "An implementation of i128 that is using strings for JSON encoding/decoding, such that the full i128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `i128` to get the value out:\n\n``` # use cosmwasm_std::Int128; let a = Int128::from(258i128); assert_eq!(a.i128(), 258); ```", "type": "string" }, "LimitOrderType": { "oneOf": [ { "description": "Good-til-Cancelled limit orders are hybrid maker and taker limit orders. They will attempt to trade the supplied AmountIn at the TickIndex or better. However, if they total AmountIn cannot be traded at the limit price they are remaining amount will be placed as a maker limit order. The proceeds from the taker portion are deposited into the user’s account immediately, however, the proceeds from the maker portion must be explicitly withdrawn via WithdrawLimitOrder.", "type": "string", "enum": [ "GOOD_TIL_CANCELLED" ] }, { "description": "Fill-or-Kill limit orders are taker limit orders that either successfully swap 100% of the supplied AmountIn or return an error. If there is insufficient liquidity to complete the trade at or above the supplied TickIndex a Fill-or-Kill order will return an error `codespace: dex, code: 1134` ( ErrGoodTilOrderWithoutExpiration).", "type": "string", "enum": [ "FILL_OR_KILL" ] }, { "description": "Immediate-or-Cancel limit orders are taker orders that will swap as much as of the AmountIn as possible given available liquidity above the supplied TickIndex. Unlike Fill-or-Kill orders they will still successfully complete even if they are only able to partially trade through the AmountIn at the TickIndex or better.", "type": "string", "enum": [ "IMMEDIATE_OR_CANCEL" ] }, { "description": "Just-in-Time limit orders are an advanced maker limit order that provides tradeable liquidity for exactly one block. At the end of the same block in which the Just-in-Time order was submitted the order is canceled and any untraded portion will no longer be usable as active liquidity.", "type": "string", "enum": [ "JUST_IN_TIME" ] }, { "description": "Good-til-Time limit order function exactly the same as Good-til-Cancelled limit orders first trying to trade as a taker limit order and then placing any remaining amount as a maker limit order. However, the maker portion of the limit order has a specified ExpirationTime. After the ExpirationTime the order will be cancelled and can no longer be traded against. When withdrawing a Good-til-Time limit order the user will receive both the successfully traded portion of the limit order (TokenOut) as well as any remaining untraded amount (TokenIn).", "type": "string", "enum": [ "GOOD_TIL_TIME" ] } ] }, "MarketMapQuery": { "oneOf": [ { "description": "Parameters queries the parameters of the module.", "type": "object", "required": [ "params" ], "properties": { "params": { "type": "object", "additionalProperties": false } }, "additionalProperties": false }, { "type": "object", "required": [ "last_updated" ], "properties": { "last_updated": { "type": "object", "additionalProperties": false } }, "additionalProperties": false }, { "type": "object", "required": [ "market_map" ], "properties": { "market_map": { "type": "object", "additionalProperties": false } }, "additionalProperties": false }, { "type": "object", "required": [ "market" ], "properties": { "market": { "type": "object", "required": [ "currency_pair" ], "properties": { "currency_pair": { "$ref": "#/definitions/CurrencyPair" } }, "additionalProperties": false } }, "additionalProperties": false } ] }, "MultiHopRoute": { "type": "object", "required": [ "hops" ], "properties": { "hops": { "type": "array", "items": { "type": "string" } } }, "additionalProperties": false }, "OracleQuery": { "oneOf": [ { "type": "object", "required": [ "get_all_currency_pairs" ], "properties": { "get_all_currency_pairs": { "type": "object", "additionalProperties": false } }, "additionalProperties": false }, { "type": "object", "required": [ "get_price" ], "properties": { "get_price": { "type": "object", "required": [ "currency_pair" ], "properties": { "currency_pair": { "$ref": "#/definitions/CurrencyPair" } }, "additionalProperties": false } }, "additionalProperties": false }, { "type": "object", "required": [ "get_prices" ], "properties": { "get_prices": { "type": "object", "required": [ "currency_pair_ids" ], "properties": { "currency_pair_ids": { "type": "array", "items": { "type": "string" } } }, "additionalProperties": false } }, "additionalProperties": false } ] }, "PageRequest": { "type": "object", "required": [ "count_total", "key", "limit", "offset", "reverse" ], "properties": { "count_total": { "description": "**count_total** is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set.", "type": "boolean" }, "key": { "description": "**key** is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set.", "allOf": [ { "$ref": "#/definitions/Binary" } ] }, "limit": { "description": "**limit** is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.", "type": "integer", "format": "uint64", "minimum": 0.0 }, "offset": { "description": "**offset** is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.", "type": "integer", "format": "uint64", "minimum": 0.0 }, "reverse": { "description": "reverse is set to true if results are to be returned in the descending order.", "type": "boolean" } }, "additionalProperties": false }, "PrecDec": { "type": "object", "required": [ "i" ], "properties": { "i": { "type": "string" } }, "additionalProperties": false } } }