Skip to content

Commit

Permalink
GITBOOK-168: change request with no subject merged in GitBook
Browse files Browse the repository at this point in the history
  • Loading branch information
aw126 authored and gitbook-bot committed Oct 25, 2023
1 parent 14cdeac commit d899289
Showing 1 changed file with 68 additions and 59 deletions.
127 changes: 68 additions & 59 deletions for-dapp-developers/useful-projects-on-cronos/moralis.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,48 @@

## **Introduction**

Moralis helps leading cryptocurrency and blockchain companies like MetaMask, Blockchain.com and Opera Crypto Wallet to grow and innovate faster with high quality, insightful data tools on Cronos, and on all other major EVM chains. By using Moralis, your team can focus on growing your product and your business while minimizing the time and money you spend on data infrastructure.
Moralis helps leading cryptocurrency and blockchain companies to grow and innovate faster with high-quality and insightful data tools on Cronos and other major EVM chains. By using Moralis, you can focus on growing your product and your business while minimizing the time and money you spend on data infrastructure.

Moralis offers APIs and real-time data Streams for NFT data, token data, wallet data, raw blockchain data, as well as market insights and discovery data.
Moralis offers APIs and real-time data Streams for NFT data, token data, wallet data, raw blockchain data, as well as market insights and discovery data.

## Getting Started

