Skip to content

Public Node API

Get Account Balances

Retrieves the balance for a specific wallet address across all currency denominations within the account. See the definition.

Method Declaration

Python
async def get_account_balances(
        self,
        address: str,
) -> bank_query.QueryAllBalancesResponse

Parameters

ParameterLocationTypeRequiredDescription
addressqueryAddresstrueThe wallet address that owns the account.

Response

StatusMeaningSchemaDescription
200OKCoinThe response containing all account balances.
400Bad RequestThe request was malformed or invalid.

Examples: Python | TypeScript | Rust | API | Guide - Get Account Balances

Get Account Balance

Retrieves the balance of a specified account address for a particular denomination/token. See the definition.

Method Declaration

Python
async def get_account_balance(
    self,
    address: str,
    denom: str,
) -> bank_query.QueryBalanceResponse

Parameters

ParameterLocationTypeRequiredDescription
addressqueryAddresstrueThe wallet address that owns the account.
denomqueryDenomtrueDenomination of the token associated with the request.

Response

StatusMeaningSchemaDescription
200OKCoinThe account balance.
400Bad RequestThe request was malformed or invalid.

Examples: Python | Rust | API | Guide - Get Account Balance

Get Account

Retrieves an account using its unique wallet address, returning detailed account information encapsulated in the BaseAccount structure. See the definition.

Method Declaration

Python
async def get_account(self, address: str) -> BaseAccount
Unification Plan

Parameters

ParameterLocationTypeRequiredDescription
addressqueryAddresstrueThe wallet address that owns the account.

Response

StatusMeaningSchemaDescription
200OKBaseAccountThe account information.
400Bad RequestThe request was malformed or invalid.

Examples: Python | TypeScript | Rust | API | Guide - Get Account

Get Latest Block

Retrieves the most recent block from the blockchain network. This is useful for obtaining the latest state or data committed on the chain, ensuring the application operates with up-to-date information.

Method Declaration

Python
async def latest_block(self) -> tendermint_query.GetLatestBlockResponse

Parameters

Response

StatusMeaningSchemaDescription
200OKBlockThe latest block.
400Bad RequestThe request was malformed or invalid.

Examples: Python | Rust | API| Guide - Get Latest Block

Get Latest Block Height

Retrieves the most recent block height from a blockchain network. Internally it uses the Get Latest Block API call.

Method Declaration

Python
async def latest_block_height(self) -> int

Parameters

Response

StatusMeaningSchemaDescription
200OKHeightThe latest block height.
400Bad RequestThe request was malformed or invalid.

Examples: Python | Rust

Get User Stats

Retrieves statistical data for a user's Maker and Taker positions associated with a specified wallet address.

Method Declaration

Python
async def get_user_stats(
    self,
    address: str,
) -> stats_query.QueryUserStatsResponse
Unification Plan

Parameters

ParameterLocationTypeRequiredDescription
userqueryAddresstrueThe wallet address that owns the account.

Response

StatusMeaningSchemaDescription
200OKUserStatsThe response containing the user stats.
400Bad RequestThe request was malformed or invalid.

Examples: Python | TypeScript | Rust | API

Get All Validators

Fetches a list of all validators, optionally filtering them by a specified status. See the definition.

Method Declaration

Python
async def get_all_validators(
    self,
    status: str = "",
) -> staking_query.QueryValidatorsResponse

Parameters

ParameterLocationTypeRequiredDescription
statusqueryStringfalseStatus to filter out the matched result.

Response

StatusMeaningSchemaDescription
200OKValidatorThe response containing all validators.
400Bad RequestThe request was malformed or invalid.

Examples: Python | TypeScript | Rust | API

Get Subaccounts

Retrieves a comprehensive list of all subaccounts, returning structured information encapsulated in a response object.

Method Declaration

Python
async def get_subaccounts(self) -> QuerySubaccountAllResponse

Parameters

Response

StatusMeaningSchema
200OKSubaccountInfo

Examples: Python | TypeScript | Rust | API | Guide - Get Subaccounts

Get Subaccount

Fetches details of a specific subaccount based on its owner's address and the subaccount's unique number.

