@@ -187,5 +187,62 @@ export function tokensCommand(
187187 } ,
188188 )
189189
190+ cmd
191+ . command ( "holders" )
192+ . description (
193+ "Get paginated holders for a token (with aggregate distribution health)" ,
194+ )
195+ . argument ( "<chain>" , "Chain" )
196+ . argument ( "<address>" , "Token contract address" )
197+ . option ( "--limit <limit>" , "Number of results (max 100)" , "20" )
198+ . option ( "--next <cursor>" , "Pagination cursor" )
199+ . option ( "--sort-by <field>" , "Sort field (QUANTITY)" )
200+ . option ( "--sort-direction <direction>" , "Sort direction (asc|desc)" )
201+ . action (
202+ async (
203+ chain : string ,
204+ address : string ,
205+ options : {
206+ limit : string
207+ next ?: string
208+ sortBy ?: string
209+ sortDirection ?: string
210+ } ,
211+ ) => {
212+ const client = getClient ( )
213+ await outputGet (
214+ client ,
215+ getFormat ( ) ,
216+ `/api/v2/chain/${ chain as Chain } /token/${ address } /holders` ,
217+ {
218+ limit : parseIntOption ( options . limit , "--limit" ) ,
219+ cursor : options . next ,
220+ sort_by : options . sortBy ,
221+ sort_direction : options . sortDirection ,
222+ } ,
223+ )
224+ } ,
225+ )
226+
227+ cmd
228+ . command ( "liquidity-pools" )
229+ . description ( "Get liquidity pools for a token" )
230+ . argument ( "<chain>" , "Chain" )
231+ . argument ( "<address>" , "Token contract address" )
232+ . option ( "--limit <limit>" , "Number of results (max 50)" , "20" )
233+ . action (
234+ async ( chain : string , address : string , options : { limit : string } ) => {
235+ const client = getClient ( )
236+ await outputGet (
237+ client ,
238+ getFormat ( ) ,
239+ `/api/v2/chain/${ chain as Chain } /token/${ address } /liquidity-pools` ,
240+ {
241+ limit : parseIntOption ( options . limit , "--limit" ) ,
242+ } ,
243+ )
244+ } ,
245+ )
246+
190247 return cmd
191248}
0 commit comments