In order to use any of the Moralis APIs, you need to [register](https://admin.moralis.io/register?utm_source=cronos-docs) for a free Moralis account and get your API key.
In order to use any of the Moralis APIs, you need to [register](https://admin.moralis.io/register?utm\_source=cronos-docs) for a free Moralis account and get your API key.

You will find your API key under your account settings.


## Moralis APIs

Below you'll find details about the different APIs that Moralis offers and some examples of the endpoints available.

### NFT API

The Moralis [NFT API](https://moralis.io/api/nft/) can be used to quickly build NFT functionality in your wallet, portfolio application or to spin up an NFT marketplace. You can use it to fetch NFTs owned by particular wallets, or get NFT transfers and sales, or track prices of recent NFT sales.

The NFT API automatically indexes all NFTs and metadata across all available chains.
The NFT API automatically indexes all NFTs and metadata across all available chains.

#### Endpoints
- [Get Multiple NFTs](https://docs.moralis.io/web3-data-api/evm/reference/get-multiple-nfts)
- [Get NFTs by Wallet](https://docs.moralis.io/web3-data-api/evm/reference/get-wallet-nfts)
- [Get NFTs by Contract](https://docs.moralis.io/web3-data-api/evm/reference/get-contract-nfts)
- [Get NFT Metadata](https://docs.moralis.io/web3-data-api/evm/reference/get-nft-metadata)
- [Get NFT Transfers by Wallet](https://docs.moralis.io/web3-data-api/evm/reference/get-wallet-nft-transfers)
- [Get NFT Transfers by Contract](https://docs.moralis.io/web3-data-api/evm/reference/get-nft-contract-transfers)
- [Get NFT Transfers in a block](https://docs.moralis.io/web3-data-api/evm/reference/get-nft-transfers-by-block)
- [Get NFT Transfers in a block range](https://docs.moralis.io/web3-data-api/evm/reference/get-nft-transfers-from-to-block)
- [Get NFT Transfer by Token ID](https://docs.moralis.io/web3-data-api/evm/reference/get-nft-transfers)
- [Get NFT Collections by Wallet](https://docs.moralis.io/web3-data-api/evm/reference/get-wallet-nft-collections)
- [Get NFT Collection Metadata](https://docs.moralis.io/web3-data-api/evm/reference/get-nft-contract-metadata)
- [Get NFT Owners by Contract](https://docs.moralis.io/web3-data-api/evm/reference/get-nft-owners)
- [Get NFT Owners by Token ID](https://docs.moralis.io/web3-data-api/evm/reference/get-nft-token-id-owners)
- [Get NFT Trades by Marketplace](https://docs.moralis.io/web3-data-api/evm/reference/get-nft-trades)
- [Get NFT Lowest Price](https://docs.moralis.io/web3-data-api/evm/reference/get-nft-lowest-price)
- [Get NFT Stats](https://docs.moralis.io/web3-data-api/evm/reference/get-nft-token-stats)
- [Get NFT Collection Stats](https://docs.moralis.io/web3-data-api/evm/reference/get-nft-collection-stats)

* [Get Multiple NFTs](https://docs.moralis.io/web3-data-api/evm/reference/get-multiple-nfts)
* [Get NFTs by Wallet](https://docs.moralis.io/web3-data-api/evm/reference/get-wallet-nfts)
* [Get NFTs by Contract](https://docs.moralis.io/web3-data-api/evm/reference/get-contract-nfts)
* [Get NFT Metadata](https://docs.moralis.io/web3-data-api/evm/reference/get-nft-metadata)
* [Get NFT Transfers by Wallet](https://docs.moralis.io/web3-data-api/evm/reference/get-wallet-nft-transfers)
* [Get NFT Transfers by Contract](https://docs.moralis.io/web3-data-api/evm/reference/get-nft-contract-transfers)
* [Get NFT Transfers in a block](https://docs.moralis.io/web3-data-api/evm/reference/get-nft-transfers-by-block)
* [Get NFT Transfers in a block range](https://docs.moralis.io/web3-data-api/evm/reference/get-nft-transfers-from-to-block)
* [Get NFT Transfer by Token ID](https://docs.moralis.io/web3-data-api/evm/reference/get-nft-transfers)
* [Get NFT Collections by Wallet](https://docs.moralis.io/web3-data-api/evm/reference/get-wallet-nft-collections)
* [Get NFT Collection Metadata](https://docs.moralis.io/web3-data-api/evm/reference/get-nft-contract-metadata)
* [Get NFT Owners by Contract](https://docs.moralis.io/web3-data-api/evm/reference/get-nft-owners)
* [Get NFT Owners by Token ID](https://docs.moralis.io/web3-data-api/evm/reference/get-nft-token-id-owners)
* [Get NFT Trades by Marketplace](https://docs.moralis.io/web3-data-api/evm/reference/get-nft-trades)
* [Get NFT Lowest Price](https://docs.moralis.io/web3-data-api/evm/reference/get-nft-lowest-price)
* [Get NFT Stats](https://docs.moralis.io/web3-data-api/evm/reference/get-nft-token-stats)
* [Get NFT Collection Stats](https://docs.moralis.io/web3-data-api/evm/reference/get-nft-collection-stats)

#### Example call

Below is an example where we call the Get NFTs by Wallet endpoint ( `{wallet_address}/nft`) with the Moralis JS SDK.

```js
Expand All @@ -52,6 +54,7 @@ Below is an example where we call the Get NFTs by Wallet endpoint ( `{wallet_add
"address": "0x1f9090aaE28b8a3dCeaDf281B0F12828e676c326"
});
```

```json
{
"page": 1,
Expand Down Expand Up @@ -156,23 +159,26 @@ Below is an example where we call the Get NFTs by Wallet endpoint ( `{wallet_add
```

### Token API
The Moralis [Token API](https://moralis.io/api/token/?utm_source=cronos-docs) has all the information you need about ERC20 tokens, including ownership, transfers and token prices. Use it to add ERC20 support in your wallet or enrich your token pages with in-depth token metadata.

The Moralis [Token API](https://moralis.io/api/token/?utm\_source=cronos-docs) has all the information you need about ERC20 tokens, including ownership, transfers and token prices. Use it to add ERC20 support in your wallet or enrich your token pages with in-depth token metadata.

The Token API includes token logos and spam detection.

#### Endpoints
- [Get ERC20 Token Balance By Wallet](https://docs.moralis.io/web3-data-api/evm/reference/get-token-balances-by-wallet)
- [Get ERC20 Metadata by Contract](https://docs.moralis.io/web3-data-api/evm/reference/get-token-metadata)
- [Get ERC20 Metadata by Symbol](https://docs.moralis.io/web3-data-api/evm/reference/get-token-metadata-by-symbol)
- [Get ERC20 Token Prices](https://docs.moralis.io/web3-data-api/evm/reference/get-multiple-token-prices)
- [Get ERC20 Token Allowance](https://docs.moralis.io/web3-data-api/evm/reference/get-token-allowance)
- [Get ERC20 Token Transfers By Wallet](https://docs.moralis.io/web3-data-api/evm/reference/get-wallet-token-transfers)
- [Get ERC20 Token Transfers By Contract](https://docs.moralis.io/web3-data-api/evm/reference/get-token-transfers)
- [Get DEX Token Pair Reserves](https://docs.moralis.io/web3-data-api/evm/reference/get-pair-reserves)
- [Get DEX Token Pair Address](https://docs.moralis.io/web3-data-api/evm/reference/get-pair-address)
- [Get ERC20 Token Stats](https://docs.moralis.io/web3-data-api/evm/reference/get-token-stats)

* [Get ERC20 Token Balance By Wallet](https://docs.moralis.io/web3-data-api/evm/reference/get-token-balances-by-wallet)
* [Get ERC20 Metadata by Contract](https://docs.moralis.io/web3-data-api/evm/reference/get-token-metadata)
* [Get ERC20 Metadata by Symbol](https://docs.moralis.io/web3-data-api/evm/reference/get-token-metadata-by-symbol)
* [Get ERC20 Token Prices](https://docs.moralis.io/web3-data-api/evm/reference/get-multiple-token-prices)
* [Get ERC20 Token Allowance](https://docs.moralis.io/web3-data-api/evm/reference/get-token-allowance)
* [Get ERC20 Token Transfers By Wallet](https://docs.moralis.io/web3-data-api/evm/reference/get-wallet-token-transfers)
* [Get ERC20 Token Transfers By Contract](https://docs.moralis.io/web3-data-api/evm/reference/get-token-transfers)
* [Get DEX Token Pair Reserves](https://docs.moralis.io/web3-data-api/evm/reference/get-pair-reserves)
* [Get DEX Token Pair Address](https://docs.moralis.io/web3-data-api/evm/reference/get-pair-address)
* [Get ERC20 Token Stats](https://docs.moralis.io/web3-data-api/evm/reference/get-token-stats)

#### Example call

```js
const response = await Moralis.EvmApi.token.getWalletTokenBalances({
"chain": "0x1",
Expand All @@ -195,15 +201,18 @@ The Token API includes token logos and spam detection.
```

### Market Data API
The Moralis [Market Data API](https://moralis.io/api/market-data/?utm_source=cronos-docs) helps you retrieve top coins and NFT collection based on market cap and trading volume. You can use it to build market discovery pages, coin listing pages or displaying winners and losers.

The Moralis [Market Data API](https://moralis.io/api/market-data/?utm\_source=cronos-docs) helps you retrieve top coins and NFT collection based on market cap and trading volume. You can use it to build market discovery pages, coin listing pages or displaying winners and losers.

#### Endpoints
- [Get the top ERC20 tokens by market cap](https://docs.moralis.io/web3-data-api/evm/reference/get-top-erc20-tokens-by-market-cap)
- [Get the top ERC20 tokens by price change](https://docs.moralis.io/web3-data-api/evm/reference/get-top-erc20-tokens-by-price-movers)
- [Get the top NFT collections by market cap](https://docs.moralis.io/web3-data-api/evm/reference/get-top-nft-collections-by-market-cap)
- [Get the top NFT collections by trading volume](https://docs.moralis.io/web3-data-api/evm/reference/get-top-nft-collections-by-trading-volume)

* [Get the top ERC20 tokens by market cap](https://docs.moralis.io/web3-data-api/evm/reference/get-top-erc20-tokens-by-market-cap)
* [Get the top ERC20 tokens by price change](https://docs.moralis.io/web3-data-api/evm/reference/get-top-erc20-tokens-by-price-movers)
* [Get the top NFT collections by market cap](https://docs.moralis.io/web3-data-api/evm/reference/get-top-nft-collections-by-market-cap)
* [Get the top NFT collections by trading volume](https://docs.moralis.io/web3-data-api/evm/reference/get-top-nft-collections-by-trading-volume)

#### Example call

```js
const response = await Moralis.EvmApi.marketData.getTopERC20TokensByMarketCap({});
```
Expand All @@ -226,23 +235,24 @@ const response = await Moralis.EvmApi.marketData.getTopERC20TokensByMarketCap({}
```

### Blockchain API
Using the Moralis [Blockchain API](https://moralis.io/api/block/?utm_source=cronos-docs) you can fetch basic data about blocks, transactions, logs and events. The Blockchain API also supports transaction decoding, which automtically decodes the transaction logs for you, without submitting any ABIs.

#### Endpoints
- [Get Block by Block number or Block Hash](https://docs.moralis.io/web3-data-api/evm/reference/get-block)
- [Get Block by Date](https://docs.moralis.io/web3-data-api/evm/reference/get-date-to-block)
- [Get Transaction by Transaction Hash](https://docs.moralis.io/web3-data-api/evm/reference/get-transaction)
- [Get Native Transactions by Wallet](https://docs.moralis.io/web3-data-api/evm/reference/get-wallet-transactions)
- [Get Decoded Transactions by Transaction Hash](https://docs.moralis.io/web3-data-api/evm/reference/get-decoded-transaction)
- [Get Decoded Transactions by Wallet](https://docs.moralis.io/web3-data-api/evm/reference/get-decoded-wallet-transaction)
- [Get Internal Transactions by Transaction Hash](https://docs.moralis.io/web3-data-api/evm/reference/get-internal-transactions)
- [Get Logs by Contract](https://docs.moralis.io/web3-data-api/evm/reference/get-contract-logs)
- [Get Events by Contract](https://docs.moralis.io/web3-data-api/evm/reference/get-contract-events)
- [Get Block Stats](https://docs.moralis.io/web3-data-api/evm/reference/get-block-stats)
Using the Moralis [Blockchain API](https://moralis.io/api/block/?utm\_source=cronos-docs) you can fetch basic data about blocks, transactions, logs and events. The Blockchain API also supports transaction decoding, which automtically decodes the transaction logs for you, without submitting any ABIs.

#### Endpoints

* [Get Block by Block number or Block Hash](https://docs.moralis.io/web3-data-api/evm/reference/get-block)
* [Get Block by Date](https://docs.moralis.io/web3-data-api/evm/reference/get-date-to-block)
* [Get Transaction by Transaction Hash](https://docs.moralis.io/web3-data-api/evm/reference/get-transaction)
* [Get Native Transactions by Wallet](https://docs.moralis.io/web3-data-api/evm/reference/get-wallet-transactions)
* [Get Decoded Transactions by Transaction Hash](https://docs.moralis.io/web3-data-api/evm/reference/get-decoded-transaction)
* [Get Decoded Transactions by Wallet](https://docs.moralis.io/web3-data-api/evm/reference/get-decoded-wallet-transaction)
* [Get Internal Transactions by Transaction Hash](https://docs.moralis.io/web3-data-api/evm/reference/get-internal-transactions)
* [Get Logs by Contract](https://docs.moralis.io/web3-data-api/evm/reference/get-contract-logs)
* [Get Events by Contract](https://docs.moralis.io/web3-data-api/evm/reference/get-contract-events)
* [Get Block Stats](https://docs.moralis.io/web3-data-api/evm/reference/get-block-stats)

#### Example call

```js
const response = await Moralis.EvmApi.transaction.getTransactionVerbose({
"chain": "0x1",
Expand Down Expand Up @@ -322,20 +332,19 @@ Using the Moralis [Blockchain API](https://moralis.io/api/block/?utm_source=cron
}
```


## Moralis Streams
[Moralis Streams](https://moralis.io/streams/?utm_source=cronos-docs) is an API for real-time blockchain data, sent over webhooks. Using Streams you can avoid polling of other APIs and instead only be notified when something has actually happened. You can configure the Stream to notify you only when specific things happen on-chain, like transactions, transfers, mints, or any other custom event. Streams support custom events and customer filters.

[Moralis Streams](https://moralis.io/streams/?utm\_source=cronos-docs) is an API for real-time blockchain data, sent over webhooks. Using Streams you can avoid polling of other APIs and instead only be notified when something has actually happened. You can configure the Stream to notify you only when specific things happen on-chain, like transactions, transfers, mints, or any other custom event. Streams support custom events and customer filters.

Streams can be created either in the [Streams User Interface](https://admin.moralis.io/streams) once you're signed into the Moralis Admin Panel, or through the [API](https://docs.moralis.io/streams-api/evm).

### Moralis Streams Guides
- [How to listen to all ERC20 transfers over certain amount sent by specific address](https://docs.moralis.io/streams-api/evm/how-to-listen-to-all-erc20-contract-transfers-over-certain-amount-sent-by-specific-address)
- [How to listen all NFT transfers](https://docs.moralis.io/streams-api/evm/how-to-listen-all-nft-transfers)
- [How to monitor ENS Domain Registrations](https://docs.moralis.io/streams-api/evm/how-to-monitor-ens-domain-registrations)
- [How to monitor for ERC20 token burns or mints](https://docs.moralis.io/streams-api/evm/how-to-monitor-for-erc20-token-burns-or-mints)
- [How to Monitor Crypto Wallet Addresses with Streams](https://www.youtube.com/watch?v=pnmVhxdUBao)


* [How to listen to all ERC20 transfers over certain amount sent by specific address](https://docs.moralis.io/streams-api/evm/how-to-listen-to-all-erc20-contract-transfers-over-certain-amount-sent-by-specific-address)
* [How to listen all NFT transfers](https://docs.moralis.io/streams-api/evm/how-to-listen-all-nft-transfers)
* [How to monitor ENS Domain Registrations](https://docs.moralis.io/streams-api/evm/how-to-monitor-ens-domain-registrations)
* [How to monitor for ERC20 token burns or mints](https://docs.moralis.io/streams-api/evm/how-to-monitor-for-erc20-token-burns-or-mints)
* [How to Monitor Crypto Wallet Addresses with Streams](https://www.youtube.com/watch?v=pnmVhxdUBao)

## **Other Resources**

Expand All @@ -345,4 +354,4 @@ Here are additional resources to help you get started with the Moralis:
* [Moralis Account Login](https://admin.moralis.io/login)
* [Moralis Tutorials](https://www.youtube.com/@MoralisWeb3)
* [Tutorial: Build a DEX with Moralis](https://www.youtube.com/watch?v=t8U7GRrlYW8)
* [Tutorial: Get Any Token Price with Moralis](https://www.youtube.com/watch?v=laDsODyofVU)
* [Tutorial: Get Any Token Price with Moralis](https://www.youtube.com/watch?v=laDsODyofVU)

0 comments on commit d899289

Please sign in to comment.