{ "$schema": "http://json-schema.org/draft-07/schema#", "title": "QueryMsg", "oneOf": [ { "description": "Get all swaps (enumerable) Return type: ListResponse", "type": "object", "required": [ "list" ], "properties": { "list": { "type": "object", "properties": { "limit": { "type": [ "integer", "null" ], "format": "uint32", "minimum": 0.0 }, "start_after": { "type": [ "string", "null" ] } } } }, "additionalProperties": false }, { "type": "object", "required": [ "get_total" ], "properties": { "get_total": { "type": "object", "required": [ "swap_type" ], "properties": { "swap_type": { "$ref": "#/definitions/SwapType" } } } }, "additionalProperties": false }, { "description": "Get all swaps of type `SwapType::Offer`", "type": "object", "required": [ "get_offers" ], "properties": { "get_offers": { "type": "object", "properties": { "limit": { "type": [ "integer", "null" ], "format": "uint32", "minimum": 0.0 }, "page": { "type": [ "integer", "null" ], "format": "uint32", "minimum": 0.0 } } } }, "additionalProperties": false }, { "description": "Get all swaps of type `SwapType::Sale`", "type": "object", "required": [ "get_listings" ], "properties": { "get_listings": { "type": "object", "properties": { "limit": { "type": [ "integer", "null" ], "format": "uint32", "minimum": 0.0 }, "page": { "type": [ "integer", "null" ], "format": "uint32", "minimum": 0.0 } } } }, "additionalProperties": false }, { "description": "Get all listings for a token of type `Swap::Sale` and `Swap::Offer` or both (`None`)", "type": "object", "required": [ "listings_of_token" ], "properties": { "listings_of_token": { "type": "object", "required": [ "token_id" ], "properties": { "limit": { "type": [ "integer", "null" ], "format": "uint32", "minimum": 0.0 }, "page": { "type": [ "integer", "null" ], "format": "uint32", "minimum": 0.0 }, "swap_type": { "anyOf": [ { "$ref": "#/definitions/SwapType" }, { "type": "null" } ] }, "token_id": { "type": "string" } } } }, "additionalProperties": false }, { "description": "Show all swaps created by a specific address Defaults to SwapType::Sale if no `swap_type`", "type": "object", "required": [ "swaps_of" ], "properties": { "swaps_of": { "type": "object", "required": [ "address" ], "properties": { "address": { "$ref": "#/definitions/Addr" }, "limit": { "type": [ "integer", "null" ], "format": "uint32", "minimum": 0.0 }, "page": { "type": [ "integer", "null" ], "format": "uint32", "minimum": 0.0 }, "swap_type": { "anyOf": [ { "$ref": "#/definitions/SwapType" }, { "type": "null" } ] } } } }, "additionalProperties": false }, { "description": "Show all swaps of a given price range", "type": "object", "required": [ "swaps_by_price" ], "properties": { "swaps_by_price": { "type": "object", "properties": { "limit": { "type": [ "integer", "null" ], "format": "uint32", "minimum": 0.0 }, "max": { "anyOf": [ { "$ref": "#/definitions/Uint128" }, { "type": "null" } ] }, "min": { "anyOf": [ { "$ref": "#/definitions/Uint128" }, { "type": "null" } ] }, "page": { "type": [ "integer", "null" ], "format": "uint32", "minimum": 0.0 }, "swap_type": { "anyOf": [ { "$ref": "#/definitions/SwapType" }, { "type": "null" } ] } } } }, "additionalProperties": false }, { "description": "Show all swaps of a given denom (contract address) Defaults to ARCH if no contract is sent", "type": "object", "required": [ "swaps_by_denom" ], "properties": { "swaps_by_denom": { "type": "object", "properties": { "limit": { "type": [ "integer", "null" ], "format": "uint32", "minimum": 0.0 }, "page": { "type": [ "integer", "null" ], "format": "uint32", "minimum": 0.0 }, "payment_token": { "anyOf": [ { "$ref": "#/definitions/Addr" }, { "type": "null" } ] }, "swap_type": { "anyOf": [ { "$ref": "#/definitions/SwapType" }, { "type": "null" } ] } } } }, "additionalProperties": false }, { "description": "Show all cw20 swaps, or all ARCH swaps", "type": "object", "required": [ "swaps_by_payment_type" ], "properties": { "swaps_by_payment_type": { "type": "object", "required": [ "cw20" ], "properties": { "cw20": { "type": "boolean" }, "limit": { "type": [ "integer", "null" ], "format": "uint32", "minimum": 0.0 }, "page": { "type": [ "integer", "null" ], "format": "uint32", "minimum": 0.0 }, "swap_type": { "anyOf": [ { "$ref": "#/definitions/SwapType" }, { "type": "null" } ] } } } }, "additionalProperties": false }, { "description": "Returns the details of the named swap, error if not created. Return type: DetailsResponse.", "type": "object", "required": [ "details" ], "properties": { "details": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "string" } } } }, "additionalProperties": false } ], "definitions": { "Addr": { "description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.", "type": "string" }, "SwapType": { "type": "string", "enum": [ "Offer", "Sale" ] }, "Uint128": { "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 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 `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", "type": "string" } } }