Method Declaration

Python
async def get_subaccount(
    self,
    address: str,
    account_number: int,
) -> Optional[subaccount_type.Subaccount]
Unification Plan
  • Rust uses Subaccount - a wrapper that combines Address with SubaccountNumber, it's safer to create the same type for Python and TypeScript

Parameters

ParameterLocationTypeRequiredDescription
ownerqueryAddresstrueThe wallet address that owns the account.
numberquerySubaccountNumbertrueThe identifier for the specific subaccount withing the wallet address.

Response

StatusMeaningSchemaDescription
200OKSubaccountInfoThe response containing the subaccount.
400Bad RequestThe request was malformed or invalid.
404Not FoundThe subaccount was not found.

Examples: Python | TypeScript | Rust | API | Guide - Get Subaccount

Get Clob Pair

Fetches the order book pair identified by a given ID, allowing users to retrieve detailed information about a specific trading pair within a Central Limit Order Book (CLOB) system.

The response includes data structured within the ClobPair schema.

Method Declaration

Python
async def get_clob_pair(self, pair_id: int) -> clob_pair_type.ClobPair

Parameters

ParameterLocationTypeRequiredDescription
idqueryu32trueClob pair ID

Response

StatusMeaningSchemaDescription
200OKClobPairThe clob pair information.
400Bad RequestThe request was malformed or invalid.
404Not FoundThe clob pair was not found.

Examples: Python | Rust | API

Get Clob Pairs

Obtain a comprehensive list of all available order book trading pairs.

Method Declaration

Python
async def get_clob_pairs(self) -> QueryClobPairAllResponse
Unification Plan
  • Python and TypeScript don't contain options

Parameters

ParameterLocationTypeRequiredDescription
paginationqueryPageRequestfalseParameters of pagination.

Response

StatusMeaningSchemaDescription
200OKClobPairThe response containing all clob pairs.
400Bad RequestThe request was malformed or invalid.

Examples: Python | TypeScript | Rust | API

Get Price

Retrieve the current market price for a specified market, identified by its CLOB pair ID.

Method Declaration

Python
async def get_price(self, market_id: int) -> market_price_type.MarketPrice
Unification Plan

Parameters

ParameterLocationTypeRequiredDescription
idqueryu32trueMarket (Clob pair) ID

Response

| Status | Meaning | Schema | | ------ | ------------- | ------------- | ------------------------------------- | | 200 | OK | MarketPrice | | 400 | Bad Request | | The request was malformed or invalid. | | 404 | Not Found | | The market was not found. |

Examples: Python | Rust | API

Get Prices

Query all market prices from the system, providing an overview of current market values.

Method Declaration

Python
async def get_prices(self) -> QueryAllMarketPricesResponse
Unification Plan
  • Python and TypeScript don't contain options

Parameters

ParameterLocationTypeRequiredDescription
paginationqueryPageRequestfalseParameters of pagination.

Response

StatusMeaningSchemaDescription
200OKMarketPriceThe response containing all market prices.
400Bad RequestThe request was malformed or invalid.

Examples: Python | TypeScript | Rust | API

Get Perpetual

Queries a specific perpetual contract by its unique perpetual ID, returning details about the contract.

Method Declaration

Python
async def get_perpetual(self, perpetual_id: int) -> QueryPerpetualResponse
Unification Plan

Parameters

ParameterLocationTypeRequiredDescription
idqueryu32truePerpetual ID

Response

| Status | Meaning | Schema | | ------ | ------------- | ----------- | ------------------------------------- | | 200 | OK | Perpetual | | 400 | Bad Request | | The request was malformed or invalid. | | 404 | Not Found | | The perpetual was not found. |

Examples: Python | Rust | API

Get Perpetuals

Retrieve a list of all perpetuals currently available in the system.

Method Declaration

Python
async def get_perpetuals(self) -> QueryAllPerpetualsResponse
Unification Plan
  • Python and TypeScript don't contain options
  • Options in protocol are not optional

Parameters

ParameterLocationTypeRequiredDescription
paginationqueryPageRequestfalseParameters of pagination.

Response

