amm_client

class algofipy.amm.v1.amm_client.AMMClient(algofi_client)

Bases: object

get_asset(asset_id)

Returns an Asset object representing the asset with given asset id

Parameters:

asset_id (int) – asset id

Returns:

Asset object representing the asset with given asset id

Return type:

Asset

get_constant_product_lending_pools()

Returns a dict of valid constant product lending pools with relevant data

Returns:

dict mapping constant product lending pool app id -> Pool

Return type:

dict

get_constant_product_pools()

Returns a dict of valid constant product pools with relevant data

Returns:

dict mapping pool app id -> Pool

Return type:

dict

get_nanoswap_lending_pools()

Returns a dict of valid nanoswap lending pools with relevant data

Returns:

dict mapping nanoswap lending pool app id -> Pool

Return type:

dict

get_nanoswap_pools()

Returns a dict of valid nanoswap pools with relevant data

Returns:

dict mapping nanoswap pool app id -> Pool

Return type:

dict

get_pool(pool_type, asset1_id, asset2_id)

Returns a Pool object for given assets and pool_type

Parameters:
  • pool_type (PoolType) – a PoolType object for the type of pool (e.g. 30bp, 100bp fee)

  • asset1_id (int) – asset 1 id

  • asset2_id (int) – asset 2 id

Returns:

a Pool object for given assets and pool_type

Return type:

Pool