SDK Methods

The { Mobula } class provides several methods to interact with the Mobula API.

Here’s a list of available methods:

  1. searchCryptoByName(options: { name?: string; requestOptions?: RequestOptions; })

    Search for crypto data by name or symbol. Supports partial name/symbol matching.

  2. fetchWalletNFTs(options: { wallet?: string; force?: boolean; blockchains?: string; requestOptions?: RequestOptions; })

    Retrieve NFTs associated with a given wallet. Optional parameters to force on-chain data fetch and specify blockchains.

  3. fetchAllCryptoDetails(options: { fields?: string; requestOptions?: RequestOptions; })

    Get detailed information of all cryptocurrencies. Allows specifying additional fields to be included in the response.

  4. fetchAssetMarketData(options: { asset: string; blockchain?: string; symbol?: string; requestOptions?: RequestOptions; })

    Fetch market data for a specific asset. Blockchain parameter is optional but required if asset is specified as a smart contract.

  5. fetchPairMarketData(options: { address: string; blockchain?: string; asset?: unknown; requestOptions?: RequestOptions; })

    Obtain market data for a specific pair identified by the smart-contract address. Optional parameters include blockchain and target asset.

  6. fetchPairsMarketData(options: { asset: string; blockchain?: string; offset?: number; requestOptions?: RequestOptions; })

    Retrieve market data for multiple pairs based on asset. Supports pagination through the offset parameter.

  7. fetchAssetMarketHistory(options: { asset: string; blockchain?: string; from?: number; to?: number; requestOptions?: RequestOptions; })

    Get historical market data for an asset. Parameters allow specifying time range and blockchain.

  8. fetchAssetTradeHistory(options: { asset: string; maxResults?: number; requestOptions?: RequestOptions; })

    Access trade history for a given asset. Optional maxResults parameter to limit the number of results.

  9. fetchAssetMetadata(options: { asset?: string; requestOptions?: RequestOptions; })

    Retrieve metadata for a specific asset. Asset parameter is optional.

  10. fetchWalletHistoryBalance(options: { wallet: string; from?: number; to?: number; blockchains?: string; requestOptions?: RequestOptions; })

    Retrieve historical balance information for a wallet. Allows filtering by time range and blockchain.

  11. fetchWalletTransactions(options: { wallet: string; from?: number; to?: number; asset?: string; blockchain?: string; limit?: number; offset?: number; order?: OrderEnum; requestOptions?: RequestOptions; })

    Fetch transaction history for a wallet. Supports various filters like asset, blockchain, and time range.

  12. fetchMultipleAssetMarketData(options: { assets: string; blockchains?: symbol?: string; string; requestOptions?: RequestOptions; })

    Retrieve market data for multiple assets simultaneously. Supports specifying a list of assets and blockchains.

  13. fetchWalletHoldings(options: { wallet: string; blockchains?: string; cache?: boolean; stale?: number; requestOptions?: RequestOptions; })

    Query current holdings in a specified wallet, with options for caching and stale data handling.