api
Module for interacting with Pact API.
- class pactsdk.api.ListPoolsParams
Bases:
TypedDict
Parameters for calling the
pactsdk.pool.list_pools()
function.All keys are optional and can be omitted.
- offset: int
- limit: int
- is_verified: str
- creator: str
- primary_asset__on_chain_id: int
- secondary_asset__on_chain_id: int
- primary_asset__unit_name: str
- secondary_asset__unit_name: str
- primary_asset__name: str
- secondary_asset__name: str
- class pactsdk.api.ApiAsset
Bases:
TypedDict
Details about the liquidity pool assets returned from the asset pool.
- on_chain_id: str
- decimals: int
- id: int
- is_liquidity_token: bool
- is_verified: bool
- name: str
- total_amount: str
- tvl_usd: str
- unit_name: str
- volume_7d: str
- volume_24h: str
- class pactsdk.api.ApiPool
Bases:
TypedDict
The individual pool information returned from
pactsdk.pool.list_pools()
, this contains the basic pool information.- address: str
- on_chain_id: str
- confirmed_round: int
- creator: str
- fee_amount_7d: str
- fee_amount_24h: str
- fee_usd_7d: str
- fee_usd_24h: str
- tvl_usd: str
- volume_7d: str
- volume_24h: str
- apr_7d: str
- id: int
- is_verified: bool
- pool_asset: pactsdk.api.ApiAsset
- primary_asset: pactsdk.api.ApiAsset
- secondary_asset: pactsdk.api.ApiAsset
- class pactsdk.api.ApiListPoolsResponse
Bases:
TypedDict
Response from
pactsdk.pool.list_pools()
function containing pagination information and results.- count: int
- offset: int
- limit: int
- results: list[pactsdk.api.ApiPool]
- pactsdk.api.list_pools(pact_api_url, params)
Finds all the pools that match the pool options passed in.
- Parameters
pact_api_url (
str
) – The API URL to query the list of pools.params (
ListPoolsParams
) – Dict of params for querying the pools.
- Return type
- Returns
Pool data for all pools in the Pact that meets the pool options.