StatusMeaningSchemaDescription
200OKPerpetualThe response containing all perpetuals.
400Bad RequestThe request was malformed or invalid.

Examples: Python | Rust | API

Get Equity Tier Limit Config

Fetch the configuration details that outline the limits set for different tiers of equity.

Method Declaration

Python
async def get_equity_tier_limit_config(
    self,
) -> equity_tier_limit_config_type.EquityTierLimitConfiguration:
Unification Plan

Parameters

Response

| Status | Meaning | Schema | | ------ | ------------- | ------------------------------ | ------------------------------------- | | 200 | OK | EquityTierLimitConfiguration | | 400 | Bad Request | | The request was malformed or invalid. |

Examples: Python | TypeScript | Rust | API

Get Delegator Delegations

Retrieves all delegations associated with a specific delegator address. See the definition.

Method Declaration

Python
async def get_delegator_delegations(
    self, delegator_addr: str
) -> staking_query.QueryDelegatorDelegationsResponse
Unification Plan
  • Python and TypeScript don't contain options
  • Options in protocol are not optional
  • Two types of options (v4 and cosmos, are the same, please use cosmos)

Parameters

ParameterLocationTypeRequiredDescription
delegator_addrqueryAddresstrueThe wallet address that owns the account.
paginationqueryPageRequestfalseParameters of pagination.

Response

| Status | Meaning | Schema | | ------ | ------------- | ---------------------- | ------------------------------------- | | 200 | OK | DelegationResponse ⛁ | | 400 | Bad Request | | The request was malformed or invalid. |

Examples: Python | TypeScript | Rust | API

Get Delegator Unbonding Delegations

Query all unbonding delegations associated with a specific delegator address. See the definition.

Method Declaration

Python
async def get_delegator_unbonding_delegations(
    self, delegator_addr: str
) -> staking_query.QueryDelegatorUnbondingDelegationsResponse
Unification Plan
  • Python and TypeScript don't contain options
  • Options in protocol are not optional
  • Two types of options (v4 and cosmos, are the same, please use cosmos)

Parameters

ParameterLocationTypeRequiredDescription
delegator_addrqueryAddresstrueThe wallet address that owns the account.
paginationqueryPageRequestfalseParameters of pagination.

Response

| Status | Meaning | Schema | | ------ | ------------- | ----------------------- | ------------------------------------- | | 200 | OK | UnbondingDelegation ⛁ | | 400 | Bad Request | | The request was malformed or invalid. |

Examples: Python | TypeScript | Rust | API

Get Delayed Complete Bridge Messages

Retrieve delayed bridge messages associated with a specified wallet address, focusing on messages that have not yet reached completion.

It requires the address of the wallet to access its related subaccount messages and returns a structured response detailing the delayed messages.

Method Declaration

Python
async def get_delayed_complete_bridge_messages(
    self,
    address: str = "",
) -> bridge_query.QueryDelayedCompleteBridgeMessagesResponse
Unification Plan

Parameters

ParameterLocationTypeRequiredDescription
addressqueryAddresstrueThe wallet address that owns the account.

Response

| Status | Meaning | Schema | | ------ | ------------- | -------------------------------- | ------------------------------------- | | 200 | OK | DelayedCompleteBridgeMessage ⛁ | | 400 | Bad Request | | The request was malformed or invalid. |

Examples: Python | TypeScript | Rust | API

Get Fee Tiers

Retrieves current fee tiers associated with perpetual trading, helping to understand the fees applied based on trading volume or other criteria.

Method Declaration

Python
async def get_fee_tiers(self) -> fee_tier_query.QueryPerpetualFeeParamsResponse
Unification Plan

Response

| Status | Meaning | Schema | | ------ | ------------- | -------------------- | ------------------------------------- | | 200 | OK | PerpetualFeeTier ⛁ | | 400 | Bad Request | | The request was malformed or invalid. |

Examples: Python | TypeScript | Rust | API

Get User Fee Tier

Retrieves the perpetual fee tier associated with a specific wallet address, providing information on the user's current fee structure.

Method Declaration

Python
async def get_user_fee_tier(
    self, address: str
) -> fee_tier_query.QueryUserFeeTierResponse
Unification Plan

