Public Node API
Get Account Balances
The Get Account Balances method retrieves the balance for a specific wallet address across all currency denominations within the account.
It provides the balance details encapsulated in a response structure, typically including the coin type and respective amounts.
Method Declaration
async def get_account_balances(
self,
address: str,
) -> bank_query.QueryAllBalancesResponse
Parameters
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
address | query | Address | true | The wallet address that owns the subaccount. |
Response
Status | Meaning | Schema | Description |
---|---|---|---|
200 | OK | Coin ⛁ | The response containing all account balances. |
Examples: Python | TypeScript | Rust
Get Account Balance
The Get Account Balance query retrieves the balance of a specified account address for a particular denomination.
This function is crucial for obtaining the current funds available in a wallet within blockchain network.
Method Declaration
async def get_account_balance(
self,
address: str,
denom: str,
) -> bank_query.QueryBalanceResponse
Parameters
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
address | query | Address | true | The wallet address that owns the subaccount. |
denom | query | Denom | true | The denomination of the balance. |
Response
Status | Meaning | Schema |
---|---|---|
200 | OK | Coin |
Get Account
The Get Account function retrieves an account using its unique wallet address, returning detailed account information encapsulated in the BaseAccount
structure.
This is essential for obtaining ownership details and balances associated with the account address provided.
Method Declaration
async def get_account(self, address: str) -> BaseAccount
Unification Plan
Parameters
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
address | query | Address | true | The wallet address that owns the subaccount. |
Response
Status | Meaning | Schema |
---|---|---|
200 | OK | BaseAccount |
Examples: Python | TypeScript | Rust
Get Latest Block
The method 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
async def latest_block(self) -> tendermint_query.GetLatestBlockResponse
Parameters
Response
Status | Meaning | Schema |
---|---|---|
200 | OK | Block |
Get Latest Block Height
The Get Latest Block Height
function asynchronously retrieves the most recent block height from a blockchain network.
This information is typically returned as an integer value wrapped in a specific data type or promise, indicating the current height of the blockchain.
Method Declaration
async def latest_block_height(self) -> int
Parameters
Response
Status | Meaning | Schema |
---|---|---|
200 | OK | Height |
Get User Stats
The Get User Stats
method retrieves statistical data for a user's Maker and Taker positions associated with a specified wallet address.
By querying this API, users can access detailed insights into their trading activities across various financial positions.
Method Declaration
async def get_user_stats(
self,
address: str,
) -> stats_query.QueryUserStatsResponse
Unification Plan
Parameters
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
user | query | Address | true | The wallet address that owns the subaccount. |
Response
Status | Meaning | Schema |
---|---|---|
200 | OK | UserStats |
Examples: Python | TypeScript | Rust
Get All Validators
The Get All Validators method fetches a list of all validators, optionally filtering them by a specified status.
This can be useful for monitoring network participants and their roles within a blockchain staking system.
Method Declaration
async def get_all_validators(
self,
status: str = "",
) -> staking_query.QueryValidatorsResponse
Parameters
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
status | query | String | false | Status to filter out the matched result. |
Response
Status | Meaning | Schema |
---|---|---|
200 | OK | Validator ⛁ |
Examples: Python | TypeScript | Rust
Get Subaccounts
The Get Subaccounts
function retrieves a comprehensive list of all subaccounts associated with an account, returning structured information encapsulated in a response object.
This aids in managing and viewing details of subaccounts under a main account efficiently.
Method Declaration
async def get_subaccounts(self) -> QuerySubaccountAllResponse
Parameters
Response
Status | Meaning | Schema |
---|---|---|
200 | OK | SubaccountInfo ⛁ |
Examples: Python | TypeScript | Rust
Get Subaccount
The Get Subaccount
method fetches details of a specific subaccount based on its owner's address and the subaccount's unique number.
It returns information about the subaccount, including its configuration and current status.
Method Declaration
async def get_subaccount(
self,
address: str,
account_number: int,
) -> Optional[subaccount_type.Subaccount]
Unification Plan
- Rust uses
Subaccount
- a wrapper that combinesAddress
withSubaccountNumber
, it's safer to create the same type for Python and TypeScript
Parameters
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
owner | query | Address | true | The wallet address that owns the subaccount. |
number | query | SubaccountNumber | true | The identifier for the specific subaccount withing the wallet address. |
Response
Status | Meaning | Schema |
---|---|---|
200 | OK | SubaccountInfo |
Examples: Python | TypeScript | Rust
Get Clob Pair
The Get Clob Pair
function 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 typically includes data structured within the ClobPair
schema.
Method Declaration
async def get_clob_pair(self, pair_id: int) -> clob_pair_type.ClobPair
Parameters
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
id | query | u32 | true | Clob pair id |
Response
Status | Meaning | Schema |
---|---|---|
200 | OK | ClobPair |
Get Clob Pairs
The Get Clob Pairs
function is utilized to obtain a comprehensive list of all available order book trading pairs from a centralized limit order book.
It facilitates managing large datasets by supporting optional pagination parameters, ensuring efficient data retrieval (not in all clients yet).
Method Declaration
async def get_clob_pairs(self) -> QueryClobPairAllResponse
Unification Plan
- Python and TypeScript don't contain options
Parameters
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
pagination | query | PageRequest | false | Parameters of pagination. |
Response
Status | Meaning | Schema |
---|---|---|
200 | OK | ClobPair ⛁ |
Examples: Python | TypeScript | Rust
Get Price
The Get Price
method is used to retrieve the current market price for a specified market, identified by its id
.
It returns the price as a MarketPrice
object when the request is successful.
Method Declaration
async def get_price(self, market_id: int) -> market_price_type.MarketPrice
Unification Plan
Parameters
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
id | query | u32 | true | market id to get price |
Response
Status | Meaning | Schema |
---|---|---|
200 | OK | MarketPrice |
Get Prices
The Get Prices
method is used to query all market prices from the system, providing an overview of current market values.
It can include optional pagination parameters to manage large sets of data efficiently (not in all clients yet).
Method Declaration
async def get_prices(self) -> QueryAllMarketPricesResponse
Unification Plan
- Python and TypeScript don't contain options
Parameters
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
pagination | query | PageRequest | false | Parameters of pagination. |
Response
Status | Meaning | Schema |
---|---|---|
200 | OK | MarketPrice ⛁ |
Examples: Python | TypeScript | Rust
Get Perpetual
The Get Perpetual
method queries a specific perpetual contract by its unique perpetual_id
, returning details about the contract.
This is an asynchronous function typically used to retrieve data such as market conditions or contract specifications.
Method Declaration
async def get_perpetual(self, perpetual_id: int) -> QueryPerpetualResponse
Unification Plan
Parameters
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
id | query | u32 | true | Perpetual id |
Response
Status | Meaning | Schema |
---|---|---|
200 | OK | Perpetual |
Get Perpetuals
The Get Perpetuals
function allows you to retrieve a list of all perpetuals currently available in the system.
It's designed to support pagination, so you can specify pagination parameters to control the volume of data retrieved in each query (no in all clients yet).
Method Declaration
async def get_perpetuals(self) -> QueryAllPerpetualsResponse
Unification Plan
- Python and TypeScript don't contain options
- Options in protocol are not optional
Parameters
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
pagination | query | PageRequest | false | Parameters of pagination. |
Response
Status | Meaning | Schema |
---|---|---|
200 | OK | Perpetual ⛁ |
Get Equity Tier Limit Config
The Equity Tier Limit Configuration is a method used to fetch the configuration details that outline the limits set for different tiers of equity.
It provides essential data that defines the specific constraints and parameters associated with each equity tier.
Method Declaration
async def get_equity_tier_limit_config(
self,
) -> equity_tier_limit_config_type.EquityTierLimitConfiguration:
Unification Plan
Parameters
Response
Status | Meaning | Schema |
---|---|---|
200 | OK | EquityTierLimitConfiguration |
Examples: Python | TypeScript | Rust
Get Delegator Delegations
The Get Delegator Delegations method retrieves all delegations associated with a specific delegator address.
This can be useful in blockchain or staking systems to view the stakes that an individual delegator has allocated to various validators.
Method Declaration
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
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
delegator_addr | query | Address | true | The wallet address that owns the subaccount. |
pagination | query | PageRequest | false | Parameters of pagination. |
Response
Status | Meaning | Schema |
---|---|---|
200 | OK | DelegationResponse ⛁ |
:::
Examples: Python | TypeScript | Rust
Get Delegator Unbounding Delegations
The Get Delegator Unbonding Delegations function allows you to query all unbonding delegations associated with a specific delegator address.
This is particularly useful for tracking assets that are in the process of being unbonded from validators, providing insight into pending delegation changes.
Method Declaration
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
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
delegator_addr | query | Address | true | The wallet address that owns the subaccount. |
pagination | query | PageRequest | false | Parameters of pagination. |
Response
Status | Meaning | Schema |
---|---|---|
200 | OK | UnbondingDelegation ⛁ |
Examples: Python | TypeScript | Rust
Get Delayed Complete Bridge Messages
This method retrieves 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
async def get_delayed_complete_bridge_messages(
self,
address: str = "",
) -> bridge_query.QueryDelayedCompleteBridgeMessagesResponse
Unification Plan
Parameters
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
address | query | Address | true | The wallet address that owns the subaccount. |
Response
Status | Meaning | Schema |
---|---|---|
200 | OK | DelayedCompleteBridgeMessage ⛁ |
Examples: Python | TypeScript | Rust
Get Fee Tiers
The Get Fee Tiers
method retrieves current fee tiers associated with perpetual trading, helping to understand the fees applied based on trading volume or other criteria.
It responds with a structure defined by the PerpetualFeeTier
, providing data essential for financial calculations and strategy planning.
Method Declaration
async def get_fee_tiers(self) -> fee_tier_query.QueryPerpetualFeeParamsResponse
Unification Plan
Response
Status | Meaning | Schema |
---|---|---|
200 | OK | PerpetualFeeTier ⛁ |
Examples: Python | TypeScript | Rust
Get User Fee Tier
The Get User Fee Tier
function retrieves the perpetual fee tier associated with a specific wallet address, providing information on the user's current fee structure.
This is essential for users to understand the fees applicable to their transactions on the platform.
Method Declaration
async def get_user_fee_tier(
self, address: str
) -> fee_tier_query.QueryUserFeeTierResponse
Unification Plan
Parameters
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
user | query | Address | true | The wallet address that owns the subaccount. |
Response
Status | Meaning | Schema |
---|---|---|
200 | OK | PerpetualFeeTier |
Examples: Python | TypeScript | Rust
Get Rewards Params
The Get Rewards Params
function retrieves the parameters for the rewards system, providing insight into the set configurations for earning and distributing rewards.
This API call returns a structured response detailing these parameters, ensuring users have access to the current rewards setup for planning and analysis.
Method Declaration
async def get_rewards_params(self) -> rewards_query.QueryParamsResponse
Unification Plan
- Rename
Params
toRewardsParams
in Rust
Parameters
Response
Status | Meaning | Schema |
---|---|---|
200 | OK | RewardsParams |
Examples: Python | TypeScript | Rust