Skip to main content

Market Validation

Trade Transfer Markets Market Validation (v1.0.0)

Download OpenAPI specification:Download

API Documentation for Trade Transfer Markets Market Validation

ValidateMarket

ValidateMarket checks for any problems with a market's setup.

Authorizations:
bearerAuth
path Parameters
market_id
required
integer (market_id)

market_id is the id of the market to check.

Responses

Response samples

Content type
application/json
{
  • "error": "string"
}

ValidateCreateMarket

ValidateCreateMarket checks the provided MsgGovCreateMarketResponse and returns any errors it might have.

Authorizations:
bearerAuth
query Parameters
createMarketRequest.authority
string (authority)

authority should be the governance module account address.

createMarketRequest.market.marketId
integer (market_id)

market_id is the numerical identifier for this market.

createMarketRequest.market.marketDetails.name
string (name)

name is a moniker that people can use to refer to this market.

createMarketRequest.market.marketDetails.description
string (description)

description extra information about this market. The field is meant to be human-readable.

createMarketRequest.market.marketDetails.websiteUrl
string (website_url)

website_url is a url people can use to get to this market, or at least get more information about this market.

createMarketRequest.market.marketDetails.iconUri
string (icon_uri)

icon_uri is a uri for an icon to associate with this market.

createMarketRequest.market.feeCreateAskFlat.denom
string (denom)

(proto string)

createMarketRequest.market.feeCreateAskFlat.amount
string (amount)

(proto string)

createMarketRequest.market.acceptingOrders
boolean (accepting_orders)

accepting_orders is whether this market is allowing orders to be created for it.

createMarketRequest.market.allowUserSettlement
boolean (allow_user_settlement)

allow_user_settlement is whether this market allows users to initiate their own settlements. For example, the FillBids and FillAsks endpoints are available if and only if this is true. The MarketSettle endpoint is only available to market actors regardless of the value of this field.

createMarketRequest.market.accessGrants.address
string (address)

address is the address that these permissions apply to.

createMarketRequest.market.accessGrants.permissions
Array of strings (permissions)
Items Enum: "PERMISSION_UNSPECIFIED" "PERMISSION_SETTLE" "PERMISSION_SET_IDS" "PERMISSION_CANCEL" "PERMISSION_WITHDRAW" "PERMISSION_UPDATE" "PERMISSION_PERMISSIONS" "PERMISSION_ATTRIBUTES"

allowed is the list of permissions available for the address.

createMarketRequest.market.reqAttrCreateAsk
Array of strings (req_attr_create_ask)

req_attr_create_ask is a list of attributes required on an account for it to be allowed to create an ask order. An account must have all of these attributes in order to create an ask order in this market. If the list is empty, any account can create ask orders in this market.

An entry that starts with "." will match any attributes that end with the rest of it. E.g. ".b.a" will match all of "c.b.a", "x.b.a", and "e.d.c.b.a"; but not "b.a", "xb.a", "b.x.a", or "c.b.a.x".

createMarketRequest.market.reqAttrCreateBid
Array of strings (req_attr_create_bid)

req_attr_create_ask is a list of attributes required on an account for it to be allowed to create a bid order. An account must have all of these attributes in order to create a bid order in this market. If the list is empty, any account can create bid orders in this market.

An entry that starts with "." will match any attributes that end with the rest of it. E.g. ".b.a" will match all of "c.b.a", "x.b.a", and "e.d.c.b.a"; but not "b.a", "xb.a", "c.b.x.a", or "c.b.a.x".

createMarketRequest.market.acceptingCommitments
boolean (accepting_commitments)

accepting_commitments is whether the market is allowing users to commit funds to it.

createMarketRequest.market.commitmentSettlementBips
integer (commitment_settlement_bips)

commitment_settlement_bips is the fraction of a commitment settlement that will be paid to the exchange. It is represented in basis points (1/100th of 1%, e.g. 0.0001) and is limited to 0 to 10,000 inclusive. During a commitment settlement, the inputs are summed and NAVs are used to convert that total to the intermediary denom, then to the fee denom. That is then multiplied by this value to get the fee amount that will be transferred out of the market's account into the exchange for that settlement.

Summing the inputs effectively doubles the value of the settlement from what what is usually thought of as the value of a trade. That should be taken into account when setting this value. E.g. if two accounts are trading 10apples for 100grapes, the inputs total will be 10apples,100grapes (which might then be converted to USD then nhash before applying this ratio); Usually, though, the value of that trade would be viewed as either just 10apples or just 100grapes.

createMarketRequest.market.intermediaryDenom
string (intermediary_denom)

intermediary_denom is the denom that funds get converted to (before being converted to the chain's fee denom) when calculating the fees that are paid to the exchange. NAVs are used for this conversion and actions will fail if a NAV is needed but not available.

createMarketRequest.market.reqAttrCreateCommitment
Array of strings (req_attr_create_commitment)

req_attr_create_commitment is a list of attributes required on an account for it to be allowed to create a commitment. An account must have all of these attributes in order to create a commitment in this market. If the list is empty, any account can create commitments in this market.

An entry that starts with "." will match any attributes that end with the rest of it. E.g. ".b.a" will match all of "c.b.a", "x.b.a", and "e.d.c.b.a"; but not "b.a", "xb.a", "c.b.x.a", or "c.b.a.x".

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "govPropWillPass": true
}

ValidateManageFees

ValidateManageFees checks the provided MsgGovManageFeesRequest and returns any errors that it might have.

Authorizations:
bearerAuth
query Parameters
manageFeesRequest.authority
string (authority)

authority should be the governance module account address.

manageFeesRequest.marketId
integer (market_id)

market_id is the market id that will get these fee updates.

manageFeesRequest.addFeeCreateAskFlat.denom
string (denom)

(proto string)

manageFeesRequest.addFeeCreateAskFlat.amount
string (amount)

(proto string)

manageFeesRequest.setFeeCommitmentSettlementBips
integer (set_fee_commitment_settlement_bips)

set_fee_commitment_settlement_bips is the new fee_commitment_settlement_bips for the market. It is ignored if it is zero. To set it to zero set unset_fee_commitment_settlement_bips to true.

manageFeesRequest.unsetFeeCommitmentSettlementBips
boolean (unset_fee_commitment_settlement_bips)

unset_fee_commitment_settlement_bips, if true, sets the fee_commitment_settlement_bips to zero. If false, it is ignored.

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "govPropWillPass": true
}

ValidateMarket

ValidateMarket checks for any problems with a market's setup.

Authorizations:
bearerAuth
path Parameters
market_id
required
integer (market_id)

market_id is the id of the market to check.

Responses

Response samples

Content type
application/json
{
  • "error": "string"
}