Parameters

ParameterLocationTypeRequiredDescription
userqueryAddresstrueThe wallet address that owns the account.

Response

StatusMeaningSchemaDescription
200OKPerpetualFeeTierThe response containing the user fee tier.
400Bad RequestThe request was malformed or invalid.

Examples: Python | TypeScript | Rust | API| Guide - Get User Fee Tier

Get Rewards Params

Retrieves the parameters for the rewards system, providing insight into the set configurations for earning and distributing rewards.

Method Declaration

Python
async def get_rewards_params(self) -> rewards_query.QueryParamsResponse
Unification Plan
  • Rename Params to RewardsParams in Rust

Parameters

Response

StatusMeaningSchema
200OKRewardsParams

Examples: Python | TypeScript | Rust | API | Guide - Get Rewards Params

Get Affiliate Info

Get affiliate info by address.

Method Declaration

Python
 

Parameters

ParameterLocationTypeMandatoryDescription
addressQuerystringtrueAddress to get affiliate info

Response

StatusMeaningSchema
200OKAffiliateModule.AffiliateInfoResponse

Examples: API

Get Affiliate White List

Get affiliate white list.

Method Declaration

Python
 

Parameters

Response

StatusMeaningSchema
200OKAffiliateModule.AffiliateWhitelistResponse

Examples: API

Get All Affiliate Tiers

Get all affiliate tiers.

Method Declaration

Python
 

Parameters

Response

StatusMeaningSchema
200OKAffiliateModule.AllAffiliateTiersResponse

Examples: API

Get All Gov Proposals

Get all gov proposals.

Method Declaration

Python
 

Parameters

ParameterLocationTypeMandatoryDescription
proposalStatusQueryProposalStatustrueStatus of the proposal to filter by.
voterQuerystringfalseVoter to filter by
depositorQuerystringfalseDepositor to filter by.

Response

StatusMeaningSchema
200OKGovV1Module.QueryProposalsResponse

Examples: API

GetDelegationTotalRewards

Get all unbonding delegations from a delegator.

Method Declaration

Python
 

Implement Python and Rust method

Parameters

ParameterLocationTypeMandatoryDescription
delegatorAddressQuerystringtrueAddress of the delegator

Response

StatusMeaningSchemaDescription
200OKDistributionModule.QueryDelegationTotalRewardsResponseAll unbonding delegations from a delegator.
400Bad RequestThe request was malformed or invalid.

Examples: API

Get Node Info

Query for node info.

Method Declaration

Python
 
Unification Plan

Parameters

Response

| Status | Meaning | Schema | | ------ | ------------- | --------------------- | ------------------------------------- | | 200 | OK | GetNodeInfoResponse | | 400 | Bad Request | | The request was malformed or invalid. |

Examples: Rust | API

Get Referred By

Get referred by.

Method Declaration

Python
 

Parameters

ParameterLocationTypeMandatoryDescription
addressQuerystringtrueAddress to get referred by

Response

StatusMeaningSchema
200OKAffiliateModule.ReferredByResponse

Examples: API

Get Withdrawal and Transfer Gating Status

Get withdrawal and transfer gating status.

Method Declaration

Python
 

Parameters

ParameterLocationTypeMandatoryDescription
perpetualIdQueryinttruePerpetual id

Response

StatusMeaningSchema
200OKSubaccountsModule.QueryGetWithdrawalAndTransfersBlockedInfoResponse

Examples: API

Get Withdrawal Capacity By Denom

Get withdrawal capacity by denom.

Method Declaration

Python
 

Parameters

ParameterLocationTypeMandatoryDescription
denomQuerystringtrueDenomination value

Response

StatusMeaningSchema
200OKRateLimitModule.QueryCapacityByDenomResponse

Examples: API

Query Address

Fetch account’s number and sequence number from the network.

Method Declaration

Python
 
Unification Plan

Parameters

ParameterLocationTypeDescription
addressquery[Address]The wallet address that owns the account.

Response

StatusMeaningSchemaDescription
200OKPair of ([u64], [u64])The response containing the account.
400Bad RequestThe request was malformed or invalid.