CetusProtocol / cetus-clmm-sui-sdk

The clmm sdk on Sui.
Apache License 2.0
28 stars 20 forks source link

How to get pool object ID? #1

Closed Kinco4TC closed 3 months ago

Kinco4TC commented 1 year ago

Can I get the pool object ID by the coin type? Like the object ID "0xcf994611fd4c48e277ce3ffd4d4364c914af2c3cbb05f7bf6facd371de688630" is the pool for <0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN, 0x2::sui::SUI>

icegriffinguru commented 4 months ago

There is no such specific endpoint in the SDK as far as I know. One possible solution is fetching all pools by getPoolsWithPage([]) and check their TypeName with your CoinType.