diff --git a/docs/01-web3-data-api/evm/resources/pricing-plans.md b/docs/01-web3-data-api/evm/resources/pricing-plans.md index a5742fc1..d4ac88f7 100644 --- a/docs/01-web3-data-api/evm/resources/pricing-plans.md +++ b/docs/01-web3-data-api/evm/resources/pricing-plans.md @@ -20,28 +20,33 @@ For an in-depth understanding of Moralis's compute unit costs per method, chain, Note that all paid plans are billed annually. ::: -* **Starter:** Free to get started -* **Pro:** $49 per month -* **Business:** $249 per month -* **Enterprise:** individual prices +- **Starter:** Free to get started +- **Pro:** $49 per month +- **Business:** $249 per month +- **Enterprise:** individual prices The following table summarize the key features and support options available in each Moralis pricing plan: ### Moralis API -| Feature | STARTER | PRO | BUSINESS | ENTERPRISE | -|-------------------------|---------------|-------------|-----------------|-----------------| -| Throughput | 150 CU/s | 150 CU/s | 300 CU/s | 300+ CU/s | -| Daily Compute Units | 4000 per day | Unlimited | Unlimited | Unlimited | -| Monthly Compute Units | Not applied daily | 10,000,000 per month | 35,000,000 per month | 50,000,000+ per month | -| Premium endpoints | Not included | Included | Included | Included | -| Number of Retries if Webhook Delivery Fails | 0 | 1 | 5 | Custom | -| 100% Delivery Guarantee | No | No | No | Yes | -| Specific Chains Allowed to be Streamed | All Chains| All Chains| All Chains | All Chains | -| Internal Transactions Allowed | Yes | Yes | Yes | Yes | -| Forum, Discord, Online Tutorials | Yes | Yes | Yes | Yes | -| Senior Account Manager | No | No | Yes | Yes | -| Service Level Agreement | No | No | No | Yes | -| Technical Account Manager | No | No | No | Yes | -| Premium Onboarding | No | No | No | Yes | -| Dedicated Live Support Channel | No | No | No | Yes | +| Feature | STARTER | PRO | BUSINESS | ENTERPRISE | +| ------------------------------------------- | ----------------- | --------------------- | --------------------- | -------------- | +| Throughput | 1500 CU/s | 1500 CU/s | 3000 CU/s | 3000+ CU/s | +| Daily Compute Units | 40000 per day | Unlimited | Unlimited | Unlimited | +| Monthly Compute Units | Not applied daily | 100,000,000 per month | 350,000,000 per month | Custom | +| API Maximum Payload Size | 100 | 100 | 300 | 5000+ | +| NFT Metadata Refresh | No | Yes | Priority Queue | First Priority | +| Number of nodes | 2 | 5 | Unlimited | Unlimited | +| RPC Node Throughput (CU/s) | 100 CU/s | 100 CU/s | 300 CU/s | 300+ CU/s | +| Premium endpoints | Not included | Included | Included | Included | +| Number of Retries if Webhook Delivery Fails | 0 | 2 | 5 | Custom | +| Failed payload retention time | No | 6 hours | 1 week | Custom | +| 100% Delivery Guarantee | No | No | No | Yes | +| Specific Chains Allowed to be Streamed | All Chains | All Chains | All Chains | All Chains | +| Internal Transactions Allowed | Yes | Yes | Yes | Yes | +| Forum, Discord, Online Tutorials | Yes | Yes | Yes | Yes | +| Senior Account Manager | No | No | Yes | Yes | +| Service Level Agreement | No | No | No | Yes | +| Technical Account Manager | No | No | No | Yes | +| Premium Onboarding | No | No | No | Yes | +| Dedicated Live Support Channel | No | No | No | Yes | diff --git a/docs/01-web3-data-api/evm/resources/supported-dexs.md b/docs/01-web3-data-api/evm/resources/supported-dexs.md index 0eeeaa48..0b728ac8 100644 --- a/docs/01-web3-data-api/evm/resources/supported-dexs.md +++ b/docs/01-web3-data-api/evm/resources/supported-dexs.md @@ -17,14 +17,15 @@ The following tables show you how to find a list of supported chains on the [Mor Simply click on a chain's name to jump to its respective section for more details: -* [Ethereum](#ethereum) -* [Polygon](#polygon) -* [Binance Smart Chain (BSC)](#binance-smart-chain-bsc) -* [Avalanche](#avalanche) -* [Fantom Opera](#fantom-opera) -* [Cronos](#cronos) -* [Arbitrum](#arbitrum) -* [Base](#base) +- [Ethereum](#ethereum) +- [Polygon](#polygon) +- [Binance Smart Chain (BSC)](#binance-smart-chain-bsc) +- [Avalanche](#avalanche) +- [Fantom Opera](#fantom-opera) +- [Cronos](#cronos) +- [Arbitrum](#arbitrum) +- [Base](#base) +- [Linea](#linea) :::note If you do not specify a particular `exchange`, our API takes a comprehensive approach. It checks various exchanges one by one, ensuring that it finds the price you need. It does this while being smart about avoiding exchanges or pairs with low liquidity, guaranteeing you get reliable and accurate results for your queries. @@ -32,83 +33,88 @@ If you do not specify a particular `exchange`, our API takes a comprehensive app ### Ethereum -| Supported DEX(s) | Query Parameter Value | -| -------------------- | -------------------- | -| [Uniswap v3](https://app.uniswap.org/) | uniswapv3 | -| [Uniswap v2](https://uniswap.org/) | uniswapv2 | -| [Sushiswap v2](https://sushi.com/) | sushiswapv2 | +| Supported DEX(s) | Query Parameter Value | +| -------------------------------------- | --------------------- | +| [Uniswap v3](https://app.uniswap.org/) | uniswapv3 | +| [Uniswap v2](https://uniswap.org/) | uniswapv2 | +| [Sushiswap v2](https://sushi.com/) | sushiswapv2 | ### Polygon -| Supported DEX(s) |Query Parameter Value| -| -------------------- | --------------------| -| [Quickswap v2](https://quickswap.exchange/) |quickswapv2| -| [Uniswap v3](https://app.uniswap.org/) | uniswapv3 | -| [Uniswap v2](https://uniswap.org/) |uniswapv2 | -| [MM Finance](https://mm.finance/) |mm finance| +| Supported DEX(s) | Query Parameter Value | +| ------------------------------------------- | --------------------- | +| [Quickswap v2](https://quickswap.exchange/) | quickswapv2 | +| [Uniswap v3](https://app.uniswap.org/) | uniswapv3 | +| [Uniswap v2](https://uniswap.org/) | uniswapv2 | +| [MM Finance](https://mm.finance/) | mm finance | ### Binance Smart Chain (BSC) -| Supported DEX(s) |Query Parameter Value| -| -------------------- | --------------------| -| [PancakeSwap v2](https://pancakeswap.finance/) |pancakeswapv2| -| [PancakeSwap v3](https://pancakeswap.finance/v3) |pancakeswapv3| -| [PancakeSwap v1](https://pancakeswap.finance/v1) |pancakeswapv1| -| [Uniswap v3](https://app.uniswap.org/) |uniswapv3| +| Supported DEX(s) | Query Parameter Value | +| ------------------------------------------------ | --------------------- | +| [PancakeSwap v2](https://pancakeswap.finance/) | pancakeswapv2 | +| [PancakeSwap v3](https://pancakeswap.finance/v3) | pancakeswapv3 | +| [PancakeSwap v1](https://pancakeswap.finance/v1) | pancakeswapv1 | +| [Uniswap v3](https://app.uniswap.org/) | uniswapv3 | ### Avalanche -| Supported DEX(s) |Query Parameter Value| -| -------------------- |--------------------| -| [TraderJoe](https://www.traderjoexyz.com/) |traderjoe| -| [Pangolin](https://pangolin.exchange/) |pangolin| +| Supported DEX(s) | Query Parameter Value | +| ------------------------------------------ | --------------------- | +| [TraderJoe](https://www.traderjoexyz.com/) | traderjoe | +| [Pangolin](https://pangolin.exchange/) | pangolin | ### Fantom Opera -| Supported DEX(s) |Query Parameter Value| -| -------------------- |--------------------| -| [SpookySwap](https://spookyswap.finance/) |spookyswap| +| Supported DEX(s) | Query Parameter Value | +| ----------------------------------------- | --------------------- | +| [SpookySwap](https://spookyswap.finance/) | spookyswap | ### Cronos -| Supported DEX(s) |Query Parameter Value| -| -------------------- |--------------------| -| [VVS Finance](https://vvs.finance/) |vvs| -| [MM Finance](https://mm.finance/) |mm finance| -| [Crodex](https://crodex.exchange/) |crodex| +| Supported DEX(s) | Query Parameter Value | +| ----------------------------------- | --------------------- | +| [VVS Finance](https://vvs.finance/) | vvs | +| [MM Finance](https://mm.finance/) | mm finance | +| [Crodex](https://crodex.exchange/) | crodex | ### Arbitrum -| Supported DEX(s) |Query Parameter Value| -| -------------------- |--------------------| -| [Uniswap v3](https://app.uniswap.org/) |uniswapv3| -| [Camelot V2](https://www.camelotsix.com/) |camelotv2| +| Supported DEX(s) | Query Parameter Value | +| ----------------------------------------- | --------------------- | +| [Uniswap v3](https://app.uniswap.org/) | uniswapv3 | +| [Camelot V2](https://www.camelotsix.com/) | camelotv2 | ### Optimism -| Supported DEX(s) |Query Parameter Value| -| -------------------- |--------------------| -| [Uniswap v3](https://app.uniswap.org/) |uniswapv3| - +| Supported DEX(s) | Query Parameter Value | +| -------------------------------------- | --------------------- | +| [Uniswap v3](https://app.uniswap.org/) | uniswapv3 | ### Base -| Supported DEX(s) | Query Parameter Value | -| -------------------- | -------------------- | -| [Uniswap v3](https://app.uniswap.org/) | uniswapv3 | -| [Sharkswap](https://www.sharkswap.finance/swap) | sharkswap | -| [Aerodrome](https://aerodrome.finance) | aerodrome | -| [Baseswap](https://baseswap.fi) | baseswap | -| [PancakeSwap](https://pancakeswap.finance/) | pancakeswap | -| [Sushiswap](https://sushi.com/) | sushiswap | +| Supported DEX(s) | Query Parameter Value | +| ----------------------------------------------- | --------------------- | +| [Uniswap v3](https://app.uniswap.org/) | uniswapv3 | +| [Sharkswap](https://www.sharkswap.finance/swap) | sharkswap | +| [Aerodrome](https://aerodrome.finance) | aerodrome | +| [Baseswap](https://baseswap.fi) | baseswap | +| [PancakeSwap](https://pancakeswap.finance/) | pancakeswap | +| [Sushiswap](https://sushi.com/) | sushiswap | + +### Linea +| Supported DEX(s) | Query Parameter Value | +| ------------------------------------------------ | --------------------- | +| [PancakeSwap v3](https://pancakeswap.finance/v3) | pancakeswapv3 | +| [Nile](https://www.thenile.exchange/swap) | nile | ## Endpoints DEXs integration The table shows the list of endpoints that are integrated with the supported DEXs: -| No. | Method | Description | API Reference | URL | -|-----|------------------------------------------|----------------------------|---------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------| -| 1 | `getTokenPrice` | Get ERC20 token price | [Method Documentation](/web3-data-api/evm/reference/get-token-price) | [https://deep-index.moralis.io/api/v2.2/erc20/:address/price](https://deep-index.moralis.io/api/v2.2/erc20/:address/price) | -| 2 | `getMultipleTokenPrices` | Get multiple token prices | [Method Documentation](/web3-data-api/evm/reference/get-multiple-token-prices) | [https://deep-index.moralis.io/api/v2.2/erc20/prices](https://deep-index.moralis.io/api/v2.2/erc20/prices) -| 3 | `getPairAddress` | Get DEX token pair address | [Method Documentation](/web3-data-api/evm/reference/get-pair-address) | [https://deep-index.moralis.io/api/v2.2/:token0_address/:token1_address/pairAddress](https://deep-index.moralis.io/api/v2.2/:token0_address/:token1_address/pairAddress) +| No. | Method | Description | API Reference | URL | +| --- | ------------------------ | -------------------------- | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| 1 | `getTokenPrice` | Get ERC20 token price | [Method Documentation](/web3-data-api/evm/reference/get-token-price) | [https://deep-index.moralis.io/api/v2.2/erc20/:address/price](https://deep-index.moralis.io/api/v2.2/erc20/:address/price) | +| 2 | `getMultipleTokenPrices` | Get multiple token prices | [Method Documentation](/web3-data-api/evm/reference/get-multiple-token-prices) | [https://deep-index.moralis.io/api/v2.2/erc20/prices](https://deep-index.moralis.io/api/v2.2/erc20/prices) | +| 3 | `getPairAddress` | Get DEX token pair address | [Method Documentation](/web3-data-api/evm/reference/get-pair-address) | [https://deep-index.moralis.io/api/v2.2/:token0_address/:token1_address/pairAddress](https://deep-index.moralis.io/api/v2.2/:token0_address/:token1_address/pairAddress) | diff --git a/docs/configs/api-reference/configs.json b/docs/configs/api-reference/configs.json index 6b370a52..3ee7d21a 100644 --- a/docs/configs/api-reference/configs.json +++ b/docs/configs/api-reference/configs.json @@ -1,49284 +1,50595 @@ { - "market-data": { - "getTopCryptoCurrenciesByTradingVolume": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get top Crypto Currencies tokens by trading volume", - "description": "Get the top Crypto Currencies by trading volume", - "method": "GET", - "path": "/market-data/global/volume", - "pathParams": [], - "queryParams": [], - "responses": [ - { - "status": "200", - "description": "Returns the top Crypto Currencies by trading volume", - "body": { - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "symbol", - "type": "string", - "example": "ETH", - "description": "The token symbol", - "required": true - }, + "market-data": { + "getTopCryptoCurrenciesByTradingVolume": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get top Crypto Currencies tokens by trading volume", + "description": "Get the top Crypto Currencies by trading volume", + "method": "GET", + "path": "/market-data/global/volume", + "pathParams": [], + "queryParams": [], + "responses": [ + { + "status": "200", + "description": "Returns the top Crypto Currencies by trading volume", + "body": { + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "symbol", + "type": "string", + "example": "ETH", + "description": "The token symbol", + "required": true + }, + { + "name": "name", + "type": "string", + "example": "Ethereum", + "description": "The token name", + "required": true + }, + { + "name": "logo", + "type": "string", + "example": "https://assets.coingecko.com/coins/images/279/large/ethereum.png?1595348880", + "description": "The token logo", + "required": true + }, + { + "name": "circulating_supply", + "type": "string", + "example": "0.0", + "description": "The circulating supply", + "required": true + }, + { + "name": "total_supply", + "type": "string", + "example": "0.0", + "description": "The total supply", + "required": true + }, + { + "name": "max_supply", + "type": "string", + "example": "0.0", + "description": "The max supply", + "required": true + }, + { + "name": "market_cap_usd", + "type": "string", + "example": "0.0", + "description": "The market cap in USD", + "required": true + }, + { + "name": "market_cap_rank", + "type": "string", + "example": "0.0", + "description": "The market cap rank", + "required": true + }, + { + "name": "market_cap_24hr_change", + "type": "string", + "example": "0.0285", + "description": "The market cap change in the last 24h", + "required": true + }, + { + "name": "market_cap_24hr_percent_change", + "type": "string", + "example": "0.0285", + "description": "The market cap percent change in the last 24h", + "required": true + }, + { + "name": "total_volume", + "type": "string", + "example": "0.0", + "description": "The total volume", + "required": true + }, + { + "name": "usd_price", + "type": "string", + "example": "0.0", + "description": "The price in USD", + "required": true + }, + { + "name": "usd_price_24hr_high", + "type": "string", + "example": "0.0", + "description": "The 24h high price in USD", + "required": true + }, + { + "name": "usd_price_24hr_low", + "type": "string", + "example": "0.0", + "description": "The 24h low price in USD", + "required": true + }, + { + "name": "usd_price_24hr_change", + "type": "string", + "example": "0.0", + "description": "The price change in the last 24h", + "required": true + }, + { + "name": "usd_price_24hr_percent_change", + "type": "string", + "example": "0.0", + "description": "The price percent change in the last 24h", + "required": true + }, + { + "name": "usd_price_ath", + "type": "string", + "example": "0.0", + "description": "The all time high price in USD", + "required": true + }, + { + "name": "ath_percent_change", + "type": "string", + "example": "0.0", + "description": "The all time high percent change", + "required": true + }, + { + "name": "ath_date", + "type": "string", + "example": "0.0", + "description": "The all time high date", + "required": true + }, + { + "name": "usd_price_1hr_percent_change", + "type": "string", + "example": "0.0", + "description": "The price change in the last 1h", + "required": true + }, + { + "name": "usd_price_7d_percent_change", + "type": "string", + "example": "0.0", + "description": "The price change in the last 7d", + "required": true + }, + { + "name": "usd_price_30d_percent_change", + "type": "string", + "example": "0.0", + "description": "The price change in the last 30d", + "required": true + } + ] + } + } + } + ], + "codeSamples": [ { - "name": "name", - "type": "string", - "example": "Ethereum", - "description": "The token name", - "required": true + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.marketData.getTopCryptoCurrenciesByTradingVolume({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" }, { - "name": "logo", - "type": "string", - "example": "https://assets.coingecko.com/coins/images/279/large/ethereum.png?1595348880", - "description": "The token logo", - "required": true - }, + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nresult = evm_api.market_data.get_top_crypto_currencies_by_trading_volume(\n api_key=api_key,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getTopCryptoCurrenciesByMarketCap": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get top Crypto Currencies tokens by market cap", + "description": "Get the top Crypto Currencies by market cap", + "method": "GET", + "path": "/market-data/global/market-cap", + "pathParams": [], + "queryParams": [], + "responses": [ + { + "status": "200", + "description": "Returns the top Crypto Currencies by market cap", + "body": { + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "symbol", + "type": "string", + "example": "ETH", + "description": "The token symbol", + "required": true + }, + { + "name": "name", + "type": "string", + "example": "Ethereum", + "description": "The token name", + "required": true + }, + { + "name": "logo", + "type": "string", + "example": "https://assets.coingecko.com/coins/images/279/large/ethereum.png?1595348880", + "description": "The token logo", + "required": true + }, + { + "name": "circulating_supply", + "type": "string", + "example": "0.0", + "description": "The circulating supply", + "required": true + }, + { + "name": "total_supply", + "type": "string", + "example": "0.0", + "description": "The total supply", + "required": true + }, + { + "name": "max_supply", + "type": "string", + "example": "0.0", + "description": "The max supply", + "required": true + }, + { + "name": "market_cap_usd", + "type": "string", + "example": "0.0", + "description": "The market cap in USD", + "required": true + }, + { + "name": "market_cap_rank", + "type": "string", + "example": "0.0", + "description": "The market cap rank", + "required": true + }, + { + "name": "market_cap_24hr_change", + "type": "string", + "example": "0.0285", + "description": "The market cap change in the last 24h", + "required": true + }, + { + "name": "market_cap_24hr_percent_change", + "type": "string", + "example": "0.0285", + "description": "The market cap percent change in the last 24h", + "required": true + }, + { + "name": "total_volume", + "type": "string", + "example": "0.0", + "description": "The total volume", + "required": true + }, + { + "name": "usd_price", + "type": "string", + "example": "0.0", + "description": "The price in USD", + "required": true + }, + { + "name": "usd_price_24hr_high", + "type": "string", + "example": "0.0", + "description": "The 24h high price in USD", + "required": true + }, + { + "name": "usd_price_24hr_low", + "type": "string", + "example": "0.0", + "description": "The 24h low price in USD", + "required": true + }, + { + "name": "usd_price_24hr_change", + "type": "string", + "example": "0.0", + "description": "The price change in the last 24h", + "required": true + }, + { + "name": "usd_price_24hr_percent_change", + "type": "string", + "example": "0.0", + "description": "The price percent change in the last 24h", + "required": true + }, + { + "name": "usd_price_ath", + "type": "string", + "example": "0.0", + "description": "The all time high price in USD", + "required": true + }, + { + "name": "ath_percent_change", + "type": "string", + "example": "0.0", + "description": "The all time high percent change", + "required": true + }, + { + "name": "ath_date", + "type": "string", + "example": "0.0", + "description": "The all time high date", + "required": true + }, + { + "name": "usd_price_1hr_percent_change", + "type": "string", + "example": "0.0", + "description": "The price change in the last 1h", + "required": true + }, + { + "name": "usd_price_7d_percent_change", + "type": "string", + "example": "0.0", + "description": "The price change in the last 7d", + "required": true + }, + { + "name": "usd_price_30d_percent_change", + "type": "string", + "example": "0.0", + "description": "The price change in the last 30d", + "required": true + } + ] + } + } + } + ], + "codeSamples": [ { - "name": "circulating_supply", - "type": "string", - "example": "0.0", - "description": "The circulating supply", - "required": true + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.marketData.getTopCryptoCurrenciesByMarketCap({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" }, { - "name": "total_supply", - "type": "string", - "example": "0.0", - "description": "The total supply", - "required": true - }, + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nresult = evm_api.market_data.get_top_crypto_currencies_by_market_cap(\n api_key=api_key,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getTopERC20TokensByMarketCap": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get top ERC20 tokens", + "description": "Get the top ERC20 tokens by market cap", + "method": "GET", + "path": "/market-data/erc20s/top-tokens", + "pathParams": [], + "queryParams": [], + "responses": [ + { + "status": "200", + "description": "Returns the top ERC20 tokens by market cap", + "body": { + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "rank", + "type": "string", + "example": "1", + "description": "The rank", + "required": true + }, + { + "name": "token_name", + "type": "string", + "example": "Wrapped Ether", + "description": "The token name", + "required": true + }, + { + "name": "token_symbol", + "type": "string", + "example": "WETH", + "description": "The token symbol", + "required": true + }, + { + "name": "token_logo", + "type": "string", + "example": "https://cdn.moralis.io/eth/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png", + "description": "The token logo", + "required": true + }, + { + "name": "token_decimals", + "type": "string", + "example": "18", + "description": "The token decimals", + "required": true + }, + { + "name": "contract_address", + "type": "string", + "example": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "description": "The contract address", + "required": true + }, + { + "name": "price_usd", + "type": "string", + "example": "0.0285", + "description": "he price in USD", + "required": true + }, + { + "name": "price_24h_percent_change", + "type": "string", + "example": "0.0285", + "description": "The price change in the last 24h", + "required": true + }, + { + "name": "price_7d_percent_change", + "type": "string", + "example": "0.0285", + "description": "The price change in the last 7d", + "required": true + }, + { + "name": "market_cap_usd", + "type": "string", + "example": "0.0285", + "description": "The market cap in USD", + "required": true + } + ] + } + } + } + ], + "codeSamples": [ { - "name": "max_supply", - "type": "string", - "example": "0.0", - "description": "The max supply", - "required": true + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.marketData.getTopERC20TokensByMarketCap({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" }, { - "name": "market_cap_usd", - "type": "string", - "example": "0.0", - "description": "The market cap in USD", - "required": true - }, - { - "name": "market_cap_rank", - "type": "string", - "example": "0.0", - "description": "The market cap rank", - "required": true - }, + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nresult = evm_api.market_data.get_top_erc20_tokens_by_market_cap(\n api_key=api_key,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getTopERC20TokensByPriceMovers": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get top ERC20 tokens", + "description": "Get the top ERC20 tokens by price change", + "method": "GET", + "path": "/market-data/erc20s/top-movers", + "pathParams": [], + "queryParams": [], + "responses": [ + { + "status": "200", + "description": "Returns an a list of ERC20 tokens with their price change", + "body": { + "type": "object", + "fields": [ + { + "name": "gainers", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "rank", + "type": "string", + "description": "The rank", + "example": "1", + "required": true + }, + { + "name": "token_name", + "type": "string", + "description": "The token name", + "example": "Wrapped Ether", + "required": true + }, + { + "name": "token_symbol", + "type": "string", + "description": "The token symbol", + "example": "WETH", + "required": true + }, + { + "name": "token_logo", + "type": "string", + "description": "The token image", + "example": "https://assets.coingecko.com/coins/images/2518/large/weth.png?1595348880", + "required": true + }, + { + "name": "token_decimals", + "type": "string", + "description": "The token decimals", + "example": "18", + "required": true + }, + { + "name": "contract_address", + "type": "string", + "description": "The contract address", + "example": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "required": true + }, + { + "name": "price_usd", + "type": "string", + "description": "The price in USD", + "example": "0.0285", + "required": true + }, + { + "name": "price_24h_percent_change", + "type": "string", + "description": "The price change in the last 24h", + "example": "0.0285", + "required": true + }, + { + "name": "price_7d_percent_change", + "type": "string", + "description": "The price change in the last 7d", + "example": "0.0285", + "required": true + }, + { + "name": "market_cap_usd", + "type": "string", + "description": "The market cap in USD", + "example": "0.0285", + "required": true + } + ] + } + }, + { + "name": "losers", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "rank", + "type": "string", + "description": "The rank", + "example": "1", + "required": true + }, + { + "name": "token_name", + "type": "string", + "description": "The token name", + "example": "Wrapped Ether", + "required": true + }, + { + "name": "token_symbol", + "type": "string", + "description": "The token symbol", + "example": "WETH", + "required": true + }, + { + "name": "token_logo", + "type": "string", + "description": "The token image", + "example": "https://assets.coingecko.com/coins/images/2518/large/weth.png?1595348880", + "required": true + }, + { + "name": "token_decimals", + "type": "string", + "description": "The token decimals", + "example": "18", + "required": true + }, + { + "name": "contract_address", + "type": "string", + "description": "The contract address", + "example": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "required": true + }, + { + "name": "price_usd", + "type": "string", + "description": "The price in USD", + "example": "0.0285", + "required": true + }, + { + "name": "price_24h_percent_change", + "type": "string", + "description": "The price change in the last 24h", + "example": "0.0285", + "required": true + }, + { + "name": "price_7d_percent_change", + "type": "string", + "description": "The price change in the last 7d", + "example": "0.0285", + "required": true + }, + { + "name": "market_cap_usd", + "type": "string", + "description": "The market cap in USD", + "example": "0.0285", + "required": true + } + ] + } + } + ] + } + } + ], + "codeSamples": [ { - "name": "market_cap_24hr_change", - "type": "string", - "example": "0.0285", - "description": "The market cap change in the last 24h", - "required": true + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.marketData.getTopERC20TokensByPriceMovers({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" }, { - "name": "market_cap_24hr_percent_change", - "type": "string", - "example": "0.0285", - "description": "The market cap percent change in the last 24h", - "required": true - }, + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nresult = evm_api.market_data.get_top_erc20_tokens_by_price_movers(\n api_key=api_key,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getTopNFTCollectionsByMarketCap": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get top NFT collections", + "description": "Get the top NFT collections by market cap", + "method": "GET", + "path": "/market-data/nfts/top-collections", + "pathParams": [], + "queryParams": [], + "responses": [ + { + "status": "200", + "description": "Returns the top NFT collections by market cap", + "body": { + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "rank", + "type": "number", + "example": 1, + "description": "The rank", + "required": true + }, + { + "name": "collection_title", + "type": "string", + "example": "CryptoPunks", + "description": "The collection title", + "required": true + }, + { + "name": "collection_image", + "type": "string", + "description": "The collection image", + "required": true + }, + { + "name": "floor_price_usd", + "type": "string", + "example": "0.0", + "description": "The floor price in USD", + "required": true + }, + { + "name": "floor_price_24hr_percent_change", + "type": "string", + "example": "0.0", + "description": "The floor price 24hr percent change", + "required": true + }, + { + "name": "market_cap_usd", + "type": "string", + "example": "0.0", + "description": "The market cap in USD", + "required": true + }, + { + "name": "market_cap_24hr_percent_change", + "type": "string", + "example": "0.0", + "description": "The market cap 24hr percent change", + "required": true + }, + { + "name": "volume_usd", + "type": "string", + "example": "0.0", + "description": "The volume in USD", + "required": true + }, + { + "name": "volume_24hr_percent_change", + "type": "string", + "example": "0.0", + "description": "The volume 24hr percent change", + "required": true + }, + { + "name": "collection_address", + "type": "string", + "example": "0x123", + "description": "The collection address", + "required": true + }, + { + "name": "floor_price", + "type": "string", + "example": "0.0", + "description": "The floor price", + "required": true + }, + { + "name": "floor_price_usd_24hr_percent_change", + "type": "string", + "example": "0.0", + "description": "The floor price 24hr percent change", + "required": true + } + ] + } + } + } + ], + "codeSamples": [ { - "name": "total_volume", - "type": "string", - "example": "0.0", - "description": "The total volume", - "required": true + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.marketData.getTopNFTCollectionsByMarketCap({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" }, { - "name": "usd_price", - "type": "string", - "example": "0.0", - "description": "The price in USD", - "required": true - }, + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nresult = evm_api.market_data.get_top_nft_collections_by_market_cap(\n api_key=api_key,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getHottestNFTCollectionsByTradingVolume": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get top NFT collections", + "description": "Get the top NFT collections by trading volume", + "method": "GET", + "path": "/market-data/nfts/hottest-collections", + "pathParams": [], + "queryParams": [], + "responses": [ + { + "status": "200", + "description": "Returns the top NFT collections by trading volume", + "body": { + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "rank", + "type": "number", + "example": 1, + "description": "The rank", + "required": true + }, + { + "name": "collection_title", + "type": "string", + "example": "CryptoPunks", + "description": "The collection title", + "required": true + }, + { + "name": "collection_image", + "type": "string", + "description": "The collection image", + "required": true + }, + { + "name": "floor_price_usd", + "type": "string", + "example": "0.0", + "description": "The floor price in USD", + "required": true + }, + { + "name": "floor_price_24hr_percent_change", + "type": "string", + "example": "0.0", + "description": "The floor price 24hr percent change", + "required": true + }, + { + "name": "volume_usd", + "type": "string", + "example": "0.0", + "description": "The volume in USD", + "required": true + }, + { + "name": "volume_24hr_percent_change", + "type": "string", + "example": "0.0", + "description": "The volume 24hr percent change", + "required": true + }, + { + "name": "The average price in USD", + "type": "string", + "example": "0.0", + "description": "The volume 24hr percent change", + "required": true + }, + { + "name": "collection_address", + "type": "string", + "example": "0x123", + "description": "The collection address", + "required": true + }, + { + "name": "average_price", + "type": "string", + "example": "0.0", + "description": "The average price", + "required": true + }, + { + "name": "floor_price", + "type": "string", + "example": "0.0", + "description": "The floor price", + "required": true + }, + { + "name": "floor_price_usd_24hr_percent_change", + "type": "string", + "example": "0.0", + "description": "The floor price 24hr percent change", + "required": true + }, + { + "name": "floor_price_7d_percent_change", + "type": "string", + "example": "0.0", + "description": "The floor price 7d percent change", + "required": true + }, + { + "name": "floor_price_usd_7d_percent_change", + "type": "string", + "example": "0.0", + "description": "The floor price 7d percent change", + "required": true + }, + { + "name": "floor_price_30d_percent_change", + "type": "string", + "example": "0.0", + "description": "The floor price 30d percent change", + "required": true + }, + { + "name": "floor_price_usd_30d_percent_change", + "type": "string", + "example": "0.0", + "description": "The floor price 30d percent change", + "required": true + } + ] + } + } + } + ], + "codeSamples": [ { - "name": "usd_price_24hr_high", - "type": "string", - "example": "0.0", - "description": "The 24h high price in USD", - "required": true + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.marketData.getHottestNFTCollectionsByTradingVolume({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" }, { - "name": "usd_price_24hr_low", - "type": "string", - "example": "0.0", - "description": "The 24h low price in USD", - "required": true - }, + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nresult = evm_api.market_data.get_hottest_nft_collections_by_trading_volume(\n api_key=api_key,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + } + }, + "wallet": { + "getWalletActiveChains": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "getWalletActiveChains", + "description": "Get the active chains for a wallet address.", + "method": "GET", + "path": "/wallets/:address/chains", + "pathParams": [ { - "name": "usd_price_24hr_change", - "type": "string", - "example": "0.0", - "description": "The price change in the last 24h", - "required": true - }, + "name": "address", + "description": "Wallet address", + "required": true, + "type": "string", + "example": "0x1f9090aaE28b8a3dCeaDf281B0F12828e676c326" + } + ], + "queryParams": [ { - "name": "usd_price_24hr_percent_change", - "type": "string", - "example": "0.0", - "description": "The price percent change in the last 24h", - "required": true - }, - { - "name": "usd_price_ath", - "type": "string", - "example": "0.0", - "description": "The all time high price in USD", - "required": true - }, + "name": "chains", + "description": "The chains to query.", + "required": false, + "type": "array", + "field": { + "type": "string", + "example": "eth", + "enum": [ + "eth", + "0x1", + "polygon", + "0x89", + "bsc", + "0x38", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "gnosis", + "0x64", + "chiliz", + "0x15b38", + "base", + "0x2105", + "optimism", + "0xa", + "linea", + "0xe705" + ] + } + } + ], + "responses": [ { - "name": "ath_percent_change", - "type": "string", - "example": "0.0", - "description": "The all time high percent change", - "required": true - }, + "status": "200", + "description": "Returns the active chains for the wallet address.", + "body": { + "type": "object", + "fields": [ + { + "name": "address", + "type": "string", + "description": "The address of the wallet", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "active_chains", + "type": "object", + "fields": [ + { + "name": "chain", + "type": "string", + "description": "The chain name", + "example": "eth" + }, + { + "name": "chain_id", + "type": "string", + "description": "The chain id", + "example": "0x1" + }, + { + "name": "first_transaction", + "type": "object", + "fields": [ + { + "name": "block_number", + "type": "string", + "description": "The block number", + "example": "123456789", + "required": true + }, + { + "name": "block_timestamp", + "type": "string", + "description": "The block timestamp", + "example": "2022-08-23T20:58:31.000Z", + "required": true + }, + { + "name": "transaction_hash", + "type": "string", + "description": "The hash of the transaction", + "example": "0x2d30ca6f024dbc1307ac8a1a44ca27de6f797ec22ef20627a1307243b0ab7d09", + "required": true + } + ] + }, + { + "name": "last_transaction", + "type": "object", + "fields": [ + { + "name": "block_number", + "type": "string", + "description": "The block number", + "example": "123456789", + "required": true + }, + { + "name": "block_timestamp", + "type": "string", + "description": "The block timestamp", + "example": "2022-08-23T20:58:31.000Z", + "required": true + }, + { + "name": "transaction_hash", + "type": "string", + "description": "The hash of the transaction", + "example": "0x2d30ca6f024dbc1307ac8a1a44ca27de6f797ec22ef20627a1307243b0ab7d09", + "required": true + } + ] + } + ] + } + ] + } + } + ], + "codeSamples": [ { - "name": "ath_date", - "type": "string", - "example": "0.0", - "description": "The all time high date", - "required": true + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.wallets.getWalletActiveChains({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" }, { - "name": "usd_price_1hr_percent_change", - "type": "string", - "example": "0.0", - "description": "The price change in the last 1h", - "required": true - }, + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.wallets.get_wallet_active_chains(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getWalletStats": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get the wallet stats", + "description": "Get the stats for a wallet address.", + "method": "GET", + "path": "/wallets/:address/stats", + "pathParams": [ { - "name": "usd_price_7d_percent_change", - "type": "string", - "example": "0.0", - "description": "The price change in the last 7d", - "required": true - }, + "name": "address", + "description": "Wallet address", + "required": true, + "type": "string", + "example": "0x1f9090aaE28b8a3dCeaDf281B0F12828e676c326" + } + ], + "queryParams": [ { - "name": "usd_price_30d_percent_change", - "type": "string", - "example": "0.0", - "description": "The price change in the last 30d", - "required": true + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", + "type": "string", + "enum": [ + "eth", + "0x1", + "sepolia", + "0xaa36a7", + "holesky", + "0x4268", + "polygon", + "0x89", + "amoy", + "0x13882", + "bsc", + "0x38", + "bsc testnet", + "0x61", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "gnosis", + "0x64", + "gnosis testnet", + "0x27d8", + "chiliz", + "0x15b38", + "chiliz testnet", + "0x15b32", + "base", + "0x2105", + "base sepolia", + "0x14a34", + "optimism", + "0xa", + "optimism sepolia", + "0xaa37dc", + "linea", + "0xe705", + "linea sepolia", + "0xe705" + ] } - ] - } - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.marketData.getTopCryptoCurrenciesByTradingVolume({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nresult = evm_api.market_data.get_top_crypto_currencies_by_trading_volume(\n api_key=api_key,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getTopCryptoCurrenciesByMarketCap": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get top Crypto Currencies tokens by market cap", - "description": "Get the top Crypto Currencies by market cap", - "method": "GET", - "path": "/market-data/global/market-cap", - "pathParams": [], - "queryParams": [], - "responses": [ - { - "status": "200", - "description": "Returns the top Crypto Currencies by market cap", - "body": { - "type": "array", - "field": { - "type": "object", - "fields": [ + ], + "responses": [ { - "name": "symbol", - "type": "string", - "example": "ETH", - "description": "The token symbol", - "required": true - }, + "status": "200", + "description": "Returns the stats for the wallet address.", + "body": { + "type": "object", + "fields": [ + { + "name": "nfts", + "type": "string", + "description": "The number of NFTs owned by a wallet", + "example": "100" + }, + { + "name": "collections", + "type": "string", + "description": "The number of unique NFT collections owned by a wallet", + "example": "10" + }, + { + "name": "transactions", + "type": "object", + "description": "Transaction stats", + "fields": [ + { + "name": "total", + "type": "string", + "description": "The number of transactions sent by a wallet", + "example": "1000" + } + ] + }, + { + "name": "nft_transfers", + "type": "object", + "description": "NFT transfer stats", + "fields": [ + { + "name": "total", + "type": "string", + "description": "The number of NFT transfers of a wallet", + "example": "1000" + } + ] + }, + { + "name": "token_transfers", + "type": "object", + "description": "Token transfer stats", + "fields": [ + { + "name": "total", + "type": "string", + "description": "The number of ERC20 token transfers of a wallet", + "example": "1000" + } + ] + } + ] + } + } + ], + "codeSamples": [ { - "name": "name", - "type": "string", - "example": "Ethereum", - "description": "The token name", - "required": true + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.wallets.getWalletStats({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" }, { - "name": "logo", - "type": "string", - "example": "https://assets.coingecko.com/coins/images/279/large/ethereum.png?1595348880", - "description": "The token logo", - "required": true - }, + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.wallets.get_wallet_stats(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getWalletNetWorth": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get wallet net worth", + "description": "Get the net worth of a wallet in USD. We recommend to filter out spam tokens and unverified contracts to get a more accurate result.", + "method": "GET", + "path": "/wallets/:address/net-worth", + "pathParams": [ { - "name": "circulating_supply", - "type": "string", - "example": "0.0", - "description": "The circulating supply", - "required": true - }, + "name": "address", + "description": "The wallet address", + "required": true, + "example": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045", + "type": "string" + } + ], + "queryParams": [ { - "name": "total_supply", - "type": "string", - "example": "0.0", - "description": "The total supply", - "required": true + "name": "chains", + "description": "The chains to query.", + "required": false, + "type": "array", + "field": { + "type": "string", + "example": "eth", + "enum": [ + "eth", + "0x1", + "polygon", + "0x89", + "bsc", + "0x38", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "gnosis", + "0x64", + "chiliz", + "0x15b38", + "base", + "0x2105", + "optimism", + "0xa", + "linea", + "0xe705" + ] + } }, { - "name": "max_supply", - "type": "string", - "example": "0.0", - "description": "The max supply", - "required": true + "name": "exclude_spam", + "description": "Exclude spam tokens from the result", + "required": false, + "example": true, + "type": "boolean" }, { - "name": "market_cap_usd", - "type": "string", - "example": "0.0", - "description": "The market cap in USD", - "required": true - }, + "name": "exclude_unverified_contracts", + "description": "Exclude unverified contracts from the result", + "required": false, + "example": true, + "type": "boolean" + } + ], + "responses": [ { - "name": "market_cap_rank", - "type": "string", - "example": "0.0", - "description": "The market cap rank", - "required": true - }, + "status": "200", + "description": "Returns the net worth and chain balance data.", + "body": { + "type": "object", + "fields": [ + { + "name": "total_networth_usd", + "type": "string", + "description": "The total net worth in USD", + "example": "3879851.41" + }, + { + "name": "chains", + "type": "array", + "description": "An array of chain balance objects", + "field": { + "type": "object", + "fields": [ + { + "name": "chain", + "type": "string", + "description": "The identifier for the blockchain (e.g., 'eth' for Ethereum)", + "example": "eth" + }, + { + "name": "native_balance", + "type": "string", + "description": "The balance of the native currency on the chain in its smallest unit (e.g., wei for Ethereum)", + "example": "1085513807021271641379" + }, + { + "name": "native_balance_formatted", + "type": "string", + "description": "The formatted balance of the native currency on the chain", + "example": "1085.513807021271641379" + }, + { + "name": "native_balance_usd", + "type": "string", + "description": "The USD value of the native currency balance", + "example": "3158392.48" + }, + { + "name": "token_balance_usd", + "type": "string", + "description": "The USD value of the token balance on the chain", + "example": "721458.93" + }, + { + "name": "networth_usd", + "type": "string", + "description": "The total net worth in USD associated with this chain", + "example": "3879851.41" + } + ] + } + } + ] + } + } + ], + "codeSamples": [ { - "name": "market_cap_24hr_change", - "type": "string", - "example": "0.0285", - "description": "The market cap change in the last 24h", - "required": true + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.wallets.getWalletNetWorth({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" }, { - "name": "market_cap_24hr_percent_change", - "type": "string", - "example": "0.0285", - "description": "The market cap percent change in the last 24h", - "required": true - }, + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.wallets.get_wallet_net_worth(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getWalletHistory": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get the complete history of a wallet", + "description": "Retrieve the full transaction history of a specified wallet address, including sends, receives, token and NFT transfers, and contract interactions.", + "method": "GET", + "path": "/wallets/:address/history", + "pathParams": [ { - "name": "total_volume", - "type": "string", - "example": "0.0", - "description": "The total volume", - "required": true - }, + "name": "address", + "description": "The address of the wallet", + "required": true, + "example": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045", + "type": "string" + } + ], + "queryParams": [ { - "name": "usd_price", - "type": "string", - "example": "0.0", - "description": "The price in USD", - "required": true + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", + "type": "string", + "enum": [ + "eth", + "0x1", + "sepolia", + "0xaa36a7", + "holesky", + "0x4268", + "polygon", + "0x89", + "amoy", + "0x13882", + "bsc", + "0x38", + "bsc testnet", + "0x61", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "gnosis", + "0x64", + "gnosis testnet", + "0x27d8", + "chiliz", + "0x15b38", + "chiliz testnet", + "0x15b32", + "base", + "0x2105", + "base sepolia", + "0x14a34", + "optimism", + "0xa", + "optimism sepolia", + "0xaa37dc", + "linea", + "0xe705", + "linea sepolia", + "0xe705" + ] }, { - "name": "usd_price_24hr_high", - "type": "string", - "example": "0.0", - "description": "The 24h high price in USD", - "required": true + "name": "from_block", + "description": "The minimum block number from which to get the transactions\n* Provide the param 'from_block' or 'from_date'\n* If 'from_date' and 'from_block' are provided, 'from_block' will be used.\n", + "required": false, + "type": "number" }, { - "name": "usd_price_24hr_low", - "type": "string", - "example": "0.0", - "description": "The 24h low price in USD", - "required": true + "name": "to_block", + "description": "The maximum block number from which to get the transactions.\n* Provide the param 'to_block' or 'to_date'\n* If 'to_date' and 'to_block' are provided, 'to_block' will be used.\n", + "required": false, + "type": "number" }, { - "name": "usd_price_24hr_change", - "type": "string", - "example": "0.0", - "description": "The price change in the last 24h", - "required": true + "name": "from_date", + "description": "The start date from which to get the transactions (format in seconds or datestring accepted by momentjs)\n* Provide the param 'from_block' or 'from_date'\n* If 'from_date' and 'from_block' are provided, 'from_block' will be used.\n", + "required": false, + "type": "string" }, { - "name": "usd_price_24hr_percent_change", - "type": "string", - "example": "0.0", - "description": "The price percent change in the last 24h", - "required": true + "name": "to_date", + "description": "Get the transactions up to this date (format in seconds or datestring accepted by momentjs)\n* Provide the param 'to_block' or 'to_date'\n* If 'to_date' and 'to_block' are provided, 'to_block' will be used.\n", + "type": "string" }, { - "name": "usd_price_ath", - "type": "string", - "example": "0.0", - "description": "The all time high price in USD", - "required": true + "name": "include_internal_transactions", + "description": "If the result should contain the internal transactions.", + "required": false, + "type": "boolean" }, { - "name": "ath_percent_change", - "type": "string", - "example": "0.0", - "description": "The all time high percent change", - "required": true + "name": "include_input_data", + "description": "Set the input data from the result", + "required": false, + "type": "boolean" }, { - "name": "ath_date", - "type": "string", - "example": "0.0", - "description": "The all time high date", - "required": true + "name": "nft_metadata", + "description": "If the result should contain the nft metadata.", + "required": false, + "type": "boolean" }, { - "name": "usd_price_1hr_percent_change", - "type": "string", - "example": "0.0", - "description": "The price change in the last 1h", - "required": true + "name": "cursor", + "description": "The cursor returned in the previous response (used for getting the next page).", + "required": false, + "type": "string" }, { - "name": "usd_price_7d_percent_change", - "type": "string", - "example": "0.0", - "description": "The price change in the last 7d", - "required": true + "name": "order", + "description": "The order of the result, in ascending (ASC) or descending (DESC)", + "required": false, + "example": "DESC", + "type": "string", + "enum": ["ASC", "DESC"] }, { - "name": "usd_price_30d_percent_change", - "type": "string", - "example": "0.0", - "description": "The price change in the last 30d", - "required": true - } - ] - } - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.marketData.getTopCryptoCurrenciesByMarketCap({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nresult = evm_api.market_data.get_top_crypto_currencies_by_market_cap(\n api_key=api_key,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getTopERC20TokensByMarketCap": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get top ERC20 tokens", - "description": "Get the top ERC20 tokens by market cap", - "method": "GET", - "path": "/market-data/erc20s/top-tokens", - "pathParams": [], - "queryParams": [], - "responses": [ - { - "status": "200", - "description": "Returns the top ERC20 tokens by market cap", - "body": { - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "rank", - "type": "string", - "example": "1", - "description": "The rank", - "required": true - }, - { - "name": "token_name", - "type": "string", - "example": "Wrapped Ether", - "description": "The token name", - "required": true - }, - { - "name": "token_symbol", - "type": "string", - "example": "WETH", - "description": "The token symbol", - "required": true - }, - { - "name": "token_logo", - "type": "string", - "example": "https://cdn.moralis.io/eth/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png", - "description": "The token logo", - "required": true - }, - { - "name": "token_decimals", - "type": "string", - "example": "18", - "description": "The token decimals", - "required": true - }, - { - "name": "contract_address", - "type": "string", - "example": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "description": "The contract address", - "required": true - }, - { - "name": "price_usd", - "type": "string", - "example": "0.0285", - "description": "he price in USD", - "required": true - }, - { - "name": "price_24h_percent_change", - "type": "string", - "example": "0.0285", - "description": "The price change in the last 24h", - "required": true - }, - { - "name": "price_7d_percent_change", - "type": "string", - "example": "0.0285", - "description": "The price change in the last 7d", - "required": true - }, - { - "name": "market_cap_usd", - "type": "string", - "example": "0.0285", - "description": "The market cap in USD", - "required": true - } - ] - } - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.marketData.getTopERC20TokensByMarketCap({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nresult = evm_api.market_data.get_top_erc20_tokens_by_market_cap(\n api_key=api_key,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getTopERC20TokensByPriceMovers": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get top ERC20 tokens", - "description": "Get the top ERC20 tokens by price change", - "method": "GET", - "path": "/market-data/erc20s/top-movers", - "pathParams": [], - "queryParams": [], - "responses": [ - { - "status": "200", - "description": "Returns an a list of ERC20 tokens with their price change", - "body": { - "type": "object", - "fields": [ - { - "name": "gainers", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "rank", - "type": "string", - "description": "The rank", - "example": "1", - "required": true - }, - { - "name": "token_name", - "type": "string", - "description": "The token name", - "example": "Wrapped Ether", - "required": true - }, - { - "name": "token_symbol", - "type": "string", - "description": "The token symbol", - "example": "WETH", - "required": true - }, - { - "name": "token_logo", - "type": "string", - "description": "The token image", - "example": "https://assets.coingecko.com/coins/images/2518/large/weth.png?1595348880", - "required": true - }, - { - "name": "token_decimals", - "type": "string", - "description": "The token decimals", - "example": "18", - "required": true - }, - { - "name": "contract_address", - "type": "string", - "description": "The contract address", - "example": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "required": true - }, - { - "name": "price_usd", - "type": "string", - "description": "The price in USD", - "example": "0.0285", - "required": true - }, - { - "name": "price_24h_percent_change", - "type": "string", - "description": "The price change in the last 24h", - "example": "0.0285", - "required": true - }, - { - "name": "price_7d_percent_change", - "type": "string", - "description": "The price change in the last 7d", - "example": "0.0285", - "required": true - }, - { - "name": "market_cap_usd", - "type": "string", - "description": "The market cap in USD", - "example": "0.0285", - "required": true - } - ] + "name": "limit", + "description": "The desired page size of the result.", + "required": false, + "type": "number" } - }, - { - "name": "losers", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "rank", - "type": "string", - "description": "The rank", - "example": "1", - "required": true - }, - { - "name": "token_name", - "type": "string", - "description": "The token name", - "example": "Wrapped Ether", - "required": true - }, - { - "name": "token_symbol", - "type": "string", - "description": "The token symbol", - "example": "WETH", - "required": true - }, - { - "name": "token_logo", - "type": "string", - "description": "The token image", - "example": "https://assets.coingecko.com/coins/images/2518/large/weth.png?1595348880", - "required": true - }, - { - "name": "token_decimals", - "type": "string", - "description": "The token decimals", - "example": "18", - "required": true - }, - { - "name": "contract_address", - "type": "string", - "description": "The contract address", - "example": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "required": true - }, - { - "name": "price_usd", - "type": "string", - "description": "The price in USD", - "example": "0.0285", - "required": true - }, - { - "name": "price_24h_percent_change", - "type": "string", - "description": "The price change in the last 24h", - "example": "0.0285", - "required": true - }, - { - "name": "price_7d_percent_change", - "type": "string", - "description": "The price change in the last 7d", - "example": "0.0285", - "required": true - }, - { - "name": "market_cap_usd", - "type": "string", - "description": "The market cap in USD", - "example": "0.0285", - "required": true - } - ] - } - } - ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.marketData.getTopERC20TokensByPriceMovers({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nresult = evm_api.market_data.get_top_erc20_tokens_by_price_movers(\n api_key=api_key,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getTopNFTCollectionsByMarketCap": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get top NFT collections", - "description": "Get the top NFT collections by market cap", - "method": "GET", - "path": "/market-data/nfts/top-collections", - "pathParams": [], - "queryParams": [], - "responses": [ - { - "status": "200", - "description": "Returns the top NFT collections by market cap", - "body": { - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "rank", - "type": "number", - "example": 1, - "description": "The rank", - "required": true - }, - { - "name": "collection_title", - "type": "string", - "example": "CryptoPunks", - "description": "The collection title", - "required": true - }, - { - "name": "collection_image", - "type": "string", - "description": "The collection image", - "required": true - }, - { - "name": "floor_price_usd", - "type": "string", - "example": "0.0", - "description": "The floor price in USD", - "required": true - }, - { - "name": "floor_price_24hr_percent_change", - "type": "string", - "example": "0.0", - "description": "The floor price 24hr percent change", - "required": true - }, - { - "name": "market_cap_usd", - "type": "string", - "example": "0.0", - "description": "The market cap in USD", - "required": true - }, - { - "name": "market_cap_24hr_percent_change", - "type": "string", - "example": "0.0", - "description": "The market cap 24hr percent change", - "required": true - }, - { - "name": "volume_usd", - "type": "string", - "example": "0.0", - "description": "The volume in USD", - "required": true - }, - { - "name": "volume_24hr_percent_change", - "type": "string", - "example": "0.0", - "description": "The volume 24hr percent change", - "required": true - }, - { - "name": "collection_address", - "type": "string", - "example": "0x123", - "description": "The collection address", - "required": true - }, - { - "name": "floor_price", - "type": "string", - "example": "0.0", - "description": "The floor price", - "required": true - }, - { - "name": "floor_price_usd_24hr_percent_change", - "type": "string", - "example": "0.0", - "description": "The floor price 24hr percent change", - "required": true - } - ] - } - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.marketData.getTopNFTCollectionsByMarketCap({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nresult = evm_api.market_data.get_top_nft_collections_by_market_cap(\n api_key=api_key,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getHottestNFTCollectionsByTradingVolume": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get top NFT collections", - "description": "Get the top NFT collections by trading volume", - "method": "GET", - "path": "/market-data/nfts/hottest-collections", - "pathParams": [], - "queryParams": [], - "responses": [ - { - "status": "200", - "description": "Returns the top NFT collections by trading volume", - "body": { - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "rank", - "type": "number", - "example": 1, - "description": "The rank", - "required": true - }, - { - "name": "collection_title", - "type": "string", - "example": "CryptoPunks", - "description": "The collection title", - "required": true - }, - { - "name": "collection_image", - "type": "string", - "description": "The collection image", - "required": true - }, - { - "name": "floor_price_usd", - "type": "string", - "example": "0.0", - "description": "The floor price in USD", - "required": true - }, - { - "name": "floor_price_24hr_percent_change", - "type": "string", - "example": "0.0", - "description": "The floor price 24hr percent change", - "required": true - }, - { - "name": "volume_usd", - "type": "string", - "example": "0.0", - "description": "The volume in USD", - "required": true - }, - { - "name": "volume_24hr_percent_change", - "type": "string", - "example": "0.0", - "description": "The volume 24hr percent change", - "required": true - }, - { - "name": "The average price in USD", - "type": "string", - "example": "0.0", - "description": "The volume 24hr percent change", - "required": true - }, - { - "name": "collection_address", - "type": "string", - "example": "0x123", - "description": "The collection address", - "required": true - }, - { - "name": "average_price", - "type": "string", - "example": "0.0", - "description": "The average price", - "required": true - }, - { - "name": "floor_price", - "type": "string", - "example": "0.0", - "description": "The floor price", - "required": true - }, - { - "name": "floor_price_usd_24hr_percent_change", - "type": "string", - "example": "0.0", - "description": "The floor price 24hr percent change", - "required": true - }, - { - "name": "floor_price_7d_percent_change", - "type": "string", - "example": "0.0", - "description": "The floor price 7d percent change", - "required": true - }, - { - "name": "floor_price_usd_7d_percent_change", - "type": "string", - "example": "0.0", - "description": "The floor price 7d percent change", - "required": true - }, - { - "name": "floor_price_30d_percent_change", - "type": "string", - "example": "0.0", - "description": "The floor price 30d percent change", - "required": true - }, + ], + "responses": [ { - "name": "floor_price_usd_30d_percent_change", - "type": "string", - "example": "0.0", - "description": "The floor price 30d percent change", - "required": true - } - ] - } - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.marketData.getHottestNFTCollectionsByTradingVolume({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nresult = evm_api.market_data.get_hottest_nft_collections_by_trading_volume(\n api_key=api_key,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - } - }, - "wallet": { - "getWalletActiveChains": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "getWalletActiveChains", - "description": "Get the active chains for a wallet address.", - "method": "GET", - "path": "/wallets/:address/chains", - "pathParams": [ - { - "name": "address", - "description": "Wallet address", - "required": true, - "type": "string", - "example": "0x1f9090aaE28b8a3dCeaDf281B0F12828e676c326" - } - ], - "queryParams": [ - { - "name": "chains", - "description": "The chains to query.", - "required": false, - "type": "array", - "field": { - "type": "string", - "example": "eth", - "enum": [ - "eth", - "0x1", - "polygon", - "0x89", - "bsc", - "0x38", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "gnosis", - "0x64", - "chiliz", - "0x15b38", - "base", - "0x2105", - "optimism", - "0xa", - "linea", - "0xe705" - ] - } - } - ], - "responses": [ - { - "status": "200", - "description": "Returns the active chains for the wallet address.", - "body": { - "type": "object", - "fields": [ - { - "name": "address", - "type": "string", - "description": "The address of the wallet", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "active_chains", - "type": "object", - "fields": [ - { - "name": "chain", - "type": "string", - "description": "The chain name", - "example": "eth" - }, - { - "name": "chain_id", - "type": "string", - "description": "The chain id", - "example": "0x1" - }, - { - "name": "first_transaction", - "type": "object", - "fields": [ - { - "name": "block_number", - "type": "string", - "description": "The block number", - "example": "123456789", - "required": true - }, - { - "name": "block_timestamp", - "type": "string", - "description": "The block timestamp", - "example": "2022-08-23T20:58:31.000Z", - "required": true - }, - { - "name": "transaction_hash", - "type": "string", - "description": "The hash of the transaction", - "example": "0x2d30ca6f024dbc1307ac8a1a44ca27de6f797ec22ef20627a1307243b0ab7d09", - "required": true - } - ] - }, - { - "name": "last_transaction", - "type": "object", - "fields": [ - { - "name": "block_number", - "type": "string", - "description": "The block number", - "example": "123456789", - "required": true - }, - { - "name": "block_timestamp", - "type": "string", - "description": "The block timestamp", - "example": "2022-08-23T20:58:31.000Z", - "required": true - }, - { - "name": "transaction_hash", - "type": "string", - "description": "The hash of the transaction", - "example": "0x2d30ca6f024dbc1307ac8a1a44ca27de6f797ec22ef20627a1307243b0ab7d09", - "required": true - } - ] - } - ] - } - ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.wallets.getWalletActiveChains({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.wallets.get_wallet_active_chains(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getWalletStats": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get the wallet stats", - "description": "Get the stats for a wallet address.", - "method": "GET", - "path": "/wallets/:address/stats", - "pathParams": [ - { - "name": "address", - "description": "Wallet address", - "required": true, - "type": "string", - "example": "0x1f9090aaE28b8a3dCeaDf281B0F12828e676c326" - } - ], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "0x1", - "sepolia", - "0xaa36a7", - "holesky", - "0x4268", - "polygon", - "0x89", - "amoy", - "0x13882", - "bsc", - "0x38", - "bsc testnet", - "0x61", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "gnosis", - "0x64", - "gnosis testnet", - "0x27d8", - "chiliz", - "0x15b38", - "chiliz testnet", - "0x15b32", - "base", - "0x2105", - "base sepolia", - "0x14a34", - "optimism", - "0xa", - "optimism sepolia", - "0xaa37dc", - "linea", - "0xe705", - "linea sepolia", - "0xe705" - ] - } - ], - "responses": [ - { - "status": "200", - "description": "Returns the stats for the wallet address.", - "body": { - "type": "object", - "fields": [ - { - "name": "nfts", - "type": "string", - "description": "The number of NFTs owned by a wallet", - "example": "100" - }, - { - "name": "collections", - "type": "string", - "description": "The number of unique NFT collections owned by a wallet", - "example": "10" - }, - { - "name": "transactions", - "type": "object", - "description": "Transaction stats", - "fields": [ - { - "name": "total", - "type": "string", - "description": "The number of transactions sent by a wallet", - "example": "1000" - } - ] - }, - { - "name": "nft_transfers", - "type": "object", - "description": "NFT transfer stats", - "fields": [ - { - "name": "total", - "type": "string", - "description": "The number of NFT transfers of a wallet", - "example": "1000" - } - ] - }, - { - "name": "token_transfers", - "type": "object", - "description": "Token transfer stats", - "fields": [ - { - "name": "total", - "type": "string", - "description": "The number of ERC20 token transfers of a wallet", - "example": "1000" - } - ] - } - ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.wallets.getWalletStats({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.wallets.get_wallet_stats(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getWalletNetWorth": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get wallet net worth", - "description": "Get the net worth of a wallet in USD. We recommend to filter out spam tokens and unverified contracts to get a more accurate result.", - "method": "GET", - "path": "/wallets/:address/net-worth", - "pathParams": [ - { - "name": "address", - "description": "The wallet address", - "required": true, - "example": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045", - "type": "string" - } - ], - "queryParams": [ - { - "name": "chains", - "description": "The chains to query.", - "required": false, - "type": "array", - "field": { - "type": "string", - "example": "eth", - "enum": [ - "eth", - "0x1", - "polygon", - "0x89", - "bsc", - "0x38", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "gnosis", - "0x64", - "chiliz", - "0x15b38", - "base", - "0x2105", - "optimism", - "0xa", - "linea", - "0xe705" - ] - } - }, - { - "name": "exclude_spam", - "description": "Exclude spam tokens from the result", - "required": false, - "example": true, - "type": "boolean" - }, - { - "name": "exclude_unverified_contracts", - "description": "Exclude unverified contracts from the result", - "required": false, - "example": true, - "type": "boolean" - } - ], - "responses": [ - { - "status": "200", - "description": "Returns the net worth and chain balance data.", - "body": { - "type": "object", - "fields": [ - { - "name": "total_networth_usd", - "type": "string", - "description": "The total net worth in USD", - "example": "3879851.41" - }, - { - "name": "chains", - "type": "array", - "description": "An array of chain balance objects", - "field": { - "type": "object", - "fields": [ - { - "name": "chain", - "type": "string", - "description": "The identifier for the blockchain (e.g., 'eth' for Ethereum)", - "example": "eth" - }, - { - "name": "native_balance", - "type": "string", - "description": "The balance of the native currency on the chain in its smallest unit (e.g., wei for Ethereum)", - "example": "1085513807021271641379" - }, - { - "name": "native_balance_formatted", - "type": "string", - "description": "The formatted balance of the native currency on the chain", - "example": "1085.513807021271641379" - }, - { - "name": "native_balance_usd", - "type": "string", - "description": "The USD value of the native currency balance", - "example": "3158392.48" - }, - { - "name": "token_balance_usd", - "type": "string", - "description": "The USD value of the token balance on the chain", - "example": "721458.93" - }, - { - "name": "networth_usd", - "type": "string", - "description": "The total net worth in USD associated with this chain", - "example": "3879851.41" - } - ] - } - } - ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.wallets.getWalletNetWorth({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.wallets.get_wallet_net_worth(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getWalletHistory": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get the complete history of a wallet", - "description": "Retrieve the full transaction history of a specified wallet address, including sends, receives, token and NFT transfers, and contract interactions.", - "method": "GET", - "path": "/wallets/:address/history", - "pathParams": [ - { - "name": "address", - "description": "The address of the wallet", - "required": true, - "example": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045", - "type": "string" - } - ], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "0x1", - "sepolia", - "0xaa36a7", - "holesky", - "0x4268", - "polygon", - "0x89", - "amoy", - "0x13882", - "bsc", - "0x38", - "bsc testnet", - "0x61", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "gnosis", - "0x64", - "gnosis testnet", - "0x27d8", - "chiliz", - "0x15b38", - "chiliz testnet", - "0x15b32", - "base", - "0x2105", - "base sepolia", - "0x14a34", - "optimism", - "0xa", - "optimism sepolia", - "0xaa37dc", - "linea", - "0xe705", - "linea sepolia", - "0xe705" - ] - }, - { - "name": "from_block", - "description": "The minimum block number from which to get the transactions\n* Provide the param 'from_block' or 'from_date'\n* If 'from_date' and 'from_block' are provided, 'from_block' will be used.\n", - "required": false, - "type": "number" - }, - { - "name": "to_block", - "description": "The maximum block number from which to get the transactions.\n* Provide the param 'to_block' or 'to_date'\n* If 'to_date' and 'to_block' are provided, 'to_block' will be used.\n", - "required": false, - "type": "number" - }, - { - "name": "from_date", - "description": "The start date from which to get the transactions (format in seconds or datestring accepted by momentjs)\n* Provide the param 'from_block' or 'from_date'\n* If 'from_date' and 'from_block' are provided, 'from_block' will be used.\n", - "required": false, - "type": "string" - }, - { - "name": "to_date", - "description": "Get the transactions up to this date (format in seconds or datestring accepted by momentjs)\n* Provide the param 'to_block' or 'to_date'\n* If 'to_date' and 'to_block' are provided, 'to_block' will be used.\n", - "type": "string" - }, - { - "name": "include_internal_transactions", - "description": "If the result should contain the internal transactions.", - "required": false, - "type": "boolean" - }, - { - "name": "include_input_data", - "description": "Set the input data from the result", - "required": false, - "type": "boolean" - }, - { - "name": "nft_metadata", - "description": "If the result should contain the nft metadata.", - "required": false, - "type": "boolean" - }, - { - "name": "cursor", - "description": "The cursor returned in the previous response (used for getting the next page).", - "required": false, - "type": "string" - }, - { - "name": "order", - "description": "The order of the result, in ascending (ASC) or descending (DESC)", - "required": false, - "example": "DESC", - "type": "string", - "enum": ["ASC", "DESC"] - }, - { - "name": "limit", - "description": "The desired page size of the result.", - "required": false, - "type": "number" - } - ], - "responses": [ - { - "status": "200", - "description": "Returns the transaction data.", - "body": { - "type": "object", - "fields": [ - { - "name": "page", - "type": "number", - "description": "The current page number in the paginated result set", - "example": "2" - }, - { - "name": "page_size", - "type": "number", - "description": "The number of items per page in the paginated result set", - "example": "100" - }, - { - "name": "cursor", - "type": "string", - "description": "A cursor for use in pagination", - "example": "" - }, - { - "name": "result", - "type": "array", - "description": "An array of transaction objects", - "field": { - "type": "object", - "fields": [ - { - "name": "hash", - "type": "string", - "description": "The hash of the transaction", - "example": "0x1ed85b3757a6d31d01a4d6677fc52fd3911d649a0af21fe5ca3f886b153773ed" - }, - { - "name": "nonce", - "type": "string", - "description": "The nonce of the transaction", - "example": "1848059" - }, - { - "name": "transaction_index", - "type": "string", - "description": "The position of the transaction in the block", - "example": "108" - }, - { - "name": "from_address", - "type": "string", - "description": "The address sending the transaction", - "example": "0x267be1c1d684f78cb4f6a176c4911b741e4ffdc0" - }, - { - "name": "from_address_label", - "type": "string", - "description": "Label for the from address", - "example": "Binance 1" - }, - { - "name": "to_address", - "type": "string", - "description": "The address receiving the transaction", - "example": "0x003dde3494f30d861d063232c6a8c04394b686ff" - }, - { - "name": "to_address_label", - "type": "string", - "description": "Label for the to address", - "example": "Binance 2" - }, - { - "name": "value", - "type": "string", - "description": "The value transferred in the transaction", - "example": "115580000000000000" - }, - { - "name": "gas", - "type": "string", - "description": "The gas limit provided by the sender", - "example": "30000" - }, - { - "name": "gas_price", - "type": "string", - "description": "The gas price set for the transaction", - "example": "52500000000" - }, - { - "name": "input", - "type": "string", - "description": "The input data of the transaction", - "example": "0x" - }, - { - "name": "receipt_cumulative_gas_used", - "type": "string", - "description": "The total gas used in the block up until this transaction", - "example": "4923073" - }, - { - "name": "receipt_gas_used", - "type": "string", - "description": "The gas used by this transaction alone", - "example": "21000" - }, - { - "name": "receipt_contract_address", - "type": "string", - "description": "The contract address created by the transaction, if any", - "example": null - }, - { - "name": "receipt_root", - "type": "string", - "description": "The receipt root of the transaction", - "example": null - }, - { - "name": "receipt_status", - "type": "string", - "description": "The status of the transaction (1 for success, 0 for failure)", - "example": "1" - }, - { - "name": "block_timestamp", - "type": "string", - "description": "The timestamp for the block containing the transaction", - "example": "2021-05-07T11:08:35.000Z" - }, - { - "name": "block_number", - "type": "string", - "description": "The block number containing the transaction", - "example": "12386788" - }, - { - "name": "block_hash", - "type": "string", - "description": "The hash of the block containing the transaction", - "example": "0x9b559aef7ea858608c2e554246fe4a24287e7aeeb976848df2b9a2531f4b9171" - }, - { - "name": "logs", - "type": "array", - "description": "An array of logs generated by the transaction", - "items": { - "type": "object", - "fields": [ - { - "name": "log_index", - "type": "string", - "description": "The index of the log in the block", - "example": "273" - }, - { - "name": "transaction_hash", - "type": "string", - "description": "The hash of the transaction generating the log", - "example": "0xdd9006489e46670e0e85d1fb88823099e7f596b08aeaac023e9da0851f26fdd5" - }, - { - "name": "transaction_index", - "type": "string", - "description": "The index of the transaction in the block", - "example": "204" - }, - { - "name": "address", - "type": "string", - "description": "The address that generated the log", - "example": "0x3105d328c66d8d55092358cf595d54608178e9b5" - }, - { - "name": "data", - "type": "string", - "description": "The data contained in the log", - "example": "0x00000000000000000000000000000000000000000000000de05239bccd4d537400000000000000000000000000024dbc80a9f80e3d5fc0a0ee30e2693781a443" - }, - { - "name": "topic0", - "type": "string", - "description": "The first topic of the log", - "example": "0x2caecd17d02f56fa897705dcc740da2d237c373f70686f4e0d9bd3bf0400ea7a" - }, - { - "name": "topic1", - "type": "string", - "description": "The second topic of the log", - "example": "0x000000000000000000000000031002d15b0d0cd7c9129d6f644446368deae391" - }, - { - "name": "topic2", - "type": "string", - "description": "The third topic of the log", - "example": "0x000000000000000000000000d25943be09f968ba740e0782a34e710100defae9" - }, - { - "name": "topic3", - "type": "string", - "description": "The fourth topic of the log, if any", - "example": null - }, - { - "name": "block_timestamp", - "type": "string", - "description": "The timestamp for the block containing the log", - "example": "2021-05-07T11:08:35.000Z" - }, - { - "name": "block_number", - "type": "string", - "description": "The block number containing the log", - "example": "12386788" - }, - { - "name": "block_hash", - "type": "string", - "description": "The hash of the block containing the log", - "example": "0x9b559aef7ea858608c2e554246fe4a24287e7aeeb976848df2b9a2531f4b9171" - } - ] - } - }, - { - "name": "internal_transactions", - "type": "array", - "description": "An array of internal transactions triggered by the transaction", - "field": { - "type": "object", - "fields": [ - { - "name": "transaction_hash", - "type": "string", - "description": "The hash of the internal transaction", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "block_number", - "type": "string", - "description": "The block number in which the internal transaction was included", - "example": "12526958" - }, - { - "name": "block_hash", - "type": "string", - "description": "The hash of the block containing the internal transaction", - "example": "0x0372c302e3c52e8f2e15d155e2c545e6d802e479236564af052759253b20fd86" - }, - { - "name": "type", - "type": "string", - "description": "The type of internal transaction (e.g., CALL, CREATE)", - "example": "CALL" - }, - { - "name": "from", - "type": "string", - "description": "The address initiating the internal transaction", - "example": "0xd4a3BebD824189481FC45363602b83C9c7e9cbDf" - }, - { - "name": "to", - "type": "string", - "description": "The address the internal transaction was directed to", - "example": "0xa71db868318f0a0bae9411347cd4a6fa23d8d4ef" - }, - { - "name": "value", - "type": "string", - "description": "The value transferred in the internal transaction", - "example": "650000000000000000" - }, - { - "name": "gas", - "type": "string", - "description": "The gas provided for the internal transaction", - "example": "6721975" - }, - { - "name": "gas_used", - "type": "string", - "description": "The gas used by the internal transaction", - "example": "6721975" - }, - { - "name": "input", - "type": "string", - "description": "The input data for the internal transaction", - "example": "0x" - }, - { - "name": "output", - "type": "string", - "description": "The output of the internal transaction", - "example": "0x" - } - ] - } - }, - { - "name": "nft_transfers", - "type": "array", - "description": "An array of NFT transfers triggered by the transaction", - "field": { - "type": "object", - "fields": [ - { - "name": "token_address", - "type": "string", - "description": "The address of the NFT contract", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "token_id", - "type": "string", - "description": "The unique identifier of the NFT", - "example": "15" - }, - { - "name": "from_address", - "type": "string", - "description": "The address from which the NFT was transferred", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "from_address_label", - "type": "string", - "description": "Label for the from address of the NFT transfer", - "example": "Binance 1" - }, - { - "name": "to_address", - "type": "string", - "description": "The address to which the NFT was transferred", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "to_address_label", - "type": "string", - "description": "Label for the to address of the NFT transfer", - "example": "Binance 2" - }, - { - "name": "value", - "type": "string", - "description": "The value of the NFT transferred", - "example": "1000000000000000" - }, - { - "name": "amount", - "type": "string", - "description": "The amount of the NFT transferred", - "example": "1" - }, - { - "name": "contract_type", - "type": "string", - "description": "The contract type of the NFT (e.g., ERC721)", - "example": "ERC721" - }, - { - "name": "block_number", - "type": "string", - "description": "The block number in which the NFT transfer occurred", - "example": "88256" - }, - { - "name": "block_timestamp", - "type": "string", - "description": "The timestamp for the block containing the NFT transfer", - "example": "2021-06-04T16:00:15" - }, - { - "name": "block_hash", - "type": "string", - "description": "The hash of the block containing the NFT transfer", - "example": "string" - }, - { - "name": "transaction_hash", - "type": "string", - "description": "The hash of the transaction containing the NFT transfer", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "transaction_type", - "type": "string", - "description": "The type of transaction", - "example": "string" - }, - { - "name": "transaction_index", - "type": "number", - "description": "The index of the transaction in the block", - "example": 0 - }, - { - "name": "log_index", - "type": "number", - "description": "The index of the log in the block", - "example": 0 - }, - { - "name": "operator", - "type": "string", - "description": "The operator executing the NFT transfer", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "possible_spam", - "type": "boolean", - "description": "Flag indicating if the transfer might be spam", - "example": false - }, - { - "name": "verified_collection", - "type": "boolean", - "description": "Flag indicating if the NFT is from a verified collection", - "example": false - } - ] - } - }, - { - "name": "erc20_transfer", - "type": "array", - "description": "An array of ERC20 token transfers triggered by the transaction", - "field": { - "type": "object", - "fields": [ - { - "name": "token_name", - "type": "string", - "description": "The name of the ERC20 token", - "example": "Tether USD" - }, - { - "name": "token_symbol", - "type": "string", - "description": "The symbol of the ERC20 token", - "example": "USDT" - }, - { - "name": "token_logo", - "type": "string", - "description": "The logo URL of the ERC20 token", - "example": "https://assets.coingecko.com/coins/images/325/large/Tether-logo.png?1598003707" - }, - { - "name": "token_decimals", - "type": "string", - "description": "The decimals of the ERC20 token", - "example": "6" - }, - { - "name": "transaction_hash", - "type": "string", - "description": "The hash of the transaction containing the ERC20 transfer", - "example": "0x2d30ca6f024dbc1307ac8a1a44ca27de6f797ec22ef20627a1307243b0ab7d09" - }, - { - "name": "address", - "type": "string", - "description": "The address of the ERC20 contract", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "block_timestamp", - "type": "string", - "description": "The timestamp for the block containing the ERC20 transfer", - "example": "2021-04-02T10:07:54.000Z" - }, - { - "name": "block_number", - "type": "string", - "description": "The block number in which the ERC20 transfer occurred", - "example": "12526958" - }, - { - "name": "block_hash", - "type": "string", - "description": "The hash of the block containing the ERC20 transfer", - "example": "0x0372c302e3c52e8f2e15d155e2c545e6d802e479236564af052759253b20fd86" - }, - { - "name": "to_address", - "type": "string", - "description": "The address to which the ERC20 token was transferred", - "example": "0x62AED87d21Ad0F3cdE4D147Fdcc9245401Af0044" - }, - { - "name": "to_address_label", - "type": "string", - "description": "Label for the to address of the ERC20 transfer", - "example": "Binance 2" - }, - { - "name": "from_address", - "type": "string", - "description": "The address from which the ERC20 token was transferred", - "example": "0xd4a3BebD824189481FC45363602b83C9c7e9cbDf" - }, - { - "name": "from_address_label", - "type": "string", - "description": "Label for the from address of the ERC20 transfer", - "example": "Binance 1" - }, - { - "name": "value", - "type": "string", - "description": "The value of the ERC20 token transferred", - "example": "650000000000000000" - }, - { - "name": "transaction_index", - "type": "number", - "description": "The index of the transaction in the block", - "example": 12 - }, - { - "name": "log_index", - "type": "number", - "description": "The index of the log in the block", - "example": 2 - }, - { - "name": "possible_spam", - "type": "boolean", - "description": "Flag indicating if the transfer might be spam", - "example": false - }, - { - "name": "verified_contract", - "type": "boolean", - "description": "Flag indicating if the ERC20 contract is verified", - "example": false - } - ] - } - }, - { - "name": "native_transfers", - "type": "array", - "description": "An array of native currency transfers triggered by the transaction", - "field": { + "status": "200", + "description": "Returns the transaction data.", + "body": { "type": "object", "fields": [ - { - "name": "from_address", - "type": "string", - "description": "The address from which the native currency was transferred", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "from_address_label", - "type": "string", - "description": "Label for the from address of the native transfer", - "example": "Binance 1" - }, - { - "name": "to_address", - "type": "string", - "description": "The address to which the native currency was transferred", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "to_address_label", - "type": "string", - "description": "Label for the to address of the native transfer", - "example": "Binance 2" - }, - { - "name": "value", - "type": "string", - "description": "The value of the native currency transferred", - "example": "1000000000000000" - }, - { - "name": "value_formatted", - "type": "string", - "description": "The formatted value of the native currency transferred", - "example": "0.1" - }, - { - "name": "direction", - "type": "string", - "description": "The direction of the transfer (incoming or outgoing)", - "example": "outgoing" - }, - { - "name": "internal_transaction", - "type": "boolean", - "description": "Flag indicating if the transfer was an internal transaction", - "example": false - }, - { - "name": "token_symbol", - "type": "string", - "description": "The symbol of the native currency", - "example": "ETH" - }, - { - "name": "token_logo", - "type": "string", - "description": "The logo URL of the native currency", - "example": "https://cdn.moralis.io/eth/0x67b6d479c7bb412c54e03dca8e1bc6740ce6b99c.png" - } + { + "name": "page", + "type": "number", + "description": "The current page number in the paginated result set", + "example": "2" + }, + { + "name": "page_size", + "type": "number", + "description": "The number of items per page in the paginated result set", + "example": "100" + }, + { + "name": "cursor", + "type": "string", + "description": "A cursor for use in pagination", + "example": "" + }, + { + "name": "result", + "type": "array", + "description": "An array of transaction objects", + "field": { + "type": "object", + "fields": [ + { + "name": "hash", + "type": "string", + "description": "The hash of the transaction", + "example": "0x1ed85b3757a6d31d01a4d6677fc52fd3911d649a0af21fe5ca3f886b153773ed" + }, + { + "name": "nonce", + "type": "string", + "description": "The nonce of the transaction", + "example": "1848059" + }, + { + "name": "transaction_index", + "type": "string", + "description": "The position of the transaction in the block", + "example": "108" + }, + { + "name": "from_address", + "type": "string", + "description": "The address sending the transaction", + "example": "0x267be1c1d684f78cb4f6a176c4911b741e4ffdc0" + }, + { + "name": "from_address_label", + "type": "string", + "description": "Label for the from address", + "example": "Binance 1" + }, + { + "name": "to_address", + "type": "string", + "description": "The address receiving the transaction", + "example": "0x003dde3494f30d861d063232c6a8c04394b686ff" + }, + { + "name": "to_address_label", + "type": "string", + "description": "Label for the to address", + "example": "Binance 2" + }, + { + "name": "value", + "type": "string", + "description": "The value transferred in the transaction", + "example": "115580000000000000" + }, + { + "name": "gas", + "type": "string", + "description": "The gas limit provided by the sender", + "example": "30000" + }, + { + "name": "gas_price", + "type": "string", + "description": "The gas price set for the transaction", + "example": "52500000000" + }, + { + "name": "input", + "type": "string", + "description": "The input data of the transaction", + "example": "0x" + }, + { + "name": "receipt_cumulative_gas_used", + "type": "string", + "description": "The total gas used in the block up until this transaction", + "example": "4923073" + }, + { + "name": "receipt_gas_used", + "type": "string", + "description": "The gas used by this transaction alone", + "example": "21000" + }, + { + "name": "receipt_contract_address", + "type": "string", + "description": "The contract address created by the transaction, if any", + "example": null + }, + { + "name": "receipt_root", + "type": "string", + "description": "The receipt root of the transaction", + "example": null + }, + { + "name": "receipt_status", + "type": "string", + "description": "The status of the transaction (1 for success, 0 for failure)", + "example": "1" + }, + { + "name": "block_timestamp", + "type": "string", + "description": "The timestamp for the block containing the transaction", + "example": "2021-05-07T11:08:35.000Z" + }, + { + "name": "block_number", + "type": "string", + "description": "The block number containing the transaction", + "example": "12386788" + }, + { + "name": "block_hash", + "type": "string", + "description": "The hash of the block containing the transaction", + "example": "0x9b559aef7ea858608c2e554246fe4a24287e7aeeb976848df2b9a2531f4b9171" + }, + { + "name": "logs", + "type": "array", + "description": "An array of logs generated by the transaction", + "items": { + "type": "object", + "fields": [ + { + "name": "log_index", + "type": "string", + "description": "The index of the log in the block", + "example": "273" + }, + { + "name": "transaction_hash", + "type": "string", + "description": "The hash of the transaction generating the log", + "example": "0xdd9006489e46670e0e85d1fb88823099e7f596b08aeaac023e9da0851f26fdd5" + }, + { + "name": "transaction_index", + "type": "string", + "description": "The index of the transaction in the block", + "example": "204" + }, + { + "name": "address", + "type": "string", + "description": "The address that generated the log", + "example": "0x3105d328c66d8d55092358cf595d54608178e9b5" + }, + { + "name": "data", + "type": "string", + "description": "The data contained in the log", + "example": "0x00000000000000000000000000000000000000000000000de05239bccd4d537400000000000000000000000000024dbc80a9f80e3d5fc0a0ee30e2693781a443" + }, + { + "name": "topic0", + "type": "string", + "description": "The first topic of the log", + "example": "0x2caecd17d02f56fa897705dcc740da2d237c373f70686f4e0d9bd3bf0400ea7a" + }, + { + "name": "topic1", + "type": "string", + "description": "The second topic of the log", + "example": "0x000000000000000000000000031002d15b0d0cd7c9129d6f644446368deae391" + }, + { + "name": "topic2", + "type": "string", + "description": "The third topic of the log", + "example": "0x000000000000000000000000d25943be09f968ba740e0782a34e710100defae9" + }, + { + "name": "topic3", + "type": "string", + "description": "The fourth topic of the log, if any", + "example": null + }, + { + "name": "block_timestamp", + "type": "string", + "description": "The timestamp for the block containing the log", + "example": "2021-05-07T11:08:35.000Z" + }, + { + "name": "block_number", + "type": "string", + "description": "The block number containing the log", + "example": "12386788" + }, + { + "name": "block_hash", + "type": "string", + "description": "The hash of the block containing the log", + "example": "0x9b559aef7ea858608c2e554246fe4a24287e7aeeb976848df2b9a2531f4b9171" + } + ] + } + }, + { + "name": "internal_transactions", + "type": "array", + "description": "An array of internal transactions triggered by the transaction", + "field": { + "type": "object", + "fields": [ + { + "name": "transaction_hash", + "type": "string", + "description": "The hash of the internal transaction", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "block_number", + "type": "string", + "description": "The block number in which the internal transaction was included", + "example": "12526958" + }, + { + "name": "block_hash", + "type": "string", + "description": "The hash of the block containing the internal transaction", + "example": "0x0372c302e3c52e8f2e15d155e2c545e6d802e479236564af052759253b20fd86" + }, + { + "name": "type", + "type": "string", + "description": "The type of internal transaction (e.g., CALL, CREATE)", + "example": "CALL" + }, + { + "name": "from", + "type": "string", + "description": "The address initiating the internal transaction", + "example": "0xd4a3BebD824189481FC45363602b83C9c7e9cbDf" + }, + { + "name": "to", + "type": "string", + "description": "The address the internal transaction was directed to", + "example": "0xa71db868318f0a0bae9411347cd4a6fa23d8d4ef" + }, + { + "name": "value", + "type": "string", + "description": "The value transferred in the internal transaction", + "example": "650000000000000000" + }, + { + "name": "gas", + "type": "string", + "description": "The gas provided for the internal transaction", + "example": "6721975" + }, + { + "name": "gas_used", + "type": "string", + "description": "The gas used by the internal transaction", + "example": "6721975" + }, + { + "name": "input", + "type": "string", + "description": "The input data for the internal transaction", + "example": "0x" + }, + { + "name": "output", + "type": "string", + "description": "The output of the internal transaction", + "example": "0x" + } + ] + } + }, + { + "name": "nft_transfers", + "type": "array", + "description": "An array of NFT transfers triggered by the transaction", + "field": { + "type": "object", + "fields": [ + { + "name": "token_address", + "type": "string", + "description": "The address of the NFT contract", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "token_id", + "type": "string", + "description": "The unique identifier of the NFT", + "example": "15" + }, + { + "name": "from_address", + "type": "string", + "description": "The address from which the NFT was transferred", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "from_address_label", + "type": "string", + "description": "Label for the from address of the NFT transfer", + "example": "Binance 1" + }, + { + "name": "to_address", + "type": "string", + "description": "The address to which the NFT was transferred", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "to_address_label", + "type": "string", + "description": "Label for the to address of the NFT transfer", + "example": "Binance 2" + }, + { + "name": "value", + "type": "string", + "description": "The value of the NFT transferred", + "example": "1000000000000000" + }, + { + "name": "amount", + "type": "string", + "description": "The amount of the NFT transferred", + "example": "1" + }, + { + "name": "contract_type", + "type": "string", + "description": "The contract type of the NFT (e.g., ERC721)", + "example": "ERC721" + }, + { + "name": "block_number", + "type": "string", + "description": "The block number in which the NFT transfer occurred", + "example": "88256" + }, + { + "name": "block_timestamp", + "type": "string", + "description": "The timestamp for the block containing the NFT transfer", + "example": "2021-06-04T16:00:15" + }, + { + "name": "block_hash", + "type": "string", + "description": "The hash of the block containing the NFT transfer", + "example": "string" + }, + { + "name": "transaction_hash", + "type": "string", + "description": "The hash of the transaction containing the NFT transfer", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "transaction_type", + "type": "string", + "description": "The type of transaction", + "example": "string" + }, + { + "name": "transaction_index", + "type": "number", + "description": "The index of the transaction in the block", + "example": 0 + }, + { + "name": "log_index", + "type": "number", + "description": "The index of the log in the block", + "example": 0 + }, + { + "name": "operator", + "type": "string", + "description": "The operator executing the NFT transfer", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "possible_spam", + "type": "boolean", + "description": "Flag indicating if the transfer might be spam", + "example": false + }, + { + "name": "verified_collection", + "type": "boolean", + "description": "Flag indicating if the NFT is from a verified collection", + "example": false + } + ] + } + }, + { + "name": "erc20_transfer", + "type": "array", + "description": "An array of ERC20 token transfers triggered by the transaction", + "field": { + "type": "object", + "fields": [ + { + "name": "token_name", + "type": "string", + "description": "The name of the ERC20 token", + "example": "Tether USD" + }, + { + "name": "token_symbol", + "type": "string", + "description": "The symbol of the ERC20 token", + "example": "USDT" + }, + { + "name": "token_logo", + "type": "string", + "description": "The logo URL of the ERC20 token", + "example": "https://assets.coingecko.com/coins/images/325/large/Tether-logo.png?1598003707" + }, + { + "name": "token_decimals", + "type": "string", + "description": "The decimals of the ERC20 token", + "example": "6" + }, + { + "name": "transaction_hash", + "type": "string", + "description": "The hash of the transaction containing the ERC20 transfer", + "example": "0x2d30ca6f024dbc1307ac8a1a44ca27de6f797ec22ef20627a1307243b0ab7d09" + }, + { + "name": "address", + "type": "string", + "description": "The address of the ERC20 contract", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "block_timestamp", + "type": "string", + "description": "The timestamp for the block containing the ERC20 transfer", + "example": "2021-04-02T10:07:54.000Z" + }, + { + "name": "block_number", + "type": "string", + "description": "The block number in which the ERC20 transfer occurred", + "example": "12526958" + }, + { + "name": "block_hash", + "type": "string", + "description": "The hash of the block containing the ERC20 transfer", + "example": "0x0372c302e3c52e8f2e15d155e2c545e6d802e479236564af052759253b20fd86" + }, + { + "name": "to_address", + "type": "string", + "description": "The address to which the ERC20 token was transferred", + "example": "0x62AED87d21Ad0F3cdE4D147Fdcc9245401Af0044" + }, + { + "name": "to_address_label", + "type": "string", + "description": "Label for the to address of the ERC20 transfer", + "example": "Binance 2" + }, + { + "name": "from_address", + "type": "string", + "description": "The address from which the ERC20 token was transferred", + "example": "0xd4a3BebD824189481FC45363602b83C9c7e9cbDf" + }, + { + "name": "from_address_label", + "type": "string", + "description": "Label for the from address of the ERC20 transfer", + "example": "Binance 1" + }, + { + "name": "value", + "type": "string", + "description": "The value of the ERC20 token transferred", + "example": "650000000000000000" + }, + { + "name": "transaction_index", + "type": "number", + "description": "The index of the transaction in the block", + "example": 12 + }, + { + "name": "log_index", + "type": "number", + "description": "The index of the log in the block", + "example": 2 + }, + { + "name": "possible_spam", + "type": "boolean", + "description": "Flag indicating if the transfer might be spam", + "example": false + }, + { + "name": "verified_contract", + "type": "boolean", + "description": "Flag indicating if the ERC20 contract is verified", + "example": false + } + ] + } + }, + { + "name": "native_transfers", + "type": "array", + "description": "An array of native currency transfers triggered by the transaction", + "field": { + "type": "object", + "fields": [ + { + "name": "from_address", + "type": "string", + "description": "The address from which the native currency was transferred", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "from_address_label", + "type": "string", + "description": "Label for the from address of the native transfer", + "example": "Binance 1" + }, + { + "name": "to_address", + "type": "string", + "description": "The address to which the native currency was transferred", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "to_address_label", + "type": "string", + "description": "Label for the to address of the native transfer", + "example": "Binance 2" + }, + { + "name": "value", + "type": "string", + "description": "The value of the native currency transferred", + "example": "1000000000000000" + }, + { + "name": "value_formatted", + "type": "string", + "description": "The formatted value of the native currency transferred", + "example": "0.1" + }, + { + "name": "direction", + "type": "string", + "description": "The direction of the transfer (incoming or outgoing)", + "example": "outgoing" + }, + { + "name": "internal_transaction", + "type": "boolean", + "description": "Flag indicating if the transfer was an internal transaction", + "example": false + }, + { + "name": "token_symbol", + "type": "string", + "description": "The symbol of the native currency", + "example": "ETH" + }, + { + "name": "token_logo", + "type": "string", + "description": "The logo URL of the native currency", + "example": "https://cdn.moralis.io/eth/0x67b6d479c7bb412c54e03dca8e1bc6740ce6b99c.png" + } + ] + } + } + ] + } + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.wallets.getWalletHistory({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.wallets.get_wallet_history(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + } + }, + "nft": { + "getWalletNFTs": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get NFTs by wallet", + "description": "Get NFTs owned by a given address.\n* The response will include status [SYNCED/SYNCING] based on the contracts being indexed.\n* Use the token_address param to get results for a specific contract only\n* Note that results will include all indexed NFTs\n* Any request that includes the token_address param will start the indexing process for that NFT collection the very first time it is requested.", + "method": "GET", + "path": "/:address/nft", + "pathParams": [ + { + "name": "address", + "description": "The address of the wallet", + "required": true, + "example": "0xff3879b8a363aed92a6eaba8f61f1a96a9ec3c1e", + "type": "string" + } + ], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", + "type": "string", + "enum": [ + "eth", + "0x1", + "sepolia", + "0xaa36a7", + "holesky", + "0x4268", + "polygon", + "0x89", + "amoy", + "0x13882", + "bsc", + "0x38", + "bsc testnet", + "0x61", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "gnosis", + "0x64", + "gnosis testnet", + "0x27d8", + "chiliz", + "0x15b38", + "chiliz testnet", + "0x15b32", + "base", + "0x2105", + "base sepolia", + "0x14a34", + "optimism", + "0xa", + "optimism sepolia", + "0xaa37dc", + "linea", + "0xe705", + "linea sepolia", + "0xe705" + ] + }, + { + "name": "format", + "description": "The format of the token ID", + "required": false, + "example": "decimal", + "type": "string", + "enum": ["decimal", "hex"] + }, + { + "name": "limit", + "description": "The desired page size of the result.", + "required": false, + "type": "number" + }, + { + "name": "exclude_spam", + "description": "Should spam NFTs be excluded from the result?", + "required": false, + "type": "boolean" + }, + { + "name": "token_addresses", + "description": "The non-fungible token (NFT) addresses to get balances for", + "required": false, + "type": "array", + "field": { "type": "string" } + }, + { + "name": "cursor", + "description": "The cursor returned in the previous response (used for getting the next page).", + "type": "string" + }, + { + "name": "normalizeMetadata", + "description": "The option to enable metadata normalization. Learn more about metadata normalization [here](/web3-data-api/evm/normalized-vs-non-normalized-metadata).", + "required": false, + "type": "boolean" + }, + { + "name": "media_items", + "type": "boolean", + "description": "Should preview media data be returned? Learn more about media items [here](/web3-data-api/evm/nft-image-previews).", + "example": false + } + ], + "responses": [ + { + "status": "200", + "description": "Returns a collection of NFT owners", + "body": { + "type": "object", + "fields": [ + { + "name": "status", + "type": "string", + "description": "The syncing status of the address [SYNCING/SYNCED]", + "example": "SYNCING" + }, + { + "name": "total", + "type": "number", + "description": "The total number of matches for this query", + "example": "2000" + }, + { + "name": "page", + "type": "number", + "description": "The current page of the result", + "example": "2" + }, + { + "name": "page_size", + "type": "number", + "description": "The number of results per page", + "example": "100" + }, + { + "name": "cursor", + "type": "string", + "description": "The cursor to get to the next page" + }, + { + "name": "result", + "type": "object", + "fields": [ + { + "name": "token_address", + "type": "string", + "description": "The address of the NFT contract", + "example": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB" + }, + { + "name": "token_id", + "type": "string", + "description": "The token ID of the NFT", + "example": "15" + }, + { + "name": "contract_type", + "type": "string", + "description": "The type of NFT contract standard", + "example": "ERC721" + }, + { + "name": "owner_of", + "type": "string", + "description": "The wallet address of the owner of the NFT", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "block_number", + "type": "string", + "description": "The block number when the amount or owner changed", + "example": "88256" + }, + { + "name": "block_number_minted", + "type": "string", + "description": "The block number when the NFT was minted", + "example": "88256" + }, + { + "name": "token_uri", + "type": "string", + "description": "The URI to the metadata of the token" + }, + { + "name": "metadata", + "type": "string", + "description": "The metadata of the token" + }, + { + "name": "normalized_metadata", + "description": "A normalized metadata version of the NFT's metadata.", + "properties": { + "name": { + "type": "string", + "description": "The name or title of the NFT", + "example": "Moralis Mug" + }, + "description": { + "type": "string", + "description": "A detailed description of the NFT", + "example": "Moralis Coffee nug 3D Asset that can be used in 3D worldspaces. This NFT is presented as a flat PNG, a Unity3D Prefab and a standard fbx." + }, + "image": { + "type": "string", + "description": "The URL of the NFT's image", + "example": "https://arw2wxg84h6b.moralishost.com:2053/server/files/tNJatzsHirx4V2VAep6sc923OYGxvkpBeJttR7Ks/de504bbadadcbe30c86278342fcf2560_moralismug.png" + }, + "external_link": { + "type": "string", + "description": "A link to additional information", + "example": "https://giphy.com/gifs/loop-recursion-ting-aaODAv1iuQdgI" + }, + "animation_url": { + "type": "string", + "description": "An animated version of the NFT's image", + "example": "https://giphy.com/gifs/food-design-donuts-o9ngTPVYW4qo8" + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/normalizedMetadataAttribute" + } + } + } + }, + { + "name": "media", + "description": "A set of links to 'thumbnail / preview' media files", + "properties": { + "mimetype": { + "type": "string", + "description": "The mimetype of the media file [see https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types]" + }, + "category": { + "enum": [ + "image", + "audio", + "video" + ] + }, + "status": { + "enum": [ + "success", + "processing", + "unsupported_media", + "invalid_url", + "host_unavailable", + "temporarily_unavailable" + ], + "description": "
successThe NFT Preview was created / retrieved successfully
processingThe NFT Preview was not found and has been submitted for generation.
unsupported_mediaThe mime-type of the NFT's media file indicates a type not currently supported.
invalid_urlThe 'image' URL from the NFT's metadata is not a valid URL and cannot be processed.
host_unavailableThe 'image' URL from the NFT's metadata returned an HttpCode indicating the host / file is not available.
temporarily_unavailableThe attempt to load / parse the NFT media file failed (usually due to rate limiting) and will be tried again at next request.
" + }, + "original_media_url": { + "type": "string", + "description": "The url of the original media file." + }, + "updatedAt": { + "type": "string", + "description": "The timestamp of the last update to this NFT media record." + }, + "parent_hash": { + "type": "string", + "description": "Hash value of the original media file." + }, + "media_collection": { + "description": "Preview item associated with the original", + "$ref": "#/components/schemas/mediaCollection" + } + } + }, + { + "name": "amount", + "type": "string", + "description": "The number of this item the user owns (used by ERC1155)", + "example": "1" + }, + { + "name": "name", + "type": "string", + "description": "The name of the NFT contract", + "example": "CryptoKitties" + }, + { + "name": "symbol", + "type": "string", + "description": "The symbol of the NFT contract", + "example": "RARI" + }, + { + "name": "token_hash", + "type": "string", + "description": "The token hash", + "example": "502cee781b0fb40ea02508b21d319ced" + }, + { + "name": "last_token_uri_sync", + "type": "string", + "description": "When the token_uri was last updated", + "example": "2021-02-24T00:47:26.647Z" + }, + { + "name": "last_metadata_sync", + "type": "string", + "description": "When the metadata was last updated", + "example": "2021-02-24T00:47:26.647Z" + }, + { + "name": "possible_spam", + "type": "boolean", + "description": "Indicates if a contract is possibly a spam contract", + "example": "false" + }, + { + "name": "verified_collection", + "type": "boolean", + "description": "Indicates if a contract is verified. Currently supported for ethereum NFT contracts.", + "example": "false" + } + ] + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.nft.getWalletNFTs({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.nft.get_wallet_nfts(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getMultipleNFTs": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get Multiple NFTs", + "description": "Returns an array of NFTs specified in the request.\n* Note that results will include all indexed NFTs\n* Any request that includes the token_address param will start the indexing process for that NFT collection the very first time it is requested.\n* Only 25 NFTs can be fetched in one API call.", + "method": "POST", + "path": "/nft/getMultipleNFTs", + "pathParams": [], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", + "type": "string", + "enum": [ + "eth", + "0x1", + "sepolia", + "0xaa36a7", + "holesky", + "0x4268", + "polygon", + "0x89", + "amoy", + "0x13882", + "bsc", + "0x38", + "bsc testnet", + "0x61", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "gnosis", + "0x64", + "gnosis testnet", + "0x27d8", + "chiliz", + "0x15b38", + "chiliz testnet", + "0x15b32", + "base", + "0x2105", + "base sepolia", + "0x14a34", + "optimism", + "0xa", + "optimism sepolia", + "0xaa37dc", + "linea", + "0xe705", + "linea sepolia", + "0xe705" + ] + } + ], + "bodyParam": { + "required": true, + "description": "Body", + "type": "object", + "fields": [ + { + "name": "tokens", + "type": "array", + "required": true, + "description": "The tokens to be fetched (max 25 tokens)", + "example": [ + { + "token_address": "0xa4991609c508b6d4fb7156426db0bd49fe298bd8", + "token_id": "12" + }, + { + "token_address": "0x3c64dc415ebb4690d1df2b6216148c8de6dd29f7", + "token_id": "1" + }, + { + "token_address": "0x3c64dc415ebb4690d1df2b6216148c8de6dd29f7", + "token_id": "200" + } + ], + "field": { + "type": "object", + "fields": [ + { + "name": "token_address", + "type": "string", + "description": "The contract address", + "example": "0xa4991609c508b6d4fb7156426db0bd49fe298bd8" + }, + { + "name": "token_id", + "type": "string", + "description": "The id of the token", + "example": 12 + } + ] + } + }, + { + "name": "normalizeMetadata", + "type": "boolean", + "required": false, + "description": "The option to enable metadata normalization. Learn more about metadata normalization [here](/web3-data-api/evm/normalized-vs-non-normalized-metadata).", + "example": false + }, + { + "name": "media_items", + "type": "boolean", + "description": "Should preview media data be returned? Learn more about media items [here](/web3-data-api/evm/nft-image-previews).", + "example": true + } + ] + }, + "responses": [ + { + "status": "200", + "description": "Returns a collection of NFTs", + "body": { + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "token_address", + "type": "string", + "description": "The address of the NFT contract", + "example": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB", + "required": true + }, + { + "name": "token_id", + "type": "string", + "description": "The token ID of the NFT", + "example": "15", + "required": true + }, + { + "name": "contract_type", + "type": "string", + "description": "The type of NFT contract standard", + "example": "ERC721", + "required": true + }, + { + "name": "owner_of", + "type": "string", + "description": "The wallet address of the owner of the NFT", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e", + "required": true + }, + { + "name": "block_number", + "type": "string", + "description": "The block number when the amount or owner changed", + "example": "88256", + "required": true + }, + { + "name": "block_number_minted", + "type": "string", + "description": "The block number when the NFT was minted", + "example": "88256", + "required": true + }, + { + "name": "token_uri", + "type": "string", + "description": "The URI to the metadata of the token" + }, + { + "name": "metadata", + "type": "string", + "description": "The metadata of the token" + }, + { + "name": "normalized_metadata", + "type": "object", + "description": "A normalized metadata version of the NFT's metadata.", + "fields": [ + { + "name": "name", + "type": "string", + "description": "The name or title of the NFT", + "example": "Moralis Mug" + }, + { + "name": "description", + "type": "string", + "description": "A detailed description of the NFT", + "example": "Moralis Coffee nug 3D Asset that can be used in 3D worldspaces. This NFT is presented as a flat PNG, a Unity3D Prefab and a standard fbx." + }, + { + "name": "image", + "type": "string", + "description": "The URL of the NFT's image", + "example": "https://arw2wxg84h6b.moralishost.com:2053/server/files/tNJatzsHirx4V2VAep6sc923OYGxvkpBeJttR7Ks/de504bbadadcbe30c86278342fcf2560_moralismug.png" + }, + { + "name": "external_link", + "type": "string", + "description": "A link to additional information", + "example": "https://giphy.com/gifs/loop-recursion-ting-aaODAv1iuQdgI" + }, + { + "name": "animation_url", + "type": "string", + "description": "An animated version of the NFT's image", + "example": "https://giphy.com/gifs/food-design-donuts-o9ngTPVYW4qo8" + }, + { + "name": "attributes", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "trait_type", + "type": "string", + "description": "The trait title or descriptor", + "example": "Eye Color" + }, + { + "name": "value", + "type": "object", + "description": "The value of the attribute", + "example": "hazel" + }, + { + "name": "display_type", + "type": "string", + "description": "The type the attribute value should be displayed as", + "example": "string" + }, + { + "name": "max_value", + "type": "number", + "description": "For numeric values, the upper range", + "example": 100 + }, + { + "name": "trait_count", + "type": "number", + "description": "The number of possible values for this trait", + "example": 7 + }, + { + "name": "order", + "type": "number", + "description": "Order the trait should appear in the attribute list.", + "example": 1 + } + ] + } + } + ] + }, + { + "name": "amount", + "type": "string", + "description": "The number of this item the user owns (used by ERC1155)", + "example": "1" + }, + { + "name": "name", + "type": "string", + "description": "The name of the NFT contract", + "example": "CryptoKitties", + "required": true + }, + { + "name": "symbol", + "type": "string", + "description": "The symbol of the NFT contract", + "example": "RARI", + "required": true + }, + { + "name": "token_hash", + "type": "string", + "description": "The token hash", + "example": "502cee781b0fb40ea02508b21d319ced", + "required": true + }, + { + "name": "last_token_uri_sync", + "type": "string", + "description": "When the token_uri was last updated", + "example": "2021-02-24T00:47:26.647Z", + "required": true + }, + { + "name": "last_metadata_sync", + "type": "string", + "description": "When the metadata was last updated", + "example": "2021-02-24T00:47:26.647Z", + "required": true + } + ] + } + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.nft.getMultipleNFTs({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nbody = []\n\nparams = {}\n\nresult = evm_api.nft.get_multiple_nfts(\n api_key=api_key,\n body=body,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getWalletNFTTransfers": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get NFT transfers by wallet", + "description": "Get transfers of NFTs given the wallet and other parameters.", + "method": "GET", + "path": "/:address/nft/transfers", + "pathParams": [ + { + "name": "address", + "description": "The wallet address of the sender or recipient of the transfers", + "required": true, + "example": "0x1f9090aaE28b8a3dCeaDf281B0F12828e676c326", + "type": "string" + } + ], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", + "type": "string", + "enum": [ + "eth", + "0x1", + "sepolia", + "0xaa36a7", + "holesky", + "0x4268", + "polygon", + "0x89", + "amoy", + "0x13882", + "bsc", + "0x38", + "bsc testnet", + "0x61", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "gnosis", + "0x64", + "gnosis testnet", + "0x27d8", + "chiliz", + "0x15b38", + "chiliz testnet", + "0x15b32", + "base", + "0x2105", + "base sepolia", + "0x14a34", + "optimism", + "0xa", + "optimism sepolia", + "0xaa37dc", + "linea", + "0xe705", + "linea sepolia", + "0xe705" + ] + }, + { + "name": "contract_addresses", + "description": "List of contract addresses of transfers", + "required": false, + "type": "array", + "field": { "type": "string" } + }, + { + "name": "format", + "description": "The format of the token ID", + "required": false, + "example": "decimal", + "type": "string" + }, + { + "name": "from_block", + "description": "The minimum block number from which to get the transfers\n* Provide the param 'from_block' or 'from_date'\n* If 'from_date' and 'from_block' are provided, 'from_block' will be used.\n", + "required": false, + "type": "number" + }, + { + "name": "to_block", + "description": "To get the reserves at this block number", + "required": false, + "type": "string" + }, + { + "name": "from_date", + "description": "The date from where to get the transfers (any format that is accepted by momentjs)\n* Provide the param 'from_block' or 'from_date'\n* If 'from_date' and 'from_block' are provided, 'from_block' will be used.\n", + "required": false, + "type": "string" + }, + { + "name": "to_date", + "description": "Get transfers up until this date (any format that is accepted by momentjs)\n* Provide the param 'to_block' or 'to_date'\n* If 'to_date' and 'to_block' are provided, 'to_block' will be used.\n", + "required": false, + "type": "string" + }, + { + "name": "limit", + "description": "The desired page size of the result.", + "required": false, + "type": "number" + }, + { + "name": "order", + "required": false, + "type": "string", + "description": "The order of the result, in ascending (ASC) or descending (DESC)", + "example": "DESC", + "enum": ["ASC", "DESC"] + }, + { + "name": "cursor", + "description": "The cursor returned in the previous response (used for getting the next page).", + "type": "string" + } + ], + "responses": [ + { + "status": "200", + "description": "Returns a collection of NFT transfers", + "body": { + "type": "object", + "fields": [ + { + "name": "page", + "type": "number", + "description": "The current page of the result", + "example": "2" + }, + { + "name": "page_size", + "type": "number", + "description": "The number of results per page", + "example": "100" + }, + { + "name": "cursor", + "type": "string", + "description": "The cursor to get to the next page" + }, + { + "name": "result", + "type": "object", + "fields": [ + { + "name": "token_address", + "type": "string", + "description": "The address of the NFT contract", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "token_id", + "type": "string", + "description": "The token ID of the NFT", + "example": "15" + }, + { + "name": "from_address", + "type": "string", + "description": "The address that sent the NFT", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "from_address_label", + "description": "The label of the from address", + "example": "Binance 1" + }, + { + "name": "to_address", + "type": "string", + "description": "The address that received the NFT", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "to_address_label", + "description": "The label of the to address", + "example": "Binance 2" + }, + { + "name": "value", + "type": "string", + "description": "The value that was sent in the transaction (ETH/BNB/etc..)", + "example": "1000000000000000" + }, + { + "name": "amount", + "type": "string", + "description": "The number of tokens transferred", + "example": "1" + }, + { + "name": "contract_type", + "type": "string", + "description": "The type of NFT contract standard", + "example": "ERC721" + }, + { + "name": "block_number", + "type": "string", + "description": "The block number of the transaction", + "example": "88256" + }, + { + "name": "block_timestamp", + "type": "string", + "description": "The block timestamp", + "example": "2021-06-04T16:00:15" + }, + { + "name": "block_hash", + "type": "string", + "description": "The block hash of the transaction" + }, + { + "name": "transaction_hash", + "type": "string", + "description": "The transaction hash", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "transaction_type", + "type": "string", + "description": "The transaction type" + }, + { + "name": "transaction_index", + "type": "number", + "description": "The transaction index" + }, + { + "name": "log_index", + "type": "number", + "description": "The log index" + }, + { + "name": "operator", + "type": "string", + "description": "The operator present only for ERC1155 transfers", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "possible_spam", + "type": "boolean", + "description": "Indicates if a contract is possibly a spam contract", + "example": "false" + }, + { + "name": "verified_collection", + "type": "boolean", + "description": "Indicates if a contract is verified", + "example": "false" + } + ] + }, + { + "name": "block_exists", + "type": "boolean", + "description": "Indicator if the block exists", + "example": true + }, + { + "name": "index_complete", + "type": "boolean", + "description": "Indicator if the block is fully indexed", + "example": true + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.nft.getWalletNFTTransfers({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.nft.get_wallet_nft_transfers(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getWalletNFTCollections": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get NFT collections by wallet", + "description": "Get NFT collections owned by a given wallet address.", + "method": "GET", + "path": "/:address/nft/collections", + "pathParams": [ + { + "name": "address", + "description": "The wallet address of the owner of NFTs in the collections", + "required": true, + "example": "0x1f9090aaE28b8a3dCeaDf281B0F12828e676c326", + "type": "string" + } + ], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", + "type": "string", + "enum": [ + "eth", + "0x1", + "sepolia", + "0xaa36a7", + "holesky", + "0x4268", + "polygon", + "0x89", + "amoy", + "0x13882", + "bsc", + "0x38", + "bsc testnet", + "0x61", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "gnosis", + "0x64", + "gnosis testnet", + "0x27d8", + "chiliz", + "0x15b38", + "chiliz testnet", + "0x15b32", + "base", + "0x2105", + "base sepolia", + "0x14a34", + "optimism", + "0xa", + "optimism sepolia", + "0xaa37dc", + "linea", + "0xe705", + "linea sepolia", + "0xe705" + ] + }, + { + "name": "limit", + "description": "The desired page size of the result.", + "required": false, + "type": "number" + }, + { + "name": "token_counts", + "description": "Should token counts per collection be included in the response?", + "required": false, + "type": "boolean" + }, + { + "name": "exclude_spam", + "description": "Should spam NFTs be excluded from the result?", + "required": false, + "type": "boolean" + }, + { + "name": "cursor", + "description": "The cursor returned in the previous response (used for getting the next page).", + "type": "string" + } + ], + "responses": [ + { + "status": "200", + "description": "Returns the NFT collections owned by a wallet", + "body": { + "type": "object", + "fields": [ + { + "name": "status", + "type": "string", + "description": "The syncing status of the address [SYNCING/SYNCED]", + "example": "SYNCING" + }, + { + "name": "page", + "type": "number", + "description": "The current page of the result", + "example": "2" + }, + { + "name": "page_size", + "type": "number", + "description": "The number of results per page", + "example": "100" + }, + { + "name": "cursor", + "type": "string", + "description": "The cursor to get to the next page" + }, + { + "name": "result", + "type": "object", + "fields": [ + { + "name": "token_address", + "type": "string", + "description": "The address of the NFT contract", + "example": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB" + }, + { + "name": "contract_type", + "type": "string", + "description": "The type of NFT contract standard", + "example": "ERC721" + }, + { + "name": "name", + "type": "string", + "description": "The name of the NFT contract", + "example": "CryptoKitties" + }, + { + "name": "symbol", + "type": "string", + "description": "The symbol of the NFT contract", + "example": "RARI" + }, + { + "name": "possible_spam", + "type": "boolean", + "description": "Indicates if a contract is possibly a spam contract", + "example": "false" + }, + { + "name": "verified_collection", + "type": "boolean", + "description": "Indicates if a contract is verified", + "example": "false" + }, + { + "name": "count", + "type": "number", + "description": "The number of tokens the wallet holds in this collection", + "example": 5 + }, + { + "name": "collection_logo", + "type": "string", + "description": "The logo of the collection", + "example": "https://cdn.moralis.io/eth/0x67b6d479c7bb412c54e03dca8e1bc6740ce6b99c.png" + }, + { + "name": "collection_banner_image", + "type": "string", + "description": "The banner image of the collection", + "example": "https://cdn.moralis.io/eth/0x67b6d479c7bb412c54e03dca8e1bc6740ce6b99c.png" + } + ] + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.nft.getWalletNFTCollections({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.nft.get_wallet_nft_collections(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getContractNFTs": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get NFTs by contract", + "description": "Get NFTs for a given contract address, including metadata for all NFTs (where available).\n* Results are limited to 100 per page by default\n* Requests for contract addresses not yet indexed will automatically start the indexing process for that NFT collection.", + "method": "GET", + "path": "/nft/:address", + "pathParams": [ + { + "name": "address", + "description": "The address of the NFT contract", + "required": true, + "example": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB", + "type": "string" + } + ], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", + "type": "string", + "enum": [ + "eth", + "0x1", + "sepolia", + "0xaa36a7", + "holesky", + "0x4268", + "polygon", + "0x89", + "amoy", + "0x13882", + "bsc", + "0x38", + "bsc testnet", + "0x61", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "gnosis", + "0x64", + "gnosis testnet", + "0x27d8", + "chiliz", + "0x15b38", + "chiliz testnet", + "0x15b32", + "base", + "0x2105", + "base sepolia", + "0x14a34", + "optimism", + "0xa", + "optimism sepolia", + "0xaa37dc", + "linea", + "0xe705", + "linea sepolia", + "0xe705" + ] + }, + { + "name": "format", + "description": "The format of the token ID", + "required": false, + "example": "decimal", + "type": "string" + }, + { + "name": "limit", + "description": "The desired page size of the result.", + "required": false, + "type": "number" + }, + { + "name": "totalRanges", + "description": "The number of subranges to split the results into", + "required": false, + "type": "number" + }, + { + "name": "range", + "description": "The desired subrange to query", + "required": false, + "type": "number" + }, + { + "name": "cursor", + "description": "The cursor returned in the previous response (used for getting the next page).", + "type": "string" + }, + { + "name": "normalizeMetadata", + "description": "Should normalized metadata be returned?", + "required": false, + "type": "boolean" + }, + { + "name": "media_items", + "description": "Should preview media data be returned?", + "required": false, + "type": "boolean" + } + ], + "responses": [ + { + "status": "200", + "description": "Returns a collection of NFTs", + "body": { + "type": "object", + "fields": [ + { + "name": "page", + "type": "number", + "description": "The current page of the result", + "example": "2" + }, + { + "name": "page_size", + "type": "number", + "description": "The number of results per page", + "example": "100" + }, + { + "name": "cursor", + "type": "string", + "description": "The cursor to get to the next page" + }, + { + "name": "result", + "type": "object", + "fields": [ + { + "name": "token_address", + "type": "string", + "description": "The address of the NFT contract", + "example": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB" + }, + { + "name": "token_id", + "type": "string", + "description": "The token ID of the NFT", + "example": "15" + }, + { + "name": "owner_of", + "type": "string", + "description": "The wallet address of the owner of the NFT", + "example": "0x9c83ff0f1c8924da96cb2fcb7e093f78eb2e316b" + }, + { + "name": "token_hash", + "type": "string", + "description": "The token hash", + "example": "502cee781b0fb40ea02508b21d319ced" + }, + { + "name": "block_number", + "type": "string", + "description": "The block number when the amount or owner changed", + "example": "88256" + }, + { + "name": "block_number_minted", + "type": "string", + "description": "The block number when the NFT was minted", + "example": "88256" + }, + { + "name": "contract_type", + "type": "string", + "description": "The type of NFT contract standard", + "example": "ERC721" + }, + { + "name": "token_uri", + "type": "string", + "description": "The URI to the metadata of the token" + }, + { + "name": "metadata", + "type": "string", + "description": "The metadata of the token" + }, + { + "name": "normalized_metadata", + "description": "A normalized metadata version of the NFT's metadata.", + "properties": { + "name": { + "type": "string", + "description": "The name or title of the NFT", + "example": "Moralis Mug" + }, + "description": { + "type": "string", + "description": "A detailed description of the NFT", + "example": "Moralis Coffee nug 3D Asset that can be used in 3D worldspaces. This NFT is presented as a flat PNG, a Unity3D Prefab and a standard fbx." + }, + "image": { + "type": "string", + "description": "The URL of the NFT's image", + "example": "https://arw2wxg84h6b.moralishost.com:2053/server/files/tNJatzsHirx4V2VAep6sc923OYGxvkpBeJttR7Ks/de504bbadadcbe30c86278342fcf2560_moralismug.png" + }, + "external_link": { + "type": "string", + "description": "A link to additional information", + "example": "https://giphy.com/gifs/loop-recursion-ting-aaODAv1iuQdgI" + }, + "animation_url": { + "type": "string", + "description": "An animated version of the NFT's image", + "example": "https://giphy.com/gifs/food-design-donuts-o9ngTPVYW4qo8" + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/normalizedMetadataAttribute" + } + } + } + }, + { + "name": "media", + "description": "A set of links to 'thumbnail / preview' media files", + "properties": { + "mimetype": { + "type": "string", + "description": "The mimetype of the media file [see https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types]" + }, + "category": { + "enum": [ + "image", + "audio", + "video" + ] + }, + "status": { + "enum": [ + "success", + "processing", + "unsupported_media", + "invalid_url", + "host_unavailable", + "temporarily_unavailable" + ], + "description": "
successThe NFT Preview was created / retrieved successfully
processingThe NFT Preview was not found and has been submitted for generation.
unsupported_mediaThe mime-type of the NFT's media file indicates a type not currently supported.
invalid_urlThe 'image' URL from the NFT's metadata is not a valid URL and cannot be processed.
host_unavailableThe 'image' URL from the NFT's metadata returned an HttpCode indicating the host / file is not available.
temporarily_unavailableThe attempt to load / parse the NFT media file failed (usually due to rate limiting) and will be tried again at next request.
" + }, + "original_media_url": { + "type": "string", + "description": "The url of the original media file." + }, + "updatedAt": { + "type": "string", + "description": "The timestamp of the last update to this NFT media record." + }, + "parent_hash": { + "type": "string", + "description": "Hash value of the original media file." + }, + "media_collection": { + "description": "Preview item associated with the original", + "$ref": "#/components/schemas/mediaCollection" + } + } + }, + { + "name": "minter_address", + "type": "string", + "description": "The address that minted the NFT", + "example": "0x9c83ff0f1c8924da96cb2fcb7e093f78eb2e316b" + }, + { + "name": "last_token_uri_sync", + "type": "string", + "description": "When the token_uri was last updated" + }, + { + "name": "last_metadata_sync", + "type": "string", + "description": "When the metadata was last updated" + }, + { + "name": "amount", + "type": "string", + "description": "The quantity of this item that the user owns (used by ERC1155)", + "example": "1" + }, + { + "name": "name", + "type": "string", + "description": "The name of the NFT contract", + "example": "CryptoKitties" + }, + { + "name": "symbol", + "type": "string", + "description": "The symbol of the NFT contract", + "example": "RARI" + }, + { + "name": "possible_spam", + "type": "boolean", + "description": "Indicates if a contract is possibly a spam contract", + "example": "false" + }, + { + "name": "verified_collection", + "type": "boolean", + "description": "Indicates if a contract is verified", + "example": "false" + } + ] + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.nft.getContractNFTs({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.nft.get_contract_nfts(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getNFTOwners": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get NFT owners by contract", + "description": "Get owners of NFTs for a given contract.\n* Requests for contract addresses not yet indexed will automatically start the indexing process for that NFT collection.", + "method": "GET", + "path": "/nft/:address/owners", + "pathParams": [ + { + "name": "address", + "description": "The address of the NFT contract", + "required": true, + "example": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB", + "type": "string" + } + ], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", + "type": "string", + "enum": [ + "eth", + "0x1", + "sepolia", + "0xaa36a7", + "holesky", + "0x4268", + "polygon", + "0x89", + "amoy", + "0x13882", + "bsc", + "0x38", + "bsc testnet", + "0x61", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "gnosis", + "0x64", + "gnosis testnet", + "0x27d8", + "chiliz", + "0x15b38", + "chiliz testnet", + "0x15b32", + "base", + "0x2105", + "base sepolia", + "0x14a34", + "optimism", + "0xa", + "optimism sepolia", + "0xaa37dc", + "linea", + "0xe705", + "linea sepolia", + "0xe705" + ] + }, + { + "name": "format", + "description": "The format of the token ID", + "required": false, + "example": "decimal", + "type": "string" + }, + { + "name": "limit", + "description": "The desired page size of the result.", + "required": false, + "type": "number" + }, + { + "name": "cursor", + "description": "The cursor returned in the previous response (used for getting the next page).", + "type": "string" + }, + { + "name": "normalizeMetadata", + "description": "Should normalized metadata be returned?", + "required": false, + "type": "boolean" + }, + { + "name": "media_items", + "description": "Should preview media data be returned?", + "required": false, + "type": "boolean" + } + ], + "responses": [ + { + "status": "200", + "description": "Returns a collection of NFT owners", + "body": { + "type": "object", + "fields": [ + { + "name": "status", + "type": "string", + "description": "The syncing status of the address [SYNCING/SYNCED]", + "example": "SYNCING" + }, + { + "name": "page", + "type": "number", + "description": "The current page of the result", + "example": "2" + }, + { + "name": "page_size", + "type": "number", + "description": "The number of results per page", + "example": "100" + }, + { + "name": "cursor", + "type": "string", + "description": "The cursor to get to the next page" + }, + { + "name": "result", + "type": "object", + "fields": [ + { + "name": "token_address", + "type": "string", + "description": "The address of the NFT contract", + "example": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB" + }, + { + "name": "token_id", + "type": "string", + "description": "The token ID of the NFT", + "example": "15" + }, + { + "name": "contract_type", + "type": "string", + "description": "The type of NFT contract standard", + "example": "ERC721" + }, + { + "name": "owner_of", + "type": "string", + "description": "The wallet address of the owner of the NFT", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "block_number", + "type": "string", + "description": "The block number when the amount or owner changed", + "example": "88256" + }, + { + "name": "block_number_minted", + "type": "string", + "description": "The block number when the NFT was minted", + "example": "88256" + }, + { + "name": "token_uri", + "type": "string", + "description": "The URI to the metadata of the token" + }, + { + "name": "metadata", + "type": "string", + "description": "The metadata of the token" + }, + { + "name": "normalized_metadata", + "description": "A normalized metadata version of the NFT's metadata.", + "properties": { + "name": { + "type": "string", + "description": "The name or title of the NFT", + "example": "Moralis Mug" + }, + "description": { + "type": "string", + "description": "A detailed description of the NFT", + "example": "Moralis Coffee nug 3D Asset that can be used in 3D worldspaces. This NFT is presented as a flat PNG, a Unity3D Prefab and a standard fbx." + }, + "image": { + "type": "string", + "description": "The URL of the NFT's image", + "example": "https://arw2wxg84h6b.moralishost.com:2053/server/files/tNJatzsHirx4V2VAep6sc923OYGxvkpBeJttR7Ks/de504bbadadcbe30c86278342fcf2560_moralismug.png" + }, + "external_link": { + "type": "string", + "description": "A link to additional information", + "example": "https://giphy.com/gifs/loop-recursion-ting-aaODAv1iuQdgI" + }, + "animation_url": { + "type": "string", + "description": "An animated version of the NFT's image", + "example": "https://giphy.com/gifs/food-design-donuts-o9ngTPVYW4qo8" + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/normalizedMetadataAttribute" + } + } + } + }, + { + "name": "media", + "description": "A set of links to 'thumbnail / preview' media files", + "properties": { + "mimetype": { + "type": "string", + "description": "The mimetype of the media file [see https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types]" + }, + "category": { + "enum": [ + "image", + "audio", + "video" + ] + }, + "status": { + "enum": [ + "success", + "processing", + "unsupported_media", + "invalid_url", + "host_unavailable", + "temporarily_unavailable" + ], + "description": "
successThe NFT Preview was created / retrieved successfully
processingThe NFT Preview was not found and has been submitted for generation.
unsupported_mediaThe mime-type of the NFT's media file indicates a type not currently supported.
invalid_urlThe 'image' URL from the NFT's metadata is not a valid URL and cannot be processed.
host_unavailableThe 'image' URL from the NFT's metadata returned an HttpCode indicating the host / file is not available.
temporarily_unavailableThe attempt to load / parse the NFT media file failed (usually due to rate limiting) and will be tried again at next request.
" + }, + "original_media_url": { + "type": "string", + "description": "The url of the original media file." + }, + "updatedAt": { + "type": "string", + "description": "The timestamp of the last update to this NFT media record." + }, + "parent_hash": { + "type": "string", + "description": "Hash value of the original media file." + }, + "media_collection": { + "description": "Preview item associated with the original", + "$ref": "#/components/schemas/mediaCollection" + } + } + }, + { + "name": "amount", + "type": "string", + "description": "The number of this item the user owns (used by ERC1155)", + "example": "1" + }, + { + "name": "name", + "type": "string", + "description": "The name of the NFT contract", + "example": "CryptoKitties" + }, + { + "name": "symbol", + "type": "string", + "description": "The symbol of the NFT contract", + "example": "RARI" + }, + { + "name": "token_hash", + "type": "string", + "description": "The token hash", + "example": "502cee781b0fb40ea02508b21d319ced" + }, + { + "name": "last_token_uri_sync", + "type": "string", + "description": "When the token_uri was last updated", + "example": "2021-02-24T00:47:26.647Z" + }, + { + "name": "last_metadata_sync", + "type": "string", + "description": "When the metadata was last updated", + "example": "2021-02-24T00:47:26.647Z" + }, + { + "name": "possible_spam", + "type": "boolean", + "description": "Indicates if a contract is possibly a spam contract", + "example": "false" + }, + { + "name": "verified_collection", + "type": "boolean", + "description": "Indicates if a contract is verified", + "example": "false" + } + ] + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.nft.getNFTOwners({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.nft.get_nft_owners(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getNFTContractTransfers": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get NFT transfers by contract", + "description": "Get transfers of NFTs for a given contract and other parameters.", + "method": "GET", + "path": "/nft/:address/transfers", + "pathParams": [ + { + "name": "address", + "description": "The address of the NFT contract", + "required": true, + "example": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB", + "type": "string" + } + ], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", + "type": "string", + "enum": [ + "eth", + "0x1", + "sepolia", + "0xaa36a7", + "holesky", + "0x4268", + "polygon", + "0x89", + "amoy", + "0x13882", + "bsc", + "0x38", + "bsc testnet", + "0x61", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "gnosis", + "0x64", + "gnosis testnet", + "0x27d8", + "chiliz", + "0x15b38", + "chiliz testnet", + "0x15b32", + "base", + "0x2105", + "base sepolia", + "0x14a34", + "optimism", + "0xa", + "optimism sepolia", + "0xaa37dc", + "linea", + "0xe705", + "linea sepolia", + "0xe705" + ] + }, + { + "name": "from_block", + "description": "The minimum block number from where to get the transfers\n* Provide the param 'from_block' or 'from_date'\n* If 'from_date' and 'from_block' are provided, 'from_block' will be used.\n", + "required": false, + "type": "number" + }, + { + "name": "to_block", + "description": "The maximum block number from where to get the transfers.\n* Provide the param 'to_block' or 'to_date'\n* If 'to_date' and 'to_block' are provided, 'to_block' will be used.\n", + "required": false, + "type": "number" + }, + { + "name": "from_date", + "description": "The date from where to get the transfers (any format that is accepted by momentjs)\n* Provide the param 'from_block' or 'from_date'\n* If 'from_date' and 'from_block' are provided, 'from_block' will be used.\n", + "required": false, + "type": "string" + }, + { + "name": "to_date", + "description": "Get transfers up until this date (any format that is accepted by momentjs)\n* Provide the param 'to_block' or 'to_date'\n* If 'to_date' and 'to_block' are provided, 'to_block' will be used.\n", + "required": false, + "type": "string" + }, + { + "name": "format", + "description": "The format of the token ID", + "required": false, + "example": "decimal", + "type": "string" + }, + { + "name": "limit", + "description": "The desired page size of the result.", + "required": false, + "type": "number" + }, + { + "name": "order", + "required": false, + "type": "string", + "description": "The order of the result, in ascending (ASC) or descending (DESC).", + "example": "DESC", + "enum": ["ASC", "DESC"] + }, + { + "name": "cursor", + "description": "The cursor returned in the previous response (used for getting the next page).", + "type": "string" + } + ], + "responses": [ + { + "status": "200", + "description": "Returns a collection of NFT transfers", + "body": { + "type": "object", + "fields": [ + { + "name": "page", + "type": "number", + "description": "The current page of the result", + "example": "2" + }, + { + "name": "page_size", + "type": "number", + "description": "The number of results per page", + "example": "100" + }, + { + "name": "cursor", + "type": "string", + "description": "The cursor to get to the next page" + }, + { + "name": "result", + "type": "object", + "fields": [ + { + "name": "token_address", + "type": "string", + "description": "The address of the NFT contract", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "token_id", + "type": "string", + "description": "The token ID of the NFT", + "example": "15" + }, + { + "name": "from_address", + "type": "string", + "description": "The address that sent the NFT", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "from_address_label", + "description": "The label of the from address", + "example": "Binance 1" + }, + { + "name": "to_address", + "type": "string", + "description": "The address that received the NFT", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "to_address_label", + "description": "The label of the to address", + "example": "Binance 2" + }, + { + "name": "value", + "type": "string", + "description": "The value that was sent in the transaction (ETH/BNB/etc..)", + "example": "1000000000000000" + }, + { + "name": "amount", + "type": "string", + "description": "The number of tokens transferred", + "example": "1" + }, + { + "name": "contract_type", + "type": "string", + "description": "The type of NFT contract standard", + "example": "ERC721" + }, + { + "name": "block_number", + "type": "string", + "description": "The block number of the transaction", + "example": "88256" + }, + { + "name": "block_timestamp", + "type": "string", + "description": "The block timestamp", + "example": "2021-06-04T16:00:15" + }, + { + "name": "block_hash", + "type": "string", + "description": "The block hash of the transaction" + }, + { + "name": "transaction_hash", + "type": "string", + "description": "The transaction hash", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "transaction_type", + "type": "string", + "description": "The transaction type" + }, + { + "name": "transaction_index", + "type": "number", + "description": "The transaction index" + }, + { + "name": "log_index", + "type": "number", + "description": "The log index" + }, + { + "name": "operator", + "type": "string", + "description": "The operator present only for ERC1155 transfers", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "possible_spam", + "type": "boolean", + "description": "Indicates if a contract is possibly a spam contract", + "example": "false" + }, + { + "name": "verified_collection", + "type": "boolean", + "description": "Indicates if a contract is verified", + "example": "false" + } + ] + }, + { + "name": "block_exists", + "type": "boolean", + "description": "Indicator if the block exists", + "example": true + }, + { + "name": "index_complete", + "type": "boolean", + "description": "Indicator if the block is fully indexed", + "example": true + } ] - } } - ] } - } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.nft.getNFTContractTransfers({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.nft.get_nft_contract_transfers(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.wallets.getWalletHistory({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.wallets.get_wallet_history(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - } - }, - "nft": { - "getWalletNFTs": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get NFTs by wallet", - "description": "Get NFTs owned by a given address.\n* The response will include status [SYNCED/SYNCING] based on the contracts being indexed.\n* Use the token_address param to get results for a specific contract only\n* Note that results will include all indexed NFTs\n* Any request that includes the token_address param will start the indexing process for that NFT collection the very first time it is requested.", - "method": "GET", - "path": "/:address/nft", - "pathParams": [ - { - "name": "address", - "description": "The address of the wallet", - "required": true, - "example": "0xff3879b8a363aed92a6eaba8f61f1a96a9ec3c1e", - "type": "string" - } - ], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "0x1", - "sepolia", - "0xaa36a7", - "holesky", - "0x4268", - "polygon", - "0x89", - "amoy", - "0x13882", - "bsc", - "0x38", - "bsc testnet", - "0x61", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "gnosis", - "0x64", - "gnosis testnet", - "0x27d8", - "chiliz", - "0x15b38", - "chiliz testnet", - "0x15b32", - "base", - "0x2105", - "base sepolia", - "0x14a34", - "optimism", - "0xa", - "optimism sepolia", - "0xaa37dc", - "linea", - "0xe705", - "linea sepolia", - "0xe705" - ] }, - { - "name": "format", - "description": "The format of the token ID", - "required": false, - "example": "decimal", - "type": "string", - "enum": ["decimal", "hex"] - }, - { - "name": "limit", - "description": "The desired page size of the result.", - "required": false, - "type": "number" - }, - { - "name": "exclude_spam", - "description": "Should spam NFTs be excluded from the result?", - "required": false, - "type": "boolean" - }, - { - "name": "token_addresses", - "description": "The non-fungible token (NFT) addresses to get balances for", - "required": false, - "type": "array", - "field": { "type": "string" } - }, - { - "name": "cursor", - "description": "The cursor returned in the previous response (used for getting the next page).", - "type": "string" - }, - { - "name": "normalizeMetadata", - "description": "The option to enable metadata normalization. Learn more about metadata normalization [here](/web3-data-api/evm/normalized-vs-non-normalized-metadata).", - "required": false, - "type": "boolean" - }, - { - "name": "media_items", - "type": "boolean", - "description": "Should preview media data be returned? Learn more about media items [here](/web3-data-api/evm/nft-image-previews).", - "example": false - } - ], - "responses": [ - { - "status": "200", - "description": "Returns a collection of NFT owners", - "body": { - "type": "object", - "fields": [ - { - "name": "status", - "type": "string", - "description": "The syncing status of the address [SYNCING/SYNCED]", - "example": "SYNCING" - }, - { - "name": "total", - "type": "number", - "description": "The total number of matches for this query", - "example": "2000" - }, - { - "name": "page", - "type": "number", - "description": "The current page of the result", - "example": "2" - }, - { - "name": "page_size", - "type": "number", - "description": "The number of results per page", - "example": "100" - }, - { - "name": "cursor", - "type": "string", - "description": "The cursor to get to the next page" - }, - { - "name": "result", - "type": "object", - "fields": [ - { - "name": "token_address", - "type": "string", - "description": "The address of the NFT contract", - "example": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB" - }, - { - "name": "token_id", - "type": "string", - "description": "The token ID of the NFT", - "example": "15" - }, - { - "name": "contract_type", - "type": "string", - "description": "The type of NFT contract standard", - "example": "ERC721" - }, - { - "name": "owner_of", - "type": "string", - "description": "The wallet address of the owner of the NFT", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "block_number", - "type": "string", - "description": "The block number when the amount or owner changed", - "example": "88256" - }, - { - "name": "block_number_minted", - "type": "string", - "description": "The block number when the NFT was minted", - "example": "88256" - }, - { - "name": "token_uri", - "type": "string", - "description": "The URI to the metadata of the token" - }, - { - "name": "metadata", - "type": "string", - "description": "The metadata of the token" - }, - { - "name": "normalized_metadata", - "description": "A normalized metadata version of the NFT's metadata.", - "properties": { - "name": { - "type": "string", - "description": "The name or title of the NFT", - "example": "Moralis Mug" - }, - "description": { - "type": "string", - "description": "A detailed description of the NFT", - "example": "Moralis Coffee nug 3D Asset that can be used in 3D worldspaces. This NFT is presented as a flat PNG, a Unity3D Prefab and a standard fbx." - }, - "image": { - "type": "string", - "description": "The URL of the NFT's image", - "example": "https://arw2wxg84h6b.moralishost.com:2053/server/files/tNJatzsHirx4V2VAep6sc923OYGxvkpBeJttR7Ks/de504bbadadcbe30c86278342fcf2560_moralismug.png" - }, - "external_link": { - "type": "string", - "description": "A link to additional information", - "example": "https://giphy.com/gifs/loop-recursion-ting-aaODAv1iuQdgI" - }, - "animation_url": { - "type": "string", - "description": "An animated version of the NFT's image", - "example": "https://giphy.com/gifs/food-design-donuts-o9ngTPVYW4qo8" - }, - "attributes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/normalizedMetadataAttribute" - } - } - } - }, - { - "name": "media", - "description": "A set of links to 'thumbnail / preview' media files", - "properties": { - "mimetype": { - "type": "string", - "description": "The mimetype of the media file [see https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types]" - }, - "category": { "enum": ["image", "audio", "video"] }, - "status": { - "enum": [ - "success", - "processing", - "unsupported_media", - "invalid_url", - "host_unavailable", - "temporarily_unavailable" - ], - "description": "
successThe NFT Preview was created / retrieved successfully
processingThe NFT Preview was not found and has been submitted for generation.
unsupported_mediaThe mime-type of the NFT's media file indicates a type not currently supported.
invalid_urlThe 'image' URL from the NFT's metadata is not a valid URL and cannot be processed.
host_unavailableThe 'image' URL from the NFT's metadata returned an HttpCode indicating the host / file is not available.
temporarily_unavailableThe attempt to load / parse the NFT media file failed (usually due to rate limiting) and will be tried again at next request.
" - }, - "original_media_url": { - "type": "string", - "description": "The url of the original media file." - }, - "updatedAt": { - "type": "string", - "description": "The timestamp of the last update to this NFT media record." - }, - "parent_hash": { - "type": "string", - "description": "Hash value of the original media file." - }, - "media_collection": { - "description": "Preview item associated with the original", - "$ref": "#/components/schemas/mediaCollection" - } - } - }, - { - "name": "amount", - "type": "string", - "description": "The number of this item the user owns (used by ERC1155)", - "example": "1" - }, - { - "name": "name", - "type": "string", - "description": "The name of the NFT contract", - "example": "CryptoKitties" - }, - { - "name": "symbol", - "type": "string", - "description": "The symbol of the NFT contract", - "example": "RARI" - }, - { - "name": "token_hash", - "type": "string", - "description": "The token hash", - "example": "502cee781b0fb40ea02508b21d319ced" - }, - { - "name": "last_token_uri_sync", + "getNFTTransfersFromToBlock": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get NFT transfers from a block to a block", + "description": "Get transfers of NFTs from a block number to a block number.", + "method": "GET", + "path": "/nft/transfers", + "pathParams": [], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", "type": "string", - "description": "When the token_uri was last updated", - "example": "2021-02-24T00:47:26.647Z" - }, - { - "name": "last_metadata_sync", + "enum": [ + "eth", + "0x1", + "sepolia", + "0xaa36a7", + "holesky", + "0x4268", + "polygon", + "0x89", + "amoy", + "0x13882", + "bsc", + "0x38", + "bsc testnet", + "0x61", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "gnosis", + "0x64", + "gnosis testnet", + "0x27d8", + "chiliz", + "0x15b38", + "chiliz testnet", + "0x15b32", + "base", + "0x2105", + "base sepolia", + "0x14a34", + "optimism", + "0xa", + "optimism sepolia", + "0xaa37dc", + "linea", + "0xe705", + "linea sepolia", + "0xe705" + ] + }, + { + "name": "from_block", + "description": "The minimum block number from which to get the transfers\n* Provide the param 'from_block' or 'from_date'\n* If 'from_date' and 'from_block' are provided, 'from_block' will be used.\n", + "required": false, + "type": "number" + }, + { + "name": "to_block", + "description": "The maximum block number from which to get the transfers.\n* Provide the param 'to_block' or 'to_date'\n* If 'to_date' and 'to_block' are provided, 'to_block' will be used.\n", + "required": false, + "type": "number" + }, + { + "name": "from_date", + "description": "The start date from which to get the transfers (any format that is accepted by momentjs)\n* Provide the param 'from_block' or 'from_date'\n* If 'from_date' and 'from_block' are provided, 'from_block' will be used.\n", + "required": false, + "type": "string" + }, + { + "name": "to_date", + "description": "The end date from which to get the transfers (any format that is accepted by momentjs)\n* Provide the param 'to_block' or 'to_date'\n* If 'to_date' and 'to_block' are provided, 'to_block' will be used.\n", + "required": false, + "type": "string" + }, + { + "name": "format", + "description": "The format of the token ID", + "required": false, + "example": "decimal", + "type": "string" + }, + { + "name": "limit", + "description": "The desired page size of the result.", + "required": false, + "type": "number" + }, + { + "name": "order", + "required": false, "type": "string", - "description": "When the metadata was last updated", - "example": "2021-02-24T00:47:26.647Z" - }, - { - "name": "possible_spam", - "type": "boolean", - "description": "Indicates if a contract is possibly a spam contract", - "example": "false" - }, - { - "name": "verified_collection", - "type": "boolean", - "description": "Indicates if a contract is verified. Currently supported for ethereum NFT contracts.", - "example": "false" - } - ] - } + "description": "The order of the result, in ascending (ASC) or descending (DESC)", + "example": "DESC", + "enum": ["ASC", "DESC"] + }, + { + "name": "cursor", + "description": "The cursor returned in the previous response (for getting the next page)\n", + "type": "string" + } + ], + "responses": [ + { + "status": "200", + "description": "Returns a collection of NFT transfers", + "body": { + "type": "object", + "fields": [ + { + "name": "page", + "type": "number", + "description": "The current page of the result", + "example": "2" + }, + { + "name": "page_size", + "type": "number", + "description": "The number of results per page", + "example": "100" + }, + { + "name": "cursor", + "type": "string", + "description": "The cursor to get to the next page" + }, + { + "name": "result", + "type": "object", + "fields": [ + { + "name": "token_address", + "type": "string", + "description": "The address of the NFT contract", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "token_id", + "type": "string", + "description": "The token ID of the NFT", + "example": "15" + }, + { + "name": "from_address", + "type": "string", + "description": "The address that sent the NFT", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "from_address_label", + "description": "The label of the from address", + "example": "Binance 1" + }, + { + "name": "to_address", + "type": "string", + "description": "The address that received the NFT", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "to_address_label", + "description": "The label of the to address", + "example": "Binance 2" + }, + { + "name": "value", + "type": "string", + "description": "The value that was sent in the transaction (ETH/BNB/etc..)", + "example": "1000000000000000" + }, + { + "name": "amount", + "type": "string", + "description": "The number of tokens transferred", + "example": "1" + }, + { + "name": "contract_type", + "type": "string", + "description": "The type of NFT contract standard", + "example": "ERC721" + }, + { + "name": "block_number", + "type": "string", + "description": "The block number of the transaction", + "example": "88256" + }, + { + "name": "block_timestamp", + "type": "string", + "description": "The block timestamp", + "example": "2021-06-04T16:00:15" + }, + { + "name": "block_hash", + "type": "string", + "description": "The block hash of the transaction" + }, + { + "name": "transaction_hash", + "type": "string", + "description": "The transaction hash", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "transaction_type", + "type": "string", + "description": "The transaction type" + }, + { + "name": "transaction_index", + "type": "number", + "description": "The transaction index" + }, + { + "name": "log_index", + "type": "number", + "description": "The log index" + }, + { + "name": "operator", + "type": "string", + "description": "The operator present only for ERC1155 transfers", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "possible_spam", + "type": "boolean", + "description": "Indicates if a contract is possibly a spam contract", + "example": "false" + }, + { + "name": "verified_collection", + "type": "boolean", + "description": "Indicates if a contract is verified", + "example": "false" + } + ] + }, + { + "name": "block_exists", + "type": "boolean", + "description": "Indicator if the block exists", + "example": true + }, + { + "name": "index_complete", + "type": "boolean", + "description": "Indicator if the block is fully indexed", + "example": true + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.nft.getNFTTransfersFromToBlock({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.nft.get_nft_transfers_from_to_block(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.nft.getWalletNFTs({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.nft.get_wallet_nfts(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getMultipleNFTs": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get Multiple NFTs", - "description": "Returns an array of NFTs specified in the request.\n* Note that results will include all indexed NFTs\n* Any request that includes the token_address param will start the indexing process for that NFT collection the very first time it is requested.\n* Only 25 NFTs can be fetched in one API call.", - "method": "POST", - "path": "/nft/getMultipleNFTs", - "pathParams": [], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "0x1", - "sepolia", - "0xaa36a7", - "holesky", - "0x4268", - "polygon", - "0x89", - "amoy", - "0x13882", - "bsc", - "0x38", - "bsc testnet", - "0x61", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "gnosis", - "0x64", - "gnosis testnet", - "0x27d8", - "chiliz", - "0x15b38", - "chiliz testnet", - "0x15b32", - "base", - "0x2105", - "base sepolia", - "0x14a34", - "optimism", - "0xa", - "optimism sepolia", - "0xaa37dc", - "linea", - "0xe705", - "linea sepolia", - "0xe705" - ] - } - ], - "bodyParam": { - "required": true, - "description": "Body", - "type": "object", - "fields": [ - { - "name": "tokens", - "type": "array", - "required": true, - "description": "The tokens to be fetched (max 25 tokens)", - "example": [ - { - "token_address": "0xa4991609c508b6d4fb7156426db0bd49fe298bd8", - "token_id": "12" - }, - { - "token_address": "0x3c64dc415ebb4690d1df2b6216148c8de6dd29f7", - "token_id": "1" - }, - { - "token_address": "0x3c64dc415ebb4690d1df2b6216148c8de6dd29f7", - "token_id": "200" - } - ], - "field": { - "type": "object", - "fields": [ - { - "name": "token_address", - "type": "string", - "description": "The contract address", - "example": "0xa4991609c508b6d4fb7156426db0bd49fe298bd8" - }, - { - "name": "token_id", - "type": "string", - "description": "The id of the token", - "example": 12 - } - ] - } - }, - { - "name": "normalizeMetadata", - "type": "boolean", - "required": false, - "description": "The option to enable metadata normalization. Learn more about metadata normalization [here](/web3-data-api/evm/normalized-vs-non-normalized-metadata).", - "example": false - }, - { - "name": "media_items", - "type": "boolean", - "description": "Should preview media data be returned? Learn more about media items [here](/web3-data-api/evm/nft-image-previews).", - "example": true - } - ] - }, - "responses": [ - { - "status": "200", - "description": "Returns a collection of NFTs", - "body": { - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "token_address", - "type": "string", - "description": "The address of the NFT contract", - "example": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB", - "required": true - }, - { - "name": "token_id", - "type": "string", - "description": "The token ID of the NFT", - "example": "15", - "required": true - }, - { - "name": "contract_type", - "type": "string", - "description": "The type of NFT contract standard", - "example": "ERC721", - "required": true - }, - { - "name": "owner_of", - "type": "string", - "description": "The wallet address of the owner of the NFT", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e", - "required": true - }, - { - "name": "block_number", - "type": "string", - "description": "The block number when the amount or owner changed", - "example": "88256", - "required": true - }, - { - "name": "block_number_minted", - "type": "string", - "description": "The block number when the NFT was minted", - "example": "88256", - "required": true - }, - { - "name": "token_uri", - "type": "string", - "description": "The URI to the metadata of the token" - }, - { - "name": "metadata", - "type": "string", - "description": "The metadata of the token" - }, - { - "name": "normalized_metadata", - "type": "object", - "description": "A normalized metadata version of the NFT's metadata.", - "fields": [ - { - "name": "name", - "type": "string", - "description": "The name or title of the NFT", - "example": "Moralis Mug" - }, - { - "name": "description", - "type": "string", - "description": "A detailed description of the NFT", - "example": "Moralis Coffee nug 3D Asset that can be used in 3D worldspaces. This NFT is presented as a flat PNG, a Unity3D Prefab and a standard fbx." - }, - { - "name": "image", - "type": "string", - "description": "The URL of the NFT's image", - "example": "https://arw2wxg84h6b.moralishost.com:2053/server/files/tNJatzsHirx4V2VAep6sc923OYGxvkpBeJttR7Ks/de504bbadadcbe30c86278342fcf2560_moralismug.png" - }, - { - "name": "external_link", - "type": "string", - "description": "A link to additional information", - "example": "https://giphy.com/gifs/loop-recursion-ting-aaODAv1iuQdgI" - }, - { - "name": "animation_url", - "type": "string", - "description": "An animated version of the NFT's image", - "example": "https://giphy.com/gifs/food-design-donuts-o9ngTPVYW4qo8" - }, - { - "name": "attributes", - "type": "array", - "field": { + "getNFTTransfersByBlock": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get NFT transfers by block", + "description": "Get transfers of NFTs given a block number or block hash.", + "method": "GET", + "path": "/block/:block_number_or_hash/nft/transfers", + "pathParams": [ + { + "name": "block_number_or_hash", + "description": "The block number or block hash", + "required": true, + "example": "15846571", + "type": "string" + } + ], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", + "type": "string", + "enum": [ + "eth", + "0x1", + "sepolia", + "0xaa36a7", + "holesky", + "0x4268", + "polygon", + "0x89", + "amoy", + "0x13882", + "bsc", + "0x38", + "bsc testnet", + "0x61", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "gnosis", + "0x64", + "gnosis testnet", + "0x27d8", + "chiliz", + "0x15b38", + "chiliz testnet", + "0x15b32", + "base", + "0x2105", + "base sepolia", + "0x14a34", + "optimism", + "0xa", + "optimism sepolia", + "0xaa37dc", + "linea", + "0xe705", + "linea sepolia", + "0xe705" + ] + }, + { + "name": "limit", + "description": "The desired page size of the result.", + "required": false, + "type": "number" + }, + { + "name": "order", + "required": false, + "type": "string", + "description": "The order of the result, in ascending (ASC) or descending (DESC)", + "example": "DESC", + "enum": ["ASC", "DESC"] + }, + { + "name": "cursor", + "description": "The cursor returned in the previous response (used for getting the next page). Learn more on cursor pagination [here](/web3-data-api/evm/reference/pagination).", + "type": "string" + } + ], + "responses": [ + { + "status": "200", + "description": "Returns the contents of a block", + "body": { "type": "object", "fields": [ - { - "name": "trait_type", - "type": "string", - "description": "The trait title or descriptor", - "example": "Eye Color" - }, - { - "name": "value", - "type": "object", - "description": "The value of the attribute", - "example": "hazel" - }, - { - "name": "display_type", - "type": "string", - "description": "The type the attribute value should be displayed as", - "example": "string" - }, - { - "name": "max_value", - "type": "number", - "description": "For numeric values, the upper range", - "example": 100 - }, - { - "name": "trait_count", - "type": "number", - "description": "The number of possible values for this trait", - "example": 7 - }, - { - "name": "order", - "type": "number", - "description": "Order the trait should appear in the attribute list.", - "example": 1 - } + { + "name": "total", + "type": "number", + "description": "The total number of matches for this query", + "example": "2000" + }, + { + "name": "page", + "type": "number", + "description": "The current page of the result", + "example": "2" + }, + { + "name": "page_size", + "type": "number", + "description": "The number of results per page", + "example": "100" + }, + { + "name": "cursor", + "type": "string", + "description": "The cursor to get to the next page" + }, + { + "name": "result", + "type": "object", + "fields": [ + { + "name": "token_address", + "type": "string", + "description": "The address of the NFT contract", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "token_id", + "type": "string", + "description": "The token ID of the NFT", + "example": "15" + }, + { + "name": "from_address", + "type": "string", + "description": "The address that sent the NFT", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "from_address_label", + "type": "string", + "description": "The label of the from address", + "example": "Binance 1" + }, + { + "name": "to_address", + "type": "string", + "description": "The address that received the NFT", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "to_address_label", + "type": "string", + "description": "The label of the to address", + "example": "Binance 2" + }, + { + "name": "value", + "type": "string", + "description": "The value that was sent in the transaction (ETH/BNB/etc..)", + "example": "1000000000000000" + }, + { + "name": "amount", + "type": "string", + "description": "The number of tokens transferred", + "example": "1" + }, + { + "name": "contract_type", + "type": "string", + "description": "The type of NFT contract standard", + "example": "ERC721" + }, + { + "name": "block_number", + "type": "string", + "description": "The block number of the transaction", + "example": "88256" + }, + { + "name": "block_timestamp", + "type": "string", + "description": "The block timestamp", + "example": "2021-06-04T16:00:15" + }, + { + "name": "block_hash", + "type": "string", + "description": "The block hash of the transaction" + }, + { + "name": "transaction_hash", + "type": "string", + "description": "The transaction hash", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "transaction_type", + "type": "string", + "description": "The transaction type" + }, + { + "name": "transaction_index", + "type": "number", + "description": "The transaction index" + }, + { + "name": "log_index", + "type": "number", + "description": "The log index" + }, + { + "name": "operator", + "type": "string", + "description": "The operator present only for ERC1155 transfers", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "possible_spam", + "type": "boolean", + "description": "Indicates if a contract is possibly a spam contract", + "example": "false" + }, + { + "name": "verified_collection", + "type": "boolean", + "description": "Indicates if a contract is verified. Currently supported for ethereum NFT contracts.", + "example": "false" + } + ] + }, + { + "name": "block_exists", + "type": "boolean", + "description": "Indicator if the block exists", + "example": true + }, + { + "name": "index_complete", + "type": "boolean", + "description": "Indicator if the block is fully indexed", + "example": true + } ] - } } - ] + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.nft.getNFTTransfersByBlock({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.nft.get_nft_transfers_by_block(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getNFTTrades": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get NFT trades by marketplace", + "description": "Get trades of NFTs for a given contract and marketplace.", + "method": "GET", + "path": "/nft/:address/trades", + "pathParams": [ + { + "name": "address", + "description": "The address of the NFT contract", + "required": true, + "example": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB", + "type": "string" + } + ], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", + "type": "string", + "enum": [ + "eth", + "0x1", + "sepolia", + "0xaa36a7", + "holesky", + "0x4268", + "polygon", + "0x89", + "amoy", + "0x13882", + "bsc", + "0x38", + "bsc testnet", + "0x61", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "gnosis", + "0x64", + "gnosis testnet", + "0x27d8", + "chiliz", + "0x15b38", + "chiliz testnet", + "0x15b32", + "base", + "0x2105", + "base sepolia", + "0x14a34", + "optimism", + "0xa", + "optimism sepolia", + "0xaa37dc", + "linea", + "0xe705", + "linea sepolia", + "0xe705" + ] + }, + { + "name": "from_block", + "description": "The minimum block number from which to get the transfers\n* Provide the param 'from_block' or 'from_date'\n* If 'from_date' and 'from_block' are provided, 'from_block' will be used.\n", + "required": false, + "type": "number" }, { - "name": "amount", - "type": "string", - "description": "The number of this item the user owns (used by ERC1155)", - "example": "1" + "name": "to_block", + "description": "The block number to get the trades from", + "required": false, + "type": "string" }, { - "name": "name", - "type": "string", - "description": "The name of the NFT contract", - "example": "CryptoKitties", - "required": true + "name": "from_date", + "description": "The start date from which to get the transfers (any format that is accepted by momentjs)\n* Provide the param 'from_block' or 'from_date'\n* If 'from_date' and 'from_block' are provided, 'from_block' will be used.\n", + "required": false, + "type": "string" }, { - "name": "symbol", - "type": "string", - "description": "The symbol of the NFT contract", - "example": "RARI", - "required": true + "name": "to_date", + "description": "The end date from which to get the transfers (any format that is accepted by momentjs)\n* Provide the param 'to_block' or 'to_date'\n* If 'to_date' and 'to_block' are provided, 'to_block' will be used.\n", + "required": false, + "type": "string" }, { - "name": "token_hash", - "type": "string", - "description": "The token hash", - "example": "502cee781b0fb40ea02508b21d319ced", - "required": true + "name": "marketplace", + "description": "Marketplace from which to get the trades (only OpenSea is supported at the moment)", + "required": false, + "example": "opensea", + "type": "string" }, { - "name": "last_token_uri_sync", - "type": "string", - "description": "When the token_uri was last updated", - "example": "2021-02-24T00:47:26.647Z", - "required": true + "name": "cursor", + "description": "The cursor returned in the previous response (used for getting the next page).", + "required": false, + "type": "string" }, { - "name": "last_metadata_sync", - "type": "string", - "description": "When the metadata was last updated", - "example": "2021-02-24T00:47:26.647Z", - "required": true + "name": "limit", + "description": "The desired page size of the result.", + "required": false, + "type": "number" + } + ], + "responses": [ + { + "status": "200", + "description": "Returns the trades", + "body": { + "type": "object", + "fields": [ + { + "name": "page", + "type": "number", + "description": "The current page of the result", + "example": "2" + }, + { + "name": "page_size", + "type": "number", + "description": "The number of results per page", + "example": "100" + }, + { + "name": "cursor", + "type": "string", + "description": "The cursor to get to the next page" + }, + { + "name": "result", + "type": "object", + "fields": [ + { + "name": "transaction_hash", + "type": "string", + "description": "The transaction hash", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "transaction_index", + "type": "string", + "description": "The transaction index" + }, + { + "name": "token_ids", + "type": "array", + "description": "The token ID(s) traded", + "example": ["15", "54"], + "field": { + "type": "string", + "example": "15" + } + }, + { + "name": "seller_address", + "type": "string", + "description": "The address that sold the NFT", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "buyer_address", + "type": "string", + "description": "The address that bought the NFT", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "token_address", + "type": "string", + "description": "The address of the NFT contract", + "example": "0x4ad3785ec7eed7589fa86538244a4530f962434f" + }, + { + "name": "marketplace_address", + "type": "string", + "description": "The address of the contract that traded the NFT", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "price_token_address", + "type": "string", + "description": "The address of the token used to pay for the NFT", + "example": "0x60e4d786628fea6478f785a6d7e704777c86a7c6" + }, + { + "name": "price", + "type": "string", + "description": "The value that was sent in the transaction (ETH/BNB/etc..)", + "example": "1000000000000000" + }, + { + "name": "block_timestamp", + "type": "string", + "description": "The block timestamp", + "example": "2021-06-04T16:00:15" + }, + { + "name": "block_number", + "type": "string", + "description": "The block number of the transaction", + "example": "13680123" + }, + { + "name": "block_hash", + "type": "string", + "description": "The block hash", + "example": "0x4a7c916ca4a970358b9df90051008f729685ff05e9724a9dddba32630c37cb96" + }, + { + "name": "verified_collection", + "type": "boolean", + "description": "Indicates whether or not the collection has been verified on OpenSea. Currently supported for ethereum NFT contracts.", + "example": "true" + } + ] + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.nft.getNFTTrades({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.nft.get_nft_trades(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" } - ] - } - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.nft.getMultipleNFTs({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nbody = []\n\nparams = {}\n\nresult = evm_api.nft.get_multiple_nfts(\n api_key=api_key,\n body=body,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getWalletNFTTransfers": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get NFT transfers by wallet", - "description": "Get transfers of NFTs given the wallet and other parameters.", - "method": "GET", - "path": "/:address/nft/transfers", - "pathParams": [ - { - "name": "address", - "description": "The wallet address of the sender or recipient of the transfers", - "required": true, - "example": "0x1f9090aaE28b8a3dCeaDf281B0F12828e676c326", - "type": "string" - } - ], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "0x1", - "sepolia", - "0xaa36a7", - "holesky", - "0x4268", - "polygon", - "0x89", - "amoy", - "0x13882", - "bsc", - "0x38", - "bsc testnet", - "0x61", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "gnosis", - "0x64", - "gnosis testnet", - "0x27d8", - "chiliz", - "0x15b38", - "chiliz testnet", - "0x15b32", - "base", - "0x2105", - "base sepolia", - "0x14a34", - "optimism", - "0xa", - "optimism sepolia", - "0xaa37dc", - "linea", - "0xe705", - "linea sepolia", - "0xe705" - ] - }, - { - "name": "contract_addresses", - "description": "List of contract addresses of transfers", - "required": false, - "type": "array", - "field": { "type": "string" } - }, - { - "name": "format", - "description": "The format of the token ID", - "required": false, - "example": "decimal", - "type": "string" - }, - { - "name": "from_block", - "description": "The minimum block number from which to get the transfers\n* Provide the param 'from_block' or 'from_date'\n* If 'from_date' and 'from_block' are provided, 'from_block' will be used.\n", - "required": false, - "type": "number" - }, - { - "name": "to_block", - "description": "To get the reserves at this block number", - "required": false, - "type": "string" - }, - { - "name": "from_date", - "description": "The date from where to get the transfers (any format that is accepted by momentjs)\n* Provide the param 'from_block' or 'from_date'\n* If 'from_date' and 'from_block' are provided, 'from_block' will be used.\n", - "required": false, - "type": "string" - }, - { - "name": "to_date", - "description": "Get transfers up until this date (any format that is accepted by momentjs)\n* Provide the param 'to_block' or 'to_date'\n* If 'to_date' and 'to_block' are provided, 'to_block' will be used.\n", - "required": false, - "type": "string" - }, - { - "name": "limit", - "description": "The desired page size of the result.", - "required": false, - "type": "number" - }, - { - "name": "order", - "required": false, - "type": "string", - "description": "The order of the result, in ascending (ASC) or descending (DESC)", - "example": "DESC", - "enum": ["ASC", "DESC"] - }, - { - "name": "cursor", - "description": "The cursor returned in the previous response (used for getting the next page).", - "type": "string" - } - ], - "responses": [ - { - "status": "200", - "description": "Returns a collection of NFT transfers", - "body": { - "type": "object", - "fields": [ - { - "name": "page", - "type": "number", - "description": "The current page of the result", - "example": "2" - }, - { - "name": "page_size", - "type": "number", - "description": "The number of results per page", - "example": "100" - }, - { - "name": "cursor", - "type": "string", - "description": "The cursor to get to the next page" - }, - { - "name": "result", - "type": "object", - "fields": [ - { - "name": "token_address", - "type": "string", - "description": "The address of the NFT contract", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "token_id", - "type": "string", - "description": "The token ID of the NFT", - "example": "15" - }, - { - "name": "from_address", - "type": "string", - "description": "The address that sent the NFT", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "from_address_label", - "description": "The label of the from address", - "example": "Binance 1" - }, - { - "name": "to_address", - "type": "string", - "description": "The address that received the NFT", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "to_address_label", - "description": "The label of the to address", - "example": "Binance 2" - }, - { - "name": "value", - "type": "string", - "description": "The value that was sent in the transaction (ETH/BNB/etc..)", - "example": "1000000000000000" - }, - { - "name": "amount", - "type": "string", - "description": "The number of tokens transferred", - "example": "1" - }, - { - "name": "contract_type", - "type": "string", - "description": "The type of NFT contract standard", - "example": "ERC721" - }, - { - "name": "block_number", - "type": "string", - "description": "The block number of the transaction", - "example": "88256" - }, - { - "name": "block_timestamp", - "type": "string", - "description": "The block timestamp", - "example": "2021-06-04T16:00:15" - }, - { - "name": "block_hash", - "type": "string", - "description": "The block hash of the transaction" - }, - { - "name": "transaction_hash", - "type": "string", - "description": "The transaction hash", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "transaction_type", - "type": "string", - "description": "The transaction type" - }, - { - "name": "transaction_index", - "type": "number", - "description": "The transaction index" - }, - { - "name": "log_index", - "type": "number", - "description": "The log index" - }, - { - "name": "operator", - "type": "string", - "description": "The operator present only for ERC1155 transfers", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "possible_spam", - "type": "boolean", - "description": "Indicates if a contract is possibly a spam contract", - "example": "false" - }, - { - "name": "verified_collection", - "type": "boolean", - "description": "Indicates if a contract is verified", - "example": "false" - } - ] - }, - { - "name": "block_exists", - "type": "boolean", - "description": "Indicator if the block exists", - "example": true - }, - { - "name": "index_complete", - "type": "boolean", - "description": "Indicator if the block is fully indexed", - "example": true - } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.nft.getWalletNFTTransfers({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.nft.get_wallet_nft_transfers(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getWalletNFTCollections": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get NFT collections by wallet", - "description": "Get NFT collections owned by a given wallet address.", - "method": "GET", - "path": "/:address/nft/collections", - "pathParams": [ - { - "name": "address", - "description": "The wallet address of the owner of NFTs in the collections", - "required": true, - "example": "0x1f9090aaE28b8a3dCeaDf281B0F12828e676c326", - "type": "string" - } - ], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "0x1", - "sepolia", - "0xaa36a7", - "holesky", - "0x4268", - "polygon", - "0x89", - "amoy", - "0x13882", - "bsc", - "0x38", - "bsc testnet", - "0x61", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "gnosis", - "0x64", - "gnosis testnet", - "0x27d8", - "chiliz", - "0x15b38", - "chiliz testnet", - "0x15b32", - "base", - "0x2105", - "base sepolia", - "0x14a34", - "optimism", - "0xa", - "optimism sepolia", - "0xaa37dc", - "linea", - "0xe705", - "linea sepolia", - "0xe705" - ] - }, - { - "name": "limit", - "description": "The desired page size of the result.", - "required": false, - "type": "number" - }, - { - "name": "token_counts", - "description": "Should token counts per collection be included in the response?", - "required": false, - "type": "boolean" - }, - { - "name": "exclude_spam", - "description": "Should spam NFTs be excluded from the result?", - "required": false, - "type": "boolean" }, - { - "name": "cursor", - "description": "The cursor returned in the previous response (used for getting the next page).", - "type": "string" - } - ], - "responses": [ - { - "status": "200", - "description": "Returns the NFT collections owned by a wallet", - "body": { - "type": "object", - "fields": [ - { - "name": "status", - "type": "string", - "description": "The syncing status of the address [SYNCING/SYNCED]", - "example": "SYNCING" - }, - { - "name": "page", - "type": "number", - "description": "The current page of the result", - "example": "2" - }, - { - "name": "page_size", - "type": "number", - "description": "The number of results per page", - "example": "100" - }, - { - "name": "cursor", - "type": "string", - "description": "The cursor to get to the next page" - }, - { - "name": "result", - "type": "object", - "fields": [ - { - "name": "token_address", - "type": "string", + "getNFTContractMetadata": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get NFT collection metadata", + "description": "Get the collection / contract level metadata for a given contract (name, symbol, base token URI).\n* Requests for contract addresses not yet indexed will automatically start the indexing process for that NFT collection\n", + "method": "GET", + "path": "/nft/:address/metadata", + "pathParams": [ + { + "name": "address", "description": "The address of the NFT contract", - "example": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB" - }, - { - "name": "contract_type", - "type": "string", - "description": "The type of NFT contract standard", - "example": "ERC721" - }, - { - "name": "name", - "type": "string", - "description": "The name of the NFT contract", - "example": "CryptoKitties" - }, - { - "name": "symbol", - "type": "string", - "description": "The symbol of the NFT contract", - "example": "RARI" - }, - { - "name": "possible_spam", - "type": "boolean", - "description": "Indicates if a contract is possibly a spam contract", - "example": "false" - }, - { - "name": "verified_collection", - "type": "boolean", - "description": "Indicates if a contract is verified", - "example": "false" - }, - { - "name": "count", - "type": "number", - "description": "The number of tokens the wallet holds in this collection", - "example": 5 - }, - { - "name": "collection_logo", - "type": "string", - "description": "The logo of the collection", - "example": "https://cdn.moralis.io/eth/0x67b6d479c7bb412c54e03dca8e1bc6740ce6b99c.png" - }, - { - "name": "collection_banner_image", + "required": true, + "example": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB", + "type": "string" + } + ], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", "type": "string", - "description": "The banner image of the collection", - "example": "https://cdn.moralis.io/eth/0x67b6d479c7bb412c54e03dca8e1bc6740ce6b99c.png" - } - ] - } - ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.nft.getWalletNFTCollections({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.nft.get_wallet_nft_collections(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getContractNFTs": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get NFTs by contract", - "description": "Get NFTs for a given contract address, including metadata for all NFTs (where available).\n* Results are limited to 100 per page by default\n* Requests for contract addresses not yet indexed will automatically start the indexing process for that NFT collection.", - "method": "GET", - "path": "/nft/:address", - "pathParams": [ - { - "name": "address", - "description": "The address of the NFT contract", - "required": true, - "example": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB", - "type": "string" - } - ], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "0x1", - "sepolia", - "0xaa36a7", - "holesky", - "0x4268", - "polygon", - "0x89", - "amoy", - "0x13882", - "bsc", - "0x38", - "bsc testnet", - "0x61", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "gnosis", - "0x64", - "gnosis testnet", - "0x27d8", - "chiliz", - "0x15b38", - "chiliz testnet", - "0x15b32", - "base", - "0x2105", - "base sepolia", - "0x14a34", - "optimism", - "0xa", - "optimism sepolia", - "0xaa37dc", - "linea", - "0xe705", - "linea sepolia", - "0xe705" - ] - }, - { - "name": "format", - "description": "The format of the token ID", - "required": false, - "example": "decimal", - "type": "string" - }, - { - "name": "limit", - "description": "The desired page size of the result.", - "required": false, - "type": "number" - }, - { - "name": "totalRanges", - "description": "The number of subranges to split the results into", - "required": false, - "type": "number" - }, - { - "name": "range", - "description": "The desired subrange to query", - "required": false, - "type": "number" - }, - { - "name": "cursor", - "description": "The cursor returned in the previous response (used for getting the next page).", - "type": "string" - }, - { - "name": "normalizeMetadata", - "description": "Should normalized metadata be returned?", - "required": false, - "type": "boolean" + "enum": [ + "eth", + "0x1", + "sepolia", + "0xaa36a7", + "holesky", + "0x4268", + "polygon", + "0x89", + "amoy", + "0x13882", + "bsc", + "0x38", + "bsc testnet", + "0x61", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "gnosis", + "0x64", + "gnosis testnet", + "0x27d8", + "chiliz", + "0x15b38", + "chiliz testnet", + "0x15b32", + "base", + "0x2105", + "base sepolia", + "0x14a34", + "optimism", + "0xa", + "optimism sepolia", + "0xaa37dc", + "linea", + "0xe705", + "linea sepolia", + "0xe705" + ] + } + ], + "responses": [ + { + "status": "200", + "description": "Returns the metadata for an NFT collection.", + "body": { + "type": "object", + "fields": [ + { + "name": "token_address", + "type": "string", + "description": "The address of the token contract", + "example": "0x2d30ca6f024dbc1307ac8a1a44ca27de6f797ec22ef20627a1307243b0ab7d09" + }, + { + "name": "name", + "type": "string", + "description": "The name of the token contract", + "example": "KryptoKitties" + }, + { + "name": "synced_at", + "type": "string", + "description": "Timestamp of when the contract was last synced with the node", + "example": "2017-07-22T19:40:00.000Z" + }, + { + "name": "symbol", + "type": "string", + "description": "The symbol of the NFT contract", + "example": "RARI" + }, + { + "name": "contract_type", + "type": "string", + "description": "The type of NFT contract", + "example": "ERC721" + }, + { + "name": "possible_spam", + "type": "boolean", + "description": "Indicates if a contract is possibly a spam contract", + "example": "false" + }, + { + "name": "verified_collection", + "type": "boolean", + "description": "Indicates if a contract is verified", + "example": "false" + }, + { + "name": "collection_logo", + "type": "string", + "description": "The logo of the collection", + "example": "https://cdn.moralis.io/eth/0x67b6d479c7bb412c54e03dca8e1bc6740ce6b99c.png" + }, + { + "name": "collection_banner_image", + "type": "string", + "description": "The banner image of the collection", + "example": "https://cdn.moralis.io/eth/0x67b6d479c7bb412c54e03dca8e1bc6740ce6b99c.png" + }, + { + "name": "collection_category", + "type": "string", + "description": "The category of the collection", + "example": "Art" + }, + { + "name": "project_url", + "type": "string", + "description": "The project url of the collection", + "example": "https://www.cryptokitties.co/" + }, + { + "name": "wiki_url", + "type": "string", + "description": "The wiki url of the collection", + "example": "https://en.wikipedia.org/wiki/CryptoKitties" + }, + { + "name": "discord_url", + "type": "string", + "description": "The discord url of the collection", + "example": "https://discord.com/invite/cryptokitties" + }, + { + "name": "telegram_url", + "type": "string", + "description": "The telegram url of the collection", + "example": "https://t.me/cryptokitties" + }, + { + "name": "twitter_username", + "type": "string", + "description": "The twitter username of the collection", + "example": "CryptoKitties" + }, + { + "name": "instagram_username", + "type": "string", + "description": "The instagram username of the collection", + "example": "cryptokitties" + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.nft.getNFTContractMetadata({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.nft.get_nft_contract_metadata(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] }, - { - "name": "media_items", - "description": "Should preview media data be returned?", - "required": false, - "type": "boolean" - } - ], - "responses": [ - { - "status": "200", - "description": "Returns a collection of NFTs", - "body": { - "type": "object", - "fields": [ - { - "name": "page", - "type": "number", - "description": "The current page of the result", - "example": "2" - }, - { - "name": "page_size", - "type": "number", - "description": "The number of results per page", - "example": "100" - }, - { - "name": "cursor", - "type": "string", - "description": "The cursor to get to the next page" - }, - { - "name": "result", - "type": "object", - "fields": [ - { - "name": "token_address", - "type": "string", + "getNFTMetadata": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get NFT metadata", + "description": "Get NFT data, including metadata (where available), for the given NFT token ID and contract address.\n* Requests for contract addresses not yet indexed will automatically start the indexing process for that NFT collection\n", + "method": "GET", + "path": "/nft/:address/:token_id", + "pathParams": [ + { + "name": "address", "description": "The address of the NFT contract", - "example": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB" - }, - { + "required": true, + "example": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB", + "type": "string" + }, + { "name": "token_id", + "description": "The ID of the token", + "required": true, + "example": "1", + "type": "string" + } + ], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", "type": "string", - "description": "The token ID of the NFT", - "example": "15" - }, - { - "name": "owner_of", - "type": "string", - "description": "The wallet address of the owner of the NFT", - "example": "0x9c83ff0f1c8924da96cb2fcb7e093f78eb2e316b" - }, - { - "name": "token_hash", - "type": "string", - "description": "The token hash", - "example": "502cee781b0fb40ea02508b21d319ced" - }, - { - "name": "block_number", - "type": "string", - "description": "The block number when the amount or owner changed", - "example": "88256" - }, - { - "name": "block_number_minted", - "type": "string", - "description": "The block number when the NFT was minted", - "example": "88256" - }, - { - "name": "contract_type", - "type": "string", - "description": "The type of NFT contract standard", - "example": "ERC721" - }, - { - "name": "token_uri", - "type": "string", - "description": "The URI to the metadata of the token" - }, - { - "name": "metadata", - "type": "string", - "description": "The metadata of the token" - }, - { - "name": "normalized_metadata", - "description": "A normalized metadata version of the NFT's metadata.", - "properties": { - "name": { - "type": "string", - "description": "The name or title of the NFT", - "example": "Moralis Mug" - }, - "description": { - "type": "string", - "description": "A detailed description of the NFT", - "example": "Moralis Coffee nug 3D Asset that can be used in 3D worldspaces. This NFT is presented as a flat PNG, a Unity3D Prefab and a standard fbx." - }, - "image": { - "type": "string", - "description": "The URL of the NFT's image", - "example": "https://arw2wxg84h6b.moralishost.com:2053/server/files/tNJatzsHirx4V2VAep6sc923OYGxvkpBeJttR7Ks/de504bbadadcbe30c86278342fcf2560_moralismug.png" - }, - "external_link": { - "type": "string", - "description": "A link to additional information", - "example": "https://giphy.com/gifs/loop-recursion-ting-aaODAv1iuQdgI" - }, - "animation_url": { - "type": "string", - "description": "An animated version of the NFT's image", - "example": "https://giphy.com/gifs/food-design-donuts-o9ngTPVYW4qo8" - }, - "attributes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/normalizedMetadataAttribute" - } - } - } - }, - { - "name": "media", - "description": "A set of links to 'thumbnail / preview' media files", - "properties": { - "mimetype": { - "type": "string", - "description": "The mimetype of the media file [see https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types]" - }, - "category": { "enum": ["image", "audio", "video"] }, - "status": { - "enum": [ - "success", - "processing", - "unsupported_media", - "invalid_url", - "host_unavailable", - "temporarily_unavailable" - ], - "description": "
successThe NFT Preview was created / retrieved successfully
processingThe NFT Preview was not found and has been submitted for generation.
unsupported_mediaThe mime-type of the NFT's media file indicates a type not currently supported.
invalid_urlThe 'image' URL from the NFT's metadata is not a valid URL and cannot be processed.
host_unavailableThe 'image' URL from the NFT's metadata returned an HttpCode indicating the host / file is not available.
temporarily_unavailableThe attempt to load / parse the NFT media file failed (usually due to rate limiting) and will be tried again at next request.
" - }, - "original_media_url": { - "type": "string", - "description": "The url of the original media file." - }, - "updatedAt": { - "type": "string", - "description": "The timestamp of the last update to this NFT media record." - }, - "parent_hash": { - "type": "string", - "description": "Hash value of the original media file." - }, - "media_collection": { - "description": "Preview item associated with the original", - "$ref": "#/components/schemas/mediaCollection" - } - } - }, - { - "name": "minter_address", - "type": "string", - "description": "The address that minted the NFT", - "example": "0x9c83ff0f1c8924da96cb2fcb7e093f78eb2e316b" - }, - { - "name": "last_token_uri_sync", - "type": "string", - "description": "When the token_uri was last updated" - }, - { - "name": "last_metadata_sync", - "type": "string", - "description": "When the metadata was last updated" - }, - { - "name": "amount", - "type": "string", - "description": "The quantity of this item that the user owns (used by ERC1155)", - "example": "1" - }, - { - "name": "name", - "type": "string", - "description": "The name of the NFT contract", - "example": "CryptoKitties" - }, - { - "name": "symbol", + "enum": [ + "eth", + "0x1", + "sepolia", + "0xaa36a7", + "holesky", + "0x4268", + "polygon", + "0x89", + "amoy", + "0x13882", + "bsc", + "0x38", + "bsc testnet", + "0x61", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "gnosis", + "0x64", + "gnosis testnet", + "0x27d8", + "chiliz", + "0x15b38", + "chiliz testnet", + "0x15b32", + "base", + "0x2105", + "base sepolia", + "0x14a34", + "optimism", + "0xa", + "optimism sepolia", + "0xaa37dc", + "linea", + "0xe705", + "linea sepolia", + "0xe705" + ] + }, + { + "name": "format", + "description": "The format of the token ID", + "required": false, + "example": "decimal", "type": "string", - "description": "The symbol of the NFT contract", - "example": "RARI" - }, - { - "name": "possible_spam", + "enum": ["decimal", "hex"] + }, + { + "name": "normalizeMetadata", + "description": "The option to enable metadata normalization. Learn more about metadata normalization [here](/web3-data-api/evm/normalized-vs-non-normalized-metadata).", + "required": false, "type": "boolean", - "description": "Indicates if a contract is possibly a spam contract", - "example": "false" - }, - { - "name": "verified_collection", + "example": true + }, + { + "name": "media_items", "type": "boolean", - "description": "Indicates if a contract is verified", - "example": "false" - } - ] - } + "description": "Should preview media data be returned? Learn more about media items [here](/web3-data-api/evm/nft-image-previews).", + "example": false + } + ], + "responses": [ + { + "status": "200", + "description": "Returns the specified NFT.", + "body": { + "type": "object", + "fields": [ + { + "name": "token_address", + "type": "string", + "description": "The address of the NFT contract", + "example": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB" + }, + { + "name": "token_id", + "type": "string", + "description": "The token ID of the NFT", + "example": "15" + }, + { + "name": "owner_of", + "type": "string", + "description": "The wallet address of the owner of the NFT", + "example": "0x9c83ff0f1c8924da96cb2fcb7e093f78eb2e316b" + }, + { + "name": "token_hash", + "type": "string", + "description": "The token hash", + "example": "502cee781b0fb40ea02508b21d319ced" + }, + { + "name": "block_number", + "type": "string", + "description": "The block number when the amount or owner changed", + "example": "88256" + }, + { + "name": "block_number_minted", + "type": "string", + "description": "The block number when the NFT was minted", + "example": "88256" + }, + { + "name": "contract_type", + "type": "string", + "description": "The type of NFT contract standard", + "example": "ERC721" + }, + { + "name": "token_uri", + "type": "string", + "description": "The URI to the metadata of the token" + }, + { + "name": "metadata", + "type": "string", + "description": "The metadata of the token" + }, + { + "name": "normalized_metadata", + "description": "A normalized metadata version of the NFT's metadata.", + "properties": { + "name": { + "type": "string", + "description": "The name or title of the NFT", + "example": "Moralis Mug" + }, + "description": { + "type": "string", + "description": "A detailed description of the NFT", + "example": "Moralis Coffee nug 3D Asset that can be used in 3D worldspaces. This NFT is presented as a flat PNG, a Unity3D Prefab and a standard fbx." + }, + "image": { + "type": "string", + "description": "The URL of the NFT's image", + "example": "https://arw2wxg84h6b.moralishost.com:2053/server/files/tNJatzsHirx4V2VAep6sc923OYGxvkpBeJttR7Ks/de504bbadadcbe30c86278342fcf2560_moralismug.png" + }, + "external_link": { + "type": "string", + "description": "A link to additional information", + "example": "https://giphy.com/gifs/loop-recursion-ting-aaODAv1iuQdgI" + }, + "animation_url": { + "type": "string", + "description": "An animated version of the NFT's image", + "example": "https://giphy.com/gifs/food-design-donuts-o9ngTPVYW4qo8" + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/normalizedMetadataAttribute" + } + } + } + }, + { + "name": "media", + "description": "A set of links to 'thumbnail / preview' media files", + "properties": { + "mimetype": { + "type": "string", + "description": "The mimetype of the media file [see https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types]" + }, + "category": { + "enum": ["image", "audio", "video"] + }, + "status": { + "enum": [ + "success", + "processing", + "unsupported_media", + "invalid_url", + "host_unavailable", + "temporarily_unavailable" + ], + "description": "
successThe NFT Preview was created / retrieved successfully
processingThe NFT Preview was not found and has been submitted for generation.
unsupported_mediaThe mime-type of the NFT's media file indicates a type not currently supported.
invalid_urlThe 'image' URL from the NFT's metadata is not a valid URL and cannot be processed.
host_unavailableThe 'image' URL from the NFT's metadata returned an HttpCode indicating the host / file is not available.
temporarily_unavailableThe attempt to load / parse the NFT media file failed (usually due to rate limiting) and will be tried again at next request.
" + }, + "original_media_url": { + "type": "string", + "description": "The url of the original media file." + }, + "updatedAt": { + "type": "string", + "description": "The timestamp of the last update to this NFT media record." + }, + "parent_hash": { + "type": "string", + "description": "Hash value of the original media file." + }, + "media_collection": { + "description": "Preview item associated with the original", + "$ref": "#/components/schemas/mediaCollection" + } + } + }, + { + "name": "minter_address", + "type": "string", + "description": "The address that minted the NFT", + "example": "0x9c83ff0f1c8924da96cb2fcb7e093f78eb2e316b" + }, + { + "name": "last_token_uri_sync", + "type": "string", + "description": "When the token_uri was last updated" + }, + { + "name": "last_metadata_sync", + "type": "string", + "description": "When the metadata was last updated" + }, + { + "name": "amount", + "type": "string", + "description": "The quantity of this item that the user owns (used by ERC1155)", + "example": "1" + }, + { + "name": "name", + "type": "string", + "description": "The name of the NFT contract", + "example": "CryptoKitties" + }, + { + "name": "symbol", + "type": "string", + "description": "The symbol of the NFT contract", + "example": "RARI" + }, + { + "name": "possible_spam", + "type": "boolean", + "description": "Indicates if a contract is possibly a spam contract", + "example": "false" + }, + { + "name": "verified_collection", + "type": "boolean", + "description": "Indicates if a contract is verified. Currently supported for ethereum NFT contracts.", + "example": "false" + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.nft.getNFTMetadata({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.nft.get_nft_metadata(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.nft.getContractNFTs({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.nft.get_contract_nfts(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getNFTOwners": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get NFT owners by contract", - "description": "Get owners of NFTs for a given contract.\n* Requests for contract addresses not yet indexed will automatically start the indexing process for that NFT collection.", - "method": "GET", - "path": "/nft/:address/owners", - "pathParams": [ - { - "name": "address", - "description": "The address of the NFT contract", - "required": true, - "example": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB", - "type": "string" - } - ], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "0x1", - "sepolia", - "0xaa36a7", - "holesky", - "0x4268", - "polygon", - "0x89", - "amoy", - "0x13882", - "bsc", - "0x38", - "bsc testnet", - "0x61", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "gnosis", - "0x64", - "gnosis testnet", - "0x27d8", - "chiliz", - "0x15b38", - "chiliz testnet", - "0x15b32", - "base", - "0x2105", - "base sepolia", - "0x14a34", - "optimism", - "0xa", - "optimism sepolia", - "0xaa37dc", - "linea", - "0xe705", - "linea sepolia", - "0xe705" - ] - }, - { - "name": "format", - "description": "The format of the token ID", - "required": false, - "example": "decimal", - "type": "string" - }, - { - "name": "limit", - "description": "The desired page size of the result.", - "required": false, - "type": "number" - }, - { - "name": "cursor", - "description": "The cursor returned in the previous response (used for getting the next page).", - "type": "string" }, - { - "name": "normalizeMetadata", - "description": "Should normalized metadata be returned?", - "required": false, - "type": "boolean" - }, - { - "name": "media_items", - "description": "Should preview media data be returned?", - "required": false, - "type": "boolean" - } - ], - "responses": [ - { - "status": "200", - "description": "Returns a collection of NFT owners", - "body": { - "type": "object", - "fields": [ - { - "name": "status", - "type": "string", - "description": "The syncing status of the address [SYNCING/SYNCED]", - "example": "SYNCING" - }, - { - "name": "page", - "type": "number", - "description": "The current page of the result", - "example": "2" - }, - { - "name": "page_size", - "type": "number", - "description": "The number of results per page", - "example": "100" - }, - { - "name": "cursor", - "type": "string", - "description": "The cursor to get to the next page" - }, - { - "name": "result", - "type": "object", - "fields": [ - { - "name": "token_address", - "type": "string", - "description": "The address of the NFT contract", - "example": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB" - }, - { - "name": "token_id", - "type": "string", - "description": "The token ID of the NFT", - "example": "15" - }, - { - "name": "contract_type", - "type": "string", - "description": "The type of NFT contract standard", - "example": "ERC721" - }, - { - "name": "owner_of", - "type": "string", - "description": "The wallet address of the owner of the NFT", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "block_number", - "type": "string", - "description": "The block number when the amount or owner changed", - "example": "88256" - }, - { - "name": "block_number_minted", - "type": "string", - "description": "The block number when the NFT was minted", - "example": "88256" - }, - { - "name": "token_uri", - "type": "string", - "description": "The URI to the metadata of the token" - }, - { - "name": "metadata", - "type": "string", - "description": "The metadata of the token" - }, - { - "name": "normalized_metadata", - "description": "A normalized metadata version of the NFT's metadata.", - "properties": { - "name": { - "type": "string", - "description": "The name or title of the NFT", - "example": "Moralis Mug" - }, - "description": { - "type": "string", - "description": "A detailed description of the NFT", - "example": "Moralis Coffee nug 3D Asset that can be used in 3D worldspaces. This NFT is presented as a flat PNG, a Unity3D Prefab and a standard fbx." - }, - "image": { - "type": "string", - "description": "The URL of the NFT's image", - "example": "https://arw2wxg84h6b.moralishost.com:2053/server/files/tNJatzsHirx4V2VAep6sc923OYGxvkpBeJttR7Ks/de504bbadadcbe30c86278342fcf2560_moralismug.png" - }, - "external_link": { - "type": "string", - "description": "A link to additional information", - "example": "https://giphy.com/gifs/loop-recursion-ting-aaODAv1iuQdgI" - }, - "animation_url": { - "type": "string", - "description": "An animated version of the NFT's image", - "example": "https://giphy.com/gifs/food-design-donuts-o9ngTPVYW4qo8" - }, - "attributes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/normalizedMetadataAttribute" - } - } - } - }, - { - "name": "media", - "description": "A set of links to 'thumbnail / preview' media files", - "properties": { - "mimetype": { - "type": "string", - "description": "The mimetype of the media file [see https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types]" - }, - "category": { "enum": ["image", "audio", "video"] }, - "status": { - "enum": [ - "success", - "processing", - "unsupported_media", - "invalid_url", - "host_unavailable", - "temporarily_unavailable" - ], - "description": "
successThe NFT Preview was created / retrieved successfully
processingThe NFT Preview was not found and has been submitted for generation.
unsupported_mediaThe mime-type of the NFT's media file indicates a type not currently supported.
invalid_urlThe 'image' URL from the NFT's metadata is not a valid URL and cannot be processed.
host_unavailableThe 'image' URL from the NFT's metadata returned an HttpCode indicating the host / file is not available.
temporarily_unavailableThe attempt to load / parse the NFT media file failed (usually due to rate limiting) and will be tried again at next request.
" - }, - "original_media_url": { - "type": "string", - "description": "The url of the original media file." - }, - "updatedAt": { - "type": "string", - "description": "The timestamp of the last update to this NFT media record." - }, - "parent_hash": { - "type": "string", - "description": "Hash value of the original media file." - }, - "media_collection": { - "description": "Preview item associated with the original", - "$ref": "#/components/schemas/mediaCollection" - } - } - }, - { - "name": "amount", - "type": "string", - "description": "The number of this item the user owns (used by ERC1155)", - "example": "1" - }, - { - "name": "name", - "type": "string", - "description": "The name of the NFT contract", - "example": "CryptoKitties" - }, - { - "name": "symbol", - "type": "string", - "description": "The symbol of the NFT contract", - "example": "RARI" - }, - { - "name": "token_hash", - "type": "string", - "description": "The token hash", - "example": "502cee781b0fb40ea02508b21d319ced" - }, - { - "name": "last_token_uri_sync", - "type": "string", - "description": "When the token_uri was last updated", - "example": "2021-02-24T00:47:26.647Z" - }, - { - "name": "last_metadata_sync", + "getNFTBulkContractMetadata": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get metadata for multiple NFT contracts", + "description": "Get the collection / contract level metadata for a given list of contract addresses (name, symbol). Supports batching up to 25 addresses.\n* Requests for contract addresses not yet indexed will automatically start the indexing process for that NFT collection\n", + "method": "POST", + "path": "/nft/metadata", + "pathParams": [], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", "type": "string", - "description": "When the metadata was last updated", - "example": "2021-02-24T00:47:26.647Z" - }, - { - "name": "possible_spam", - "type": "boolean", - "description": "Indicates if a contract is possibly a spam contract", - "example": "false" - }, - { - "name": "verified_collection", - "type": "boolean", - "description": "Indicates if a contract is verified", - "example": "false" - } - ] - } + "enum": [ + "eth", + "0x1", + "sepolia", + "0xaa36a7", + "holesky", + "0x4268", + "polygon", + "0x89", + "amoy", + "0x13882", + "bsc", + "0x38", + "bsc testnet", + "0x61", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "gnosis", + "0x64", + "gnosis testnet", + "0x27d8", + "chiliz", + "0x15b38", + "chiliz testnet", + "0x15b32", + "base", + "0x2105", + "base sepolia", + "0x14a34", + "optimism", + "0xa", + "optimism sepolia", + "0xaa37dc", + "linea", + "0xe705", + "linea sepolia", + "0xe705" + ] + } + ], + "bodyParam": { + "required": true, + "description": "Body", + "type": "json" + }, + "responses": [ + { + "status": "200", + "description": "Returns the metadata for the requested NFT collections." + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.nft.getNFTOwners({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.nft.get_nft_owners(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getNFTContractTransfers": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get NFT transfers by contract", - "description": "Get transfers of NFTs for a given contract and other parameters.", - "method": "GET", - "path": "/nft/:address/transfers", - "pathParams": [ - { - "name": "address", - "description": "The address of the NFT contract", - "required": true, - "example": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB", - "type": "string" - } - ], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "0x1", - "sepolia", - "0xaa36a7", - "holesky", - "0x4268", - "polygon", - "0x89", - "amoy", - "0x13882", - "bsc", - "0x38", - "bsc testnet", - "0x61", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "gnosis", - "0x64", - "gnosis testnet", - "0x27d8", - "chiliz", - "0x15b38", - "chiliz testnet", - "0x15b32", - "base", - "0x2105", - "base sepolia", - "0x14a34", - "optimism", - "0xa", - "optimism sepolia", - "0xaa37dc", - "linea", - "0xe705", - "linea sepolia", - "0xe705" - ] - }, - { - "name": "from_block", - "description": "The minimum block number from where to get the transfers\n* Provide the param 'from_block' or 'from_date'\n* If 'from_date' and 'from_block' are provided, 'from_block' will be used.\n", - "required": false, - "type": "number" - }, - { - "name": "to_block", - "description": "The maximum block number from where to get the transfers.\n* Provide the param 'to_block' or 'to_date'\n* If 'to_date' and 'to_block' are provided, 'to_block' will be used.\n", - "required": false, - "type": "number" - }, - { - "name": "from_date", - "description": "The date from where to get the transfers (any format that is accepted by momentjs)\n* Provide the param 'from_block' or 'from_date'\n* If 'from_date' and 'from_block' are provided, 'from_block' will be used.\n", - "required": false, - "type": "string" - }, - { - "name": "to_date", - "description": "Get transfers up until this date (any format that is accepted by momentjs)\n* Provide the param 'to_block' or 'to_date'\n* If 'to_date' and 'to_block' are provided, 'to_block' will be used.\n", - "required": false, - "type": "string" - }, - { - "name": "format", - "description": "The format of the token ID", - "required": false, - "example": "decimal", - "type": "string" - }, - { - "name": "limit", - "description": "The desired page size of the result.", - "required": false, - "type": "number" - }, - { - "name": "order", - "required": false, - "type": "string", - "description": "The order of the result, in ascending (ASC) or descending (DESC).", - "example": "DESC", - "enum": ["ASC", "DESC"] - }, - { - "name": "cursor", - "description": "The cursor returned in the previous response (used for getting the next page).", - "type": "string" - } - ], - "responses": [ - { - "status": "200", - "description": "Returns a collection of NFT transfers", - "body": { - "type": "object", - "fields": [ - { - "name": "page", - "type": "number", - "description": "The current page of the result", - "example": "2" - }, - { - "name": "page_size", - "type": "number", - "description": "The number of results per page", - "example": "100" - }, - { - "name": "cursor", - "type": "string", - "description": "The cursor to get to the next page" - }, - { - "name": "result", - "type": "object", - "fields": [ - { - "name": "token_address", - "type": "string", + "getNFTTransfers": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get NFT transfers by token ID", + "description": "Get transfers of an NFT given a contract address and token ID.", + "method": "GET", + "path": "/nft/:address/:token_id/transfers", + "pathParams": [ + { + "name": "address", "description": "The address of the NFT contract", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { + "required": true, + "example": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB", + "type": "string" + }, + { "name": "token_id", + "description": "The ID of the token", + "required": true, + "example": "1", + "type": "string" + } + ], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", "type": "string", - "description": "The token ID of the NFT", - "example": "15" - }, - { - "name": "from_address", - "type": "string", - "description": "The address that sent the NFT", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "from_address_label", - "description": "The label of the from address", - "example": "Binance 1" - }, - { - "name": "to_address", - "type": "string", - "description": "The address that received the NFT", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "to_address_label", - "description": "The label of the to address", - "example": "Binance 2" - }, - { - "name": "value", - "type": "string", - "description": "The value that was sent in the transaction (ETH/BNB/etc..)", - "example": "1000000000000000" - }, - { - "name": "amount", - "type": "string", - "description": "The number of tokens transferred", - "example": "1" - }, - { - "name": "contract_type", - "type": "string", - "description": "The type of NFT contract standard", - "example": "ERC721" - }, - { - "name": "block_number", - "type": "string", - "description": "The block number of the transaction", - "example": "88256" - }, - { - "name": "block_timestamp", - "type": "string", - "description": "The block timestamp", - "example": "2021-06-04T16:00:15" - }, - { - "name": "block_hash", - "type": "string", - "description": "The block hash of the transaction" - }, - { - "name": "transaction_hash", - "type": "string", - "description": "The transaction hash", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "transaction_type", - "type": "string", - "description": "The transaction type" - }, - { - "name": "transaction_index", - "type": "number", - "description": "The transaction index" - }, - { - "name": "log_index", - "type": "number", - "description": "The log index" - }, - { - "name": "operator", + "enum": [ + "eth", + "0x1", + "sepolia", + "0xaa36a7", + "holesky", + "0x4268", + "polygon", + "0x89", + "amoy", + "0x13882", + "bsc", + "0x38", + "bsc testnet", + "0x61", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "gnosis", + "0x64", + "gnosis testnet", + "0x27d8", + "chiliz", + "0x15b38", + "chiliz testnet", + "0x15b32", + "base", + "0x2105", + "base sepolia", + "0x14a34", + "optimism", + "0xa", + "optimism sepolia", + "0xaa37dc", + "linea", + "0xe705", + "linea sepolia", + "0xe705" + ] + }, + { + "name": "format", + "description": "The format of the token ID", + "required": false, + "example": "decimal", + "type": "string" + }, + { + "name": "limit", + "description": "The desired page size of the result.", + "required": false, + "type": "number" + }, + { + "name": "order", + "required": false, "type": "string", - "description": "The operator present only for ERC1155 transfers", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "possible_spam", - "type": "boolean", - "description": "Indicates if a contract is possibly a spam contract", - "example": "false" - }, - { - "name": "verified_collection", - "type": "boolean", - "description": "Indicates if a contract is verified", - "example": "false" - } - ] - }, - { - "name": "block_exists", - "type": "boolean", - "description": "Indicator if the block exists", - "example": true - }, - { - "name": "index_complete", - "type": "boolean", - "description": "Indicator if the block is fully indexed", - "example": true - } + "description": "The order of the result, in ascending (ASC) or descending (DESC)", + "example": "DESC", + "enum": ["ASC", "DESC"] + }, + { + "name": "cursor", + "description": "The cursor returned in the previous response (used for getting the next page).", + "type": "string" + } + ], + "responses": [ + { + "status": "200", + "description": "Returns a collection of NFT transfers", + "body": { + "type": "object", + "fields": [ + { + "name": "page", + "type": "number", + "description": "The current page of the result", + "example": "2" + }, + { + "name": "page_size", + "type": "number", + "description": "The number of results per page", + "example": "100" + }, + { + "name": "cursor", + "type": "string", + "description": "The cursor to get to the next page" + }, + { + "name": "result", + "type": "object", + "fields": [ + { + "name": "token_address", + "type": "string", + "description": "The address of the NFT contract", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "token_id", + "type": "string", + "description": "The token ID of the NFT", + "example": "15" + }, + { + "name": "from_address", + "type": "string", + "description": "The address that sent the NFT", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "from_address_label", + "description": "The label of the from address", + "example": "Binance 1" + }, + { + "name": "to_address", + "type": "string", + "description": "The address that received the NFT", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "to_address_label", + "description": "The label of the to address", + "example": "Binance 2" + }, + { + "name": "value", + "type": "string", + "description": "The value that was sent in the transaction (ETH/BNB/etc..)", + "example": "1000000000000000" + }, + { + "name": "amount", + "type": "string", + "description": "The number of tokens transferred", + "example": "1" + }, + { + "name": "contract_type", + "type": "string", + "description": "The type of NFT contract standard", + "example": "ERC721" + }, + { + "name": "block_number", + "type": "string", + "description": "The block number of the transaction", + "example": "88256" + }, + { + "name": "block_timestamp", + "type": "string", + "description": "The block timestamp", + "example": "2021-06-04T16:00:15" + }, + { + "name": "block_hash", + "type": "string", + "description": "The block hash of the transaction" + }, + { + "name": "transaction_hash", + "type": "string", + "description": "The transaction hash", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "transaction_type", + "type": "string", + "description": "The transaction type" + }, + { + "name": "transaction_index", + "type": "number", + "description": "The transaction index" + }, + { + "name": "log_index", + "type": "number", + "description": "The log index" + }, + { + "name": "operator", + "type": "string", + "description": "The operator present only for ERC1155 transfers", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "possible_spam", + "type": "boolean", + "description": "Indicates if a contract is possibly a spam contract", + "example": "false" + }, + { + "name": "verified_collection", + "type": "boolean", + "description": "Indicates if a contract is verified", + "example": "false" + } + ] + }, + { + "name": "block_exists", + "type": "boolean", + "description": "Indicator if the block exists", + "example": true + }, + { + "name": "index_complete", + "type": "boolean", + "description": "Indicator if the block is fully indexed", + "example": true + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.nft.getNFTTransfers({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.nft.get_nft_transfers(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.nft.getNFTContractTransfers({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.nft.get_nft_contract_transfers(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getNFTTransfersFromToBlock": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get NFT transfers from a block to a block", - "description": "Get transfers of NFTs from a block number to a block number.", - "method": "GET", - "path": "/nft/transfers", - "pathParams": [], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "0x1", - "sepolia", - "0xaa36a7", - "holesky", - "0x4268", - "polygon", - "0x89", - "amoy", - "0x13882", - "bsc", - "0x38", - "bsc testnet", - "0x61", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "gnosis", - "0x64", - "gnosis testnet", - "0x27d8", - "chiliz", - "0x15b38", - "chiliz testnet", - "0x15b32", - "base", - "0x2105", - "base sepolia", - "0x14a34", - "optimism", - "0xa", - "optimism sepolia", - "0xaa37dc", - "linea", - "0xe705", - "linea sepolia", - "0xe705" - ] - }, - { - "name": "from_block", - "description": "The minimum block number from which to get the transfers\n* Provide the param 'from_block' or 'from_date'\n* If 'from_date' and 'from_block' are provided, 'from_block' will be used.\n", - "required": false, - "type": "number" - }, - { - "name": "to_block", - "description": "The maximum block number from which to get the transfers.\n* Provide the param 'to_block' or 'to_date'\n* If 'to_date' and 'to_block' are provided, 'to_block' will be used.\n", - "required": false, - "type": "number" - }, - { - "name": "from_date", - "description": "The start date from which to get the transfers (any format that is accepted by momentjs)\n* Provide the param 'from_block' or 'from_date'\n* If 'from_date' and 'from_block' are provided, 'from_block' will be used.\n", - "required": false, - "type": "string" - }, - { - "name": "to_date", - "description": "The end date from which to get the transfers (any format that is accepted by momentjs)\n* Provide the param 'to_block' or 'to_date'\n* If 'to_date' and 'to_block' are provided, 'to_block' will be used.\n", - "required": false, - "type": "string" - }, - { - "name": "format", - "description": "The format of the token ID", - "required": false, - "example": "decimal", - "type": "string" - }, - { - "name": "limit", - "description": "The desired page size of the result.", - "required": false, - "type": "number" - }, - { - "name": "order", - "required": false, - "type": "string", - "description": "The order of the result, in ascending (ASC) or descending (DESC)", - "example": "DESC", - "enum": ["ASC", "DESC"] }, - { - "name": "cursor", - "description": "The cursor returned in the previous response (for getting the next page)\n", - "type": "string" - } - ], - "responses": [ - { - "status": "200", - "description": "Returns a collection of NFT transfers", - "body": { - "type": "object", - "fields": [ - { - "name": "page", - "type": "number", - "description": "The current page of the result", - "example": "2" - }, - { - "name": "page_size", - "type": "number", - "description": "The number of results per page", - "example": "100" - }, - { - "name": "cursor", - "type": "string", - "description": "The cursor to get to the next page" - }, - { - "name": "result", - "type": "object", - "fields": [ - { - "name": "token_address", - "type": "string", + "getNFTTokenIdOwners": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get NFT owners by token ID", + "description": "Get owners of a specific NFT given the contract address and token ID. \n* Requests for contract addresses not yet indexed will automatically start the indexing process for that NFT collection\n", + "method": "GET", + "path": "/nft/:address/:token_id/owners", + "pathParams": [ + { + "name": "address", "description": "The address of the NFT contract", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { + "required": true, + "example": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB", + "type": "string" + }, + { "name": "token_id", + "description": "The ID of the token", + "required": true, + "example": "1", + "type": "string" + } + ], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", "type": "string", - "description": "The token ID of the NFT", - "example": "15" - }, - { - "name": "from_address", - "type": "string", - "description": "The address that sent the NFT", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "from_address_label", - "description": "The label of the from address", - "example": "Binance 1" - }, - { - "name": "to_address", - "type": "string", - "description": "The address that received the NFT", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "to_address_label", - "description": "The label of the to address", - "example": "Binance 2" - }, - { - "name": "value", - "type": "string", - "description": "The value that was sent in the transaction (ETH/BNB/etc..)", - "example": "1000000000000000" - }, - { - "name": "amount", - "type": "string", - "description": "The number of tokens transferred", - "example": "1" - }, - { - "name": "contract_type", - "type": "string", - "description": "The type of NFT contract standard", - "example": "ERC721" - }, - { - "name": "block_number", - "type": "string", - "description": "The block number of the transaction", - "example": "88256" - }, - { - "name": "block_timestamp", - "type": "string", - "description": "The block timestamp", - "example": "2021-06-04T16:00:15" - }, - { - "name": "block_hash", - "type": "string", - "description": "The block hash of the transaction" - }, - { - "name": "transaction_hash", - "type": "string", - "description": "The transaction hash", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "transaction_type", - "type": "string", - "description": "The transaction type" - }, - { - "name": "transaction_index", - "type": "number", - "description": "The transaction index" - }, - { - "name": "log_index", - "type": "number", - "description": "The log index" - }, - { - "name": "operator", - "type": "string", - "description": "The operator present only for ERC1155 transfers", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "possible_spam", - "type": "boolean", - "description": "Indicates if a contract is possibly a spam contract", - "example": "false" - }, - { - "name": "verified_collection", - "type": "boolean", - "description": "Indicates if a contract is verified", - "example": "false" - } - ] - }, - { - "name": "block_exists", - "type": "boolean", - "description": "Indicator if the block exists", - "example": true - }, - { - "name": "index_complete", - "type": "boolean", - "description": "Indicator if the block is fully indexed", - "example": true - } + "enum": [ + "eth", + "0x1", + "sepolia", + "0xaa36a7", + "holesky", + "0x4268", + "polygon", + "0x89", + "amoy", + "0x13882", + "bsc", + "0x38", + "bsc testnet", + "0x61", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "gnosis", + "0x64", + "gnosis testnet", + "0x27d8", + "chiliz", + "0x15b38", + "chiliz testnet", + "0x15b32", + "base", + "0x2105", + "base sepolia", + "0x14a34", + "optimism", + "0xa", + "optimism sepolia", + "0xaa37dc", + "linea", + "0xe705", + "linea sepolia", + "0xe705" + ] + }, + { + "name": "format", + "description": "The format of the token ID", + "required": false, + "example": "decimal", + "type": "string" + }, + { + "name": "limit", + "description": "The desired page size of the result.", + "required": false, + "type": "number" + }, + { + "name": "cursor", + "description": "The cursor returned in the previous response (used for getting the next page).", + "type": "string" + }, + { + "name": "normalizeMetadata", + "description": "Should normalized metadata be returned?", + "required": false, + "type": "boolean" + }, + { + "name": "media_items", + "description": "Should preview media data be returned?", + "required": false, + "type": "boolean" + } + ], + "responses": [ + { + "status": "200", + "description": "Returns a collection of NFTs with their respective owners.", + "body": { + "type": "object", + "fields": [ + { + "name": "status", + "type": "string", + "description": "The syncing status of the address [SYNCING/SYNCED]", + "example": "SYNCING" + }, + { + "name": "page", + "type": "number", + "description": "The current page of the result", + "example": "2" + }, + { + "name": "page_size", + "type": "number", + "description": "The number of results per page", + "example": "100" + }, + { + "name": "cursor", + "type": "string", + "description": "The cursor to get to the next page" + }, + { + "name": "result", + "type": "object", + "fields": [ + { + "name": "token_address", + "type": "string", + "description": "The address of the NFT contract", + "example": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB" + }, + { + "name": "token_id", + "type": "string", + "description": "The token ID of the NFT", + "example": "15" + }, + { + "name": "contract_type", + "type": "string", + "description": "The type of NFT contract standard", + "example": "ERC721" + }, + { + "name": "owner_of", + "type": "string", + "description": "The wallet address of the owner of the NFT", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "block_number", + "type": "string", + "description": "The block number when the amount or owner changed", + "example": "88256" + }, + { + "name": "block_number_minted", + "type": "string", + "description": "The block number when the NFT was minted", + "example": "88256" + }, + { + "name": "token_uri", + "type": "string", + "description": "The URI to the metadata of the token" + }, + { + "name": "metadata", + "type": "string", + "description": "The metadata of the token" + }, + { + "name": "normalized_metadata", + "description": "A normalized metadata version of the NFT's metadata.", + "properties": { + "name": { + "type": "string", + "description": "The name or title of the NFT", + "example": "Moralis Mug" + }, + "description": { + "type": "string", + "description": "A detailed description of the NFT", + "example": "Moralis Coffee nug 3D Asset that can be used in 3D worldspaces. This NFT is presented as a flat PNG, a Unity3D Prefab and a standard fbx." + }, + "image": { + "type": "string", + "description": "The URL of the NFT's image", + "example": "https://arw2wxg84h6b.moralishost.com:2053/server/files/tNJatzsHirx4V2VAep6sc923OYGxvkpBeJttR7Ks/de504bbadadcbe30c86278342fcf2560_moralismug.png" + }, + "external_link": { + "type": "string", + "description": "A link to additional information", + "example": "https://giphy.com/gifs/loop-recursion-ting-aaODAv1iuQdgI" + }, + "animation_url": { + "type": "string", + "description": "An animated version of the NFT's image", + "example": "https://giphy.com/gifs/food-design-donuts-o9ngTPVYW4qo8" + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/normalizedMetadataAttribute" + } + } + } + }, + { + "name": "media", + "description": "A set of links to 'thumbnail / preview' media files", + "properties": { + "mimetype": { + "type": "string", + "description": "The mimetype of the media file [see https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types]" + }, + "category": { + "enum": [ + "image", + "audio", + "video" + ] + }, + "status": { + "enum": [ + "success", + "processing", + "unsupported_media", + "invalid_url", + "host_unavailable", + "temporarily_unavailable" + ], + "description": "
successThe NFT Preview was created / retrieved successfully
processingThe NFT Preview was not found and has been submitted for generation.
unsupported_mediaThe mime-type of the NFT's media file indicates a type not currently supported.
invalid_urlThe 'image' URL from the NFT's metadata is not a valid URL and cannot be processed.
host_unavailableThe 'image' URL from the NFT's metadata returned an HttpCode indicating the host / file is not available.
temporarily_unavailableThe attempt to load / parse the NFT media file failed (usually due to rate limiting) and will be tried again at next request.
" + }, + "original_media_url": { + "type": "string", + "description": "The url of the original media file." + }, + "updatedAt": { + "type": "string", + "description": "The timestamp of the last update to this NFT media record." + }, + "parent_hash": { + "type": "string", + "description": "Hash value of the original media file." + }, + "media_collection": { + "description": "Preview item associated with the original", + "$ref": "#/components/schemas/mediaCollection" + } + } + }, + { + "name": "amount", + "type": "string", + "description": "The number of this item the user owns (used by ERC1155)", + "example": "1" + }, + { + "name": "name", + "type": "string", + "description": "The name of the NFT contract", + "example": "CryptoKitties" + }, + { + "name": "symbol", + "type": "string", + "description": "The symbol of the NFT contract", + "example": "RARI" + }, + { + "name": "token_hash", + "type": "string", + "description": "The token hash", + "example": "502cee781b0fb40ea02508b21d319ced" + }, + { + "name": "last_token_uri_sync", + "type": "string", + "description": "When the token_uri was last updated", + "example": "2021-02-24T00:47:26.647Z" + }, + { + "name": "last_metadata_sync", + "type": "string", + "description": "When the metadata was last updated", + "example": "2021-02-24T00:47:26.647Z" + }, + { + "name": "possible_spam", + "type": "boolean", + "description": "Indicates if a contract is possibly a spam contract", + "example": "false" + }, + { + "name": "verified_collection", + "type": "boolean", + "description": "Indicates if a contract is verified", + "example": "false" + } + ] + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.nft.getNFTTokenIdOwners({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.nft.get_nft_token_id_owners(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.nft.getNFTTransfersFromToBlock({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.nft.get_nft_transfers_from_to_block(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getNFTTransfersByBlock": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get NFT transfers by block", - "description": "Get transfers of NFTs given a block number or block hash.", - "method": "GET", - "path": "/block/:block_number_or_hash/nft/transfers", - "pathParams": [ - { - "name": "block_number_or_hash", - "description": "The block number or block hash", - "required": true, - "example": "15846571", - "type": "string" - } - ], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "0x1", - "sepolia", - "0xaa36a7", - "holesky", - "0x4268", - "polygon", - "0x89", - "amoy", - "0x13882", - "bsc", - "0x38", - "bsc testnet", - "0x61", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "gnosis", - "0x64", - "gnosis testnet", - "0x27d8", - "chiliz", - "0x15b38", - "chiliz testnet", - "0x15b32", - "base", - "0x2105", - "base sepolia", - "0x14a34", - "optimism", - "0xa", - "optimism sepolia", - "0xaa37dc", - "linea", - "0xe705", - "linea sepolia", - "0xe705" - ] - }, - { - "name": "limit", - "description": "The desired page size of the result.", - "required": false, - "type": "number" }, - { - "name": "order", - "required": false, - "type": "string", - "description": "The order of the result, in ascending (ASC) or descending (DESC)", - "example": "DESC", - "enum": ["ASC", "DESC"] - }, - { - "name": "cursor", - "description": "The cursor returned in the previous response (used for getting the next page). Learn more on cursor pagination [here](/web3-data-api/evm/reference/pagination).", - "type": "string" - } - ], - "responses": [ - { - "status": "200", - "description": "Returns the contents of a block", - "body": { - "type": "object", - "fields": [ - { - "name": "total", - "type": "number", - "description": "The total number of matches for this query", - "example": "2000" - }, - { - "name": "page", - "type": "number", - "description": "The current page of the result", - "example": "2" - }, - { - "name": "page_size", - "type": "number", - "description": "The number of results per page", - "example": "100" - }, - { - "name": "cursor", - "type": "string", - "description": "The cursor to get to the next page" - }, - { - "name": "result", - "type": "object", - "fields": [ - { - "name": "token_address", - "type": "string", + "syncNFTContract": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Resync NFT Contract", + "description": "Initiates a sync of a previously non synced contract.", + "method": "PUT", + "path": "/nft/:address/sync", + "pathParams": [ + { + "name": "address", "description": "The address of the NFT contract", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "token_id", - "type": "string", - "description": "The token ID of the NFT", - "example": "15" - }, - { - "name": "from_address", - "type": "string", - "description": "The address that sent the NFT", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "from_address_label", - "type": "string", - "description": "The label of the from address", - "example": "Binance 1" - }, - { - "name": "to_address", - "type": "string", - "description": "The address that received the NFT", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "to_address_label", - "type": "string", - "description": "The label of the to address", - "example": "Binance 2" - }, - { - "name": "value", - "type": "string", - "description": "The value that was sent in the transaction (ETH/BNB/etc..)", - "example": "1000000000000000" - }, - { - "name": "amount", - "type": "string", - "description": "The number of tokens transferred", - "example": "1" - }, - { - "name": "contract_type", - "type": "string", - "description": "The type of NFT contract standard", - "example": "ERC721" - }, - { - "name": "block_number", - "type": "string", - "description": "The block number of the transaction", - "example": "88256" - }, - { - "name": "block_timestamp", - "type": "string", - "description": "The block timestamp", - "example": "2021-06-04T16:00:15" - }, - { - "name": "block_hash", - "type": "string", - "description": "The block hash of the transaction" - }, - { - "name": "transaction_hash", - "type": "string", - "description": "The transaction hash", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "transaction_type", - "type": "string", - "description": "The transaction type" - }, - { - "name": "transaction_index", - "type": "number", - "description": "The transaction index" - }, - { - "name": "log_index", - "type": "number", - "description": "The log index" - }, - { - "name": "operator", + "required": true, + "example": "0x60E4d786628Fea6478F785A6d7e704777c86a7c6", + "type": "string" + } + ], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", "type": "string", - "description": "The operator present only for ERC1155 transfers", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "possible_spam", - "type": "boolean", - "description": "Indicates if a contract is possibly a spam contract", - "example": "false" - }, - { - "name": "verified_collection", - "type": "boolean", - "description": "Indicates if a contract is verified. Currently supported for ethereum NFT contracts.", - "example": "false" - } - ] - }, - { - "name": "block_exists", - "type": "boolean", - "description": "Indicator if the block exists", - "example": true - }, - { - "name": "index_complete", - "type": "boolean", - "description": "Indicator if the block is fully indexed", - "example": true - } + "enum": [ + "eth", + "0x1", + "sepolia", + "0xaa36a7", + "holesky", + "0x4268", + "polygon", + "0x89", + "amoy", + "0x13882", + "bsc", + "0x38", + "bsc testnet", + "0x61", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "gnosis", + "0x64", + "gnosis testnet", + "0x27d8", + "chiliz", + "0x15b38", + "chiliz testnet", + "0x15b32", + "base", + "0x2105", + "base sepolia", + "0x14a34", + "optimism", + "0xa", + "optimism sepolia", + "0xaa37dc", + "linea", + "0xe705", + "linea sepolia", + "0xe705" + ] + } + ], + "responses": [ + { + "status": "201", + "description": "Request Initiated." + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.nft.syncNFTContract({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.nft.sync_nft_contract(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.nft.getNFTTransfersByBlock({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.nft.get_nft_transfers_by_block(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getNFTTrades": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get NFT trades by marketplace", - "description": "Get trades of NFTs for a given contract and marketplace.", - "method": "GET", - "path": "/nft/:address/trades", - "pathParams": [ - { - "name": "address", - "description": "The address of the NFT contract", - "required": true, - "example": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB", - "type": "string" - } - ], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "0x1", - "sepolia", - "0xaa36a7", - "holesky", - "0x4268", - "polygon", - "0x89", - "amoy", - "0x13882", - "bsc", - "0x38", - "bsc testnet", - "0x61", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "gnosis", - "0x64", - "gnosis testnet", - "0x27d8", - "chiliz", - "0x15b38", - "chiliz testnet", - "0x15b32", - "base", - "0x2105", - "base sepolia", - "0x14a34", - "optimism", - "0xa", - "optimism sepolia", - "0xaa37dc", - "linea", - "0xe705", - "linea sepolia", - "0xe705" - ] - }, - { - "name": "from_block", - "description": "The minimum block number from which to get the transfers\n* Provide the param 'from_block' or 'from_date'\n* If 'from_date' and 'from_block' are provided, 'from_block' will be used.\n", - "required": false, - "type": "number" - }, - { - "name": "to_block", - "description": "The block number to get the trades from", - "required": false, - "type": "string" - }, - { - "name": "from_date", - "description": "The start date from which to get the transfers (any format that is accepted by momentjs)\n* Provide the param 'from_block' or 'from_date'\n* If 'from_date' and 'from_block' are provided, 'from_block' will be used.\n", - "required": false, - "type": "string" - }, - { - "name": "to_date", - "description": "The end date from which to get the transfers (any format that is accepted by momentjs)\n* Provide the param 'to_block' or 'to_date'\n* If 'to_date' and 'to_block' are provided, 'to_block' will be used.\n", - "required": false, - "type": "string" - }, - { - "name": "marketplace", - "description": "Marketplace from which to get the trades (only OpenSea is supported at the moment)", - "required": false, - "example": "opensea", - "type": "string" - }, - { - "name": "cursor", - "description": "The cursor returned in the previous response (used for getting the next page).", - "required": false, - "type": "string" }, - { - "name": "limit", - "description": "The desired page size of the result.", - "required": false, - "type": "number" - } - ], - "responses": [ - { - "status": "200", - "description": "Returns the trades", - "body": { - "type": "object", - "fields": [ - { - "name": "page", - "type": "number", - "description": "The current page of the result", - "example": "2" - }, - { - "name": "page_size", - "type": "number", - "description": "The number of results per page", - "example": "100" - }, - { - "name": "cursor", - "type": "string", - "description": "The cursor to get to the next page" - }, - { - "name": "result", - "type": "object", - "fields": [ - { - "name": "transaction_hash", - "type": "string", - "description": "The transaction hash", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "transaction_index", - "type": "string", - "description": "The transaction index" - }, - { - "name": "token_ids", - "type": "array", - "description": "The token ID(s) traded", - "example": ["15", "54"], - "field": { "type": "string", "example": "15" } - }, - { - "name": "seller_address", - "type": "string", - "description": "The address that sold the NFT", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "buyer_address", - "type": "string", - "description": "The address that bought the NFT", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "token_address", - "type": "string", + "reSyncMetadata": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Resync NFT metadata", + "description": "Resync the metadata for an NFT\n* The metadata flag will request the NFT's metadata from an already existing token_uri\n* The uri (default) flag will fetch the latest token_uri from the given NFT contract address. In sync mode the metadata will also be fetched\n* The sync mode will make the endpoint synchronous so it will wait for the task to be completed before responding\n* The async mode (default) will make the endpoint asynchronous so we will wait for the task to be completed before responding\n", + "method": "GET", + "path": "/nft/:address/:token_id/metadata/resync", + "pathParams": [ + { + "name": "address", "description": "The address of the NFT contract", - "example": "0x4ad3785ec7eed7589fa86538244a4530f962434f" - }, - { - "name": "marketplace_address", - "type": "string", - "description": "The address of the contract that traded the NFT", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "price_token_address", - "type": "string", - "description": "The address of the token used to pay for the NFT", - "example": "0x60e4d786628fea6478f785a6d7e704777c86a7c6" - }, - { - "name": "price", - "type": "string", - "description": "The value that was sent in the transaction (ETH/BNB/etc..)", - "example": "1000000000000000" - }, - { - "name": "block_timestamp", + "required": true, + "example": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB", + "type": "string" + }, + { + "name": "token_id", + "description": "The ID of the token", + "required": true, + "example": "1", + "type": "string" + } + ], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", "type": "string", - "description": "The block timestamp", - "example": "2021-06-04T16:00:15" - }, - { - "name": "block_number", + "enum": [ + "eth", + "0x1", + "sepolia", + "0xaa36a7", + "holesky", + "0x4268", + "polygon", + "0x89", + "amoy", + "0x13882", + "bsc", + "0x38", + "bsc testnet", + "0x61", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "gnosis", + "0x64", + "gnosis testnet", + "0x27d8", + "chiliz", + "0x15b38", + "chiliz testnet", + "0x15b32", + "base", + "0x2105", + "base sepolia", + "0x14a34", + "optimism", + "0xa", + "optimism sepolia", + "0xaa37dc", + "linea", + "0xe705", + "linea sepolia", + "0xe705" + ] + }, + { + "name": "flag", + "description": "The type of resync to operate", + "required": false, + "example": "uri", + "default": "uri", "type": "string", - "description": "The block number of the transaction", - "example": "13680123" - }, - { - "name": "block_hash", + "enum": ["uri", "metadata"] + }, + { + "name": "mode", + "description": "To define the behaviour of the endpoint", + "required": false, + "example": "async", + "default": "async", "type": "string", - "description": "The block hash", - "example": "0x4a7c916ca4a970358b9df90051008f729685ff05e9724a9dddba32630c37cb96" - }, - { - "name": "verified_collection", - "type": "boolean", - "description": "Indicates whether or not the collection has been verified on OpenSea. Currently supported for ethereum NFT contracts.", - "example": "true" - } - ] - } + "enum": ["sync", "async"] + } + ], + "responses": [ + { + "status": "200", + "description": "(In sync mode) Resync request executed.", + "body": { + "type": "object", + "fields": [ + { + "name": "status", + "type": "string", + "description": "The status of the resync request" + } + ] + } + }, + { + "status": "202", + "description": "The resync request was received and will be executed.", + "body": { + "type": "object", + "fields": [ + { + "name": "status", + "type": "string", + "description": "The status of the resync request" + } + ] + } + }, + { + "status": "404", + "description": "(In sync mode) Resync request executed and metadata could not be updated.", + "body": { + "type": "object", + "fields": [ + { + "name": "status", + "type": "string", + "description": "The status of the resync request" + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.nft.reSyncMetadata({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.nft.re_sync_metadata(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.nft.getNFTTrades({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.nft.get_nft_trades(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getNFTContractMetadata": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get NFT collection metadata", - "description": "Get the collection / contract level metadata for a given contract (name, symbol, base token URI).\n* Requests for contract addresses not yet indexed will automatically start the indexing process for that NFT collection\n", - "method": "GET", - "path": "/nft/:address/metadata", - "pathParams": [ - { - "name": "address", - "description": "The address of the NFT contract", - "required": true, - "example": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB", - "type": "string" - } - ], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "0x1", - "sepolia", - "0xaa36a7", - "holesky", - "0x4268", - "polygon", - "0x89", - "amoy", - "0x13882", - "bsc", - "0x38", - "bsc testnet", - "0x61", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "gnosis", - "0x64", - "gnosis testnet", - "0x27d8", - "chiliz", - "0x15b38", - "chiliz testnet", - "0x15b32", - "base", - "0x2105", - "base sepolia", - "0x14a34", - "optimism", - "0xa", - "optimism sepolia", - "0xaa37dc", - "linea", - "0xe705", - "linea sepolia", - "0xe705" - ] - } - ], - "responses": [ - { - "status": "200", - "description": "Returns the metadata for an NFT collection.", - "body": { - "type": "object", - "fields": [ - { - "name": "token_address", - "type": "string", - "description": "The address of the token contract", - "example": "0x2d30ca6f024dbc1307ac8a1a44ca27de6f797ec22ef20627a1307243b0ab7d09" - }, - { - "name": "name", - "type": "string", - "description": "The name of the token contract", - "example": "KryptoKitties" - }, - { - "name": "synced_at", - "type": "string", - "description": "Timestamp of when the contract was last synced with the node", - "example": "2017-07-22T19:40:00.000Z" - }, - { - "name": "symbol", - "type": "string", - "description": "The symbol of the NFT contract", - "example": "RARI" - }, - { - "name": "contract_type", - "type": "string", - "description": "The type of NFT contract", - "example": "ERC721" - }, - { - "name": "possible_spam", - "type": "boolean", - "description": "Indicates if a contract is possibly a spam contract", - "example": "false" - }, - { - "name": "verified_collection", - "type": "boolean", - "description": "Indicates if a contract is verified", - "example": "false" - }, - { - "name": "collection_logo", - "type": "string", - "description": "The logo of the collection", - "example": "https://cdn.moralis.io/eth/0x67b6d479c7bb412c54e03dca8e1bc6740ce6b99c.png" - }, - { - "name": "collection_banner_image", - "type": "string", - "description": "The banner image of the collection", - "example": "https://cdn.moralis.io/eth/0x67b6d479c7bb412c54e03dca8e1bc6740ce6b99c.png" - }, - { - "name": "collection_category", - "type": "string", - "description": "The category of the collection", - "example": "Art" - }, - { - "name": "project_url", - "type": "string", - "description": "The project url of the collection", - "example": "https://www.cryptokitties.co/" - }, - { - "name": "wiki_url", - "type": "string", - "description": "The wiki url of the collection", - "example": "https://en.wikipedia.org/wiki/CryptoKitties" - }, - { - "name": "discord_url", - "type": "string", - "description": "The discord url of the collection", - "example": "https://discord.com/invite/cryptokitties" - }, - { - "name": "telegram_url", - "type": "string", - "description": "The telegram url of the collection", - "example": "https://t.me/cryptokitties" - }, - { - "name": "twitter_username", - "type": "string", - "description": "The twitter username of the collection", - "example": "CryptoKitties" - }, - { - "name": "instagram_username", - "type": "string", - "description": "The instagram username of the collection", - "example": "cryptokitties" - } + "getNFTLowestPrice": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get NFT lowest price", + "description": "Get the lowest executed price for an NFT contract for the last x days (only trades paid in ETH).", + "method": "GET", + "path": "/nft/:address/lowestprice", + "pathParams": [ + { + "name": "address", + "description": "The address of the NFT contract", + "required": true, + "example": "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D", + "type": "string" + } + ], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", + "type": "string", + "enum": [ + "eth", + "0x1", + "sepolia", + "0xaa36a7", + "holesky", + "0x4268", + "polygon", + "0x89", + "amoy", + "0x13882", + "bsc", + "0x38", + "bsc testnet", + "0x61", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "gnosis", + "0x64", + "gnosis testnet", + "0x27d8", + "chiliz", + "0x15b38", + "chiliz testnet", + "0x15b32", + "base", + "0x2105", + "base sepolia", + "0x14a34", + "optimism", + "0xa", + "optimism sepolia", + "0xaa37dc", + "linea", + "0xe705", + "linea sepolia", + "0xe705" + ] + }, + { + "name": "days", + "description": "The number of days to look back to find the lowest price\nIf not provided 7 days will be the default\n", + "required": false, + "type": "number" + }, + { + "name": "marketplace", + "description": "Marketplace from which to get the trades (only OpenSea is supported at the moment)", + "required": false, + "example": "opensea", + "type": "string" + } + ], + "responses": [ + { + "status": "200", + "description": "Returns the trade with the lowest price", + "body": { + "type": "object", + "fields": [ + { + "name": "transaction_hash", + "type": "string", + "description": "The transaction hash", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "transaction_index", + "type": "string", + "description": "The transaction index" + }, + { + "name": "token_ids", + "type": "array", + "description": "The token ID(s) traded", + "example": ["15", "54"], + "field": { "type": "string", "example": "15" } + }, + { + "name": "seller_address", + "type": "string", + "description": "The address that sold the NFT", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "buyer_address", + "type": "string", + "description": "The address that bought the NFT", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "marketplace_address", + "type": "string", + "description": "The address of the contract that traded the NFT", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "price", + "type": "string", + "description": "The value that was sent in the transaction (ETH/BNB/etc..)", + "example": "1000000000000000" + }, + { + "name": "block_timestamp", + "type": "string", + "description": "The block timestamp", + "example": "2021-06-04T16:00:15" + }, + { + "name": "block_number", + "type": "string", + "description": "The block number of the transaction", + "example": "13680123" + }, + { + "name": "block_hash", + "type": "string", + "description": "The block hash", + "example": "0x4a7c916ca4a970358b9df90051008f729685ff05e9724a9dddba32630c37cb96" + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.nft.getNFTLowestPrice({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.nft.get_nft_lowest_price(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.nft.getNFTContractMetadata({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.nft.get_nft_contract_metadata(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getNFTMetadata": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get NFT metadata", - "description": "Get NFT data, including metadata (where available), for the given NFT token ID and contract address.\n* Requests for contract addresses not yet indexed will automatically start the indexing process for that NFT collection\n", - "method": "GET", - "path": "/nft/:address/:token_id", - "pathParams": [ - { - "name": "address", - "description": "The address of the NFT contract", - "required": true, - "example": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB", - "type": "string" - }, - { - "name": "token_id", - "description": "The ID of the token", - "required": true, - "example": "1", - "type": "string" - } - ], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "0x1", - "sepolia", - "0xaa36a7", - "holesky", - "0x4268", - "polygon", - "0x89", - "amoy", - "0x13882", - "bsc", - "0x38", - "bsc testnet", - "0x61", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "gnosis", - "0x64", - "gnosis testnet", - "0x27d8", - "chiliz", - "0x15b38", - "chiliz testnet", - "0x15b32", - "base", - "0x2105", - "base sepolia", - "0x14a34", - "optimism", - "0xa", - "optimism sepolia", - "0xaa37dc", - "linea", - "0xe705", - "linea sepolia", - "0xe705" - ] - }, - { - "name": "format", - "description": "The format of the token ID", - "required": false, - "example": "decimal", - "type": "string", - "enum": ["decimal", "hex"] }, - { - "name": "normalizeMetadata", - "description": "The option to enable metadata normalization. Learn more about metadata normalization [here](/web3-data-api/evm/normalized-vs-non-normalized-metadata).", - "required": false, - "type": "boolean", - "example": true - }, - { - "name": "media_items", - "type": "boolean", - "description": "Should preview media data be returned? Learn more about media items [here](/web3-data-api/evm/nft-image-previews).", - "example": false - } - ], - "responses": [ - { - "status": "200", - "description": "Returns the specified NFT.", - "body": { - "type": "object", - "fields": [ - { - "name": "token_address", - "type": "string", - "description": "The address of the NFT contract", - "example": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB" - }, - { - "name": "token_id", - "type": "string", - "description": "The token ID of the NFT", - "example": "15" - }, - { - "name": "owner_of", - "type": "string", - "description": "The wallet address of the owner of the NFT", - "example": "0x9c83ff0f1c8924da96cb2fcb7e093f78eb2e316b" - }, - { - "name": "token_hash", - "type": "string", - "description": "The token hash", - "example": "502cee781b0fb40ea02508b21d319ced" - }, - { - "name": "block_number", - "type": "string", - "description": "The block number when the amount or owner changed", - "example": "88256" - }, - { - "name": "block_number_minted", - "type": "string", - "description": "The block number when the NFT was minted", - "example": "88256" - }, - { - "name": "contract_type", - "type": "string", - "description": "The type of NFT contract standard", - "example": "ERC721" - }, - { - "name": "token_uri", - "type": "string", - "description": "The URI to the metadata of the token" - }, - { - "name": "metadata", - "type": "string", - "description": "The metadata of the token" - }, - { - "name": "normalized_metadata", - "description": "A normalized metadata version of the NFT's metadata.", - "properties": { - "name": { - "type": "string", - "description": "The name or title of the NFT", - "example": "Moralis Mug" - }, - "description": { - "type": "string", - "description": "A detailed description of the NFT", - "example": "Moralis Coffee nug 3D Asset that can be used in 3D worldspaces. This NFT is presented as a flat PNG, a Unity3D Prefab and a standard fbx." - }, - "image": { - "type": "string", - "description": "The URL of the NFT's image", - "example": "https://arw2wxg84h6b.moralishost.com:2053/server/files/tNJatzsHirx4V2VAep6sc923OYGxvkpBeJttR7Ks/de504bbadadcbe30c86278342fcf2560_moralismug.png" - }, - "external_link": { - "type": "string", - "description": "A link to additional information", - "example": "https://giphy.com/gifs/loop-recursion-ting-aaODAv1iuQdgI" - }, - "animation_url": { + "getNFTCollectionStats": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get the nft collection stats", + "description": "Get the stats for a nft collection address.", + "method": "GET", + "path": "/nft/:address/stats", + "pathParams": [ + { + "name": "address", + "description": "The address of the NFT collection", + "required": true, + "type": "string" + } + ], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", "type": "string", - "description": "An animated version of the NFT's image", - "example": "https://giphy.com/gifs/food-design-donuts-o9ngTPVYW4qo8" - }, - "attributes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/normalizedMetadataAttribute" + "enum": [ + "eth", + "0x1", + "sepolia", + "0xaa36a7", + "holesky", + "0x4268", + "polygon", + "0x89", + "amoy", + "0x13882", + "bsc", + "0x38", + "bsc testnet", + "0x61", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "gnosis", + "0x64", + "gnosis testnet", + "0x27d8", + "chiliz", + "0x15b38", + "chiliz testnet", + "0x15b32", + "base", + "0x2105", + "base sepolia", + "0x14a34", + "optimism", + "0xa", + "optimism sepolia", + "0xaa37dc", + "linea", + "0xe705", + "linea sepolia", + "0xe705" + ] + } + ], + "responses": [ + { + "status": "200", + "description": "Returns the stats for the nft token.", + "body": { + "type": "object", + "fields": [ + { + "name": "owners", + "type": "object", + "description": "NFT token owner stats", + "fields": [ + { + "name": "current", + "type": "string", + "description": "The number of current owners of the nft token", + "example": "1000" + } + ] + }, + { + "name": "transfers", + "type": "object", + "description": "NFT token transfer stats", + "fields": [ + { + "name": "total", + "type": "string", + "description": "The number of transfers of the nft token", + "example": "1000" + } + ] + } + ] } - } } - }, - { - "name": "media", - "description": "A set of links to 'thumbnail / preview' media files", - "properties": { - "mimetype": { - "type": "string", - "description": "The mimetype of the media file [see https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types]" - }, - "category": { "enum": ["image", "audio", "video"] }, - "status": { - "enum": [ - "success", - "processing", - "unsupported_media", - "invalid_url", - "host_unavailable", - "temporarily_unavailable" - ], - "description": "
successThe NFT Preview was created / retrieved successfully
processingThe NFT Preview was not found and has been submitted for generation.
unsupported_mediaThe mime-type of the NFT's media file indicates a type not currently supported.
invalid_urlThe 'image' URL from the NFT's metadata is not a valid URL and cannot be processed.
host_unavailableThe 'image' URL from the NFT's metadata returned an HttpCode indicating the host / file is not available.
temporarily_unavailableThe attempt to load / parse the NFT media file failed (usually due to rate limiting) and will be tried again at next request.
" - }, - "original_media_url": { - "type": "string", - "description": "The url of the original media file." - }, - "updatedAt": { - "type": "string", - "description": "The timestamp of the last update to this NFT media record." - }, - "parent_hash": { - "type": "string", - "description": "Hash value of the original media file." - }, - "media_collection": { - "description": "Preview item associated with the original", - "$ref": "#/components/schemas/mediaCollection" - } - } - }, - { - "name": "minter_address", - "type": "string", - "description": "The address that minted the NFT", - "example": "0x9c83ff0f1c8924da96cb2fcb7e093f78eb2e316b" - }, - { - "name": "last_token_uri_sync", - "type": "string", - "description": "When the token_uri was last updated" - }, - { - "name": "last_metadata_sync", - "type": "string", - "description": "When the metadata was last updated" - }, - { - "name": "amount", - "type": "string", - "description": "The quantity of this item that the user owns (used by ERC1155)", - "example": "1" - }, - { - "name": "name", - "type": "string", - "description": "The name of the NFT contract", - "example": "CryptoKitties" - }, - { - "name": "symbol", - "type": "string", - "description": "The symbol of the NFT contract", - "example": "RARI" - }, - { - "name": "possible_spam", - "type": "boolean", - "description": "Indicates if a contract is possibly a spam contract", - "example": "false" - }, - { - "name": "verified_collection", - "type": "boolean", - "description": "Indicates if a contract is verified. Currently supported for ethereum NFT contracts.", - "example": "false" - } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.nft.getNFTCollectionStats({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.nft.get_nft_collection_stats(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.nft.getNFTMetadata({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.nft.get_nft_metadata(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getNFTBulkContractMetadata": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get metadata for multiple NFT contracts", - "description": "Get the collection / contract level metadata for a given list of contract addresses (name, symbol). Supports batching up to 25 addresses.\n* Requests for contract addresses not yet indexed will automatically start the indexing process for that NFT collection\n", - "method": "POST", - "path": "/nft/metadata", - "pathParams": [], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "0x1", - "sepolia", - "0xaa36a7", - "holesky", - "0x4268", - "polygon", - "0x89", - "amoy", - "0x13882", - "bsc", - "0x38", - "bsc testnet", - "0x61", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "gnosis", - "0x64", - "gnosis testnet", - "0x27d8", - "chiliz", - "0x15b38", - "chiliz testnet", - "0x15b32", - "base", - "0x2105", - "base sepolia", - "0x14a34", - "optimism", - "0xa", - "optimism sepolia", - "0xaa37dc", - "linea", - "0xe705", - "linea sepolia", - "0xe705" - ] - } - ], - "bodyParam": { - "required": true, - "description": "Body", - "type": "json" - }, - "responses": [ - { - "status": "200", - "description": "Returns the metadata for the requested NFT collections." - } - ] - }, - "getNFTTransfers": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get NFT transfers by token ID", - "description": "Get transfers of an NFT given a contract address and token ID.", - "method": "GET", - "path": "/nft/:address/:token_id/transfers", - "pathParams": [ - { - "name": "address", - "description": "The address of the NFT contract", - "required": true, - "example": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB", - "type": "string" - }, - { - "name": "token_id", - "description": "The ID of the token", - "required": true, - "example": "1", - "type": "string" - } - ], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "0x1", - "sepolia", - "0xaa36a7", - "holesky", - "0x4268", - "polygon", - "0x89", - "amoy", - "0x13882", - "bsc", - "0x38", - "bsc testnet", - "0x61", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "gnosis", - "0x64", - "gnosis testnet", - "0x27d8", - "chiliz", - "0x15b38", - "chiliz testnet", - "0x15b32", - "base", - "0x2105", - "base sepolia", - "0x14a34", - "optimism", - "0xa", - "optimism sepolia", - "0xaa37dc", - "linea", - "0xe705", - "linea sepolia", - "0xe705" - ] }, - { - "name": "format", - "description": "The format of the token ID", - "required": false, - "example": "decimal", - "type": "string" - }, - { - "name": "limit", - "description": "The desired page size of the result.", - "required": false, - "type": "number" - }, - { - "name": "order", - "required": false, - "type": "string", - "description": "The order of the result, in ascending (ASC) or descending (DESC)", - "example": "DESC", - "enum": ["ASC", "DESC"] - }, - { - "name": "cursor", - "description": "The cursor returned in the previous response (used for getting the next page).", - "type": "string" - } - ], - "responses": [ - { - "status": "200", - "description": "Returns a collection of NFT transfers", - "body": { - "type": "object", - "fields": [ - { - "name": "page", - "type": "number", - "description": "The current page of the result", - "example": "2" - }, - { - "name": "page_size", - "type": "number", - "description": "The number of results per page", - "example": "100" - }, - { - "name": "cursor", - "type": "string", - "description": "The cursor to get to the next page" - }, - { - "name": "result", - "type": "object", - "fields": [ - { - "name": "token_address", + "getNFTTokenStats": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get the nft token stats", + "description": "Get the stats for a nft token", + "method": "GET", + "path": "/nft/:address/:token_id/stats", + "pathParams": [ + { + "name": "address", + "description": "The address of the NFT collection", + "required": true, "type": "string", - "description": "The address of the NFT contract", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { + "example": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d" + }, + { "name": "token_id", + "description": "The token id of the NFT collection", + "required": true, "type": "string", - "description": "The token ID of the NFT", - "example": "15" - }, - { - "name": "from_address", - "type": "string", - "description": "The address that sent the NFT", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "from_address_label", - "description": "The label of the from address", - "example": "Binance 1" - }, - { - "name": "to_address", - "type": "string", - "description": "The address that received the NFT", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "to_address_label", - "description": "The label of the to address", - "example": "Binance 2" - }, - { - "name": "value", - "type": "string", - "description": "The value that was sent in the transaction (ETH/BNB/etc..)", - "example": "1000000000000000" - }, - { - "name": "amount", - "type": "string", - "description": "The number of tokens transferred", - "example": "1" - }, - { - "name": "contract_type", - "type": "string", - "description": "The type of NFT contract standard", - "example": "ERC721" - }, - { - "name": "block_number", - "type": "string", - "description": "The block number of the transaction", - "example": "88256" - }, - { - "name": "block_timestamp", - "type": "string", - "description": "The block timestamp", - "example": "2021-06-04T16:00:15" - }, - { - "name": "block_hash", - "type": "string", - "description": "The block hash of the transaction" - }, - { - "name": "transaction_hash", - "type": "string", - "description": "The transaction hash", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "transaction_type", - "type": "string", - "description": "The transaction type" - }, - { - "name": "transaction_index", - "type": "number", - "description": "The transaction index" - }, - { - "name": "log_index", - "type": "number", - "description": "The log index" - }, - { - "name": "operator", + "example": 1 + } + ], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", "type": "string", - "description": "The operator present only for ERC1155 transfers", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "possible_spam", - "type": "boolean", - "description": "Indicates if a contract is possibly a spam contract", - "example": "false" - }, - { - "name": "verified_collection", - "type": "boolean", - "description": "Indicates if a contract is verified", - "example": "false" - } - ] - }, - { - "name": "block_exists", - "type": "boolean", - "description": "Indicator if the block exists", - "example": true - }, - { - "name": "index_complete", - "type": "boolean", - "description": "Indicator if the block is fully indexed", - "example": true - } + "enum": [ + "eth", + "0x1", + "sepolia", + "0xaa36a7", + "holesky", + "0x4268", + "polygon", + "0x89", + "amoy", + "0x13882", + "bsc", + "0x38", + "bsc testnet", + "0x61", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "gnosis", + "0x64", + "gnosis testnet", + "0x27d8", + "chiliz", + "0x15b38", + "chiliz testnet", + "0x15b32", + "base", + "0x2105", + "base sepolia", + "0x14a34", + "optimism", + "0xa", + "optimism sepolia", + "0xaa37dc", + "linea", + "0xe705", + "linea sepolia", + "0xe705" + ] + } + ], + "responses": [ + { + "status": "200", + "description": "Returns the stats for the nft token.", + "body": { + "type": "object", + "fields": [ + { + "name": "owners", + "type": "object", + "description": "NFT token owner stats", + "fields": [ + { + "name": "current", + "type": "string", + "description": "The number of current owners of the nft token", + "example": "1000" + } + ] + }, + { + "name": "transfers", + "type": "object", + "description": "NFT token transfer stats", + "fields": [ + { + "name": "total", + "type": "string", + "description": "The number of transfers of the nft token", + "example": "1000" + } + ] + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.nft.getNFTTokenStats({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.nft.get_nft_token_stats(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.nft.getNFTTransfers({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.nft.get_nft_transfers(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] }, - "getNFTTokenIdOwners": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get NFT owners by token ID", - "description": "Get owners of a specific NFT given the contract address and token ID. \n* Requests for contract addresses not yet indexed will automatically start the indexing process for that NFT collection\n", - "method": "GET", - "path": "/nft/:address/:token_id/owners", - "pathParams": [ - { - "name": "address", - "description": "The address of the NFT contract", - "required": true, - "example": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB", - "type": "string" - }, - { - "name": "token_id", - "description": "The ID of the token", - "required": true, - "example": "1", - "type": "string" - } - ], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "0x1", - "sepolia", - "0xaa36a7", - "holesky", - "0x4268", - "polygon", - "0x89", - "amoy", - "0x13882", - "bsc", - "0x38", - "bsc testnet", - "0x61", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "gnosis", - "0x64", - "gnosis testnet", - "0x27d8", - "chiliz", - "0x15b38", - "chiliz testnet", - "0x15b32", - "base", - "0x2105", - "base sepolia", - "0x14a34", - "optimism", - "0xa", - "optimism sepolia", - "0xaa37dc", - "linea", - "0xe705", - "linea sepolia", - "0xe705" - ] - }, - { - "name": "format", - "description": "The format of the token ID", - "required": false, - "example": "decimal", - "type": "string" - }, - { - "name": "limit", - "description": "The desired page size of the result.", - "required": false, - "type": "number" - }, - { - "name": "cursor", - "description": "The cursor returned in the previous response (used for getting the next page).", - "type": "string" - }, - { - "name": "normalizeMetadata", - "description": "Should normalized metadata be returned?", - "required": false, - "type": "boolean" - }, - { - "name": "media_items", - "description": "Should preview media data be returned?", - "required": false, - "type": "boolean" - } - ], - "responses": [ - { - "status": "200", - "description": "Returns a collection of NFTs with their respective owners.", - "body": { - "type": "object", - "fields": [ - { - "name": "status", - "type": "string", - "description": "The syncing status of the address [SYNCING/SYNCED]", - "example": "SYNCING" - }, - { - "name": "page", - "type": "number", - "description": "The current page of the result", - "example": "2" - }, - { - "name": "page_size", - "type": "number", - "description": "The number of results per page", - "example": "100" - }, - { - "name": "cursor", - "type": "string", - "description": "The cursor to get to the next page" - }, - { - "name": "result", - "type": "object", - "fields": [ - { - "name": "token_address", - "type": "string", - "description": "The address of the NFT contract", - "example": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB" - }, - { - "name": "token_id", - "type": "string", - "description": "The token ID of the NFT", - "example": "15" - }, - { - "name": "contract_type", - "type": "string", - "description": "The type of NFT contract standard", - "example": "ERC721" - }, - { - "name": "owner_of", - "type": "string", - "description": "The wallet address of the owner of the NFT", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "block_number", - "type": "string", - "description": "The block number when the amount or owner changed", - "example": "88256" - }, - { - "name": "block_number_minted", - "type": "string", - "description": "The block number when the NFT was minted", - "example": "88256" - }, - { - "name": "token_uri", + "token": { + "getMultipleTokenPrices": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get Multiple ERC20 token prices", + "description": "Returns an array of token prices denominated in the blockchain's native token and USD for a given token contract address", + "method": "POST", + "path": "/erc20/prices", + "pathParams": [], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", "type": "string", - "description": "The URI to the metadata of the token" - }, - { - "name": "metadata", + "enum": [ + "eth", + "0x1", + "polygon", + "0x89", + "bsc", + "0x38", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "gnosis", + "0x64", + "chiliz", + "0x15b38", + "base", + "0x2105", + "optimism", + "0xa", + "linea", + "0xe705" + ] + }, + { + "name": "include", + "description": "If the result should contain the 24hr percent change", + "required": false, + "example": "percent_change", "type": "string", - "description": "The metadata of the token" - }, - { - "name": "normalized_metadata", - "description": "A normalized metadata version of the NFT's metadata.", - "properties": { - "name": { - "type": "string", - "description": "The name or title of the NFT", - "example": "Moralis Mug" - }, - "description": { - "type": "string", - "description": "A detailed description of the NFT", - "example": "Moralis Coffee nug 3D Asset that can be used in 3D worldspaces. This NFT is presented as a flat PNG, a Unity3D Prefab and a standard fbx." - }, - "image": { - "type": "string", - "description": "The URL of the NFT's image", - "example": "https://arw2wxg84h6b.moralishost.com:2053/server/files/tNJatzsHirx4V2VAep6sc923OYGxvkpBeJttR7Ks/de504bbadadcbe30c86278342fcf2560_moralismug.png" - }, - "external_link": { - "type": "string", - "description": "A link to additional information", - "example": "https://giphy.com/gifs/loop-recursion-ting-aaODAv1iuQdgI" - }, - "animation_url": { - "type": "string", - "description": "An animated version of the NFT's image", - "example": "https://giphy.com/gifs/food-design-donuts-o9ngTPVYW4qo8" - }, - "attributes": { + "enum": ["percent_change"] + } + ], + "bodyParam": { + "description": "Body", + "type": "object", + "fields": [ + { + "name": "tokens", "type": "array", - "items": { - "$ref": "#/components/schemas/normalizedMetadataAttribute" - } - } - } - }, - { - "name": "media", - "description": "A set of links to 'thumbnail / preview' media files", - "properties": { - "mimetype": { - "type": "string", - "description": "The mimetype of the media file [see https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types]" - }, - "category": { "enum": ["image", "audio", "video"] }, - "status": { - "enum": [ - "success", - "processing", - "unsupported_media", - "invalid_url", - "host_unavailable", - "temporarily_unavailable" + "required": true, + "description": "The tokens to be fetched", + "example": [ + { + "token_address": "0xdac17f958d2ee523a2206206994597c13d831ec7" + }, + { + "token_address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48" + }, + { + "token_address": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84", + "exchange": "uniswapv2", + "to_block": "16314545" + }, + { + "token_address": "0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0" + } ], - "description": "
successThe NFT Preview was created / retrieved successfully
processingThe NFT Preview was not found and has been submitted for generation.
unsupported_mediaThe mime-type of the NFT's media file indicates a type not currently supported.
invalid_urlThe 'image' URL from the NFT's metadata is not a valid URL and cannot be processed.
host_unavailableThe 'image' URL from the NFT's metadata returned an HttpCode indicating the host / file is not available.
temporarily_unavailableThe attempt to load / parse the NFT media file failed (usually due to rate limiting) and will be tried again at next request.
" - }, - "original_media_url": { - "type": "string", - "description": "The url of the original media file." - }, - "updatedAt": { - "type": "string", - "description": "The timestamp of the last update to this NFT media record." - }, - "parent_hash": { - "type": "string", - "description": "Hash value of the original media file." - }, - "media_collection": { - "description": "Preview item associated with the original", - "$ref": "#/components/schemas/mediaCollection" - } - } - }, - { - "name": "amount", - "type": "string", - "description": "The number of this item the user owns (used by ERC1155)", - "example": "1" - }, - { - "name": "name", - "type": "string", - "description": "The name of the NFT contract", - "example": "CryptoKitties" - }, - { - "name": "symbol", - "type": "string", - "description": "The symbol of the NFT contract", - "example": "RARI" - }, - { - "name": "token_hash", - "type": "string", - "description": "The token hash", - "example": "502cee781b0fb40ea02508b21d319ced" - }, - { - "name": "last_token_uri_sync", - "type": "string", - "description": "When the token_uri was last updated", - "example": "2021-02-24T00:47:26.647Z" - }, - { - "name": "last_metadata_sync", - "type": "string", - "description": "When the metadata was last updated", - "example": "2021-02-24T00:47:26.647Z" - }, - { - "name": "possible_spam", - "type": "boolean", - "description": "Indicates if a contract is possibly a spam contract", - "example": "false" - }, - { - "name": "verified_collection", - "type": "boolean", - "description": "Indicates if a contract is verified", - "example": "false" - } + "field": { + "type": "object", + "fields": [ + { + "name": "token_address", + "type": "string", + "description": "The contract address", + "example": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84" + }, + { + "name": "exchange", + "type": "string", + "description": "The exchange", + "enum": [ + "uniswapv2", + "uniswapv3", + "sushiswapv2", + "pancakeswapv1", + "pancakeswapv2", + "pancakeswapv3", + "quickswap", + "quickswapv2", + "traderjoe", + "pangolin", + "spookyswap", + "vvs", + "mm finance", + "crodex", + "camelotv2", + "nile" + ] + }, + { + "name": "to_block", + "type": "string", + "description": "The block number", + "example": 16314545 + } + ] + } + } ] - } - ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.nft.getNFTTokenIdOwners({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.nft.get_nft_token_id_owners(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "syncNFTContract": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Resync NFT Contract", - "description": "Initiates a sync of a previously non synced contract.", - "method": "PUT", - "path": "/nft/:address/sync", - "pathParams": [ - { - "name": "address", - "description": "The address of the NFT contract", - "required": true, - "example": "0x60E4d786628Fea6478F785A6d7e704777c86a7c6", - "type": "string" - } - ], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "0x1", - "sepolia", - "0xaa36a7", - "holesky", - "0x4268", - "polygon", - "0x89", - "amoy", - "0x13882", - "bsc", - "0x38", - "bsc testnet", - "0x61", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "gnosis", - "0x64", - "gnosis testnet", - "0x27d8", - "chiliz", - "0x15b38", - "chiliz testnet", - "0x15b32", - "base", - "0x2105", - "base sepolia", - "0x14a34", - "optimism", - "0xa", - "optimism sepolia", - "0xaa37dc", - "linea", - "0xe705", - "linea sepolia", - "0xe705" - ] - } - ], - "responses": [ - { - "status": "201", - "description": "Request Initiated." - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.nft.syncNFTContract({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.nft.sync_nft_contract(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "reSyncMetadata": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Resync NFT metadata", - "description": "Resync the metadata for an NFT\n* The metadata flag will request the NFT's metadata from an already existing token_uri\n* The uri (default) flag will fetch the latest token_uri from the given NFT contract address. In sync mode the metadata will also be fetched\n* The sync mode will make the endpoint synchronous so it will wait for the task to be completed before responding\n* The async mode (default) will make the endpoint asynchronous so we will wait for the task to be completed before responding\n", - "method": "GET", - "path": "/nft/:address/:token_id/metadata/resync", - "pathParams": [ - { - "name": "address", - "description": "The address of the NFT contract", - "required": true, - "example": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB", - "type": "string" - }, - { - "name": "token_id", - "description": "The ID of the token", - "required": true, - "example": "1", - "type": "string" - } - ], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "0x1", - "sepolia", - "0xaa36a7", - "holesky", - "0x4268", - "polygon", - "0x89", - "amoy", - "0x13882", - "bsc", - "0x38", - "bsc testnet", - "0x61", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "gnosis", - "0x64", - "gnosis testnet", - "0x27d8", - "chiliz", - "0x15b38", - "chiliz testnet", - "0x15b32", - "base", - "0x2105", - "base sepolia", - "0x14a34", - "optimism", - "0xa", - "optimism sepolia", - "0xaa37dc", - "linea", - "0xe705", - "linea sepolia", - "0xe705" - ] - }, - { - "name": "flag", - "description": "The type of resync to operate", - "required": false, - "example": "uri", - "default": "uri", - "type": "string", - "enum": ["uri", "metadata"] - }, - { - "name": "mode", - "description": "To define the behaviour of the endpoint", - "required": false, - "example": "async", - "default": "async", - "type": "string", - "enum": ["sync", "async"] - } - ], - "responses": [ - { - "status": "200", - "description": "(In sync mode) Resync request executed.", - "body": { - "type": "object", - "fields": [ - { - "name": "status", - "type": "string", - "description": "The status of the resync request" - } - ] - } - }, - { - "status": "202", - "description": "The resync request was received and will be executed.", - "body": { - "type": "object", - "fields": [ - { - "name": "status", - "type": "string", - "description": "The status of the resync request" - } - ] - } - }, - { - "status": "404", - "description": "(In sync mode) Resync request executed and metadata could not be updated.", - "body": { - "type": "object", - "fields": [ - { - "name": "status", - "type": "string", - "description": "The status of the resync request" - } - ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.nft.reSyncMetadata({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.nft.re_sync_metadata(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getNFTLowestPrice": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get NFT lowest price", - "description": "Get the lowest executed price for an NFT contract for the last x days (only trades paid in ETH).", - "method": "GET", - "path": "/nft/:address/lowestprice", - "pathParams": [ - { - "name": "address", - "description": "The address of the NFT contract", - "required": true, - "example": "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D", - "type": "string" - } - ], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "0x1", - "sepolia", - "0xaa36a7", - "holesky", - "0x4268", - "polygon", - "0x89", - "amoy", - "0x13882", - "bsc", - "0x38", - "bsc testnet", - "0x61", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "gnosis", - "0x64", - "gnosis testnet", - "0x27d8", - "chiliz", - "0x15b38", - "chiliz testnet", - "0x15b32", - "base", - "0x2105", - "base sepolia", - "0x14a34", - "optimism", - "0xa", - "optimism sepolia", - "0xaa37dc", - "linea", - "0xe705", - "linea sepolia", - "0xe705" - ] - }, - { - "name": "days", - "description": "The number of days to look back to find the lowest price\nIf not provided 7 days will be the default\n", - "required": false, - "type": "number" - }, - { - "name": "marketplace", - "description": "Marketplace from which to get the trades (only OpenSea is supported at the moment)", - "required": false, - "example": "opensea", - "type": "string" - } - ], - "responses": [ - { - "status": "200", - "description": "Returns the trade with the lowest price", - "body": { - "type": "object", - "fields": [ - { - "name": "transaction_hash", - "type": "string", - "description": "The transaction hash", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "transaction_index", - "type": "string", - "description": "The transaction index" - }, - { - "name": "token_ids", - "type": "array", - "description": "The token ID(s) traded", - "example": ["15", "54"], - "field": { "type": "string", "example": "15" } - }, - { - "name": "seller_address", - "type": "string", - "description": "The address that sold the NFT", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "buyer_address", - "type": "string", - "description": "The address that bought the NFT", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "marketplace_address", - "type": "string", - "description": "The address of the contract that traded the NFT", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "price", - "type": "string", - "description": "The value that was sent in the transaction (ETH/BNB/etc..)", - "example": "1000000000000000" - }, - { - "name": "block_timestamp", - "type": "string", - "description": "The block timestamp", - "example": "2021-06-04T16:00:15" - }, - { - "name": "block_number", - "type": "string", - "description": "The block number of the transaction", - "example": "13680123" - }, - { - "name": "block_hash", - "type": "string", - "description": "The block hash", - "example": "0x4a7c916ca4a970358b9df90051008f729685ff05e9724a9dddba32630c37cb96" - } + }, + "responses": [ + { + "status": "200", + "description": "Returns an array of token prices denominated in the blockchain's native token and USD for a given token contract address" + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({ apiKey: \"YOUR_API_KEY\" });\n const response = await Moralis.EvmApi.token.getMultipleTokenPrices({});\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nbody = []\n\nparams = {}\n\nresult = evm_api.token.get_multiple_token_prices(\n api_key=api_key,\n body=body,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.nft.getNFTLowestPrice({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.nft.get_nft_lowest_price(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getNFTCollectionStats": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get the nft collection stats", - "description": "Get the stats for a nft collection address.", - "method": "GET", - "path": "/nft/:address/stats", - "pathParams": [ - { - "name": "address", - "description": "The address of the NFT collection", - "required": true, - "type": "string" - } - ], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "0x1", - "sepolia", - "0xaa36a7", - "holesky", - "0x4268", - "polygon", - "0x89", - "amoy", - "0x13882", - "bsc", - "0x38", - "bsc testnet", - "0x61", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "gnosis", - "0x64", - "gnosis testnet", - "0x27d8", - "chiliz", - "0x15b38", - "chiliz testnet", - "0x15b32", - "base", - "0x2105", - "base sepolia", - "0x14a34", - "optimism", - "0xa", - "optimism sepolia", - "0xaa37dc", - "linea", - "0xe705", - "linea sepolia", - "0xe705" - ] - } - ], - "responses": [ - { - "status": "200", - "description": "Returns the stats for the nft token.", - "body": { - "type": "object", - "fields": [ - { - "name": "owners", - "type": "object", - "description": "NFT token owner stats", - "fields": [ - { - "name": "current", + "getTokenPrice": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get ERC20 token price", + "description": "Get the token price denominated in the blockchain's native token and USD. [View supported exchanges here](/web3-data-api/evm/supported-dexs-token-api)", + "method": "GET", + "path": "/erc20/:address/price", + "pathParams": [ + { + "name": "address", + "description": "The address of the token contract", + "required": true, + "example": "0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0", + "type": "string" + } + ], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", "type": "string", - "description": "The number of current owners of the nft token", - "example": "1000" - } - ] - }, - { - "name": "transfers", - "type": "object", - "description": "NFT token transfer stats", - "fields": [ - { - "name": "total", + "enum": [ + "eth", + "0x1", + "polygon", + "0x89", + "bsc", + "0x38", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "gnosis", + "0x64", + "chiliz", + "0x15b38", + "base", + "0x2105", + "optimism", + "0xa", + "linea", + "0xe705" + ] + }, + { + "name": "include", + "description": "If the result should contain the 24hr percent change", + "required": false, + "example": "percent_change", "type": "string", - "description": "The number of transfers of the nft token", - "example": "1000" - } - ] - } + "enum": ["percent_change"] + }, + { + "name": "exchange", + "description": "The factory name or address of the token exchange. [View supported exchanges here](/web3-data-api/evm/supported-dexs-token-api)", + "required": false, + "type": "string", + "enum": [ + "uniswapv2", + "uniswapv3", + "sushiswapv2", + "pancakeswapv1", + "pancakeswapv2", + "pancakeswapv3", + "quickswap", + "quickswapv2", + "traderjoe", + "pangolin", + "spookyswap", + "vvs", + "mm finance", + "crodex", + "camelotv2", + "nile" + ] + }, + { + "name": "to_block", + "description": "The block number from which the token price should be checked", + "required": false, + "type": "number" + } + ], + "responses": [ + { + "status": "200", + "description": "Returns the price denominated in the blockchain's native token and USD for a given token contract address", + "body": { + "type": "object", + "fields": [ + { + "name": "tokenName", + "type": "string", + "description": "The name of the token", + "example": "Kylin Network" + }, + { + "name": "tokenSymbol", + "type": "string", + "description": "The symbol of the token", + "example": "KYL" + }, + { + "name": "tokenLogo", + "type": "string", + "description": "The logo of the token", + "example": "https://cdn.moralis.io/eth/0x67b6d479c7bb412c54e03dca8e1bc6740ce6b99c.png" + }, + { + "name": "tokenDecimals", + "type": "string", + "description": "The number of decimals of the token", + "example": "18" + }, + { + "name": "nativePrice", + "required": [ + "value", + "decimals", + "name", + "symbol", + "address" + ], + "properties": { + "value": { + "type": "string", + "description": "The native price of the token", + "example": "8409770570506626" + }, + "decimals": { + "type": "integer", + "description": "The number of decimals on the token", + "example": 18 + }, + "name": { + "type": "string", + "description": "The name of the token", + "example": "Ether" + }, + "symbol": { + "type": "string", + "description": "The symbol of the token", + "example": "ETH" + }, + "address": { + "type": "string", + "description": "The address of the native token" + } + } + }, + { + "name": "usdPrice", + "type": "number", + "description": "The price in USD for the token", + "example": 19.722370676 + }, + { + "name": "usdPriceFormatted", + "type": "string", + "description": "The price in USD for the token in string format", + "example": "19.722370676" + }, + { + "name": "24hrPercentChange", + "type": "string", + "description": "The 24hr percent change of the token", + "example": "-0.8842730258590583" + }, + { + "name": "exchangeAddress", + "type": "string", + "description": "The address of the exchange used to calculate the price", + "example": "0x1f98431c8ad98523631ae4a59f267346ea31f984" + }, + { + "name": "exchangeName", + "type": "string", + "description": "The name of the exchange used to calculate the price", + "example": "Uniswap v3" + }, + { + "name": "tokenAddress", + "type": "string", + "description": "The address of the token", + "example": "0x67b6d479c7bb412c54e03dca8e1bc6740ce6b99c" + }, + { + "name": "toBlock", + "type": "string", + "description": "toBlock", + "example": "16314545" + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.token.getTokenPrice({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.token.get_token_price(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.nft.getNFTCollectionStats({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.nft.get_nft_collection_stats(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getNFTTokenStats": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get the nft token stats", - "description": "Get the stats for a nft token", - "method": "GET", - "path": "/nft/:address/:token_id/stats", - "pathParams": [ - { - "name": "address", - "description": "The address of the NFT collection", - "required": true, - "type": "string", - "example": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d" }, - { - "name": "token_id", - "description": "The token id of the NFT collection", - "required": true, - "type": "string", - "example": 1 - } - ], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "0x1", - "sepolia", - "0xaa36a7", - "holesky", - "0x4268", - "polygon", - "0x89", - "amoy", - "0x13882", - "bsc", - "0x38", - "bsc testnet", - "0x61", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "gnosis", - "0x64", - "gnosis testnet", - "0x27d8", - "chiliz", - "0x15b38", - "chiliz testnet", - "0x15b32", - "base", - "0x2105", - "base sepolia", - "0x14a34", - "optimism", - "0xa", - "optimism sepolia", - "0xaa37dc", - "linea", - "0xe705", - "linea sepolia", - "0xe705" - ] - } - ], - "responses": [ - { - "status": "200", - "description": "Returns the stats for the nft token.", - "body": { - "type": "object", - "fields": [ - { - "name": "owners", - "type": "object", - "description": "NFT token owner stats", - "fields": [ - { - "name": "current", - "type": "string", - "description": "The number of current owners of the nft token", - "example": "1000" - } - ] - }, - { - "name": "transfers", - "type": "object", - "description": "NFT token transfer stats", - "fields": [ - { - "name": "total", + "getWalletTokenBalancesPrice": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get ERC20 token balances with prices by wallet", + "description": "Get token balances for a specific wallet address and their token prices in USD.", + "method": "GET", + "path": "/wallets/:address/tokens", + "pathParams": [ + { + "name": "address", + "description": "The address from which token balances will be checked", + "required": true, + "example": "0xcB1C1FdE09f811B294172696404e88E658659905", + "type": "string" + } + ], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", "type": "string", - "description": "The number of transfers of the nft token", - "example": "1000" - } - ] - } + "enum": [ + "eth", + "0x1", + "sepolia", + "0xaa36a7", + "holesky", + "0x4268", + "polygon", + "0x89", + "amoy", + "0x13882", + "bsc", + "0x38", + "bsc testnet", + "0x61", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "gnosis", + "0x64", + "gnosis testnet", + "0x27d8", + "chiliz", + "0x15b38", + "chiliz testnet", + "0x15b32", + "base", + "0x2105", + "base sepolia", + "0x14a34", + "optimism", + "0xa", + "optimism sepolia", + "0xaa37dc", + "linea", + "0xe705", + "linea sepolia", + "0xe705" + ] + }, + { + "name": "to_block", + "description": "The block number up to which the balances will be checked.", + "required": false, + "type": "number" + }, + { + "name": "token_addresses", + "description": "The addresses to get balances for (optional)", + "required": false, + "type": "array", + "field": { + "type": "string" + } + }, + { + "name": "exclude_spam", + "description": "Exclude spam tokens from the result", + "required": false, + "type": "boolean" + }, + { + "name": "exclude_unverified_contracts", + "description": "Exclude unverified contracts from the result", + "required": false, + "type": "boolean" + }, + { + "name": "cursor", + "description": "The cursor returned in the previous response (used for getting the next page).", + "type": "string" + }, + { + "name": "limit", + "description": "The desired page size of the result.", + "required": false, + "type": "number" + }, + { + "name": "exclude_native", + "description": "Exclude native balance from the result", + "required": false, + "type": "boolean" + } + ], + "responses": [ + { + "status": "200", + "description": "Returns ERC20 token balance, details, and additional financial information for a specific address, including pagination details.", + "body": { + "type": "object", + "fields": [ + { + "name": "cursor", + "type": "string", + "description": "A pointer to the next page of results (if any), for pagination purposes.", + "example": "" + }, + { + "name": "page", + "type": "number", + "description": "The current page number in the paginated result set", + "example": 2 + }, + { + "name": "page_size", + "type": "number", + "description": "The number of items per page in the paginated result set", + "example": 100 + }, + { + "name": "result", + "type": "array", + "description": "An array of objects, each representing a token's detailed information and financial data.", + "field": { + "type": "object", + "fields": [ + { + "name": "token_address", + "type": "string", + "description": "The address of the token contract", + "example": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" + }, + { + "name": "symbol", + "type": "string", + "description": "The symbol of the token contract", + "example": "ETH" + }, + { + "name": "name", + "type": "string", + "description": "The name of the token", + "example": "Ether" + }, + { + "name": "logo", + "type": "string", + "description": "The URL to the token's logo image", + "example": "https://cdn.moralis.io/eth/0x.png" + }, + { + "name": "thumbnail", + "type": "string", + "description": "The URL to the token's thumbnail image", + "example": "https://cdn.moralis.io/eth/0x_thumb.png" + }, + { + "name": "decimals", + "type": "integer", + "description": "The number of decimal places the token uses", + "example": 18 + }, + { + "name": "balance", + "type": "string", + "description": "The current token balance of the address", + "example": "360659174684349604" + }, + { + "name": "possible_spam", + "type": "boolean", + "description": "Flag indicating if the token is considered possible spam", + "example": false + }, + { + "name": "verified_contract", + "type": "boolean", + "description": "Flag indicating if the contract is verified", + "example": true + }, + { + "name": "balance_formatted", + "type": "string", + "description": "The formatted string representation of the token balance", + "example": "0.360659174684349604" + }, + { + "name": "usd_price", + "type": "number", + "description": "The current USD price of the token", + "example": 3725.2775921204284 + }, + { + "name": "usd_price_24hr_percent_change", + "type": "number", + "description": "The 24-hour percentage change in the token's USD price", + "example": 1.2028612707326054 + }, + { + "name": "usd_price_24hr_usd_change", + "type": "number", + "description": "The USD amount change in the token's price over the last 24 hours", + "example": 44.80992138289679 + }, + { + "name": "usd_value", + "type": "number", + "description": "The current USD value of the token balance", + "example": 1343.5555418442548 + }, + { + "name": "usd_value_24hr_usd_change", + "type": "number", + "description": "The USD value change of the token balance over the last 24 hours", + "example": 16.161109263626145 + }, + { + "name": "native_token", + "type": "boolean", + "description": "Flag indicating if this token is the native cryptocurrency of its blockchain", + "example": true + }, + { + "name": "portfolio_percentage", + "type": "number", + "description": "The percentage of the token's value relative to the total portfolio value", + "example": 55.7292 + } + ] + } + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.wallets.getWalletTokenBalancesPrice({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.wallets.get_wallet_token_balances_price(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.nft.getNFTTokenStats({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.nft.get_nft_token_stats(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - } - }, - "token": { - "getMultipleTokenPrices": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get Multiple ERC20 token prices", - "description": "Returns an array of token prices denominated in the blockchain's native token and USD for a given token contract address", - "method": "POST", - "path": "/erc20/prices", - "pathParams": [], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "0x1", - "polygon", - "0x89", - "bsc", - "0x38", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "gnosis", - "0x64", - "chiliz", - "0x15b38", - "base", - "0x2105", - "optimism", - "0xa", - "linea", - "0xe705" - ] - }, - { - "name": "include", - "description": "If the result should contain the 24hr percent change", - "required": false, - "example": "percent_change", - "type": "string", - "enum": ["percent_change"] - } - ], - "bodyParam": { - "description": "Body", - "type": "object", - "fields": [ - { - "name": "tokens", - "type": "array", - "required": true, - "description": "The tokens to be fetched", - "example": [ - { "token_address": "0xdac17f958d2ee523a2206206994597c13d831ec7" }, - { "token_address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48" }, - { - "token_address": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84", - "exchange": "uniswapv2", - "to_block": "16314545" - }, - { "token_address": "0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0" } - ], - "field": { - "type": "object", - "fields": [ - { - "name": "token_address", - "type": "string", - "description": "The contract address", - "example": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84" - }, - { - "name": "exchange", - "type": "string", - "description": "The exchange", - "enum": [ - "uniswapv2", - "uniswapv3", - "sushiswapv2", - "pancakeswapv1", - "pancakeswapv2", - "pancakeswapv3", - "quickswap", - "quickswapv2", - "traderjoe", - "pangolin", - "spookyswap", - "vvs", - "mm finance", - "crodex", - "camelotv2" - ] - }, - { - "name": "to_block", - "type": "string", - "description": "The block number", - "example": 16314545 - } - ] - } - } - ] - }, - "responses": [ - { - "status": "200", - "description": "Returns an array of token prices denominated in the blockchain's native token and USD for a given token contract address" - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({ apiKey: \"YOUR_API_KEY\" });\n const response = await Moralis.EvmApi.token.getMultipleTokenPrices({});\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nbody = []\n\nparams = {}\n\nresult = evm_api.token.get_multiple_token_prices(\n api_key=api_key,\n body=body,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getTokenPrice": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get ERC20 token price", - "description": "Get the token price denominated in the blockchain's native token and USD. [View supported exchanges here](/web3-data-api/evm/supported-dexs-token-api)", - "method": "GET", - "path": "/erc20/:address/price", - "pathParams": [ - { - "name": "address", - "description": "The address of the token contract", - "required": true, - "example": "0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0", - "type": "string" - } - ], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "0x1", - "polygon", - "0x89", - "bsc", - "0x38", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "gnosis", - "0x64", - "chiliz", - "0x15b38", - "base", - "0x2105", - "optimism", - "0xa", - "linea", - "0xe705" - ] - }, - { - "name": "include", - "description": "If the result should contain the 24hr percent change", - "required": false, - "example": "percent_change", - "type": "string", - "enum": ["percent_change"] - }, - { - "name": "exchange", - "description": "The factory name or address of the token exchange. [View supported exchanges here](/web3-data-api/evm/supported-dexs-token-api)", - "required": false, - "type": "string", - "enum": [ - "uniswapv2", - "uniswapv3", - "sushiswapv2", - "pancakeswapv1", - "pancakeswapv2", - "pancakeswapv3", - "quickswap", - "quickswapv2", - "traderjoe", - "pangolin", - "spookyswap", - "vvs", - "mm finance", - "crodex", - "camelotv2" - ] }, - { - "name": "to_block", - "description": "The block number from which the token price should be checked", - "required": false, - "type": "number" - } - ], - "responses": [ - { - "status": "200", - "description": "Returns the price denominated in the blockchain's native token and USD for a given token contract address", - "body": { - "type": "object", - "fields": [ - { - "name": "tokenName", - "type": "string", - "description": "The name of the token", - "example": "Kylin Network" - }, - { - "name": "tokenSymbol", - "type": "string", - "description": "The symbol of the token", - "example": "KYL" - }, - { - "name": "tokenLogo", - "type": "string", - "description": "The logo of the token", - "example": "https://cdn.moralis.io/eth/0x67b6d479c7bb412c54e03dca8e1bc6740ce6b99c.png" - }, - { - "name": "tokenDecimals", - "type": "string", - "description": "The number of decimals of the token", - "example": "18" - }, - { - "name": "nativePrice", - "required": ["value", "decimals", "name", "symbol", "address"], - "properties": { - "value": { - "type": "string", - "description": "The native price of the token", - "example": "8409770570506626" - }, - "decimals": { - "type": "integer", - "description": "The number of decimals on the token", - "example": 18 - }, - "name": { - "type": "string", - "description": "The name of the token", - "example": "Ether" - }, - "symbol": { - "type": "string", - "description": "The symbol of the token", - "example": "ETH" - }, - "address": { + "getWalletTokenBalances": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get ERC20 token balance by wallet", + "description": "Get token balances for a specific wallet address.", + "method": "GET", + "path": "/:address/erc20", + "pathParams": [ + { + "name": "address", + "description": "The address from which token balances will be checked", + "required": true, + "example": "0x1f9090aaE28b8a3dCeaDf281B0F12828e676c326", + "type": "string" + } + ], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", "type": "string", - "description": "The address of the native token" - } - } - }, - { - "name": "usdPrice", - "type": "number", - "description": "The price in USD for the token", - "example": 19.722370676 - }, - { - "name": "usdPriceFormatted", - "type": "string", - "description": "The price in USD for the token in string format", - "example": "19.722370676" - }, - { - "name": "24hrPercentChange", - "type": "string", - "description": "The 24hr percent change of the token", - "example": "-0.8842730258590583" - }, - { - "name": "exchangeAddress", - "type": "string", - "description": "The address of the exchange used to calculate the price", - "example": "0x1f98431c8ad98523631ae4a59f267346ea31f984" - }, - { - "name": "exchangeName", - "type": "string", - "description": "The name of the exchange used to calculate the price", - "example": "Uniswap v3" - }, - { - "name": "tokenAddress", - "type": "string", - "description": "The address of the token", - "example": "0x67b6d479c7bb412c54e03dca8e1bc6740ce6b99c" - }, - { - "name": "toBlock", - "type": "string", - "description": "toBlock", - "example": "16314545" - } - ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.token.getTokenPrice({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.token.get_token_price(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getWalletTokenBalancesPrice": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get ERC20 token balances with prices by wallet", - "description": "Get token balances for a specific wallet address and their token prices in USD.", - "method": "GET", - "path": "/wallets/:address/tokens", - "pathParams": [ - { - "name": "address", - "description": "The address from which token balances will be checked", - "required": true, - "example": "0xcB1C1FdE09f811B294172696404e88E658659905", - "type": "string" - } - ], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "0x1", - "sepolia", - "0xaa36a7", - "holesky", - "0x4268", - "polygon", - "0x89", - "amoy", - "0x13882", - "bsc", - "0x38", - "bsc testnet", - "0x61", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "gnosis", - "0x64", - "gnosis testnet", - "0x27d8", - "chiliz", - "0x15b38", - "chiliz testnet", - "0x15b32", - "base", - "0x2105", - "base sepolia", - "0x14a34", - "optimism", - "0xa", - "optimism sepolia", - "0xaa37dc", - "linea", - "0xe705", - "linea sepolia", - "0xe705" - ] - }, - { - "name": "to_block", - "description": "The block number up to which the balances will be checked.", - "required": false, - "type": "number" - }, - { - "name": "token_addresses", - "description": "The addresses to get balances for (optional)", - "required": false, - "type": "array", - "field": { - "type": "string" - } - }, - { - "name": "exclude_spam", - "description": "Exclude spam tokens from the result", - "required": false, - "type": "boolean" - }, - { - "name": "exclude_unverified_contracts", - "description": "Exclude unverified contracts from the result", - "required": false, - "type": "boolean" - }, - { - "name": "cursor", - "description": "The cursor returned in the previous response (used for getting the next page).", - "type": "string" - }, - { - "name": "limit", - "description": "The desired page size of the result.", - "required": false, - "type": "number" - }, - { - "name": "exclude_native", - "description": "Exclude native balance from the result", - "required": false, - "type": "boolean" - } - ], - "responses": [ - { - "status": "200", - "description": "Returns ERC20 token balance, details, and additional financial information for a specific address, including pagination details.", - "body": { - "type": "object", - "fields": [ - { - "name": "cursor", - "type": "string", - "description": "A pointer to the next page of results (if any), for pagination purposes.", - "example": "" - }, - { - "name": "page", - "type": "number", - "description": "The current page number in the paginated result set", - "example": 2 - }, - { - "name": "page_size", - "type": "number", - "description": "The number of items per page in the paginated result set", - "example": 100 - }, - { - "name": "result", - "type": "array", - "description": "An array of objects, each representing a token's detailed information and financial data.", - "field": { - "type": "object", - "fields": [ - { - "name": "token_address", - "type": "string", - "description": "The address of the token contract", - "example": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" - }, - { - "name": "symbol", - "type": "string", - "description": "The symbol of the token contract", - "example": "ETH" - }, - { - "name": "name", - "type": "string", - "description": "The name of the token", - "example": "Ether" - }, - { - "name": "logo", - "type": "string", - "description": "The URL to the token's logo image", - "example": "https://cdn.moralis.io/eth/0x.png" - }, - { - "name": "thumbnail", - "type": "string", - "description": "The URL to the token's thumbnail image", - "example": "https://cdn.moralis.io/eth/0x_thumb.png" - }, - { - "name": "decimals", - "type": "integer", - "description": "The number of decimal places the token uses", - "example": 18 - }, - { - "name": "balance", - "type": "string", - "description": "The current token balance of the address", - "example": "360659174684349604" - }, - { - "name": "possible_spam", - "type": "boolean", - "description": "Flag indicating if the token is considered possible spam", - "example": false - }, - { - "name": "verified_contract", - "type": "boolean", - "description": "Flag indicating if the contract is verified", - "example": true - }, - { - "name": "balance_formatted", - "type": "string", - "description": "The formatted string representation of the token balance", - "example": "0.360659174684349604" - }, - { - "name": "usd_price", - "type": "number", - "description": "The current USD price of the token", - "example": 3725.2775921204284 - }, - { - "name": "usd_price_24hr_percent_change", - "type": "number", - "description": "The 24-hour percentage change in the token's USD price", - "example": 1.2028612707326054 - }, - { - "name": "usd_price_24hr_usd_change", - "type": "number", - "description": "The USD amount change in the token's price over the last 24 hours", - "example": 44.80992138289679 - }, - { - "name": "usd_value", - "type": "number", - "description": "The current USD value of the token balance", - "example": 1343.5555418442548 - }, - { - "name": "usd_value_24hr_usd_change", - "type": "number", - "description": "The USD value change of the token balance over the last 24 hours", - "example": 16.161109263626145 - }, - { - "name": "native_token", - "type": "boolean", - "description": "Flag indicating if this token is the native cryptocurrency of its blockchain", - "example": true - }, - { - "name": "portfolio_percentage", - "type": "number", - "description": "The percentage of the token's value relative to the total portfolio value", - "example": 55.7292 + "enum": [ + "eth", + "0x1", + "sepolia", + "0xaa36a7", + "holesky", + "0x4268", + "polygon", + "0x89", + "amoy", + "0x13882", + "bsc", + "0x38", + "bsc testnet", + "0x61", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "gnosis", + "0x64", + "gnosis testnet", + "0x27d8", + "chiliz", + "0x15b38", + "chiliz testnet", + "0x15b32", + "base", + "0x2105", + "base sepolia", + "0x14a34", + "optimism", + "0xa", + "optimism sepolia", + "0xaa37dc", + "linea", + "0xe705", + "linea sepolia", + "0xe705" + ] + }, + { + "name": "to_block", + "description": "The block number from which the balances should be checked", + "required": false, + "type": "number" + }, + { + "name": "token_addresses", + "description": "The addresses to get balances for (optional)", + "required": false, + "type": "array", + "field": { "type": "string" } + }, + { + "name": "exclude_spam", + "description": "Exclude spam tokens from the result", + "required": false, + "type": "boolean" + } + ], + "responses": [ + { + "status": "200", + "description": "Returns ERC20 token balance and details for a specific address", + "body": { + "type": "object", + "fields": [ + { + "name": "token_address", + "type": "string", + "description": "The address of the token contract", + "example": "0x2d30ca6f024dbc1307ac8a1a44ca27de6f797ec22ef20627a1307243b0ab7d09" + }, + { + "name": "name", + "type": "string", + "description": "The name of the token contract", + "example": "Kylin Network" + }, + { + "name": "symbol", + "type": "string", + "description": "The symbol of the NFT contract", + "example": "KYL" + }, + { + "name": "logo", + "type": "string", + "description": "The logo of the token", + "example": "https://cdn.moralis.io/eth/0x67b6d479c7bb412c54e03dca8e1bc6740ce6b99c.png" + }, + { + "name": "thumbnail", + "type": "string", + "description": "The thumbnail of the logo", + "example": "https://cdn.moralis.io/eth/0x67b6d479c7bb412c54e03dca8e1bc6740ce6b99c_thumb.png" + }, + { + "name": "decimals", + "type": "integer", + "description": "The number of decimals on the token", + "example": 18 + }, + { + "name": "balance", + "type": "string", + "description": "Timestamp of when the contract was last synced with the node", + "example": "123456789" + }, + { + "name": "possible_spam", + "type": "boolean", + "description": "Indicates if a contract is possibly a spam contract", + "example": false + }, + { + "name": "verified_collection", + "type": "boolean", + "description": "Indicates if a contract is verified", + "example": false + } + ] } - ] } - } - ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.wallets.getWalletTokenBalancesPrice({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.wallets.get_wallet_token_balances_price(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getWalletTokenBalances": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get ERC20 token balance by wallet", - "description": "Get token balances for a specific wallet address.", - "method": "GET", - "path": "/:address/erc20", - "pathParams": [ - { - "name": "address", - "description": "The address from which token balances will be checked", - "required": true, - "example": "0x1f9090aaE28b8a3dCeaDf281B0F12828e676c326", - "type": "string" - } - ], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "0x1", - "sepolia", - "0xaa36a7", - "holesky", - "0x4268", - "polygon", - "0x89", - "amoy", - "0x13882", - "bsc", - "0x38", - "bsc testnet", - "0x61", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "gnosis", - "0x64", - "gnosis testnet", - "0x27d8", - "chiliz", - "0x15b38", - "chiliz testnet", - "0x15b32", - "base", - "0x2105", - "base sepolia", - "0x14a34", - "optimism", - "0xa", - "optimism sepolia", - "0xaa37dc", - "linea", - "0xe705", - "linea sepolia", - "0xe705" - ] - }, - { - "name": "to_block", - "description": "The block number from which the balances should be checked", - "required": false, - "type": "number" - }, - { - "name": "token_addresses", - "description": "The addresses to get balances for (optional)", - "required": false, - "type": "array", - "field": { "type": "string" } - }, - { - "name": "exclude_spam", - "description": "Exclude spam tokens from the result", - "required": false, - "type": "boolean" - } - ], - "responses": [ - { - "status": "200", - "description": "Returns ERC20 token balance and details for a specific address", - "body": { - "type": "object", - "fields": [ - { - "name": "token_address", - "type": "string", - "description": "The address of the token contract", - "example": "0x2d30ca6f024dbc1307ac8a1a44ca27de6f797ec22ef20627a1307243b0ab7d09" - }, - { - "name": "name", - "type": "string", - "description": "The name of the token contract", - "example": "Kylin Network" - }, - { - "name": "symbol", - "type": "string", - "description": "The symbol of the NFT contract", - "example": "KYL" - }, - { - "name": "logo", - "type": "string", - "description": "The logo of the token", - "example": "https://cdn.moralis.io/eth/0x67b6d479c7bb412c54e03dca8e1bc6740ce6b99c.png" - }, - { - "name": "thumbnail", - "type": "string", - "description": "The thumbnail of the logo", - "example": "https://cdn.moralis.io/eth/0x67b6d479c7bb412c54e03dca8e1bc6740ce6b99c_thumb.png" - }, - { - "name": "decimals", - "type": "integer", - "description": "The number of decimals on the token", - "example": 18 - }, - { - "name": "balance", - "type": "string", - "description": "Timestamp of when the contract was last synced with the node", - "example": "123456789" - }, - { - "name": "possible_spam", - "type": "boolean", - "description": "Indicates if a contract is possibly a spam contract", - "example": false - }, - { - "name": "verified_collection", - "type": "boolean", - "description": "Indicates if a contract is verified", - "example": false - } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.token.getWalletTokenBalances({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.token.get_wallet_token_balances(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.token.getWalletTokenBalances({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.token.get_wallet_token_balances(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getWalletTokenTransfers": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get ERC20 token transactions by wallet", - "description": "Get ERC20 token transactions ordered by block number in descending order.", - "method": "GET", - "path": "/:address/erc20/transfers", - "pathParams": [ - { - "name": "address", - "description": "The address of the wallet", - "required": true, - "example": "0x1f9090aaE28b8a3dCeaDf281B0F12828e676c326", - "type": "string" - } - ], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "0x1", - "sepolia", - "0xaa36a7", - "holesky", - "0x4268", - "polygon", - "0x89", - "amoy", - "0x13882", - "bsc", - "0x38", - "bsc testnet", - "0x61", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "gnosis", - "0x64", - "gnosis testnet", - "0x27d8", - "chiliz", - "0x15b38", - "chiliz testnet", - "0x15b32", - "base", - "0x2105", - "base sepolia", - "0x14a34", - "optimism", - "0xa", - "optimism sepolia", - "0xaa37dc", - "linea", - "0xe705", - "linea sepolia", - "0xe705" - ] - }, - { - "name": "contract_addresses", - "description": "List of contract addresses of transfers", - "required": false, - "type": "array", - "field": { "type": "string" } - }, - { - "name": "from_block", - "description": "The minimum block number from which to get the transactions\n* Provide the param 'from_block' or 'from_date'\n* If 'from_date' and 'from_block' are provided, 'from_block' will be used.\n", - "required": false, - "type": "number" - }, - { - "name": "to_block", - "description": "The maximum block number from which to get the transactions.\n* Provide the param 'to_block' or 'to_date'\n* If 'to_date' and 'to_block' are provided, 'to_block' will be used.\n", - "required": false, - "type": "number" - }, - { - "name": "from_date", - "description": "The start date from which to get the transactions (any format that is accepted by momentjs)\n* Provide the param 'from_block' or 'from_date'\n* If 'from_date' and 'from_block' are provided, 'from_block' will be used.\n", - "required": false, - "type": "string" - }, - { - "name": "to_date", - "description": "Get the transactions up to this date (any format that is accepted by momentjs)\n* Provide the param 'to_block' or 'to_date'\n* If 'to_date' and 'to_block' are provided, 'to_block' will be used.\n", - "type": "string" }, - { - "name": "limit", - "description": "The desired page size of the result.", - "required": false, - "type": "number" - }, - { - "name": "order", - "required": false, - "type": "string", - "description": "The order of the result, in ascending (ASC) or descending (DESC)", - "example": "DESC", - "enum": ["ASC", "DESC"] - }, - { - "name": "cursor", - "description": "The cursor returned in the previous response (used for getting the next page). Learn more on cursor pagination [here](/web3-data-api/evm/reference/pagination).", - "type": "string" - } - ], - "responses": [ - { - "status": "200", - "description": "Returns a collection of token transactions.", - "body": { - "type": "object", - "fields": [ - { - "name": "total", - "type": "number", - "description": "The total number of matches for this query", - "example": "2000" - }, - { - "name": "page", - "type": "number", - "description": "The current page of the result", - "example": "2" - }, - { - "name": "page_size", - "type": "number", - "description": "The number of results per page", - "example": "100" - }, - { - "name": "result", - "type": "object", - "fields": [ - { - "name": "token_name", - "type": "string", - "example": "Tether USD" - }, - { - "name": "token_symbol", - "type": "string", - "example": "USDT" - }, - { - "name": "token_logo", - "type": "string", - "example": "https://assets.coingecko.com/coins/images/325/large/Tether-logo.png?1598003707" - }, - { - "name": "token_decimals", - "type": "string", - "example": "6" - }, - { - "name": "transaction_hash", - "type": "string", - "description": "The transaction hash", - "example": "0x2d30ca6f024dbc1307ac8a1a44ca27de6f797ec22ef20627a1307243b0ab7d09" - }, - { + "getWalletTokenTransfers": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get ERC20 token transactions by wallet", + "description": "Get ERC20 token transactions ordered by block number in descending order.", + "method": "GET", + "path": "/:address/erc20/transfers", + "pathParams": [ + { "name": "address", + "description": "The address of the wallet", + "required": true, + "example": "0x1f9090aaE28b8a3dCeaDf281B0F12828e676c326", + "type": "string" + } + ], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", "type": "string", - "description": "The address of the token", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "block_timestamp", - "type": "string", - "description": "The block timestamp", - "example": "2021-04-02T10:07:54.000Z" - }, - { - "name": "block_number", - "type": "string", - "description": "The block number", - "example": 12526958 - }, - { - "name": "block_hash", - "type": "string", - "description": "The block hash", - "example": "0x0372c302e3c52e8f2e15d155e2c545e6d802e479236564af052759253b20fd86" - }, - { - "name": "to_address", - "type": "string", - "description": "The recipient", - "example": "0x62AED87d21Ad0F3cdE4D147Fdcc9245401Af0044" - }, - { - "name": "to_address_label", - "type": "string", - "description": "The label of the to address", - "example": "Binance 2" - }, - { - "name": "from_address", - "type": "string", - "description": "The sender", - "example": "0xd4a3BebD824189481FC45363602b83C9c7e9cbDf" - }, - { - "name": "from_address_label", - "type": "string", - "description": "The label of the from address", - "example": "Binance 1" - }, - { - "name": "value", - "type": "string", - "description": "The value that was transfered (in wei)", - "example": 650000000000000000 - }, - { - "name": "transaction_index", - "type": "number", - "description": "The transaction index of the transfer within the block", - "example": 12 - }, - { - "name": "log_index", - "type": "number", - "description": "The log index of the transfer within the block", - "example": 2 - }, - { - "name": "possible_spam", - "type": "boolean", - "description": "Indicates if a contract is possibly a spam contract", - "example": "false" - }, - { - "name": "verified_collection", - "type": "boolean", - "description": "Indicates if a contract is verified. Currently supported for ethereum NFT contracts.", - "example": "false" - } - ] - } - ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.token.getWalletTokenTransfers({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.token.get_wallet_token_transfers(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getTokenMetadata": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get ERC20 token metadata by contract", - "description": "Get the metadata for a given token contract address (name, symbol, decimals, logo).", - "method": "GET", - "path": "/erc20/metadata", - "pathParams": [], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "0x1", - "sepolia", - "0xaa36a7", - "holesky", - "0x4268", - "polygon", - "0x89", - "amoy", - "0x13882", - "bsc", - "0x38", - "bsc testnet", - "0x61", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "gnosis", - "0x64", - "gnosis testnet", - "0x27d8", - "chiliz", - "0x15b38", - "chiliz testnet", - "0x15b32", - "base", - "0x2105", - "base sepolia", - "0x14a34", - "optimism", - "0xa", - "optimism sepolia", - "0xaa37dc", - "linea", - "0xe705", - "linea sepolia", - "0xe705" - ] - }, - { - "name": "addresses", - "description": "The addresses to get metadata for", - "required": true, - "type": "array", - "field": { "type": "string" } - } - ], - "responses": [ - { - "status": "200", - "description": "Get the metadata for a given ERC20 token contract address (name, symbol, decimals, logo).", - "body": { - "type": "array", - "field": { - "type": "object", - "fields": [ + "enum": [ + "eth", + "0x1", + "sepolia", + "0xaa36a7", + "holesky", + "0x4268", + "polygon", + "0x89", + "amoy", + "0x13882", + "bsc", + "0x38", + "bsc testnet", + "0x61", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "gnosis", + "0x64", + "gnosis testnet", + "0x27d8", + "chiliz", + "0x15b38", + "chiliz testnet", + "0x15b32", + "base", + "0x2105", + "base sepolia", + "0x14a34", + "optimism", + "0xa", + "optimism sepolia", + "0xaa37dc", + "linea", + "0xe705", + "linea sepolia", + "0xe705" + ] + }, + { + "name": "contract_addresses", + "description": "List of contract addresses of transfers", + "required": false, + "type": "array", + "field": { "type": "string" } + }, { - "name": "address", - "type": "string", - "description": "The address of the token contract", - "example": "0x2d30ca6f024dbc1307ac8a1a44ca27de6f797ec22ef20627a1307243b0ab7d09" + "name": "from_block", + "description": "The minimum block number from which to get the transactions\n* Provide the param 'from_block' or 'from_date'\n* If 'from_date' and 'from_block' are provided, 'from_block' will be used.\n", + "required": false, + "type": "number" + }, + { + "name": "to_block", + "description": "The maximum block number from which to get the transactions.\n* Provide the param 'to_block' or 'to_date'\n* If 'to_date' and 'to_block' are provided, 'to_block' will be used.\n", + "required": false, + "type": "number" }, { - "name": "name", - "type": "string", - "description": "The name of the token contract", - "example": "Kylin Network" + "name": "from_date", + "description": "The start date from which to get the transactions (any format that is accepted by momentjs)\n* Provide the param 'from_block' or 'from_date'\n* If 'from_date' and 'from_block' are provided, 'from_block' will be used.\n", + "required": false, + "type": "string" }, { - "name": "symbol", - "type": "string", - "description": "The symbol of the NFT contract", - "example": "KYL" + "name": "to_date", + "description": "Get the transactions up to this date (any format that is accepted by momentjs)\n* Provide the param 'to_block' or 'to_date'\n* If 'to_date' and 'to_block' are provided, 'to_block' will be used.\n", + "type": "string" }, { - "name": "decimals", - "type": "string", - "description": "The number of decimals on the token", - "example": "18" + "name": "limit", + "description": "The desired page size of the result.", + "required": false, + "type": "number" }, { - "name": "logo", - "type": "string", - "description": "The logo of the token", - "example": "https://cdn.moralis.io/eth/0x67b6d479c7bb412c54e03dca8e1bc6740ce6b99c.png" + "name": "order", + "required": false, + "type": "string", + "description": "The order of the result, in ascending (ASC) or descending (DESC)", + "example": "DESC", + "enum": ["ASC", "DESC"] }, { - "name": "logo_hash", - "type": "string", - "description": "The logo hash", - "example": "ee7aa2cdf100649a3521a082116258e862e6971261a39b5cd4e4354fcccbc54d" + "name": "cursor", + "description": "The cursor returned in the previous response (used for getting the next page). Learn more on cursor pagination [here](/web3-data-api/evm/reference/pagination).", + "type": "string" + } + ], + "responses": [ + { + "status": "200", + "description": "Returns a collection of token transactions.", + "body": { + "type": "object", + "fields": [ + { + "name": "total", + "type": "number", + "description": "The total number of matches for this query", + "example": "2000" + }, + { + "name": "page", + "type": "number", + "description": "The current page of the result", + "example": "2" + }, + { + "name": "page_size", + "type": "number", + "description": "The number of results per page", + "example": "100" + }, + { + "name": "result", + "type": "object", + "fields": [ + { + "name": "token_name", + "type": "string", + "example": "Tether USD" + }, + { + "name": "token_symbol", + "type": "string", + "example": "USDT" + }, + { + "name": "token_logo", + "type": "string", + "example": "https://assets.coingecko.com/coins/images/325/large/Tether-logo.png?1598003707" + }, + { + "name": "token_decimals", + "type": "string", + "example": "6" + }, + { + "name": "transaction_hash", + "type": "string", + "description": "The transaction hash", + "example": "0x2d30ca6f024dbc1307ac8a1a44ca27de6f797ec22ef20627a1307243b0ab7d09" + }, + { + "name": "address", + "type": "string", + "description": "The address of the token", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "block_timestamp", + "type": "string", + "description": "The block timestamp", + "example": "2021-04-02T10:07:54.000Z" + }, + { + "name": "block_number", + "type": "string", + "description": "The block number", + "example": 12526958 + }, + { + "name": "block_hash", + "type": "string", + "description": "The block hash", + "example": "0x0372c302e3c52e8f2e15d155e2c545e6d802e479236564af052759253b20fd86" + }, + { + "name": "to_address", + "type": "string", + "description": "The recipient", + "example": "0x62AED87d21Ad0F3cdE4D147Fdcc9245401Af0044" + }, + { + "name": "to_address_label", + "type": "string", + "description": "The label of the to address", + "example": "Binance 2" + }, + { + "name": "from_address", + "type": "string", + "description": "The sender", + "example": "0xd4a3BebD824189481FC45363602b83C9c7e9cbDf" + }, + { + "name": "from_address_label", + "type": "string", + "description": "The label of the from address", + "example": "Binance 1" + }, + { + "name": "value", + "type": "string", + "description": "The value that was transfered (in wei)", + "example": 650000000000000000 + }, + { + "name": "transaction_index", + "type": "number", + "description": "The transaction index of the transfer within the block", + "example": 12 + }, + { + "name": "log_index", + "type": "number", + "description": "The log index of the transfer within the block", + "example": 2 + }, + { + "name": "possible_spam", + "type": "boolean", + "description": "Indicates if a contract is possibly a spam contract", + "example": "false" + }, + { + "name": "verified_collection", + "type": "boolean", + "description": "Indicates if a contract is verified. Currently supported for ethereum NFT contracts.", + "example": "false" + } + ] + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.token.getWalletTokenTransfers({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" }, { - "name": "thumbnail", - "type": "string", - "description": "The thumbnail of the logo", - "example": "https://cdn.moralis.io/eth/0x67b6d479c7bb412c54e03dca8e1bc6740ce6b99c_thumb.png" + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.token.get_wallet_token_transfers(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getTokenMetadata": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get ERC20 token metadata by contract", + "description": "Get the metadata for a given token contract address (name, symbol, decimals, logo).", + "method": "GET", + "path": "/erc20/metadata", + "pathParams": [], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", + "type": "string", + "enum": [ + "eth", + "0x1", + "sepolia", + "0xaa36a7", + "holesky", + "0x4268", + "polygon", + "0x89", + "amoy", + "0x13882", + "bsc", + "0x38", + "bsc testnet", + "0x61", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "gnosis", + "0x64", + "gnosis testnet", + "0x27d8", + "chiliz", + "0x15b38", + "chiliz testnet", + "0x15b32", + "base", + "0x2105", + "base sepolia", + "0x14a34", + "optimism", + "0xa", + "optimism sepolia", + "0xaa37dc", + "linea", + "0xe705", + "linea sepolia", + "0xe705" + ] }, { - "name": "block_number", - "type": "string", - "description": "The block number when the token was created or last updated", - "example": "12526958" + "name": "addresses", + "description": "The addresses to get metadata for", + "required": true, + "type": "array", + "field": { "type": "string" } + } + ], + "responses": [ + { + "status": "200", + "description": "Get the metadata for a given ERC20 token contract address (name, symbol, decimals, logo).", + "body": { + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "address", + "type": "string", + "description": "The address of the token contract", + "example": "0x2d30ca6f024dbc1307ac8a1a44ca27de6f797ec22ef20627a1307243b0ab7d09" + }, + { + "name": "name", + "type": "string", + "description": "The name of the token contract", + "example": "Kylin Network" + }, + { + "name": "symbol", + "type": "string", + "description": "The symbol of the NFT contract", + "example": "KYL" + }, + { + "name": "decimals", + "type": "string", + "description": "The number of decimals on the token", + "example": "18" + }, + { + "name": "logo", + "type": "string", + "description": "The logo of the token", + "example": "https://cdn.moralis.io/eth/0x67b6d479c7bb412c54e03dca8e1bc6740ce6b99c.png" + }, + { + "name": "logo_hash", + "type": "string", + "description": "The logo hash", + "example": "ee7aa2cdf100649a3521a082116258e862e6971261a39b5cd4e4354fcccbc54d" + }, + { + "name": "thumbnail", + "type": "string", + "description": "The thumbnail of the logo", + "example": "https://cdn.moralis.io/eth/0x67b6d479c7bb412c54e03dca8e1bc6740ce6b99c_thumb.png" + }, + { + "name": "block_number", + "type": "string", + "description": "The block number when the token was created or last updated", + "example": "12526958" + }, + { + "name": "validated", + "type": "string", + "description": "Indicates if the token details have been validated", + "example": "true" + }, + { + "name": "possible_spam", + "type": "boolean", + "description": "Indicates if a contract is possibly a spam contract", + "example": false + }, + { + "name": "verified_collection", + "type": "boolean", + "description": "Indicates if a contract is verified", + "example": false + } + ] + } + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.token.getTokenMetadata({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" }, { - "name": "validated", - "type": "string", - "description": "Indicates if the token details have been validated", - "example": "true" + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.token.get_token_metadata(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getTokenMetadataBySymbol": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get ERC20 token metadata by symbols", + "description": "Get the metadata for a list of token symbols (name, symbol, decimals, logo).", + "method": "GET", + "path": "/erc20/metadata/symbols", + "pathParams": [], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", + "type": "string", + "enum": [ + "eth", + "0x1", + "sepolia", + "0xaa36a7", + "holesky", + "0x4268", + "polygon", + "0x89", + "amoy", + "0x13882", + "bsc", + "0x38", + "bsc testnet", + "0x61", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "gnosis", + "0x64", + "gnosis testnet", + "0x27d8", + "chiliz", + "0x15b38", + "chiliz testnet", + "0x15b32", + "base", + "0x2105", + "base sepolia", + "0x14a34", + "optimism", + "0xa", + "optimism sepolia", + "0xaa37dc", + "linea", + "0xe705", + "linea sepolia", + "0xe705" + ] }, { - "name": "possible_spam", - "type": "boolean", - "description": "Indicates if a contract is possibly a spam contract", - "example": false + "name": "symbols", + "description": "The symbols to get metadata for", + "required": true, + "type": "array", + "field": { "type": "string", "example": "LINK" } + } + ], + "responses": [ + { + "status": "200", + "description": "Get the metadata for a list of token symbols (name, symbol, decimals, logo).", + "body": { + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "address", + "type": "string", + "description": "The address of the token contract", + "example": "0x2d30ca6f024dbc1307ac8a1a44ca27de6f797ec22ef20627a1307243b0ab7d09" + }, + { + "name": "name", + "type": "string", + "description": "The name of the token contract", + "example": "Kylin Network" + }, + { + "name": "symbol", + "type": "string", + "description": "The symbol of the NFT contract", + "example": "KYL" + }, + { + "name": "decimals", + "type": "string", + "description": "The number of decimals on the token", + "example": "18" + }, + { + "name": "logo", + "type": "string", + "description": "The logo of the token", + "example": "https://cdn.moralis.io/eth/0x67b6d479c7bb412c54e03dca8e1bc6740ce6b99c.png" + }, + { + "name": "logo_hash", + "type": "string", + "description": "The logo hash", + "example": "ee7aa2cdf100649a3521a082116258e862e6971261a39b5cd4e4354fcccbc54d" + }, + { + "name": "thumbnail", + "type": "string", + "description": "The thumbnail of the logo", + "example": "https://cdn.moralis.io/eth/0x67b6d479c7bb412c54e03dca8e1bc6740ce6b99c_thumb.png" + }, + { + "name": "block_number", + "type": "string", + "description": "The block number when the token was created or last updated", + "example": "12526958" + }, + { + "name": "validated", + "type": "string", + "description": "Indicates if the token details have been validated", + "example": "true" + }, + { + "name": "possible_spam", + "type": "boolean", + "description": "Indicates if a contract is possibly a spam contract", + "example": false + }, + { + "name": "verified_collection", + "type": "boolean", + "description": "Indicates if a contract is verified", + "example": false + } + ] + } + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.token.getTokenMetadataBySymbol({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" }, { - "name": "verified_collection", - "type": "boolean", - "description": "Indicates if a contract is verified", - "example": false + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.token.get_token_metadata_by_symbol(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" } - ] - } - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.token.getTokenMetadata({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.token.get_token_metadata(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getTokenMetadataBySymbol": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get ERC20 token metadata by symbols", - "description": "Get the metadata for a list of token symbols (name, symbol, decimals, logo).", - "method": "GET", - "path": "/erc20/metadata/symbols", - "pathParams": [], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "0x1", - "sepolia", - "0xaa36a7", - "holesky", - "0x4268", - "polygon", - "0x89", - "amoy", - "0x13882", - "bsc", - "0x38", - "bsc testnet", - "0x61", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "gnosis", - "0x64", - "gnosis testnet", - "0x27d8", - "chiliz", - "0x15b38", - "chiliz testnet", - "0x15b32", - "base", - "0x2105", - "base sepolia", - "0x14a34", - "optimism", - "0xa", - "optimism sepolia", - "0xaa37dc", - "linea", - "0xe705", - "linea sepolia", - "0xe705" - ] + ] }, - { - "name": "symbols", - "description": "The symbols to get metadata for", - "required": true, - "type": "array", - "field": { "type": "string", "example": "LINK" } - } - ], - "responses": [ - { - "status": "200", - "description": "Get the metadata for a list of token symbols (name, symbol, decimals, logo).", - "body": { - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "address", - "type": "string", - "description": "The address of the token contract", - "example": "0x2d30ca6f024dbc1307ac8a1a44ca27de6f797ec22ef20627a1307243b0ab7d09" - }, - { - "name": "name", - "type": "string", - "description": "The name of the token contract", - "example": "Kylin Network" - }, - { - "name": "symbol", - "type": "string", - "description": "The symbol of the NFT contract", - "example": "KYL" - }, - { - "name": "decimals", - "type": "string", - "description": "The number of decimals on the token", - "example": "18" - }, + "getTokenAllowance": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get ERC20 token allowance", + "description": "Get the amount which the spender is allowed to withdraw on behalf of the owner.", + "method": "GET", + "path": "/erc20/:address/allowance", + "pathParams": [ { - "name": "logo", - "type": "string", - "description": "The logo of the token", - "example": "https://cdn.moralis.io/eth/0x67b6d479c7bb412c54e03dca8e1bc6740ce6b99c.png" - }, + "name": "address", + "description": "The address of the token contract", + "required": true, + "type": "string", + "example": "0xdac17f958d2ee523a2206206994597c13d831ec7" + } + ], + "queryParams": [ { - "name": "logo_hash", - "type": "string", - "description": "The logo hash", - "example": "ee7aa2cdf100649a3521a082116258e862e6971261a39b5cd4e4354fcccbc54d" + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", + "type": "string", + "enum": [ + "eth", + "0x1", + "polygon", + "0x89", + "bsc", + "0x38", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "chiliz", + "0x15b38", + "gnosis", + "0x64", + "base", + "0x2105", + "optimism", + "0xa", + "holesky", + "0x4268" + ] }, { - "name": "thumbnail", - "type": "string", - "description": "The thumbnail of the logo", - "example": "https://cdn.moralis.io/eth/0x67b6d479c7bb412c54e03dca8e1bc6740ce6b99c_thumb.png" + "name": "owner_address", + "description": "The address of the token owner", + "required": true, + "type": "string", + "example": "0x0cBee687015d5151BA084806E00A59A8e6F206c2" }, { - "name": "block_number", - "type": "string", - "description": "The block number when the token was created or last updated", - "example": "12526958" - }, + "name": "spender_address", + "description": "The address of the token spender", + "required": true, + "type": "string", + "example": "0x75e89d5979E4f6Fba9F97c104c2F0AFB3F1dcB88" + } + ], + "responses": [ { - "name": "validated", - "type": "string", - "description": "Indicates if the token details have been validated", - "example": "true" - }, + "status": "200", + "description": "Returns the amount which the spender is allowed to withdraw on behalf of the owner.", + "body": { + "type": "object", + "fields": [ + { + "name": "allowance", + "type": "string", + "description": "The allowance", + "example": "0" + } + ] + } + } + ], + "codeSamples": [ { - "name": "possible_spam", - "type": "boolean", - "description": "Indicates if a contract is possibly a spam contract", - "example": false + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.token.getTokenAllowance({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" }, { - "name": "verified_collection", - "type": "boolean", - "description": "Indicates if a contract is verified", - "example": false + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.token.get_token_allowance(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" } - ] - } - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.token.getTokenMetadataBySymbol({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.token.get_token_metadata_by_symbol(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getTokenAllowance": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get ERC20 token allowance", - "description": "Get the amount which the spender is allowed to withdraw on behalf of the owner.", - "method": "GET", - "path": "/erc20/:address/allowance", - "pathParams": [ - { - "name": "address", - "description": "The address of the token contract", - "required": true, - "type": "string", - "example": "0xdac17f958d2ee523a2206206994597c13d831ec7" - } - ], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "0x1", - "polygon", - "0x89", - "bsc", - "0x38", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "chiliz", - "0x15b38", - "gnosis", - "0x64", - "base", - "0x2105", - "optimism", - "0xa", - "holesky", - "0x4268" - ] - }, - { - "name": "owner_address", - "description": "The address of the token owner", - "required": true, - "type": "string", - "example": "0x0cBee687015d5151BA084806E00A59A8e6F206c2" - }, - { - "name": "spender_address", - "description": "The address of the token spender", - "required": true, - "type": "string", - "example": "0x75e89d5979E4f6Fba9F97c104c2F0AFB3F1dcB88" - } - ], - "responses": [ - { - "status": "200", - "description": "Returns the amount which the spender is allowed to withdraw on behalf of the owner.", - "body": { - "type": "object", - "fields": [ - { - "name": "allowance", - "type": "string", - "description": "The allowance", - "example": "0" - } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.token.getTokenAllowance({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.token.get_token_allowance(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getTokenTransfers": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get ERC20 token transactions by contract", - "description": "Get ERC20 token transactions from a contract ordered by block number in descending order.", - "method": "GET", - "path": "/erc20/:address/transfers", - "pathParams": [ - { - "name": "address", - "description": "The address of the token contract", - "required": true, - "example": "0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0", - "type": "string" - } - ], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "0x1", - "sepolia", - "0xaa36a7", - "holesky", - "0x4268", - "polygon", - "0x89", - "amoy", - "0x13882", - "bsc", - "0x38", - "bsc testnet", - "0x61", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "gnosis", - "0x64", - "gnosis testnet", - "0x27d8", - "chiliz", - "0x15b38", - "chiliz testnet", - "0x15b32", - "base", - "0x2105", - "base sepolia", - "0x14a34", - "optimism", - "0xa", - "optimism sepolia", - "0xaa37dc", - "linea", - "0xe705", - "linea sepolia", - "0xe705" - ] - }, - { - "name": "from_block", - "description": "The minimum block number from which to get the transfers\n* Provide the param 'from_block' or 'from_date'\n* If 'from_date' and 'from_block' are provided, 'from_block' will be used.\n", - "required": false, - "type": "number" - }, - { - "name": "to_block", - "description": "The maximum block number from which to get the transfers.\n* Provide the param 'to_block' or 'to_date'\n* If 'to_date' and 'to_block' are provided, 'to_block' will be used.\n", - "required": false, - "type": "number" - }, - { - "name": "from_date", - "description": "The start date from which to get the transfers (any format that is accepted by momentjs)\n* Provide the param 'from_block' or 'from_date'\n* If 'from_date' and 'from_block' are provided, 'from_block' will be used.\n", - "required": false, - "type": "string" - }, - { - "name": "to_date", - "description": "Get transfers up until this date (any format that is accepted by momentjs)\n* Provide the param 'to_block' or 'to_date'\n* If 'to_date' and 'to_block' are provided, 'to_block' will be used.\n", - "type": "string" - }, - { - "name": "limit", - "description": "The desired page size of the result.", - "required": false, - "type": "number" - }, - { - "name": "order", - "required": false, - "type": "string", - "description": "The order of the result, in ascending (ASC) or descending (DESC)", - "example": "DESC", - "enum": ["ASC", "DESC"] }, - { - "name": "cursor", - "description": "The cursor returned in the previous response (used for getting the next page).", - "type": "string" - } - ], - "responses": [ - { - "status": "200", - "description": "Returns a collection of token contract transactions.", - "body": { - "type": "object", - "fields": [ - { - "name": "page", - "type": "number", - "description": "The current page of the result", - "example": "2" - }, - { - "name": "page_size", - "type": "number", - "description": "The number of results per page", - "example": "100" - }, - { - "name": "cursor", - "type": "string", - "description": "The cursor to get to the next page" - }, - { - "name": "result", - "type": "object", - "fields": [ - { - "name": "token_name", - "type": "string", - "example": "Tether USD" - }, - { - "name": "token_symbol", - "type": "string", - "example": "USDT" - }, - { - "name": "token_logo", - "type": "string", - "example": "https://assets.coingecko.com/coins/images/325/large/Tether-logo.png?1598003707" - }, - { - "name": "token_decimals", - "type": "string", - "example": "6" - }, - { - "name": "transaction_hash", - "type": "string", - "description": "The transaction hash", - "example": "0x2d30ca6f024dbc1307ac8a1a44ca27de6f797ec22ef20627a1307243b0ab7d09" - }, - { + "getTokenTransfers": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get ERC20 token transactions by contract", + "description": "Get ERC20 token transactions from a contract ordered by block number in descending order.", + "method": "GET", + "path": "/erc20/:address/transfers", + "pathParams": [ + { "name": "address", - "type": "string", - "description": "The address of the token", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "block_timestamp", - "type": "string", - "description": "The block timestamp", - "example": "2021-04-02T10:07:54.000Z" - }, - { - "name": "block_number", - "type": "string", - "description": "The block number", - "example": 12526958 - }, - { - "name": "block_hash", - "type": "string", - "description": "The block hash", - "example": "0x0372c302e3c52e8f2e15d155e2c545e6d802e479236564af052759253b20fd86" - }, - { - "name": "to_address", - "type": "string", - "description": "The recipient", - "example": "0x62AED87d21Ad0F3cdE4D147Fdcc9245401Af0044" - }, - { - "name": "to_address_label", - "description": "The label of the to address", - "example": "Binance 2" - }, - { - "name": "from_address", - "type": "string", - "description": "The sender", - "example": "0xd4a3BebD824189481FC45363602b83C9c7e9cbDf" - }, - { - "name": "from_address_label", - "description": "The label of the from address", - "example": "Binance 1" - }, - { - "name": "value", - "type": "string", - "description": "The value that was transfered (in wei)", - "example": 650000000000000000 - }, - { - "name": "transaction_index", - "type": "number", - "description": "The transaction index of the transfer within the block", - "example": 12 - }, - { - "name": "log_index", - "type": "number", - "description": "The log index of the transfer within the block", - "example": 2 - }, - { - "name": "possible_spam", - "type": "boolean", - "description": "Indicates if a contract is possibly a spam contract", - "example": "false" - }, - { - "name": "verified_collection", - "type": "boolean", - "description": "Indicates if a contract is verified", - "example": "false" - } - ] - } - ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.token.getTokenTransfers({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.token.get_token_transfers(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getTokenStats": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get the erc20 token stats", - "description": "Get the stats for a erc20 token", - "method": "GET", - "path": "/erc20/:address/stats", - "pathParams": [ - { - "name": "address", - "description": "The address of the erc20 token", - "required": true, - "type": "string", - "example": "0xdac17f958d2ee523a2206206994597c13d831ec7" - } - ], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "0x1", - "sepolia", - "0xaa36a7", - "holesky", - "0x4268", - "polygon", - "0x89", - "amoy", - "0x13882", - "bsc", - "0x38", - "bsc testnet", - "0x61", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "gnosis", - "0x64", - "gnosis testnet", - "0x27d8", - "chiliz", - "0x15b38", - "chiliz testnet", - "0x15b32", - "base", - "0x2105", - "base sepolia", - "0x14a34", - "optimism", - "0xa", - "optimism sepolia", - "0xaa37dc", - "linea", - "0xe705", - "linea sepolia", - "0xe705" - ] - } - ], - "responses": [ - { - "status": "200", - "description": "Returns the stats for the erc20 token.", - "body": { - "type": "object", - "fields": [ - { - "name": "transfers", - "type": "object", - "description": "ERC20 Token transfer stats", - "fields": [ - { - "name": "total", - "type": "string", - "description": "The number of transfers of the token", - "example": "1000" - } - ] - } - ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.token.getTokenStats({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.token.get_token_stats(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getTokenOwners": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get ERC20 token owners by contract", - "description": "Identify the major holders of an ERC20 token and understand their ownership percentages", - "method": "GET", - "path": "/erc20/:token_address/owners", - "pathParams": [ - { - "name": "token_address", - "description": "The address of the token contract", - "required": true, - "example": "0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0", - "type": "string" - } - ], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "0x1", - "sepolia", - "0xaa36a7", - "holesky", - "0x4268", - "polygon", - "0x89", - "amoy", - "0x13882", - "bsc", - "0x38", - "bsc testnet", - "0x61", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "gnosis", - "0x64", - "gnosis testnet", - "0x27d8", - "chiliz", - "0x15b38", - "chiliz testnet", - "0x15b32", - "base", - "0x2105", - "base sepolia", - "0x14a34", - "optimism", - "0xa", - "optimism sepolia", - "0xaa37dc", - "linea", - "0xe705", - "linea sepolia", - "0xe705" - ] - }, - { - "name": "limit", - "description": "The desired page size of the result.", - "required": false, - "type": "number" - }, - { - "name": "cursor", - "description": "The cursor returned in the previous response (used for getting the next page).", - "required": false, - "type": "string" - }, - { - "name": "order", - "description": "The order of the result, in ascending (ASC) or descending (DESC)", - "required": false, - "example": "DESC", - "type": "string", - "enum": ["ASC", "DESC"] - } - ], - "responses": [ - { - "status": "200", - "description": "Returns a collection of owners of an ERC20 token", - "body": { - "type": "object", - "fields": [ - { - "name": "page", - "type": "number", - "description": "The current page of the result", - "example": "2" - }, - { - "name": "page_size", - "type": "number", - "description": "The number of results per page", - "example": "100" - }, - { - "name": "cursor", - "type": "string", - "description": "The cursor to get to the next page" - }, - { - "name": "result", - "type": "object", - "fields": [ - { - "name": "owner_address", - "type": "string", - "description": "The address of the erc20 token owner", - "example": "0x244..." - }, - { - "name": "owner_address_label", - "type": "string", - "description": "The label of the owner_address", - "example": "Coinbase 1" - }, - { - "name": "balance", - "type": "string", - "description": "The amount holding of the ERC20 token", - "example": "57888888888888888888880" - }, - { - "name": "balance_formatted", - "type": "string", - "description": "The amount holding of the ERC20 token in decimaal", - "example": "5.78" - }, - { - "name": "usd_value", - "type": "string", - "description": "The USD value of the balance", - "example": "57888888888888888888880" - }, - { - "name": "is_contract", - "type": "boolean", - "description": "Indicates if the token address is for a contract or not" - }, - { - "name": "percentage_relative_to_total_supply", - "type": "number", - "description": "The percentage of total supply held by the owner" - } - ] - } - ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.token.getTokenOwners({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.token.get_token_owners(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - } - }, - "balance": { - "getNativeBalance": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get native balance by wallet", - "description": "Get the native balance for a specific wallet address.", - "method": "GET", - "path": "/:address/balance", - "pathParams": [ - { - "name": "address", - "description": "The address from which the native balance will be checked", - "required": true, - "example": "0xDC24316b9AE028F1497c275EB9192a3Ea0f67022", - "type": "string" - } - ], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "0x1", - "sepolia", - "0xaa36a7", - "holesky", - "0x4268", - "polygon", - "0x89", - "amoy", - "0x13882", - "bsc", - "0x38", - "bsc testnet", - "0x61", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "gnosis", - "0x64", - "gnosis testnet", - "0x27d8", - "chiliz", - "0x15b38", - "chiliz testnet", - "0x15b32", - "base", - "0x2105", - "base sepolia", - "0x14a34", - "optimism", - "0xa", - "optimism sepolia", - "0xaa37dc", - "linea", - "0xe705", - "linea sepolia", - "0xe705" - ] - }, - { - "name": "to_block", - "description": "The block number from which the balances should be checked", - "required": false, - "type": "number" - } - ], - "responses": [ - { - "status": "200", - "description": "Returns the native balance for a specific address", - "body": { - "type": "object", - "fields": [ - { - "name": "balance", - "type": "string", - "description": "The balance", - "example": "1234567890" - } - ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.balance.getNativeBalance({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.balance.get_native_balance(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getNativeBalancesForAddresses": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get balance for a set of wallet", - "description": "Get the native balances for a set of specific addresses", - "method": "GET", - "path": "/wallets/balances", - "pathParams": [], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "0x1", - "sepolia", - "0xaa36a7", - "holesky", - "0x4268", - "polygon", - "0x89", - "amoy", - "0x13882", - "bsc", - "0x38", - "bsc testnet", - "0x61", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "gnosis", - "0x64", - "gnosis testnet", - "0x27d8", - "chiliz", - "0x15b38", - "chiliz testnet", - "0x15b32", - "base", - "0x2105", - "base sepolia", - "0x14a34", - "optimism", - "0xa", - "optimism sepolia", - "0xaa37dc", - "linea", - "0xe705", - "linea sepolia", - "0xe705" - ] - }, - { - "name": "to_block", - "description": "The block number on which the balances should be checked", - "required": false, - "type": "number" - }, - { - "name": "wallet_addresses", - "description": "The addresses to get metadata for (max 25 addresses)", - "required": true, - "type": "array", - "field": { - "type": "string", - "example": "0xE92d1A43df510F82C66382592a047d288f85226f" - } - } - ], - "responses": [ - { - "status": "200", - "description": "Returns a collection of balances", - "body": { - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "chain", - "type": "string", - "required": true, - "description": "The chain", - "example": "eth_mainnet" - }, - { - "name": "chain_id", - "type": "string", - "required": true, - "description": "The chain id", - "example": "2" - }, - { - "name": "total_balance", - "type": "string", - "required": true, - "description": "The total balances for all the walttes", - "example": "57499206466583095" - }, - { - "name": "block_number", - "type": "string", - "required": true, - "description": "The block Number", - "example": "123456789" - }, - { - "name": "block_timestamp", - "type": "string", - "required": true, - "description": "The block timestamp", - "example": "0.057" - }, - { - "name": "total_balance_formatted", - "type": "string", - "required": true, - "description": "The total balances for all the walttes formatted", - "example": "123456789" - }, - { - "name": "wallet_balances", - "type": "array", - "required": true, - "field": { - "type": "object", - "fields": [ - { - "name": "address", - "type": "string", - "description": "address", - "example": "0x123", - "required": true - }, - { - "name": "balance", - "type": "string", - "description": "balance", - "example": "28499206466583095", - "required": true - }, - { - "name": "balance_formatted", - "type": "string", - "description": "balance formatted", - "example": "0.0285", - "required": true - } - ] - } + "description": "The address of the token contract", + "required": true, + "example": "0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0", + "type": "string" } - ] - } - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.balance.getNativeBalancesForAddresses({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.balance.get_native_balances_for_addresses(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - } - }, - "transaction": { - "getWalletTransactions": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get native transactions by wallet", - "description": "Get native transactions ordered by block number in descending order.", - "method": "GET", - "path": "/:address", - "pathParams": [ - { - "name": "address", - "description": "The address of the wallet", - "required": true, - "example": "0x1f9090aaE28b8a3dCeaDf281B0F12828e676c326", - "type": "string" - } - ], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "0x1", - "sepolia", - "0xaa36a7", - "holesky", - "0x4268", - "polygon", - "0x89", - "amoy", - "0x13882", - "bsc", - "0x38", - "bsc testnet", - "0x61", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "gnosis", - "0x64", - "gnosis testnet", - "0x27d8", - "chiliz", - "0x15b38", - "chiliz testnet", - "0x15b32", - "base", - "0x2105", - "base sepolia", - "0x14a34", - "optimism", - "0xa", - "optimism sepolia", - "0xaa37dc", - "linea", - "0xe705", - "linea sepolia", - "0xe705" - ] - }, - { - "name": "from_block", - "description": "The minimum block number from which to get the transactions\n* Provide the param 'from_block' or 'from_date'\n* If 'from_date' and 'from_block' are provided, 'from_block' will be used.\n", - "required": false, - "type": "number" - }, - { - "name": "to_block", - "description": "The maximum block number from which to get the transactions.\n* Provide the param 'to_block' or 'to_date'\n* If 'to_date' and 'to_block' are provided, 'to_block' will be used.\n", - "required": false, - "type": "number" - }, - { - "name": "from_date", - "description": "The start date from which to get the transactions (any format that is accepted by momentjs)\n* Provide the param 'from_block' or 'from_date'\n* If 'from_date' and 'from_block' are provided, 'from_block' will be used.\n", - "required": false, - "type": "string" - }, - { - "name": "to_date", - "description": "Get the transactions up to this date (any format that is accepted by momentjs)\n* Provide the param 'to_block' or 'to_date'\n* If 'to_date' and 'to_block' are provided, 'to_block' will be used.\n", - "type": "string" - }, - { - "name": "cursor", - "description": "The cursor returned in the previous response (used for getting the next page). Learn more on cursor pagination [here](/web3-data-api/evm/reference/pagination).", - "type": "string" - }, - { - "name": "include", - "description": "If the result should contain the internal transactions.", - "required": false, - "type": "string", - "enum": ["internal_transactions"] - }, - { - "name": "limit", - "description": "The desired page size of the result.", - "required": false, - "type": "number" - }, - { - "name": "order", - "required": false, - "type": "string", - "description": "The order of the result, in ascending (ASC) or descending (DESC)", - "example": "DESC", - "enum": ["ASC", "DESC"] - } - ], - "responses": [ - { - "status": "200", - "description": "Returns a collection of native transactions.", - "body": { - "type": "object", - "fields": [ - { - "name": "total", - "type": "number", - "description": "The total number of matches for this query", - "example": "2000" - }, - { - "name": "page", - "type": "number", - "description": "The current page of the result", - "example": "2" - }, - { - "name": "page_size", - "type": "number", - "description": "The number of results per page", - "example": "100" - }, - { - "name": "result", - "type": "object", - "fields": [ - { - "name": "hash", - "type": "string", - "description": "The hash of the transaction", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "nonce", - "type": "string", - "description": "The nonce of the transaction", - "example": 326595425 - }, - { - "name": "transaction_index", - "type": "string", - "description": "The transaction index", - "example": 25 - }, - { - "name": "from_address", - "type": "string", - "description": "The sender", - "example": "0xd4a3BebD824189481FC45363602b83C9c7e9cbDf" - }, - { - "name": "to_address", - "type": "string", - "description": "The recipient", - "example": "0xa71db868318f0a0bae9411347cd4a6fa23d8d4ef" - }, - { - "name": "from_address_label", - "type": "string", - "description": "The label of the from address", - "example": "Binance 1" - }, - { - "name": "to_address_label", - "type": "string", - "description": "The label of the to address", - "example": "Binance 2" - }, - { - "name": "value", - "type": "string", - "description": "The value that was transferred (in wei)", - "example": 650000000000000000 - }, - { - "name": "gas", - "type": "string", - "description": "The gas of the transaction", - "example": 6721975 - }, - { - "name": "gas_price", - "type": "string", - "description": "The gas price", - "example": 20000000000 - }, - { - "name": "input", - "type": "string", - "description": "The input" - }, - { - "name": "receipt_cumulative_gas_used", - "type": "string", - "description": "The receipt cumulative gas used", - "example": 1340925 - }, - { - "name": "receipt_gas_used", - "type": "string", - "description": "The receipt gas used", - "example": 1340925 - }, - { - "name": "receipt_contract_address", - "type": "string", - "description": "The receipt contract address", - "example": "0x1d6a4cf64b52f6c73f201839aded7379ce58059c" - }, - { - "name": "receipt_root", - "type": "string", - "description": "The receipt root" - }, - { - "name": "receipt_status", - "type": "string", - "description": "The receipt status", - "example": 1 - }, - { - "name": "block_timestamp", - "type": "string", - "description": "The block timestamp", - "example": "2021-04-02T10:07:54.000Z" - }, - { - "name": "block_number", - "type": "string", - "description": "The block number", - "example": 12526958 - }, - { - "name": "block_hash", - "type": "string", - "description": "The block hash", - "example": "0x0372c302e3c52e8f2e15d155e2c545e6d802e479236564af052759253b20fd86" - }, - { - "name": "internal_transactions", - "type": "object", - "description": "The internal transaction", - "fields": [ - { - "name": "transaction_hash", - "type": "string", - "description": "The hash of the transaction", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "block_number", - "type": "string", - "description": "The block number", - "example": 12526958 - }, - { - "name": "block_hash", - "type": "string", - "description": "The block hash", - "example": "0x0372c302e3c52e8f2e15d155e2c545e6d802e479236564af052759253b20fd86" - }, - { - "name": "type", - "type": "string", - "description": "Call type", - "example": "CALL" - }, - { - "name": "from", - "type": "string", - "description": "The sender", - "example": "0xd4a3BebD824189481FC45363602b83C9c7e9cbDf" - }, - { - "name": "to", - "type": "string", - "description": "The recipient", - "example": "0xa71db868318f0a0bae9411347cd4a6fa23d8d4ef" - }, - { - "name": "value", - "type": "string", - "description": "The value that was transfered (in wei)", - "example": "650000000000000000" - }, - { - "name": "gas", - "type": "string", - "description": "The gas of the transaction", - "example": "6721975" - }, - { - "name": "gas_used", - "type": "string", - "description": "The used gas", - "example": "6721975" - }, - { - "name": "input", - "type": "string", - "description": "The input", - "example": "0x" - }, - { - "name": "output", - "type": "string", - "description": "The output", - "example": "0x" - } - ] - } - ] - } - ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.transaction.getWalletTransactions({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.transaction.get_wallet_transactions(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getWalletTransactionsVerbose": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get decoded transactions by wallet", - "description": "Get native transactions and logs ordered by block number in descending order.", - "method": "GET", - "path": "/:address/verbose", - "pathParams": [ - { - "name": "address", - "description": "The address of the wallet", - "required": true, - "example": "0x1f9090aaE28b8a3dCeaDf281B0F12828e676c326", - "type": "string" - } - ], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "0x1", - "sepolia", - "0xaa36a7", - "holesky", - "0x4268", - "polygon", - "0x89", - "amoy", - "0x13882", - "bsc", - "0x38", - "bsc testnet", - "0x61", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "gnosis", - "0x64", - "gnosis testnet", - "0x27d8", - "chiliz", - "0x15b38", - "chiliz testnet", - "0x15b32", - "base", - "0x2105", - "base sepolia", - "0x14a34", - "optimism", - "0xa", - "optimism sepolia", - "0xaa37dc", - "linea", - "0xe705", - "linea sepolia", - "0xe705" - ] - }, - { - "name": "from_block", - "description": "The minimum block number from which to get the transactions\n* Provide the param 'from_block' or 'from_date'\n* If 'from_date' and 'from_block' are provided, 'from_block' will be used.\n", - "required": false, - "type": "number" - }, - { - "name": "to_block", - "description": "The maximum block number from which to get the transactions.\n* Provide the param 'to_block' or 'to_date'\n* If 'to_date' and 'to_block' are provided, 'to_block' will be used.\n", - "required": false, - "type": "number" - }, - { - "name": "from_date", - "description": "The start date from which to get the transactions (any format that is accepted by momentjs)\n* Provide the param 'from_block' or 'from_date'\n* If 'from_date' and 'from_block' are provided, 'from_block' will be used.\n", - "required": false, - "type": "string" - }, - { - "name": "to_date", - "description": "Get the transactions up to this date (any format that is accepted by momentjs)\n* Provide the param 'to_block' or 'to_date'\n* If 'to_date' and 'to_block' are provided, 'to_block' will be used.\n", - "type": "string" - }, - { - "name": "cursor", - "description": "The cursor returned in the previous response (used for getting the next page). Learn more on cursor pagination [here](/web3-data-api/evm/reference/pagination).", - "type": "string" - }, - { - "name": "include", - "description": "If the result should contain the internal transactions.", - "required": false, - "type": "string", - "enum": ["internal_transactions"] - }, - { - "name": "limit", - "description": "The desired page size of the result.", - "required": false, - "type": "number" - }, - { - "name": "order", - "required": false, - "type": "string", - "description": "The order of the result, in ascending (ASC) or descending (DESC)", - "example": "DESC", - "enum": ["ASC", "DESC"] - } - ], - "responses": [ - { - "status": "200", - "description": "Returns a collection of native transactions.", - "body": { - "type": "object", - "fields": [ - { - "name": "page", - "type": "number", - "description": "The current page of the result", - "example": "2" - }, - { - "name": "page_size", - "type": "number", - "description": "The number of results per page", - "example": "100" - }, - { - "name": "result", - "type": "object", - "fields": [ - { - "name": "hash", - "type": "string", - "description": "The hash of the transaction", - "example": "0x1ed85b3757a6d31d01a4d6677fc52fd3911d649a0af21fe5ca3f886b153773ed" - }, - { - "name": "nonce", - "type": "string", - "description": "The nonce", - "example": "1848059" - }, - { - "name": "transaction_index", - "type": "string", - "example": "108" - }, - { - "name": "from_address", - "type": "string", - "description": "The from address", - "example": "0x267be1c1d684f78cb4f6a176c4911b741e4ffdc0" - }, - { - "name": "to_address", - "type": "string", - "description": "The to address", - "example": "0x003dde3494f30d861d063232c6a8c04394b686ff" - }, - { - "name": "from_address_label", - "type": "string", - "description": "The label of the from address", - "example": "Binance 1" - }, - { - "name": "to_address_label", - "type": "string", - "description": "The label of the to address", - "example": "Binance 2" - }, - { - "name": "value", - "type": "string", - "description": "The value sent", - "example": "115580000000000000" - }, - { "name": "gas", "type": "string", "example": "30000" }, - { - "name": "gas_price", - "type": "string", - "description": "The gas price", - "example": "52500000000" - }, - { "name": "input", "type": "string", "example": "0x" }, - { - "name": "receipt_cumulative_gas_used", - "type": "string", - "example": "4923073" - }, - { - "name": "receipt_gas_used", - "type": "string", - "example": "21000" - }, - { - "name": "receipt_contract_address", - "type": "string", - "example": null - }, - { "name": "receipt_root", "type": "string", "example": null }, - { - "name": "receipt_status", - "type": "string", - "example": "1" - }, - { - "name": "block_timestamp", - "type": "string", - "description": "The block timestamp", - "example": "2021-05-07T11:08:35.000Z" - }, - { - "name": "block_number", + ], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", "type": "string", - "description": "The block number", - "example": "12386788" - }, - { - "name": "block_hash", + "enum": [ + "eth", + "0x1", + "sepolia", + "0xaa36a7", + "holesky", + "0x4268", + "polygon", + "0x89", + "amoy", + "0x13882", + "bsc", + "0x38", + "bsc testnet", + "0x61", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "gnosis", + "0x64", + "gnosis testnet", + "0x27d8", + "chiliz", + "0x15b38", + "chiliz testnet", + "0x15b32", + "base", + "0x2105", + "base sepolia", + "0x14a34", + "optimism", + "0xa", + "optimism sepolia", + "0xaa37dc", + "linea", + "0xe705", + "linea sepolia", + "0xe705" + ] + }, + { + "name": "from_block", + "description": "The minimum block number from which to get the transfers\n* Provide the param 'from_block' or 'from_date'\n* If 'from_date' and 'from_block' are provided, 'from_block' will be used.\n", + "required": false, + "type": "number" + }, + { + "name": "to_block", + "description": "The maximum block number from which to get the transfers.\n* Provide the param 'to_block' or 'to_date'\n* If 'to_date' and 'to_block' are provided, 'to_block' will be used.\n", + "required": false, + "type": "number" + }, + { + "name": "from_date", + "description": "The start date from which to get the transfers (any format that is accepted by momentjs)\n* Provide the param 'from_block' or 'from_date'\n* If 'from_date' and 'from_block' are provided, 'from_block' will be used.\n", + "required": false, + "type": "string" + }, + { + "name": "to_date", + "description": "Get transfers up until this date (any format that is accepted by momentjs)\n* Provide the param 'to_block' or 'to_date'\n* If 'to_date' and 'to_block' are provided, 'to_block' will be used.\n", + "type": "string" + }, + { + "name": "limit", + "description": "The desired page size of the result.", + "required": false, + "type": "number" + }, + { + "name": "order", + "required": false, "type": "string", - "description": "The hash of the block", - "example": "0x9b559aef7ea858608c2e554246fe4a24287e7aeeb976848df2b9a2531f4b9171" - }, - { - "name": "logs", - "type": "object", - "description": "The logs of the transaction", - "fields": [ - { - "name": "log_index", - "type": "string", - "example": "273" - }, - { - "name": "transaction_hash", - "type": "string", - "description": "The hash of the transaction", - "example": "0xdd9006489e46670e0e85d1fb88823099e7f596b08aeaac023e9da0851f26fdd5" - }, - { - "name": "transaction_index", - "type": "string", - "example": "204" - }, - { - "name": "address", - "type": "string", - "description": "The address of the contract", - "example": "0x3105d328c66d8d55092358cf595d54608178e9b5" - }, - { - "name": "data", - "type": "string", - "description": "The data of the log", - "example": "0x00000000000000000000000000000000000000000000000de05239bccd4d537400000000000000000000000000024dbc80a9f80e3d5fc0a0ee30e2693781a443" - }, - { - "name": "topic0", - "type": "string", - "example": "0x2caecd17d02f56fa897705dcc740da2d237c373f70686f4e0d9bd3bf0400ea7a" - }, - { - "name": "topic1", - "type": "string", - "example": "0x000000000000000000000000031002d15b0d0cd7c9129d6f644446368deae391" - }, - { - "name": "topic2", - "type": "string", - "example": "0x000000000000000000000000d25943be09f968ba740e0782a34e710100defae9" - }, - { "name": "topic3", "type": "string", "example": null }, - { - "name": "block_timestamp", - "type": "string", - "description": "The timestamp of the block", - "example": "2021-05-07T11:08:35.000Z" - }, - { - "name": "block_number", - "type": "string", - "description": "The block number", - "example": "12386788" - }, - { - "name": "block_hash", - "type": "string", - "description": "The hash of the block", - "example": "0x9b559aef7ea858608c2e554246fe4a24287e7aeeb976848df2b9a2531f4b9171" - }, - { - "name": "decoded_event", + "description": "The order of the result, in ascending (ASC) or descending (DESC)", + "example": "DESC", + "enum": ["ASC", "DESC"] + }, + { + "name": "cursor", + "description": "The cursor returned in the previous response (used for getting the next page).", + "type": "string" + } + ], + "responses": [ + { + "status": "200", + "description": "Returns a collection of token contract transactions.", + "body": { "type": "object", - "description": "The decoded data of the log", "fields": [ - { - "name": "signature", - "type": "string", - "example": "Transfer(address,address,uint256)" - }, - { - "name": "label", - "type": "string", - "example": "Transfer" - }, - { - "name": "type", - "type": "string", - "example": "event" - }, - { - "name": "params", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "from" - }, - { - "name": "value", - "type": "string", - "example": "0x26C5011483Add49801eA8E3Ee354fE013895aCe5" - }, - { - "name": "type", - "type": "string", - "example": "address" - } - ] - } - } - ] - } - ] - }, - { - "name": "decoded_call", - "type": "object", - "description": "The decoded data of the transaction", - "fields": [ - { - "name": "signature", - "type": "string", - "example": "transfer(address,uint256)" - }, - { - "name": "label", - "type": "string", - "example": "transfer" - }, - { - "name": "type", - "type": "string", - "example": "function" - }, - { - "name": "params", - "type": "array", - "field": { - "type": "object", - "fields": [ { - "name": "name", - "type": "string", - "example": "_to" + "name": "page", + "type": "number", + "description": "The current page of the result", + "example": "2" }, { - "name": "value", - "type": "string", - "example": "0x1CA455A55108874A95C84620dDA2566c54D17953" + "name": "page_size", + "type": "number", + "description": "The number of results per page", + "example": "100" }, { - "name": "type", - "type": "string", - "example": "address" + "name": "cursor", + "type": "string", + "description": "The cursor to get to the next page" + }, + { + "name": "result", + "type": "object", + "fields": [ + { + "name": "token_name", + "type": "string", + "example": "Tether USD" + }, + { + "name": "token_symbol", + "type": "string", + "example": "USDT" + }, + { + "name": "token_logo", + "type": "string", + "example": "https://assets.coingecko.com/coins/images/325/large/Tether-logo.png?1598003707" + }, + { + "name": "token_decimals", + "type": "string", + "example": "6" + }, + { + "name": "transaction_hash", + "type": "string", + "description": "The transaction hash", + "example": "0x2d30ca6f024dbc1307ac8a1a44ca27de6f797ec22ef20627a1307243b0ab7d09" + }, + { + "name": "address", + "type": "string", + "description": "The address of the token", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "block_timestamp", + "type": "string", + "description": "The block timestamp", + "example": "2021-04-02T10:07:54.000Z" + }, + { + "name": "block_number", + "type": "string", + "description": "The block number", + "example": 12526958 + }, + { + "name": "block_hash", + "type": "string", + "description": "The block hash", + "example": "0x0372c302e3c52e8f2e15d155e2c545e6d802e479236564af052759253b20fd86" + }, + { + "name": "to_address", + "type": "string", + "description": "The recipient", + "example": "0x62AED87d21Ad0F3cdE4D147Fdcc9245401Af0044" + }, + { + "name": "to_address_label", + "description": "The label of the to address", + "example": "Binance 2" + }, + { + "name": "from_address", + "type": "string", + "description": "The sender", + "example": "0xd4a3BebD824189481FC45363602b83C9c7e9cbDf" + }, + { + "name": "from_address_label", + "description": "The label of the from address", + "example": "Binance 1" + }, + { + "name": "value", + "type": "string", + "description": "The value that was transfered (in wei)", + "example": 650000000000000000 + }, + { + "name": "transaction_index", + "type": "number", + "description": "The transaction index of the transfer within the block", + "example": 12 + }, + { + "name": "log_index", + "type": "number", + "description": "The log index of the transfer within the block", + "example": 2 + }, + { + "name": "possible_spam", + "type": "boolean", + "description": "Indicates if a contract is possibly a spam contract", + "example": "false" + }, + { + "name": "verified_collection", + "type": "boolean", + "description": "Indicates if a contract is verified", + "example": "false" + } + ] } - ] - } - } - ] - }, - { - "name": "internal_transactions", - "type": "object", - "description": "The internal transactions of the transaction", - "fields": [ - { - "name": "transaction_hash", - "type": "string", - "description": "The hash of the transaction", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "block_number", - "type": "string", - "description": "The block number", - "example": 12526958 - }, - { - "name": "block_hash", - "type": "string", - "description": "The block hash", - "example": "0x0372c302e3c52e8f2e15d155e2c545e6d802e479236564af052759253b20fd86" - }, - { - "name": "type", - "type": "string", - "description": "Call type", - "example": "CALL" - }, - { - "name": "from", - "type": "string", - "description": "The sender", - "example": "0xd4a3BebD824189481FC45363602b83C9c7e9cbDf" - }, - { - "name": "to", - "type": "string", - "description": "The recipient", - "example": "0xa71db868318f0a0bae9411347cd4a6fa23d8d4ef" - }, - { - "name": "value", - "type": "string", - "description": "The value that was transfered (in wei)", - "example": "650000000000000000" - }, - { - "name": "gas", - "type": "string", - "description": "The gas of the transaction", - "example": "6721975" - }, - { - "name": "gas_used", - "type": "string", - "description": "The used gas", - "example": "6721975" - }, - { - "name": "input", - "type": "string", - "description": "The input", - "example": "0x" - }, - { - "name": "output", - "type": "string", - "description": "The output", - "example": "0x" - } - ] - } - ] - } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.token.getTokenTransfers({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.token.get_token_transfers(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.transaction.getWalletTransactionsVerbose({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.transaction.get_wallet_transactions_verbose(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getInternalTransactions": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get internal transactions by transaction hash", - "description": "Get the contents of a internal transaction by transaction hash.", - "method": "GET", - "path": "/transaction/:transaction_hash/internal-transactions", - "pathParams": [ - { - "name": "transaction_hash", - "description": "The transaction hash", - "required": true, - "example": "0xdc85cb1b75fd09c2f6d001fea4aba83764193cbd7881a1fa8ccde350a5681109", - "type": "string" - } - ], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "0x1", - "sepolia", - "0xaa36a7", - "holesky", - "0x4268", - "polygon", - "0x89", - "amoy", - "0x13882", - "bsc", - "0x38", - "bsc testnet", - "0x61", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "gnosis", - "0x64", - "gnosis testnet", - "0x27d8", - "chiliz", - "0x15b38", - "chiliz testnet", - "0x15b32", - "base", - "0x2105", - "base sepolia", - "0x14a34", - "optimism", - "0xa", - "optimism sepolia", - "0xaa37dc", - "linea", - "0xe705", - "linea sepolia", - "0xe705" - ] - } - ], - "responses": [ - { - "status": "200", - "description": "Internal Transaction details by transaction hash" - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.transaction.getInternalTransactions({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.transaction.get_internal_transactions(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getTransaction": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get transaction by hash", - "description": "Get the contents of a transaction by the given transaction hash.", - "method": "GET", - "path": "/transaction/:transaction_hash", - "pathParams": [ - { - "name": "transaction_hash", - "description": "The transaction hash", - "required": true, - "example": "0xdc85cb1b75fd09c2f6d001fea4aba83764193cbd7881a1fa8ccde350a5681109", - "type": "string" - } - ], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "0x1", - "sepolia", - "0xaa36a7", - "holesky", - "0x4268", - "polygon", - "0x89", - "amoy", - "0x13882", - "bsc", - "0x38", - "bsc testnet", - "0x61", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "gnosis", - "0x64", - "gnosis testnet", - "0x27d8", - "chiliz", - "0x15b38", - "chiliz testnet", - "0x15b32", - "base", - "0x2105", - "base sepolia", - "0x14a34", - "optimism", - "0xa", - "optimism sepolia", - "0xaa37dc", - "linea", - "0xe705", - "linea sepolia", - "0xe705" - ] - }, - { - "name": "include", - "description": "If the result should contain the internal transactions.", - "required": false, - "type": "string", - "enum": ["internal_transactions"] - } - ], - "responses": [ - { - "status": "200", - "description": "Transaction details by transaction hash", - "body": { - "type": "object", - "fields": [ - { - "name": "hash", - "type": "string", - "description": "The hash of the transaction", - "example": "0x1ed85b3757a6d31d01a4d6677fc52fd3911d649a0af21fe5ca3f886b153773ed" - }, - { - "name": "nonce", - "type": "string", - "description": "The nonce", - "example": "1848059" - }, - { - "name": "transaction_index", - "type": "string", - "example": "108" - }, - { - "name": "from_address", - "type": "string", - "description": "The from address", - "example": "0x267be1c1d684f78cb4f6a176c4911b741e4ffdc0" - }, - { - "name": "to_address", - "type": "string", - "description": "The to address", - "example": "0x003dde3494f30d861d063232c6a8c04394b686ff" - }, - { - "name": "from_address_label", - "type": "string", - "description": "The label of the from address", - "example": "Binance 1" - }, - { - "name": "to_address_label", - "type": "string", - "description": "The label of the to address", - "example": "Binance 2" - }, - { - "name": "value", - "type": "string", - "description": "The value sent", - "example": "115580000000000000" - }, - { "name": "gas", "type": "string", "example": "30000" }, - { - "name": "gas_price", - "type": "string", - "description": "The gas price", - "example": "52500000000" - }, - { "name": "input", "type": "string", "example": "0x" }, - { - "name": "receipt_cumulative_gas_used", - "type": "string", - "example": "4923073" - }, - { - "name": "receipt_gas_used", - "type": "string", - "example": "21000" - }, - { - "name": "receipt_contract_address", - "type": "string", - "example": null - }, - { "name": "receipt_root", "type": "string", "example": null }, - { "name": "receipt_status", "type": "string", "example": "1" }, - { - "name": "block_timestamp", - "type": "string", - "description": "The block timestamp", - "example": "2021-05-07T11:08:35.000Z" - }, - { - "name": "block_number", - "type": "string", - "description": "The block number", - "example": "12386788" - }, - { - "name": "block_hash", - "type": "string", - "description": "The hash of the block", - "example": "0x9b559aef7ea858608c2e554246fe4a24287e7aeeb976848df2b9a2531f4b9171" - }, - { - "name": "logs", - "type": "object", - "description": "The logs of the transaction", - "fields": [ - { "name": "log_index", "type": "string", "example": "273" }, - { - "name": "transaction_hash", - "type": "string", - "description": "The hash of the transaction", - "example": "0xdd9006489e46670e0e85d1fb88823099e7f596b08aeaac023e9da0851f26fdd5" - }, - { - "name": "transaction_index", - "type": "string", - "example": "204" - }, - { + "getTokenStats": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get the erc20 token stats", + "description": "Get the stats for a erc20 token", + "method": "GET", + "path": "/erc20/:address/stats", + "pathParams": [ + { "name": "address", + "description": "The address of the erc20 token", + "required": true, "type": "string", - "description": "The address of the contract", - "example": "0x3105d328c66d8d55092358cf595d54608178e9b5" - }, - { - "name": "data", - "type": "string", - "description": "The data of the log", - "example": "0x00000000000000000000000000000000000000000000000de05239bccd4d537400000000000000000000000000024dbc80a9f80e3d5fc0a0ee30e2693781a443" - }, - { - "name": "topic0", - "type": "string", - "example": "0x2caecd17d02f56fa897705dcc740da2d237c373f70686f4e0d9bd3bf0400ea7a" - }, - { - "name": "topic1", - "type": "string", - "example": "0x000000000000000000000000031002d15b0d0cd7c9129d6f644446368deae391" - }, - { - "name": "topic2", - "type": "string", - "example": "0x000000000000000000000000d25943be09f968ba740e0782a34e710100defae9" - }, - { "name": "topic3", "type": "string", "example": null }, - { - "name": "block_timestamp", - "type": "string", - "description": "The timestamp of the block", - "example": "2021-05-07T11:08:35.000Z" - }, - { - "name": "block_number", - "type": "string", - "description": "The block number", - "example": "12386788" - }, - { - "name": "block_hash", - "type": "string", - "description": "The hash of the block", - "example": "0x9b559aef7ea858608c2e554246fe4a24287e7aeeb976848df2b9a2531f4b9171" - } - ] - }, - { - "name": "internal_transactions", - "type": "object", - "description": "The internal transactions of the transaction", - "fields": [ - { - "name": "transaction_hash", - "type": "string", - "description": "The hash of the transaction", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "block_number", - "type": "string", - "description": "The block number", - "example": 12526958 - }, - { - "name": "block_hash", - "type": "string", - "description": "The block hash", - "example": "0x0372c302e3c52e8f2e15d155e2c545e6d802e479236564af052759253b20fd86" - }, - { - "name": "type", - "type": "string", - "description": "Call type", - "example": "CALL" - }, - { - "name": "from", - "type": "string", - "description": "The sender", - "example": "0xd4a3BebD824189481FC45363602b83C9c7e9cbDf" - }, - { - "name": "to", - "type": "string", - "description": "The recipient", - "example": "0xa71db868318f0a0bae9411347cd4a6fa23d8d4ef" - }, - { - "name": "value", - "type": "string", - "description": "The value that was transfered (in wei)", - "example": "650000000000000000" - }, - { - "name": "gas", - "type": "string", - "description": "The gas of the transaction", - "example": "6721975" - }, - { - "name": "gas_used", - "type": "string", - "description": "The used gas", - "example": "6721975" - }, - { - "name": "input", - "type": "string", - "description": "The input", - "example": "0x" - }, - { - "name": "output", + "example": "0xdac17f958d2ee523a2206206994597c13d831ec7" + } + ], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", "type": "string", - "description": "The output", - "example": "0x" - } - ] - } + "enum": [ + "eth", + "0x1", + "sepolia", + "0xaa36a7", + "holesky", + "0x4268", + "polygon", + "0x89", + "amoy", + "0x13882", + "bsc", + "0x38", + "bsc testnet", + "0x61", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "gnosis", + "0x64", + "gnosis testnet", + "0x27d8", + "chiliz", + "0x15b38", + "chiliz testnet", + "0x15b32", + "base", + "0x2105", + "base sepolia", + "0x14a34", + "optimism", + "0xa", + "optimism sepolia", + "0xaa37dc", + "linea", + "0xe705", + "linea sepolia", + "0xe705" + ] + } + ], + "responses": [ + { + "status": "200", + "description": "Returns the stats for the erc20 token.", + "body": { + "type": "object", + "fields": [ + { + "name": "transfers", + "type": "object", + "description": "ERC20 Token transfer stats", + "fields": [ + { + "name": "total", + "type": "string", + "description": "The number of transfers of the token", + "example": "1000" + } + ] + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.token.getTokenStats({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.token.get_token_stats(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.transaction.getTransaction({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.transaction.get_transaction(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getTransactionVerbose": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get decoded transaction by hash", - "description": "Get the contents of a transaction by the given transaction hash.", - "method": "GET", - "path": "/transaction/:transaction_hash/verbose", - "pathParams": [ - { - "name": "transaction_hash", - "description": "The transaction hash", - "required": true, - "example": "0x012b9b98e21664117ec0b499d726a39f492ac8bd402cca8bebcbd163b9f75760", - "type": "string" - } - ], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "0x1", - "sepolia", - "0xaa36a7", - "holesky", - "0x4268", - "polygon", - "0x89", - "amoy", - "0x13882", - "bsc", - "0x38", - "bsc testnet", - "0x61", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "gnosis", - "0x64", - "gnosis testnet", - "0x27d8", - "chiliz", - "0x15b38", - "chiliz testnet", - "0x15b32", - "base", - "0x2105", - "base sepolia", - "0x14a34", - "optimism", - "0xa", - "optimism sepolia", - "0xaa37dc", - "linea", - "0xe705", - "linea sepolia", - "0xe705" - ] }, - { - "name": "include", - "description": "If the result should contain the internal transactions.", - "required": false, - "type": "string", - "enum": ["internal_transactions"] - } - ], - "responses": [ - { - "status": "200", - "description": "Transaction details by transaction hash", - "body": { - "type": "object", - "fields": [ - { - "name": "hash", - "type": "string", - "description": "The hash of the transaction", - "example": "0x1ed85b3757a6d31d01a4d6677fc52fd3911d649a0af21fe5ca3f886b153773ed" - }, - { - "name": "nonce", - "type": "string", - "description": "The nonce", - "example": "1848059" - }, - { - "name": "transaction_index", - "type": "string", - "example": "108" - }, - { - "name": "from_address", - "type": "string", - "description": "The from address", - "example": "0x267be1c1d684f78cb4f6a176c4911b741e4ffdc0" - }, - { - "name": "to_address", - "type": "string", - "description": "The to address", - "example": "0x003dde3494f30d861d063232c6a8c04394b686ff" - }, - { - "name": "from_address_label", - "type": "string", - "description": "The label of the from address", - "example": "Binance 1" - }, - { - "name": "to_address_label", - "type": "string", - "description": "The label of the to address", - "example": "Binance 2" - }, - { - "name": "value", - "type": "string", - "description": "The value sent", - "example": "115580000000000000" - }, - { "name": "gas", "type": "string", "example": "30000" }, - { - "name": "gas_price", - "type": "string", - "description": "The gas price", - "example": "52500000000" - }, - { "name": "input", "type": "string", "example": "0x" }, - { - "name": "receipt_cumulative_gas_used", - "type": "string", - "example": "4923073" - }, - { - "name": "receipt_gas_used", - "type": "string", - "example": "21000" - }, - { - "name": "receipt_contract_address", - "type": "string", - "example": null - }, - { "name": "receipt_root", "type": "string", "example": null }, - { "name": "receipt_status", "type": "string", "example": "1" }, - { - "name": "block_timestamp", - "type": "string", - "description": "The block timestamp", - "example": "2021-05-07T11:08:35.000Z" - }, - { - "name": "block_number", - "type": "string", - "description": "The block number", - "example": "12386788" - }, - { - "name": "block_hash", - "type": "string", - "description": "The hash of the block", - "example": "0x9b559aef7ea858608c2e554246fe4a24287e7aeeb976848df2b9a2531f4b9171" - }, - { - "name": "logs", - "type": "object", - "description": "The logs of the transaction", - "fields": [ - { "name": "log_index", "type": "string", "example": "273" }, - { - "name": "transaction_hash", - "type": "string", - "description": "The hash of the transaction", - "example": "0xdd9006489e46670e0e85d1fb88823099e7f596b08aeaac023e9da0851f26fdd5" - }, - { - "name": "transaction_index", - "type": "string", - "example": "204" - }, - { - "name": "address", - "type": "string", - "description": "The address of the contract", - "example": "0x3105d328c66d8d55092358cf595d54608178e9b5" - }, - { - "name": "data", - "type": "string", - "description": "The data of the log", - "example": "0x00000000000000000000000000000000000000000000000de05239bccd4d537400000000000000000000000000024dbc80a9f80e3d5fc0a0ee30e2693781a443" - }, - { - "name": "topic0", - "type": "string", - "example": "0x2caecd17d02f56fa897705dcc740da2d237c373f70686f4e0d9bd3bf0400ea7a" - }, - { - "name": "topic1", - "type": "string", - "example": "0x000000000000000000000000031002d15b0d0cd7c9129d6f644446368deae391" - }, - { - "name": "topic2", - "type": "string", - "example": "0x000000000000000000000000d25943be09f968ba740e0782a34e710100defae9" - }, - { "name": "topic3", "type": "string", "example": null }, - { - "name": "block_timestamp", - "type": "string", - "description": "The timestamp of the block", - "example": "2021-05-07T11:08:35.000Z" - }, - { - "name": "block_number", + "getTokenOwners": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get ERC20 token owners by contract", + "description": "Identify the major holders of an ERC20 token and understand their ownership percentages", + "method": "GET", + "path": "/erc20/:token_address/owners", + "pathParams": [ + { + "name": "token_address", + "description": "The address of the token contract", + "required": true, + "example": "0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0", + "type": "string" + } + ], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", "type": "string", - "description": "The block number", - "example": "12386788" - }, - { - "name": "block_hash", + "enum": [ + "eth", + "0x1", + "sepolia", + "0xaa36a7", + "holesky", + "0x4268", + "polygon", + "0x89", + "amoy", + "0x13882", + "bsc", + "0x38", + "bsc testnet", + "0x61", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "gnosis", + "0x64", + "gnosis testnet", + "0x27d8", + "chiliz", + "0x15b38", + "chiliz testnet", + "0x15b32", + "base", + "0x2105", + "base sepolia", + "0x14a34", + "optimism", + "0xa", + "optimism sepolia", + "0xaa37dc", + "linea", + "0xe705", + "linea sepolia", + "0xe705" + ] + }, + { + "name": "limit", + "description": "The desired page size of the result.", + "required": false, + "type": "number" + }, + { + "name": "cursor", + "description": "The cursor returned in the previous response (used for getting the next page).", + "required": false, + "type": "string" + }, + { + "name": "order", + "description": "The order of the result, in ascending (ASC) or descending (DESC)", + "required": false, + "example": "DESC", "type": "string", - "description": "The hash of the block", - "example": "0x9b559aef7ea858608c2e554246fe4a24287e7aeeb976848df2b9a2531f4b9171" - }, - { - "name": "decoded_event", - "type": "object", - "fields": [ - { - "name": "signature", - "type": "string", - "example": "Transfer(address,address,uint256)" - }, - { - "name": "label", - "type": "string", - "example": "Transfer" - }, - { "name": "type", "type": "string", "example": "event" }, - { - "name": "params", - "type": "array", - "field": { - "type": "object", - "fields": [ + "enum": ["ASC", "DESC"] + } + ], + "responses": [ + { + "status": "200", + "description": "Returns a collection of owners of an ERC20 token", + "body": { + "type": "object", + "fields": [ + { + "name": "page", + "type": "number", + "description": "The current page of the result", + "example": "2" + }, { - "name": "name", - "type": "string", - "example": "from" + "name": "page_size", + "type": "number", + "description": "The number of results per page", + "example": "100" }, { - "name": "value", - "type": "string", - "example": "0x26C5011483Add49801eA8E3Ee354fE013895aCe5" + "name": "cursor", + "type": "string", + "description": "The cursor to get to the next page" }, { - "name": "type", - "type": "string", - "example": "address" + "name": "result", + "type": "object", + "fields": [ + { + "name": "owner_address", + "type": "string", + "description": "The address of the erc20 token owner", + "example": "0x244..." + }, + { + "name": "owner_address_label", + "type": "string", + "description": "The label of the owner_address", + "example": "Coinbase 1" + }, + { + "name": "balance", + "type": "string", + "description": "The amount holding of the ERC20 token", + "example": "57888888888888888888880" + }, + { + "name": "balance_formatted", + "type": "string", + "description": "The amount holding of the ERC20 token in decimaal", + "example": "5.78" + }, + { + "name": "usd_value", + "type": "string", + "description": "The USD value of the balance", + "example": "57888888888888888888880" + }, + { + "name": "is_contract", + "type": "boolean", + "description": "Indicates if the token address is for a contract or not" + }, + { + "name": "percentage_relative_to_total_supply", + "type": "number", + "description": "The percentage of total supply held by the owner" + } + ] } - ] - } - } - ] - } - ] - }, - { - "name": "decoded_call", - "type": "object", - "fields": [ - { - "name": "signature", - "type": "string", - "example": "transfer(address,uint256)" - }, - { "name": "label", "type": "string", "example": "transfer" }, - { "name": "type", "type": "string", "example": "function" }, - { - "name": "params", - "type": "array", - "field": { - "type": "object", - "fields": [ - { "name": "name", "type": "string", "example": "_to" }, - { - "name": "value", - "type": "string", - "example": "0x1CA455A55108874A95C84620dDA2566c54D17953" - }, - { - "name": "type", - "type": "string", - "example": "address" - } - ] + ] } - } - ] - }, - { - "name": "internal_transactions", - "type": "object", - "description": "The internal transactions of the transaction", - "fields": [ - { - "name": "transaction_hash", - "type": "string", - "description": "The hash of the transaction", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "block_number", - "type": "string", - "description": "The block number", - "example": 12526958 - }, - { - "name": "block_hash", - "type": "string", - "description": "The block hash", - "example": "0x0372c302e3c52e8f2e15d155e2c545e6d802e479236564af052759253b20fd86" - }, - { - "name": "type", - "type": "string", - "description": "Call type", - "example": "CALL" - }, - { - "name": "from", - "type": "string", - "description": "The sender", - "example": "0xd4a3BebD824189481FC45363602b83C9c7e9cbDf" - }, - { - "name": "to", - "type": "string", - "description": "The recipient", - "example": "0xa71db868318f0a0bae9411347cd4a6fa23d8d4ef" - }, - { - "name": "value", - "type": "string", - "description": "The value that was transfered (in wei)", - "example": "650000000000000000" - }, - { - "name": "gas", - "type": "string", - "description": "The gas of the transaction", - "example": "6721975" - }, - { - "name": "gas_used", - "type": "string", - "description": "The used gas", - "example": "6721975" - }, - { - "name": "input", - "type": "string", - "description": "The input", - "example": "0x" - }, - { - "name": "output", - "type": "string", - "description": "The output", - "example": "0x" - } - ] - } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.token.getTokenOwners({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.token.get_token_owners(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.transaction.getTransactionVerbose({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.transaction.get_transaction_verbose(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - } - }, - "events": { - "getContractLogs": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get logs by contract", - "description": "Get the logs for a contract.", - "method": "GET", - "path": "/:address/logs", - "pathParams": [ - { - "name": "address", - "description": "The address of the contract", - "required": true, - "example": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB", - "type": "string" - } - ], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "0x1", - "sepolia", - "0xaa36a7", - "holesky", - "0x4268", - "polygon", - "0x89", - "amoy", - "0x13882", - "bsc", - "0x38", - "bsc testnet", - "0x61", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "gnosis", - "0x64", - "gnosis testnet", - "0x27d8", - "chiliz", - "0x15b38", - "chiliz testnet", - "0x15b32", - "base", - "0x2105", - "base sepolia", - "0x14a34", - "optimism", - "0xa", - "optimism sepolia", - "0xaa37dc", - "linea", - "0xe705", - "linea sepolia", - "0xe705" - ] - }, - { - "name": "block_number", - "description": "The block number\n* Provide the param 'block_numer' or ('from_block' and / or 'to_block')\n* If 'block_numer' is provided in combination with 'from_block' and / or 'to_block', 'block_number' will be used\n", - "required": false, - "type": "string" - }, - { - "name": "from_block", - "description": "The minimum block number from which to get the logs\n* Provide the param 'block_numer' or ('from_block' and / or 'to_block')\n* If 'block_numer' is provided in combination with 'from_block' and / or 'to_block', 'block_number' will be used\n", - "required": false, - "type": "string" - }, - { - "name": "to_block", - "description": "The maximum block number from which to get the logs\n* Provide the param 'block_numer' or ('from_block' and / or 'to_block')\n* If 'block_numer' is provided in combination with 'from_block' and / or 'to_block', 'block_number' will be used\n", - "required": false, - "type": "string" - }, - { - "name": "from_date", - "description": "The start date from which to get the logs (any format that is accepted by momentjs)\n* Provide the param 'from_block' or 'from_date'\n* If 'from_date' and 'from_block' are provided, 'from_block' will be used.\n* If 'from_date' and the block params are provided, the block params will be used. Please refer to the blocks params sections (block_number,from_block and to_block) on how to use them\n", - "required": false, - "type": "string" - }, - { - "name": "to_date", - "description": "Get the logs up to this date (any format that is accepted by momentjs)\n* Provide the param 'to_block' or 'to_date'\n* If 'to_date' and 'to_block' are provided, 'to_block' will be used.\n* If 'to_date' and the block params are provided, the block params will be used. Please refer to the blocks params sections (block_number,from_block and to_block) on how to use them\n", - "required": false, - "type": "string" - }, - { - "name": "topic0", - "description": "topic0", - "required": true, - "type": "string" - }, - { - "name": "limit", - "description": "The desired page size of the result.", - "required": false, - "type": "number" - }, - { - "name": "order", - "required": false, - "type": "string", - "description": "The order of the result, in ascending (ASC) or descending (DESC)", - "example": "DESC", - "enum": ["ASC", "DESC"] - }, - { - "name": "cursor", - "description": "The cursor returned in the previous response (used for getting the next page).", - "type": "string" } - ], - "responses": [ - { - "status": "200", - "description": "Returns the logs for an address", - "body": { - "type": "object", - "fields": [ - { - "name": "page", - "type": "number", - "description": "The current page of the result", - "example": "1" - }, - { - "name": "page_size", - "type": "number", - "description": "The number of results per page", - "example": "100" - }, - { - "name": "cursor", - "type": "string", - "description": "The cursor to get to the next page" - }, - { - "name": "result", - "type": "object", - "fields": [ - { - "name": "transaction_hash", - "type": "string", - "description": "The transaction hash", - "example": "0x2d30ca6f024dbc1307ac8a1a44ca27de6f797ec22ef20627a1307243b0ab7d09" - }, - { + }, + "balance": { + "getNativeBalance": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get native balance by wallet", + "description": "Get the native balance for a specific wallet address.", + "method": "GET", + "path": "/:address/balance", + "pathParams": [ + { "name": "address", + "description": "The address from which the native balance will be checked", + "required": true, + "example": "0xDC24316b9AE028F1497c275EB9192a3Ea0f67022", + "type": "string" + } + ], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", "type": "string", - "description": "The address of the contract", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "block_timestamp", - "type": "string", - "description": "The block timestamp", - "example": "2021-04-02T10:07:54.000Z" - }, - { - "name": "block_number", - "type": "string", - "description": "The block number", - "example": 12526958 - }, - { - "name": "block_hash", - "type": "string", - "description": "The block hash", - "example": "0x0372c302e3c52e8f2e15d155e2c545e6d802e479236564af052759253b20fd86" - }, - { - "name": "data", - "type": "string", - "description": "The data of the log", - "example": "0x00000000000000000000000000000000000000000000000de05239bccd4d537400000000000000000000000000024dbc80a9f80e3d5fc0a0ee30e2693781a443" - }, - { - "name": "topic0", - "type": "string", - "example": "0x2caecd17d02f56fa897705dcc740da2d237c373f70686f4e0d9bd3bf0400ea7a" - }, - { - "name": "topic1", - "type": "string", - "example": "0x000000000000000000000000031002d15b0d0cd7c9129d6f644446368deae391" - }, - { - "name": "topic2", - "type": "string", - "example": "0x000000000000000000000000d25943be09f968ba740e0782a34e710100defae9" - }, - { "name": "topic3", "type": "string", "example": null }, - { - "name": "transaction_index", - "type": "number", - "description": "The Transaction index of the log within the block", - "example": 12 - }, - { - "name": "log_index", - "type": "number", - "description": "The log index of the log within the block", - "example": 15 - } - ] - } + "enum": [ + "eth", + "0x1", + "sepolia", + "0xaa36a7", + "holesky", + "0x4268", + "polygon", + "0x89", + "amoy", + "0x13882", + "bsc", + "0x38", + "bsc testnet", + "0x61", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "gnosis", + "0x64", + "gnosis testnet", + "0x27d8", + "chiliz", + "0x15b38", + "chiliz testnet", + "0x15b32", + "base", + "0x2105", + "base sepolia", + "0x14a34", + "optimism", + "0xa", + "optimism sepolia", + "0xaa37dc", + "linea", + "0xe705", + "linea sepolia", + "0xe705" + ] + }, + { + "name": "to_block", + "description": "The block number from which the balances should be checked", + "required": false, + "type": "number" + } + ], + "responses": [ + { + "status": "200", + "description": "Returns the native balance for a specific address", + "body": { + "type": "object", + "fields": [ + { + "name": "balance", + "type": "string", + "description": "The balance", + "example": "1234567890" + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.balance.getNativeBalance({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.balance.get_native_balance(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.events.getContractLogs({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.events.get_contract_logs(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getContractEvents": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get events by contract", - "description": "Get events for a contract ordered by block number in descending order. [Try it with Swagger](https://deep-index.moralis.io/api-docs-2.1/#/Events/getContractEvents).", - "method": "POST", - "path": "/:address/events", - "pathParams": [ - { - "name": "address", - "description": "The address of the contract", - "required": true, - "example": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB", - "type": "string" - } - ], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "0x1", - "sepolia", - "0xaa36a7", - "holesky", - "0x4268", - "polygon", - "0x89", - "amoy", - "0x13882", - "bsc", - "0x38", - "bsc testnet", - "0x61", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "gnosis", - "0x64", - "gnosis testnet", - "0x27d8", - "chiliz", - "0x15b38", - "chiliz testnet", - "0x15b32", - "base", - "0x2105", - "base sepolia", - "0x14a34", - "optimism", - "0xa", - "optimism sepolia", - "0xaa37dc", - "linea", - "0xe705", - "linea sepolia", - "0xe705" - ] - }, - { - "name": "from_block", - "description": "The minimum block number from which to get the logs\n* Provide the param 'from_block' or 'from_date'\n* If 'from_date' and 'from_block' are provided, 'from_block' will be used.\n", - "required": false, - "type": "number" - }, - { - "name": "to_block", - "description": "The maximum block number from which to get the logs.\n* Provide the param 'to_block' or 'to_date'\n* If 'to_date' and 'to_block' are provided, 'to_block' will be used.\n", - "required": false, - "type": "number" - }, - { - "name": "from_date", - "description": "The start date from which to get the logs (any format that is accepted by momentjs)\n* Provide the param 'from_block' or 'from_date'\n* If 'from_date' and 'from_block' are provided, 'from_block' will be used.\n", - "required": false, - "type": "string" }, - { - "name": "to_date", - "description": "Get the logs up to this date (any format that is accepted by momentjs)\n* Provide the param 'to_block' or 'to_date'\n* If 'to_date' and 'to_block' are provided, 'to_block' will be used.\n", - "type": "string" - }, - { - "name": "topic", - "description": "The topic of the event", - "required": true, - "type": "string" - }, - { - "name": "offset", - "description": "offset", - "required": false, - "type": "number" - }, - { - "name": "limit", - "description": "The desired page size of the result.", - "required": false, - "type": "number" - }, - { - "name": "order", - "required": false, - "type": "string", - "description": "The order of the result, in ascending (ASC) or descending (DESC)", - "example": "DESC", - "enum": ["ASC", "DESC"] - }, - { - "name": "cursor", - "description": "The cursor returned in the previous response (used for getting the next page).", - "type": "string" - } - ], - "bodyParam": { - "required": true, - "description": "ABI of the specific event", - "type": "json" - }, - "responses": [ - { - "status": "200", - "description": "Returns a collection of events by topic" - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.events.getContractEvents({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nbody = []\n\nparams = {}\n\nresult = evm_api.events.get_contract_events(\n api_key=api_key,\n body=body,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - } - }, - "block": { - "getBlock": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get block by hash", - "description": "Get the contents of a block given the block hash.", - "method": "GET", - "path": "/block/:block_number_or_hash", - "pathParams": [ - { - "name": "block_number_or_hash", - "description": "The block number or block hash", - "required": true, - "example": "18541416", - "type": "string" - } - ], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "0x1", - "sepolia", - "0xaa36a7", - "holesky", - "0x4268", - "polygon", - "0x89", - "amoy", - "0x13882", - "bsc", - "0x38", - "bsc testnet", - "0x61", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "gnosis", - "0x64", - "gnosis testnet", - "0x27d8", - "chiliz", - "0x15b38", - "chiliz testnet", - "0x15b32", - "base", - "0x2105", - "base sepolia", - "0x14a34", - "optimism", - "0xa", - "optimism sepolia", - "0xaa37dc", - "linea", - "0xe705", - "linea sepolia", - "0xe705" - ] - }, - { - "name": "include", - "description": "If the result should contain the internal transactions.", - "required": false, - "type": "string", - "enum": ["internal_transactions"] - } - ], - "responses": [ - { - "status": "200", - "description": "Returns the contents of a block", - "body": { - "type": "object", - "fields": [ - { - "name": "timestamp", - "type": "string", - "description": "The block timestamp", - "example": "2021-05-07T11:08:35.000Z" - }, - { - "name": "number", - "type": "string", - "description": "The block number", - "example": 12386788 - }, - { - "name": "hash", - "type": "string", - "description": "The block hash", - "example": "0x9b559aef7ea858608c2e554246fe4a24287e7aeeb976848df2b9a2531f4b9171" - }, - { - "name": "parent_hash", - "type": "string", - "description": "The block hash of the parent block", - "example": "0x011d1fc45839de975cc55d758943f9f1d204f80a90eb631f3bf064b80d53e045" - }, - { - "name": "nonce", - "type": "string", - "description": "The nonce", - "example": "0xedeb2d8fd2b2bdec" - }, - { - "name": "sha3_uncles", - "type": "string", - "example": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - }, - { - "name": "logs_bloom", - "type": "string", - "example": "0xdde5fc46c5d8bcbd58207bc9f267bf43298e23791a326ff02661e99790da9996b3e0dd912c0b8202d389d282c56e4d11eb2dec4898a32b6b165f1f4cae6aa0079498eab50293f3b8defbf6af11bb75f0408a563ddfc26a3323d1ff5f9849e95d5f034d88a757ddea032c75c00708c9ff34d2207f997cc7d93fd1fa160a6bfaf62a54e31f9fe67ab95752106ba9d185bfdc9b6dc3e17427f844ee74e5c09b17b83ad6e8fc7360f5c7c3e4e1939e77a6374bee57d1fa6b2322b11ad56ad0398302de9b26d6fbfe414aa416bff141fad9d4af6aea19322e47595e342cd377403f417dfd396ab5f151095a5535f51cbc34a40ce9648927b7d1d72ab9daf253e31daf" - }, - { - "name": "transactions_root", - "type": "string", - "example": "0xe4c7bf3aff7ad07f9e80d57f7189f0252592fee6321c2a9bd9b09b6ce0690d27" - }, - { - "name": "state_root", - "type": "string", - "example": "0x49e3bfe7b618e27fde8fa08884803a8458b502c6534af69873a3cc926a7c724b" - }, - { - "name": "receipts_root", - "type": "string", - "example": "0x7cf43d7e837284f036cf92c56973f5e27bdd253ca46168fa195a6b07fa719f23" - }, - { - "name": "miner", - "type": "string", - "description": "The address of the miner", - "example": "0xea674fdde714fd979de3edf0f56aa9716b898ec8" - }, - { - "name": "difficulty", - "type": "string", - "description": "The difficulty of the block", - "example": "7253857437305950" - }, - { - "name": "total_difficulty", - "type": "string", - "description": "The total difficulty", - "example": "24325637817906576196890" - }, - { - "name": "size", - "type": "string", - "description": "The block size", - "example": "61271" - }, - { - "name": "extra_data", - "type": "string", - "example": "0x65746865726d696e652d6575726f70652d7765737433" - }, - { - "name": "gas_limit", - "type": "string", - "description": "The gas limit", - "example": "14977947" - }, - { - "name": "gas_used", - "type": "string", - "description": "The gas used", - "example": "14964688" - }, - { - "name": "transaction_count", - "type": "string", - "description": "The number of transactions in the block", - "example": "252" - }, - { - "name": "transactions", - "type": "object", - "description": "The transactions in the block", - "fields": [ - { - "name": "hash", - "type": "string", - "description": "The hash of the transaction", - "example": "0x1ed85b3757a6d31d01a4d6677fc52fd3911d649a0af21fe5ca3f886b153773ed" - }, - { - "name": "nonce", - "type": "string", - "description": "The nonce", - "example": "1848059" - }, - { - "name": "transaction_index", - "type": "string", - "example": "108" - }, - { - "name": "from_address", - "type": "string", - "description": "The from address", - "example": "0x267be1c1d684f78cb4f6a176c4911b741e4ffdc0" - }, - { - "name": "to_address", - "type": "string", - "description": "The to address", - "example": "0x003dde3494f30d861d063232c6a8c04394b686ff" - }, - { - "name": "from_address_label", - "type": "string", - "description": "The label of the from address", - "example": "Binance 1" - }, - { - "name": "to_address_label", - "type": "string", - "description": "The label of the to address", - "example": "Binance 2" - }, - { - "name": "value", - "type": "string", - "description": "The value sent", - "example": "115580000000000000" - }, - { "name": "gas", "type": "string", "example": "30000" }, - { - "name": "gas_price", - "type": "string", - "description": "The gas price", - "example": "52500000000" - }, - { "name": "input", "type": "string", "example": "0x" }, - { - "name": "receipt_cumulative_gas_used", - "type": "string", - "example": "4923073" - }, - { - "name": "receipt_gas_used", - "type": "string", - "example": "21000" - }, - { - "name": "receipt_contract_address", - "type": "string", - "example": null - }, - { "name": "receipt_root", "type": "string", "example": null }, - { - "name": "receipt_status", - "type": "string", - "example": "1" - }, - { - "name": "block_timestamp", - "type": "string", - "description": "The block timestamp", - "example": "2021-05-07T11:08:35.000Z" - }, - { - "name": "block_number", - "type": "string", - "description": "The block number", - "example": "12386788" - }, - { - "name": "block_hash", + "getNativeBalancesForAddresses": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get balance for a set of wallet", + "description": "Get the native balances for a set of specific addresses", + "method": "GET", + "path": "/wallets/balances", + "pathParams": [], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", "type": "string", - "description": "The hash of the block", - "example": "0x9b559aef7ea858608c2e554246fe4a24287e7aeeb976848df2b9a2531f4b9171" - }, - { - "name": "logs", - "type": "object", - "description": "The logs of the transaction", - "fields": [ - { - "name": "log_index", - "type": "string", - "example": "273" - }, - { - "name": "transaction_hash", - "type": "string", - "description": "The hash of the transaction", - "example": "0xdd9006489e46670e0e85d1fb88823099e7f596b08aeaac023e9da0851f26fdd5" - }, - { - "name": "transaction_index", - "type": "string", - "example": "204" - }, - { - "name": "address", - "type": "string", - "description": "The address of the contract", - "example": "0x3105d328c66d8d55092358cf595d54608178e9b5" - }, - { - "name": "data", - "type": "string", - "description": "The data of the log", - "example": "0x00000000000000000000000000000000000000000000000de05239bccd4d537400000000000000000000000000024dbc80a9f80e3d5fc0a0ee30e2693781a443" - }, - { - "name": "topic0", - "type": "string", - "example": "0x2caecd17d02f56fa897705dcc740da2d237c373f70686f4e0d9bd3bf0400ea7a" - }, - { - "name": "topic1", - "type": "string", - "example": "0x000000000000000000000000031002d15b0d0cd7c9129d6f644446368deae391" - }, - { - "name": "topic2", - "type": "string", - "example": "0x000000000000000000000000d25943be09f968ba740e0782a34e710100defae9" - }, - { "name": "topic3", "type": "string", "example": null }, - { - "name": "block_timestamp", - "type": "string", - "description": "The timestamp of the block", - "example": "2021-05-07T11:08:35.000Z" - }, - { - "name": "block_number", - "type": "string", - "description": "The block number", - "example": "12386788" - }, - { - "name": "block_hash", - "type": "string", - "description": "The hash of the block", - "example": "0x9b559aef7ea858608c2e554246fe4a24287e7aeeb976848df2b9a2531f4b9171" - } + "enum": [ + "eth", + "0x1", + "sepolia", + "0xaa36a7", + "holesky", + "0x4268", + "polygon", + "0x89", + "amoy", + "0x13882", + "bsc", + "0x38", + "bsc testnet", + "0x61", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "gnosis", + "0x64", + "gnosis testnet", + "0x27d8", + "chiliz", + "0x15b38", + "chiliz testnet", + "0x15b32", + "base", + "0x2105", + "base sepolia", + "0x14a34", + "optimism", + "0xa", + "optimism sepolia", + "0xaa37dc", + "linea", + "0xe705", + "linea sepolia", + "0xe705" ] - }, - { - "name": "internal_transactions", - "type": "object", - "description": "The internal transactions of the transaction", - "fields": [ - { - "name": "transaction_hash", - "type": "string", - "description": "The hash of the transaction", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - }, - { - "name": "block_number", - "type": "string", - "description": "The block number", - "example": 12526958 - }, - { - "name": "block_hash", - "type": "string", - "description": "The block hash", - "example": "0x0372c302e3c52e8f2e15d155e2c545e6d802e479236564af052759253b20fd86" - }, - { - "name": "type", - "type": "string", - "description": "Call type", - "example": "CALL" - }, - { - "name": "from", - "type": "string", - "description": "The sender", - "example": "0xd4a3BebD824189481FC45363602b83C9c7e9cbDf" - }, - { - "name": "to", - "type": "string", - "description": "The recipient", - "example": "0xa71db868318f0a0bae9411347cd4a6fa23d8d4ef" - }, - { - "name": "value", - "type": "string", - "description": "The value that was transfered (in wei)", - "example": "650000000000000000" - }, - { - "name": "gas", - "type": "string", - "description": "The gas of the transaction", - "example": "6721975" - }, - { - "name": "gas_used", - "type": "string", - "description": "The used gas", - "example": "6721975" - }, - { - "name": "input", - "type": "string", - "description": "The input", - "example": "0x" - }, - { - "name": "output", + }, + { + "name": "to_block", + "description": "The block number on which the balances should be checked", + "required": false, + "type": "number" + }, + { + "name": "wallet_addresses", + "description": "The addresses to get metadata for (max 25 addresses)", + "required": true, + "type": "array", + "field": { "type": "string", - "description": "The output", - "example": "0x" - } - ] - } - ] - } - ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.block.getBlock({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.block.get_block(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getDateToBlock": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get block by date", - "description": "Get the closest block given the date.", - "method": "GET", - "path": "/dateToBlock", - "pathParams": [], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "0x1", - "sepolia", - "0xaa36a7", - "holesky", - "0x4268", - "polygon", - "0x89", - "amoy", - "0x13882", - "bsc", - "0x38", - "bsc testnet", - "0x61", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "gnosis", - "0x64", - "gnosis testnet", - "0x27d8", - "chiliz", - "0x15b38", - "chiliz testnet", - "0x15b32", - "base", - "0x2105", - "base sepolia", - "0x14a34", - "optimism", - "0xa", - "optimism sepolia", - "0xaa37dc", - "linea", - "0xe705", - "linea sepolia", - "0xe705" - ] - }, - { - "name": "date", - "description": "Unix date in seconds or a datestring (any format that is accepted by momentjs)", - "required": true, - "type": "string" - } - ], - "responses": [ - { - "status": "200", - "description": "Returns the block number and corresponding date and timestamp", - "body": { - "type": "object", - "fields": [ - { - "name": "date", - "type": "string", - "description": "The date of the block", - "example": "2020-01-01T00:00:00+00:00" - }, - { - "name": "block", - "type": "number", - "description": "The block number", - "example": 9193266 - }, - { - "name": "timestamp", - "type": "number", - "description": "The timestamp of the block", - "example": 1577836811 - }, - { - "name": "block_timestamp", - "type": "string", - "description": "The timestamp of the block", - "example": "2019-12-31T23:59:45.000Z" - }, - { - "name": "hash", - "type": "string", - "description": "The block hash", - "example": "0x9b559aef7ea858608c2e554246fe4a24287e7aeeb976848df2b9a2531f4b9171" - }, - { - "name": "parent_hash", - "type": "string", - "description": "The block hash of the parent block", - "example": "0x011d1fc45839de975cc55d758943f9f1d204f80a90eb631f3bf064b80d53e045" - } + "example": "0xE92d1A43df510F82C66382592a047d288f85226f" + } + } + ], + "responses": [ + { + "status": "200", + "description": "Returns a collection of balances", + "body": { + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "chain", + "type": "string", + "required": true, + "description": "The chain", + "example": "eth_mainnet" + }, + { + "name": "chain_id", + "type": "string", + "required": true, + "description": "The chain id", + "example": "2" + }, + { + "name": "total_balance", + "type": "string", + "required": true, + "description": "The total balances for all the walttes", + "example": "57499206466583095" + }, + { + "name": "block_number", + "type": "string", + "required": true, + "description": "The block Number", + "example": "123456789" + }, + { + "name": "block_timestamp", + "type": "string", + "required": true, + "description": "The block timestamp", + "example": "0.057" + }, + { + "name": "total_balance_formatted", + "type": "string", + "required": true, + "description": "The total balances for all the walttes formatted", + "example": "123456789" + }, + { + "name": "wallet_balances", + "type": "array", + "required": true, + "field": { + "type": "object", + "fields": [ + { + "name": "address", + "type": "string", + "description": "address", + "example": "0x123", + "required": true + }, + { + "name": "balance", + "type": "string", + "description": "balance", + "example": "28499206466583095", + "required": true + }, + { + "name": "balance_formatted", + "type": "string", + "description": "balance formatted", + "example": "0.0285", + "required": true + } + ] + } + } + ] + } + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.balance.getNativeBalancesForAddresses({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.balance.get_native_balances_for_addresses(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.block.getDateToBlock({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.block.get_date_to_block(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" } - ] }, - "getBlockStats": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get the block stats", - "description": "Get the stats for a block", - "method": "GET", - "path": "/block/:block_number_or_hash/stats", - "pathParams": [ - { - "name": "block_number_or_hash", - "description": "The block number or hash", - "required": true, - "type": "string", - "example": 1023323 - } - ], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "0x1", - "sepolia", - "0xaa36a7", - "holesky", - "0x4268", - "polygon", - "0x89", - "amoy", - "0x13882", - "bsc", - "0x38", - "bsc testnet", - "0x61", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "gnosis", - "0x64", - "gnosis testnet", - "0x27d8", - "chiliz", - "0x15b38", - "chiliz testnet", - "0x15b32", - "base", - "0x2105", - "base sepolia", - "0x14a34", - "optimism", - "0xa", - "optimism sepolia", - "0xaa37dc", - "linea", - "0xe705", - "linea sepolia", - "0xe705" - ] - } - ], - "responses": [ - { - "status": "200", - "description": "Returns the stats for the wallet address.", - "body": { - "type": "object", - "fields": [ - { - "name": "transactions", - "type": "object", - "description": "Transaction stats", - "fields": [ - { - "name": "total", + "transaction": { + "getWalletTransactions": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get native transactions by wallet", + "description": "Get native transactions ordered by block number in descending order.", + "method": "GET", + "path": "/:address", + "pathParams": [ + { + "name": "address", + "description": "The address of the wallet", + "required": true, + "example": "0x1f9090aaE28b8a3dCeaDf281B0F12828e676c326", + "type": "string" + } + ], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", "type": "string", - "description": "The number of transactions sent by a wallet", - "example": "1000" - } - ] - }, - { - "name": "nft_transfers", - "type": "object", - "description": "NFT transfer stats", - "fields": [ - { - "name": "total", + "enum": [ + "eth", + "0x1", + "sepolia", + "0xaa36a7", + "holesky", + "0x4268", + "polygon", + "0x89", + "amoy", + "0x13882", + "bsc", + "0x38", + "bsc testnet", + "0x61", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "gnosis", + "0x64", + "gnosis testnet", + "0x27d8", + "chiliz", + "0x15b38", + "chiliz testnet", + "0x15b32", + "base", + "0x2105", + "base sepolia", + "0x14a34", + "optimism", + "0xa", + "optimism sepolia", + "0xaa37dc", + "linea", + "0xe705", + "linea sepolia", + "0xe705" + ] + }, + { + "name": "from_block", + "description": "The minimum block number from which to get the transactions\n* Provide the param 'from_block' or 'from_date'\n* If 'from_date' and 'from_block' are provided, 'from_block' will be used.\n", + "required": false, + "type": "number" + }, + { + "name": "to_block", + "description": "The maximum block number from which to get the transactions.\n* Provide the param 'to_block' or 'to_date'\n* If 'to_date' and 'to_block' are provided, 'to_block' will be used.\n", + "required": false, + "type": "number" + }, + { + "name": "from_date", + "description": "The start date from which to get the transactions (any format that is accepted by momentjs)\n* Provide the param 'from_block' or 'from_date'\n* If 'from_date' and 'from_block' are provided, 'from_block' will be used.\n", + "required": false, + "type": "string" + }, + { + "name": "to_date", + "description": "Get the transactions up to this date (any format that is accepted by momentjs)\n* Provide the param 'to_block' or 'to_date'\n* If 'to_date' and 'to_block' are provided, 'to_block' will be used.\n", + "type": "string" + }, + { + "name": "cursor", + "description": "The cursor returned in the previous response (used for getting the next page). Learn more on cursor pagination [here](/web3-data-api/evm/reference/pagination).", + "type": "string" + }, + { + "name": "include", + "description": "If the result should contain the internal transactions.", + "required": false, "type": "string", - "description": "The number of NFT transfers of a wallet", - "example": "1000" - } - ] - }, - { - "name": "token_transfers", - "type": "object", - "description": "Token transfer stats", - "fields": [ - { - "name": "total", + "enum": ["internal_transactions"] + }, + { + "name": "limit", + "description": "The desired page size of the result.", + "required": false, + "type": "number" + }, + { + "name": "order", + "required": false, "type": "string", - "description": "The number of ERC20 token transfers of a wallet", - "example": "1000" - } - ] - } - ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.block.getBlockStats({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.block.get_block_stats(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - } - }, - "utils": { - "runContractFunction": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Run contract function", - "description": "Run a given function of a contract ABI and retrieve readonly data. [Try it with Swagger](https://deep-index.moralis.io/api-docs-2.1/#/Utils/runContractFunction).", - "method": "POST", - "path": "/:address/function", - "pathParams": [ - { - "name": "address", - "description": "The address of the contract", - "required": true, - "type": "string" - } - ], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "0x1", - "sepolia", - "0xaa36a7", - "holesky", - "0x4268", - "polygon", - "0x89", - "amoy", - "0x13882", - "bsc", - "0x38", - "bsc testnet", - "0x61", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "gnosis", - "0x64", - "gnosis testnet", - "0x27d8", - "chiliz", - "0x15b38", - "chiliz testnet", - "0x15b32", - "base", - "0x2105", - "base sepolia", - "0x14a34", - "optimism", - "0xa", - "optimism sepolia", - "0xaa37dc", - "linea", - "0xe705", - "linea sepolia", - "0xe705" - ] - }, - { - "name": "function_name", - "description": "The function name of the contract", - "required": true, - "type": "string" - } - ], - "bodyParam": { - "required": true, - "description": "Body", - "type": "object", - "fields": [ - { - "name": "abi", - "type": "array", - "description": "The contract ABI", - "example": [], - "field": { "type": "json" } - }, - { - "name": "params", - "type": "json", - "description": "The params for the given function", - "example": {} - } - ] - }, - "responses": [ - { - "status": "200", - "description": "Returns response of the function executed" - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.utils.runContractFunction({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nbody = []\n\nparams = {}\n\nresult = evm_api.utils.run_contract_function(\n api_key=api_key,\n body=body,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "web3ApiVersion": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get API version", - "description": "Get the current version of the Moralis Web3 API.", - "method": "GET", - "path": "/web3/version", - "pathParams": [], - "queryParams": [], - "responses": [ - { - "status": "200", - "description": "Get the current version of the Moralis Web3 API.", - "body": { - "type": "object", - "fields": [ - { - "name": "version", - "type": "string", - "description": "The version of the API", - "example": "1.0.0" - } - ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.utils.web3ApiVersion({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nresult = evm_api.utils.web3_api_version(\n api_key=api_key,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "endpointWeights": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get weights of endpoints", - "description": "Get the cost and rate limit for each API endpoint.", - "method": "GET", - "path": "/info/endpointWeights", - "pathParams": [], - "queryParams": [], - "responses": [ - { - "status": "200", - "description": "The cost and rate limit for each API endpoint." - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.utils.endpointWeights({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nresult = evm_api.utils.endpoint_weights(\n api_key=api_key,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "contractsReview": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Review contracts", - "description": "Review contracts as spam or not spam", - "method": "POST", - "path": "/contracts-review", - "pathParams": [], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "0x1", - "sepolia", - "0xaa36a7", - "holesky", - "0x4268", - "polygon", - "0x89", - "amoy", - "0x13882", - "bsc", - "0x38", - "bsc testnet", - "0x61", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "gnosis", - "0x64", - "gnosis testnet", - "0x27d8", - "chiliz", - "0x15b38", - "chiliz testnet", - "0x15b32", - "base", - "0x2105", - "base sepolia", - "0x14a34", - "optimism", - "0xa", - "optimism sepolia", - "0xaa37dc", - "linea", - "0xe705", - "linea sepolia", - "0xe705" - ] - } - ], - "bodyParam": { - "required": true, - "description": "Body", - "type": "object", - "fields": [ - { - "name": "contracts", - "type": "object", - "description": "The contracts to be reported", - "example": [ - { - "contract_address": "0xa4991609c508b6d4fb7156426db0bd49fe298bd8", - "report_type": "spam", - "contract_type": "ERC20", - "reason": "The contract contains shady code" - } - ], - "fields": [ - { - "name": "contract_address", - "type": "string", - "description": "The contract address", - "example": "0x06012c8cf97bead5deae237070f9587f8e7a266d" - }, - { - "name": "reason", - "type": "string", - "description": "The reason for the contract being spam", - "example": 100 - }, - { - "name": "report_type", - "type": "string", - "description": "This can be spam or not_spam", - "example": "spam", - "enum": ["spam", "not_spam"] - }, - { - "name": "contract_type", - "type": "string", - "description": "This can be ERC20, or NFT", - "example": "ERC20", - "enum": ["ERC20", "NFT"] - } - ] - } - ] - }, - "responses": [ - { - "status": "200", - "description": "Returns a message acknowledging the report" - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.utils.contractsReview({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nbody = []\n\nparams = {}\n\nresult = evm_api.utils.contracts_review(\n api_key=api_key,\n body=body,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - } - }, - "resolve": { - "resolveAddress": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "ENS Lookup by Address", - "description": "Reverse resolve a given ETH address to its ENS domain.", - "method": "GET", - "path": "/resolve/:address/reverse", - "pathParams": [ - { - "name": "address", - "description": "The address to be resolved", - "required": true, - "example": "0x1f9090aaE28b8a3dCeaDf281B0F12828e676c326", - "type": "string" - } - ], - "queryParams": [], - "responses": [ - { - "status": "200", - "description": "Returns an ENS", - "body": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "description": "Resolved ENS address", - "example": "Vitalik.eth" - } - ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.resolve.resolveAddress({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.resolve.resolve_address(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "resolveDomain": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Resolve Unstoppable domain", - "description": "Resolve a specific Unstoppable domain to its address.", - "method": "GET", - "path": "/resolve/:domain", - "pathParams": [ - { - "name": "domain", - "description": "The domain to be resolved", - "required": true, - "example": "brad.crypto", - "type": "string" - } - ], - "queryParams": [ - { - "name": "currency", - "description": "The currency to query", - "required": false, - "example": "eth", - "type": "string" - } - ], - "responses": [ - { - "status": "200", - "description": "Returns an address", - "body": { - "type": "object", - "fields": [ - { - "name": "address", - "type": "string", - "description": "Resolved domain address", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - } - ] - } - }, - { "status": "404", "description": "Returns an address" } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.resolve.resolveDomain({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.resolve.resolve_domain(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "resolveAddressToDomain": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Resolve Address to Unstoppable domain", - "description": "Resolve a specific address to its Unstoppable domain", - "method": "GET", - "path": "/resolve/:address/domain", - "pathParams": [ - { - "name": "address", - "description": "The address to be resolved", - "required": true, - "example": "0x94ef5300cbc0aa600a821ccbc561b057e456ab23", - "type": "string" - } - ], - "queryParams": [], - "responses": [ - { - "status": "200", - "description": "Returns an unstoppable domain", - "body": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "description": "Resolved unstoppable domain address", - "example": "sandy.nft" - } - ] - } - }, - { "status": "404", "description": "Returns an unstoppable domain" } - ] - }, - "resolveENSDomain": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "ENS Lookup by Domain", - "description": "Resolve a specific ENS domain to its address.", - "method": "GET", - "path": "/resolve/ens/:domain", - "pathParams": [ - { - "name": "domain", - "description": "The domain to be resolved", - "required": true, - "example": "vitalik.eth", - "type": "string" - } - ], - "queryParams": [], - "responses": [ - { - "status": "200", - "description": "Returns an address", - "body": { - "type": "object", - "fields": [ - { - "name": "address", - "type": "string", - "description": "Resolved domain address", - "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" - } - ] - } - }, - { "status": "404", "description": "Returns an address" } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.resolve.resolveENSDomain({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.resolve.resolve_e_n_s_domain(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - } - }, - "defi": { - "getPairReserves": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get DEX token pair reserves", - "description": "Get the liquidity reserves for a given pair address. Only Uniswap V2 based exchanges supported at the moment.", - "method": "GET", - "path": "/:pair_address/reserves", - "pathParams": [ - { - "name": "pair_address", - "description": "The liquidity pair address", - "required": true, - "example": "0xa2107fa5b38d9bbd2c461d6edf11b11a50f6b974", - "type": "string" - } - ], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "0x1", - "polygon", - "0x89", - "bsc", - "0x38", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "gnosis", - "0x64", - "chiliz", - "0x15b38", - "base", - "0x2105", - "optimism", - "0xa", - "linea", - "0xe705" - ] - }, - { - "name": "to_block", - "description": "The block number to get the reserves from", - "required": false, - "type": "string" - }, - { - "name": "to_date", - "description": "Get the reserves up to this date (any format that is accepted by momentjs)\n* Provide the param 'to_block' or 'to_date'\n* If 'to_date' and 'to_block' are provided, 'to_block' will be used.\n", - "type": "string" - } - ], - "responses": [ - { "status": "200", "description": "Returns the pair reserves" } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.defi.getPairReserves({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.defi.get_pair_reserves(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getPairAddress": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get DEX token pair address", - "description": "Fetch the pair data of the provided token0+token1 combination.\nThe token0 and token1 options are interchangable (ie. there is no different outcome in \"token0=WETH and token1=USDT\" or \"token0=USDT and token1=WETH\")\n", - "method": "GET", - "path": "/:token0_address/:token1_address/pairAddress", - "pathParams": [ - { - "name": "token0_address", - "description": "The token0 address", - "required": true, - "example": "0x2b591e99afe9f32eaa6214f7b7629768c40eeb39", - "type": "string" - }, - { - "name": "token1_address", - "description": "The token1 address", - "required": true, - "example": "0xdac17f958d2ee523a2206206994597c13d831ec7", - "type": "string" - } - ], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "0x1", - "polygon", - "0x89", - "bsc", - "0x38", - "avalanche", - "0xa86a", - "fantom", - "0xfa", - "palm", - "0x2a15c308d", - "cronos", - "0x19", - "arbitrum", - "0xa4b1", - "gnosis", - "0x64", - "chiliz", - "0x15b38", - "base", - "0x2105", - "optimism", - "0xa", - "linea", - "0xe705" - ] - }, - { - "name": "to_block", - "description": "The block number to get the reserves from", - "required": false, - "type": "string" - }, - { - "name": "to_date", - "description": "Get the reserves up to this date (any format that is accepted by momentjs)\n* Provide the param 'to_block' or 'to_date'\n* If 'to_date' and 'to_block' are provided, 'to_block' will be used.\n", - "type": "string" - }, - { - "name": "exchange", - "description": "The factory name or address of the token exchange", - "required": true, - "example": "uniswapv2", - "type": "string", - "enum": [ - "uniswapv2", - "uniswapv3", - "sushiswapv2", - "pancakeswapv1", - "pancakeswapv2", - "quickswap", - "quickswapv2", - "traderjoe", - "pangolin", - "spookyswap", - "vvs", - "camelotv2" - ] - } - ], - "responses": [ - { - "status": "200", - "description": "Returns the pair address of the two tokens.", - "body": { - "type": "object", - "fields": [ - { "name": "token0", "type": "json" }, - { "name": "token1", "type": "json" }, - { - "name": "pairAddress", - "type": "string", - "example": "0xbbb9bf440d0f686487925fef3b0a0f9aa67753f6" - } - ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.defi.getPairAddress({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.defi.get_pair_address(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - } - }, - "ipfs": { - "uploadFolder": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Upload folder to IPFS", - "description": "Upload multiple files to IPFS and place them in a folder directory. To use the API, [sign up to Moralis](https://admin.moralis.io/register) and get your API key from the dashboard.\n", - "method": "POST", - "path": "/ipfs/uploadFolder", - "pathParams": [], - "queryParams": [], - "bodyParam": { - "required": false, - "description": "Array of JSON and Base64 Supported", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "path", - "type": "string", - "description": "Path to the file", - "example": "moralis/logo.jpg", - "disabled": true - }, - { - "name": "content", - "type": "string", - "description": "Base64 or JSON", - "example": "iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAApgAAAKYB3X3", - "disabled": true - } - ] - } - }, - "responses": [ - { - "status": "200", - "description": "Returns the path to the uploaded files" - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.ipfs.uploadFolder({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nbody = []\n\nresult = evm_api.ipfs.upload_folder(\n api_key=api_key,\n body=body,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - } - }, - "auth": { - "requestChallengeEvm": { - "apiHost": "https://authapi.moralis.io", - "summary": "Request EVM challenge", - "method": "POST", - "path": "/challenge/request/evm", - "pathParams": [], - "queryParams": [], - "bodyParam": { - "required": true, - "description": "Request EVM challenge message.", - "type": "object", - "fields": [ - { - "name": "domain", - "type": "string", - "required": true, - "description": "RFC 4501 dns authority that is requesting the signing.", - "example": "defi.finance" - }, - { - "name": "chainId", - "type": "string", - "required": true, - "description": "EIP-155 Chain ID to which the session is bound, and the network where Contract Accounts must be resolved.", - "example": 1 - }, - { - "name": "address", - "type": "string", - "required": true, - "description": "Ethereum address performing the signing conformant to capitalization encoded checksum specified in EIP-55 where applicable.", - "example": "0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B" - }, - { - "name": "statement", - "type": "string", - "description": "Human-readable ASCII assertion that the user will sign, and it must not contain `\n`.", - "example": "Please confirm" - }, - { - "name": "uri", - "type": "string", - "required": true, - "description": "RFC 3986 URI referring to the resource that is the subject of the signing (as in the __subject__ of a claim).", - "example": "https://defi.finance/" - }, - { - "name": "expirationTime", - "type": "string", - "description": "ISO 8601 datetime string that, if present, indicates when the signed authentication message is no longer valid.", - "example": "2020-01-01T00:00:00.000Z" - }, - { - "name": "notBefore", - "type": "string", - "description": "ISO 8601 datetime string that, if present, indicates when the signed authentication message will become valid.", - "example": "2020-01-01T00:00:00.000Z" - }, - { - "name": "resources", - "type": "array", - "description": "List of information or references to information the user wishes to have resolved as part of authentication by the relying party. They are expressed as RFC 3986 URIs separated by new lines.", - "example": ["https://docs.moralis.io/"], - "field": { "type": "string" } - }, - { - "name": "timeout", - "type": "number", - "required": true, - "description": "Time in seconds before the challenge is expired", - "example": 15 - } - ] - }, - "responses": [ - { - "status": "201", - "description": "The back channel challenge containing the id to store on the api and the message to be signed by the user", - "body": { - "type": "object", - "fields": [ - { - "name": "id", - "type": "string", - "description": "17-characters Alphanumeric string Secret Challenge ID used to identify this particular request. Is should be used at the backend of the calling service to identify the completed request.", - "example": "fRyt67D3eRss3RrXa" - }, - { - "name": "message", - "type": "string", - "description": "Message that needs to be signed by the end user", - "example": "defi.finance wants you to sign in with your Ethereum account:\n0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B\n\nPlease confirm\n\nURI: https://defi.finance/\nVersion: 1\nChain ID: 1\nNonce: DbU1DCTmdzR4lg3wi\nIssued At: 2022-06-12T12:15:31.290Z\nExpiration Time: 2020-01-01T00:00:00.000Z\nNot Before: 2020-01-01T00:00:00.000Z\nResources:\n- https://docs.moralis.io/" - }, - { - "name": "profileId", - "type": "string", - "description": "Unique identifier with a length of 66 characters", - "example": "0xbfbcfab169c67072ff418133124480fea02175f1402aaa497daa4fd09026b0e1" - } - ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n \n const response = Moralis.Auth.requestMessage({});\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import auth\napi_key = \"YOUR_API_KEY\"\n\nbody = []\n\nresult = auth.challenge.request_challenge_evm(\n api_key=api_key,\n body=body,\n)\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "verifyChallengeEvm": { - "apiHost": "https://authapi.moralis.io", - "summary": "Verify EVM challenge", - "method": "POST", - "path": "/challenge/verify/evm", - "pathParams": [], - "queryParams": [], - "bodyParam": { - "required": true, - "description": "Verify EVM challenge message.", - "type": "object", - "fields": [ - { - "name": "message", - "type": "string", - "required": true, - "description": "Message that needs to be signed by the end user.", - "example": "defi.finance wants you to sign in with your Ethereum account:\n0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B\n\n\nURI: https://defi.finance\nVersion: 1\nChain ID: 1\nNonce: Px7Nh1RPzlCLwqgOb\nIssued At: 2022-11-30T10:20:00.262Z" - }, - { - "name": "signature", - "type": "string", - "required": true, - "description": "EIP-191 compliant signature signed by the Ethereum account address requesting authentication.", - "example": "0xa8f89a58bf9b433d3100f9e41ee35b5e31fb8c7cd62547acb113162ec6f2e4140207e2dfbd4e387e1801ebc7f08a9dd105ac1d22b2e2ff0df5fa8b6d9bdcfe491c" - } - ] - }, - "responses": [ - { - "status": "201", - "description": "The token to be used to call the third party API from the client", - "body": { - "type": "object", - "fields": [ - { - "name": "id", - "type": "string", - "description": "17-characters Alphanumeric string Secret Challenge ID used to identify this particular request. Is should be used at the backend of the calling service to identify the completed request.", - "example": "fRyt67D3eRss3RrX" - }, - { - "name": "domain", - "type": "string", - "description": "RFC 4501 dns authority that is requesting the signing.", - "example": "defi.finance" - }, - { - "name": "chainId", - "type": "string", - "description": "EIP-155 Chain ID to which the session is bound, and the network where Contract Accounts must be resolved.", - "example": 1 - }, - { - "name": "address", - "type": "string", - "description": "Ethereum address performing the signing conformant to capitalization encoded checksum specified in EIP-55 where applicable.", - "example": "0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B" - }, - { - "name": "statement", - "type": "string", - "description": "Human-readable ASCII assertion that the user will sign, and it must not contain `\n`.", - "example": "Please confirm" - }, - { - "name": "uri", - "type": "string", - "description": "RFC 3986 URI referring to the resource that is the subject of the signing (as in the __subject__ of a claim).", - "example": "https://defi.finance/" - }, - { - "name": "expirationTime", - "type": "string", - "description": "ISO 8601 datetime string that, if present, indicates when the signed authentication message is no longer valid.", - "example": "2020-01-01T00:00:00.000Z" - }, - { - "name": "notBefore", - "type": "string", - "description": "ISO 8601 datetime string that, if present, indicates when the signed authentication message will become valid.", - "example": "2020-01-01T00:00:00.000Z" - }, - { - "name": "resources", - "type": "array", - "description": "List of information or references to information the user wishes to have resolved as part of authentication by the relying party. They are expressed as RFC 3986 URIs separated by `\n- `.", - "example": ["https://docs.moralis.io/"], - "field": { "type": "string" } - }, - { - "name": "version", - "type": "string", - "description": "EIP-155 Chain ID to which the session is bound, and the network where Contract Accounts must be resolved.", - "example": "1.0" - }, - { - "name": "nonce", - "type": "string", - "example": "0x1234567890abcdef0123456789abcdef1234567890abcdef" - }, - { - "name": "profileId", - "type": "string", - "description": "Unique identifier with a length of 66 characters", - "example": "0xbfbcfab169c67072ff418133124480fea02175f1402aaa497daa4fd09026b0e1" - } + "description": "The order of the result, in ascending (ASC) or descending (DESC)", + "example": "DESC", + "enum": ["ASC", "DESC"] + } + ], + "responses": [ + { + "status": "200", + "description": "Returns a collection of native transactions.", + "body": { + "type": "object", + "fields": [ + { + "name": "total", + "type": "number", + "description": "The total number of matches for this query", + "example": "2000" + }, + { + "name": "page", + "type": "number", + "description": "The current page of the result", + "example": "2" + }, + { + "name": "page_size", + "type": "number", + "description": "The number of results per page", + "example": "100" + }, + { + "name": "result", + "type": "object", + "fields": [ + { + "name": "hash", + "type": "string", + "description": "The hash of the transaction", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "nonce", + "type": "string", + "description": "The nonce of the transaction", + "example": 326595425 + }, + { + "name": "transaction_index", + "type": "string", + "description": "The transaction index", + "example": 25 + }, + { + "name": "from_address", + "type": "string", + "description": "The sender", + "example": "0xd4a3BebD824189481FC45363602b83C9c7e9cbDf" + }, + { + "name": "to_address", + "type": "string", + "description": "The recipient", + "example": "0xa71db868318f0a0bae9411347cd4a6fa23d8d4ef" + }, + { + "name": "from_address_label", + "type": "string", + "description": "The label of the from address", + "example": "Binance 1" + }, + { + "name": "to_address_label", + "type": "string", + "description": "The label of the to address", + "example": "Binance 2" + }, + { + "name": "value", + "type": "string", + "description": "The value that was transferred (in wei)", + "example": 650000000000000000 + }, + { + "name": "gas", + "type": "string", + "description": "The gas of the transaction", + "example": 6721975 + }, + { + "name": "gas_price", + "type": "string", + "description": "The gas price", + "example": 20000000000 + }, + { + "name": "input", + "type": "string", + "description": "The input" + }, + { + "name": "receipt_cumulative_gas_used", + "type": "string", + "description": "The receipt cumulative gas used", + "example": 1340925 + }, + { + "name": "receipt_gas_used", + "type": "string", + "description": "The receipt gas used", + "example": 1340925 + }, + { + "name": "receipt_contract_address", + "type": "string", + "description": "The receipt contract address", + "example": "0x1d6a4cf64b52f6c73f201839aded7379ce58059c" + }, + { + "name": "receipt_root", + "type": "string", + "description": "The receipt root" + }, + { + "name": "receipt_status", + "type": "string", + "description": "The receipt status", + "example": 1 + }, + { + "name": "block_timestamp", + "type": "string", + "description": "The block timestamp", + "example": "2021-04-02T10:07:54.000Z" + }, + { + "name": "block_number", + "type": "string", + "description": "The block number", + "example": 12526958 + }, + { + "name": "block_hash", + "type": "string", + "description": "The block hash", + "example": "0x0372c302e3c52e8f2e15d155e2c545e6d802e479236564af052759253b20fd86" + }, + { + "name": "internal_transactions", + "type": "object", + "description": "The internal transaction", + "fields": [ + { + "name": "transaction_hash", + "type": "string", + "description": "The hash of the transaction", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "block_number", + "type": "string", + "description": "The block number", + "example": 12526958 + }, + { + "name": "block_hash", + "type": "string", + "description": "The block hash", + "example": "0x0372c302e3c52e8f2e15d155e2c545e6d802e479236564af052759253b20fd86" + }, + { + "name": "type", + "type": "string", + "description": "Call type", + "example": "CALL" + }, + { + "name": "from", + "type": "string", + "description": "The sender", + "example": "0xd4a3BebD824189481FC45363602b83C9c7e9cbDf" + }, + { + "name": "to", + "type": "string", + "description": "The recipient", + "example": "0xa71db868318f0a0bae9411347cd4a6fa23d8d4ef" + }, + { + "name": "value", + "type": "string", + "description": "The value that was transfered (in wei)", + "example": "650000000000000000" + }, + { + "name": "gas", + "type": "string", + "description": "The gas of the transaction", + "example": "6721975" + }, + { + "name": "gas_used", + "type": "string", + "description": "The used gas", + "example": "6721975" + }, + { + "name": "input", + "type": "string", + "description": "The input", + "example": "0x" + }, + { + "name": "output", + "type": "string", + "description": "The output", + "example": "0x" + } + ] + } + ] + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.transaction.getWalletTransactions({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.transaction.get_wallet_transactions(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n \n const response = Moralis.Auth.verify({});\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" }, - { - "language": "python", - "code": "from moralis import auth\napi_key = \"YOUR_API_KEY\"\n\nbody = []\n\nresult = auth.challenge.verify_challenge_evm(\n api_key=api_key,\n body=body,\n)\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "requestChallengeSolana": { - "apiHost": "https://authapi.moralis.io", - "summary": "Request Solana challenge", - "method": "POST", - "path": "/challenge/request/solana", - "pathParams": [], - "queryParams": [], - "bodyParam": { - "required": true, - "description": "Request Solana challenge message.", - "type": "object", - "fields": [ - { - "name": "domain", - "type": "string", - "required": true, - "description": "RFC 4501 dns authority that is requesting the signing.", - "example": "defi.finance" - }, - { - "name": "network", - "type": "string", - "required": true, - "description": "The network where Contract Accounts must be resolved.", - "example": "mainnet" - }, - { - "name": "address", - "type": "string", - "required": true, - "description": "Solana address with a length of 32 - 44 characters that is used to perform the signing", - "example": "26qv4GCcx98RihuK3c4T6ozB3J7L6VwCuFVc7Ta2A3Uo" - }, - { - "name": "statement", - "type": "string", - "description": "Human-readable ASCII assertion that the user will sign, and it must not contain `\n`.", - "example": "Please confirm" - }, - { - "name": "uri", - "type": "string", - "required": true, - "description": "RFC 3986 URI referring to the resource that is the subject of the signing (as in the __subject__ of a claim).", - "example": "https://defi.finance/" - }, - { - "name": "expirationTime", - "type": "string", - "description": "ISO 8601 datetime string that, if present, indicates when the signed authentication message is no longer valid.", - "example": "2020-01-01T00:00:00.000Z" - }, - { - "name": "notBefore", - "type": "string", - "description": "ISO 8601 datetime string that, if present, indicates when the signed authentication message will become valid.", - "example": "2020-01-01T00:00:00.000Z" - }, - { - "name": "resources", - "type": "array", - "description": "List of information or references to information the user wishes to have resolved as part of authentication by the relying party. They are expressed as RFC 3986 URIs separated by new lines.", - "example": ["https://docs.moralis.io/"], - "field": { "type": "string" } - }, - { - "name": "timeout", - "type": "number", - "required": true, - "description": "Time in seconds before the challenge is expired", - "example": 15 - } - ] - }, - "responses": [ - { - "status": "201", - "description": "The back channel challenge containing the id to store on the api and the message to be signed by the user", - "body": { - "type": "object", - "fields": [ - { - "name": "id", - "type": "string", - "description": "17-characters Alphanumeric string Secret Challenge ID used to identify this particular request. Is should be used at the backend of the calling service to identify the completed request.", - "example": "fRyt67D3eRss3RrXa" - }, - { - "name": "message", - "type": "string", - "description": "Message that needs to be signed by the end user", - "example": "defi.finance wants you to sign in with your Solana account:\n26qv4GCcx98RihuK3c4T6ozB3J7L6VwCuFVc7Ta2A3Uo\n\nI am a third party API\n\nURI: http://defi.finance\nVersion: 1\nNetwork: mainnet\nNonce: PYxxb9msdjVXsMQ9x\nIssued At: 2022-08-25T11:02:34.097Z\nExpiration Time: 2022-08-25T11:12:38.243Z\nResources:\n- https://docs.moralis.io/" - }, - { - "name": "profileId", - "type": "string", - "description": "Unique identifier with a length of 66 characters", - "example": "0xbfbcfab169c67072ff418133124480fea02175f1402aaa497daa4fd09026b0e1" - } + "getWalletTransactionsVerbose": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get decoded transactions by wallet", + "description": "Get native transactions and logs ordered by block number in descending order.", + "method": "GET", + "path": "/:address/verbose", + "pathParams": [ + { + "name": "address", + "description": "The address of the wallet", + "required": true, + "example": "0x1f9090aaE28b8a3dCeaDf281B0F12828e676c326", + "type": "string" + } + ], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", + "type": "string", + "enum": [ + "eth", + "0x1", + "sepolia", + "0xaa36a7", + "holesky", + "0x4268", + "polygon", + "0x89", + "amoy", + "0x13882", + "bsc", + "0x38", + "bsc testnet", + "0x61", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "gnosis", + "0x64", + "gnosis testnet", + "0x27d8", + "chiliz", + "0x15b38", + "chiliz testnet", + "0x15b32", + "base", + "0x2105", + "base sepolia", + "0x14a34", + "optimism", + "0xa", + "optimism sepolia", + "0xaa37dc", + "linea", + "0xe705", + "linea sepolia", + "0xe705" + ] + }, + { + "name": "from_block", + "description": "The minimum block number from which to get the transactions\n* Provide the param 'from_block' or 'from_date'\n* If 'from_date' and 'from_block' are provided, 'from_block' will be used.\n", + "required": false, + "type": "number" + }, + { + "name": "to_block", + "description": "The maximum block number from which to get the transactions.\n* Provide the param 'to_block' or 'to_date'\n* If 'to_date' and 'to_block' are provided, 'to_block' will be used.\n", + "required": false, + "type": "number" + }, + { + "name": "from_date", + "description": "The start date from which to get the transactions (any format that is accepted by momentjs)\n* Provide the param 'from_block' or 'from_date'\n* If 'from_date' and 'from_block' are provided, 'from_block' will be used.\n", + "required": false, + "type": "string" + }, + { + "name": "to_date", + "description": "Get the transactions up to this date (any format that is accepted by momentjs)\n* Provide the param 'to_block' or 'to_date'\n* If 'to_date' and 'to_block' are provided, 'to_block' will be used.\n", + "type": "string" + }, + { + "name": "cursor", + "description": "The cursor returned in the previous response (used for getting the next page). Learn more on cursor pagination [here](/web3-data-api/evm/reference/pagination).", + "type": "string" + }, + { + "name": "include", + "description": "If the result should contain the internal transactions.", + "required": false, + "type": "string", + "enum": ["internal_transactions"] + }, + { + "name": "limit", + "description": "The desired page size of the result.", + "required": false, + "type": "number" + }, + { + "name": "order", + "required": false, + "type": "string", + "description": "The order of the result, in ascending (ASC) or descending (DESC)", + "example": "DESC", + "enum": ["ASC", "DESC"] + } + ], + "responses": [ + { + "status": "200", + "description": "Returns a collection of native transactions.", + "body": { + "type": "object", + "fields": [ + { + "name": "page", + "type": "number", + "description": "The current page of the result", + "example": "2" + }, + { + "name": "page_size", + "type": "number", + "description": "The number of results per page", + "example": "100" + }, + { + "name": "result", + "type": "object", + "fields": [ + { + "name": "hash", + "type": "string", + "description": "The hash of the transaction", + "example": "0x1ed85b3757a6d31d01a4d6677fc52fd3911d649a0af21fe5ca3f886b153773ed" + }, + { + "name": "nonce", + "type": "string", + "description": "The nonce", + "example": "1848059" + }, + { + "name": "transaction_index", + "type": "string", + "example": "108" + }, + { + "name": "from_address", + "type": "string", + "description": "The from address", + "example": "0x267be1c1d684f78cb4f6a176c4911b741e4ffdc0" + }, + { + "name": "to_address", + "type": "string", + "description": "The to address", + "example": "0x003dde3494f30d861d063232c6a8c04394b686ff" + }, + { + "name": "from_address_label", + "type": "string", + "description": "The label of the from address", + "example": "Binance 1" + }, + { + "name": "to_address_label", + "type": "string", + "description": "The label of the to address", + "example": "Binance 2" + }, + { + "name": "value", + "type": "string", + "description": "The value sent", + "example": "115580000000000000" + }, + { + "name": "gas", + "type": "string", + "example": "30000" + }, + { + "name": "gas_price", + "type": "string", + "description": "The gas price", + "example": "52500000000" + }, + { + "name": "input", + "type": "string", + "example": "0x" + }, + { + "name": "receipt_cumulative_gas_used", + "type": "string", + "example": "4923073" + }, + { + "name": "receipt_gas_used", + "type": "string", + "example": "21000" + }, + { + "name": "receipt_contract_address", + "type": "string", + "example": null + }, + { + "name": "receipt_root", + "type": "string", + "example": null + }, + { + "name": "receipt_status", + "type": "string", + "example": "1" + }, + { + "name": "block_timestamp", + "type": "string", + "description": "The block timestamp", + "example": "2021-05-07T11:08:35.000Z" + }, + { + "name": "block_number", + "type": "string", + "description": "The block number", + "example": "12386788" + }, + { + "name": "block_hash", + "type": "string", + "description": "The hash of the block", + "example": "0x9b559aef7ea858608c2e554246fe4a24287e7aeeb976848df2b9a2531f4b9171" + }, + { + "name": "logs", + "type": "object", + "description": "The logs of the transaction", + "fields": [ + { + "name": "log_index", + "type": "string", + "example": "273" + }, + { + "name": "transaction_hash", + "type": "string", + "description": "The hash of the transaction", + "example": "0xdd9006489e46670e0e85d1fb88823099e7f596b08aeaac023e9da0851f26fdd5" + }, + { + "name": "transaction_index", + "type": "string", + "example": "204" + }, + { + "name": "address", + "type": "string", + "description": "The address of the contract", + "example": "0x3105d328c66d8d55092358cf595d54608178e9b5" + }, + { + "name": "data", + "type": "string", + "description": "The data of the log", + "example": "0x00000000000000000000000000000000000000000000000de05239bccd4d537400000000000000000000000000024dbc80a9f80e3d5fc0a0ee30e2693781a443" + }, + { + "name": "topic0", + "type": "string", + "example": "0x2caecd17d02f56fa897705dcc740da2d237c373f70686f4e0d9bd3bf0400ea7a" + }, + { + "name": "topic1", + "type": "string", + "example": "0x000000000000000000000000031002d15b0d0cd7c9129d6f644446368deae391" + }, + { + "name": "topic2", + "type": "string", + "example": "0x000000000000000000000000d25943be09f968ba740e0782a34e710100defae9" + }, + { + "name": "topic3", + "type": "string", + "example": null + }, + { + "name": "block_timestamp", + "type": "string", + "description": "The timestamp of the block", + "example": "2021-05-07T11:08:35.000Z" + }, + { + "name": "block_number", + "type": "string", + "description": "The block number", + "example": "12386788" + }, + { + "name": "block_hash", + "type": "string", + "description": "The hash of the block", + "example": "0x9b559aef7ea858608c2e554246fe4a24287e7aeeb976848df2b9a2531f4b9171" + }, + { + "name": "decoded_event", + "type": "object", + "description": "The decoded data of the log", + "fields": [ + { + "name": "signature", + "type": "string", + "example": "Transfer(address,address,uint256)" + }, + { + "name": "label", + "type": "string", + "example": "Transfer" + }, + { + "name": "type", + "type": "string", + "example": "event" + }, + { + "name": "params", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "from" + }, + { + "name": "value", + "type": "string", + "example": "0x26C5011483Add49801eA8E3Ee354fE013895aCe5" + }, + { + "name": "type", + "type": "string", + "example": "address" + } + ] + } + } + ] + } + ] + }, + { + "name": "decoded_call", + "type": "object", + "description": "The decoded data of the transaction", + "fields": [ + { + "name": "signature", + "type": "string", + "example": "transfer(address,uint256)" + }, + { + "name": "label", + "type": "string", + "example": "transfer" + }, + { + "name": "type", + "type": "string", + "example": "function" + }, + { + "name": "params", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "_to" + }, + { + "name": "value", + "type": "string", + "example": "0x1CA455A55108874A95C84620dDA2566c54D17953" + }, + { + "name": "type", + "type": "string", + "example": "address" + } + ] + } + } + ] + }, + { + "name": "internal_transactions", + "type": "object", + "description": "The internal transactions of the transaction", + "fields": [ + { + "name": "transaction_hash", + "type": "string", + "description": "The hash of the transaction", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "block_number", + "type": "string", + "description": "The block number", + "example": 12526958 + }, + { + "name": "block_hash", + "type": "string", + "description": "The block hash", + "example": "0x0372c302e3c52e8f2e15d155e2c545e6d802e479236564af052759253b20fd86" + }, + { + "name": "type", + "type": "string", + "description": "Call type", + "example": "CALL" + }, + { + "name": "from", + "type": "string", + "description": "The sender", + "example": "0xd4a3BebD824189481FC45363602b83C9c7e9cbDf" + }, + { + "name": "to", + "type": "string", + "description": "The recipient", + "example": "0xa71db868318f0a0bae9411347cd4a6fa23d8d4ef" + }, + { + "name": "value", + "type": "string", + "description": "The value that was transfered (in wei)", + "example": "650000000000000000" + }, + { + "name": "gas", + "type": "string", + "description": "The gas of the transaction", + "example": "6721975" + }, + { + "name": "gas_used", + "type": "string", + "description": "The used gas", + "example": "6721975" + }, + { + "name": "input", + "type": "string", + "description": "The input", + "example": "0x" + }, + { + "name": "output", + "type": "string", + "description": "The output", + "example": "0x" + } + ] + } + ] + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.transaction.getWalletTransactionsVerbose({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.transaction.get_wallet_transactions_verbose(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n \n const response = Moralis.Auth.requestMessage({});\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" }, - { - "language": "python", - "code": "from moralis import auth\napi_key = \"YOUR_API_KEY\"\n\nbody = []\n\nresult = auth.challenge.request_challenge_solana(\n api_key=api_key,\n body=body,\n)\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "verifyChallengeSolana": { - "apiHost": "https://authapi.moralis.io", - "summary": "Verify Solana challenge", - "method": "POST", - "path": "/challenge/verify/solana", - "pathParams": [], - "queryParams": [], - "bodyParam": { - "required": true, - "description": "Verify Solana challenge message.", - "type": "object", - "fields": [ - { - "name": "message", - "type": "string", - "required": true, - "description": "Message that needs to be signed by the end user", - "example": "defi.finance wants you to sign in with your Solana account:\n26qv4GCcx98RihuK3c4T6ozB3J7L6VwCuFVc7Ta2A3Uo\n\nI am a third party API\n\nURI: http://defi.finance\nVersion: 1\nNetwork: mainnet\nNonce: PYxxb9msdjVXsMQ9x\nIssued At: 2022-08-25T11:02:34.097Z\nExpiration Time: 2022-08-25T11:12:38.243Z\nResources:\n- https://docs.moralis.io/" - }, - { - "name": "signature", - "type": "string", - "required": true, - "description": "Base58 signature that needs to be used to verify end user", - "example": "2pH9DqD5rve2qV4yBDshcAjWd2y8TqMx8BPb7f3KoNnuLEhE5JwjruYi4jaFaD4HN6wriLz2Vdr32kRBAJmHcyny" - } - ] - }, - "responses": [ - { - "status": "201", - "description": "The token to be used to call the third party API from the client", - "body": { - "type": "object", - "fields": [ - { - "name": "id", - "type": "string", - "description": "17-characters Alphanumeric string Secret Challenge ID used to identify this particular request. Is should be used at the backend of the calling service to identify the completed request.", - "example": "fRyt67D3eRss3RrX" - }, - { - "name": "domain", - "type": "string", - "description": "RFC 4501 dns authority that is requesting the signing.", - "example": "defi.finance" - }, - { - "name": "network", - "type": "string", - "description": "The network where Contract Accounts must be resolved.", - "example": "mainnet" - }, - { - "name": "address", - "type": "string", - "description": "Solana address with a length of 32 - 44 characters that is used to perform the signing", - "example": "26qv4GCcx98RihuK3c4T6ozB3J7L6VwCuFVc7Ta2A3Uo" - }, - { - "name": "statement", - "type": "string", - "description": "Human-readable ASCII assertion that the user will sign, and it must not contain `\n`.", - "example": "Please confirm" - }, - { - "name": "uri", - "type": "string", - "description": "RFC 3986 URI referring to the resource that is the subject of the signing (as in the __subject__ of a claim).", - "example": "https://defi.finance/" - }, - { - "name": "expirationTime", - "type": "string", - "description": "ISO 8601 datetime string that, if present, indicates when the signed authentication message is no longer valid.", - "example": "2020-01-01T00:00:00.000Z" - }, - { - "name": "notBefore", - "type": "string", - "description": "ISO 8601 datetime string that, if present, indicates when the signed authentication message will become valid.", - "example": "2020-01-01T00:00:00.000Z" - }, - { - "name": "resources", - "type": "array", - "description": "List of information or references to information the user wishes to have resolved as part of authentication by the relying party. They are expressed as RFC 3986 URIs separated by `\n- `.", - "example": ["https://docs.moralis.io/"], - "field": { "type": "string" } - }, - { - "name": "version", - "type": "string", - "description": "EIP-155 Chain ID to which the session is bound, and the network where Contract Accounts must be resolved.", - "example": "1.0" - }, - { - "name": "nonce", - "type": "string", - "example": "0x1234567890abcdef0123456789abcdef1234567890abcdef" - }, - { - "name": "profileId", - "type": "string", - "description": "Unique identifier with a length of 66 characters", - "example": "0xbfbcfab169c67072ff418133124480fea02175f1402aaa497daa4fd09026b0e1" - } + "getInternalTransactions": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get internal transactions by transaction hash", + "description": "Get the contents of a internal transaction by transaction hash.", + "method": "GET", + "path": "/transaction/:transaction_hash/internal-transactions", + "pathParams": [ + { + "name": "transaction_hash", + "description": "The transaction hash", + "required": true, + "example": "0xdc85cb1b75fd09c2f6d001fea4aba83764193cbd7881a1fa8ccde350a5681109", + "type": "string" + } + ], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", + "type": "string", + "enum": [ + "eth", + "0x1", + "sepolia", + "0xaa36a7", + "holesky", + "0x4268", + "polygon", + "0x89", + "amoy", + "0x13882", + "bsc", + "0x38", + "bsc testnet", + "0x61", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "gnosis", + "0x64", + "gnosis testnet", + "0x27d8", + "chiliz", + "0x15b38", + "chiliz testnet", + "0x15b32", + "base", + "0x2105", + "base sepolia", + "0x14a34", + "optimism", + "0xa", + "optimism sepolia", + "0xaa37dc", + "linea", + "0xe705", + "linea sepolia", + "0xe705" + ] + } + ], + "responses": [ + { + "status": "200", + "description": "Internal Transaction details by transaction hash" + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.transaction.getInternalTransactions({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.transaction.get_internal_transactions(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n \n const response = Moralis.Auth.verify({});\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" }, - { - "language": "python", - "code": "from moralis import auth\napi_key = \"YOUR_API_KEY\"\n\nbody = []\n\nresult = auth.challenge.verify_challenge_solana(\n api_key=api_key,\n body=body,\n)\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "requestChallengeAptos": { - "apiHost": "https://authapi.moralis.io", - "summary": "Request Aptos challenge", - "method": "POST", - "path": "/challenge/request/aptos", - "pathParams": [], - "queryParams": [], - "bodyParam": { - "required": true, - "description": "Request Aptos challenge message.", - "type": "object", - "fields": [ - { - "name": "domain", - "type": "string", - "required": true, - "description": "RFC 4501 dns authority that is requesting the signing.", - "example": "defi.finance" - }, - { - "name": "statement", - "type": "string", - "description": "Human-readable ASCII assertion that the user will sign, and it must not contain `\n`.", - "example": "Please confirm" - }, - { - "name": "uri", - "type": "string", - "required": true, - "description": "RFC 3986 URI referring to the resource that is the subject of the signing (as in the __subject__ of a claim).", - "example": "https://defi.finance/" - }, - { - "name": "expirationTime", - "type": "string", - "description": "ISO 8601 datetime string that, if present, indicates when the signed authentication message is no longer valid.", - "example": "2020-01-01T00:00:00.000Z" - }, - { - "name": "notBefore", - "type": "string", - "description": "ISO 8601 datetime string that, if present, indicates when the signed authentication message will become valid.", - "example": "2020-01-01T00:00:00.000Z" - }, - { - "name": "resources", - "type": "array", - "description": "List of information or references to information the user wishes to have resolved as part of authentication by the relying party. They are expressed as RFC 3986 URIs separated by new lines.", - "example": ["https://docs.moralis.io/"], - "field": { "type": "string" } - }, - { - "name": "timeout", - "type": "number", - "required": true, - "description": "Time in seconds before the challenge is expired", - "example": 15 - }, - { - "name": "chainId", - "type": "string", - "required": true, - "description": "Chain ID to which the session is bound, and the network where Contract Accounts must be resolved.", - "example": 1 - }, - { - "name": "address", - "type": "string", - "required": true, - "description": "Aptos address performing the signing conformant.", - "example": "0xfb2853744bb8afd58d9386d1856afd8e08de135019961dfa3a10d8c9bf83b99d" - }, - { - "name": "publicKey", - "type": "string", - "required": true, - "description": "Aptos public key performing the signing conformant.", - "example": "0xfb2853744bb8afd58d9386d1856afd8e08de135019961dfa3a10d8c9bf83b99d" - } - ] - }, - "responses": [ - { - "status": "201", - "description": "The back channel challenge containing the id to store on the api and the message to be signed by the user", - "body": { - "type": "object", - "fields": [ - { - "name": "id", - "type": "string", - "description": "17-characters Alphanumeric string Secret Challenge ID used to identify this particular request. Is should be used at the backend of the calling service to identify the completed request.", - "example": "fRyt67D3eRss3RrXa" - }, - { - "name": "profileId", - "type": "string", - "description": "Unique identifier with a length of 66 characters", - "example": "0xbfbcfab169c67072ff418133124480fea02175f1402aaa497daa4fd09026b0e1" - }, - { - "name": "message", - "type": "string", - "description": "Message that needs to be signed by the end user", - "example": "defi.finance wants you to sign in with your Aptos account:\n0xfb2853744bb8afd58d9386d1856afd8e08de135019961dfa3a10d8c9bf83b99d\n\nPlease confirm\n\nURI: https://defi.finance/\nVersion: 1\nChain ID: 1\nNonce: DbU1DCTmdzR4lg3wi\nIssued At: 2022-06-12T12:15:31.290Z\nExpiration Time: 2020-01-01T00:00:00.000Z\nNot Before: 2020-01-01T00:00:00.000Z\nResources:\n- https://docs.moralis.io/" - } - ] - } - } - ] - }, - "verifyChallengeAptos": { - "apiHost": "https://authapi.moralis.io", - "summary": "Verify Aptos challenge", - "method": "POST", - "path": "/challenge/verify/aptos", - "pathParams": [], - "queryParams": [], - "bodyParam": { - "required": true, - "description": "Verify Aptos challenge message.", - "type": "object", - "fields": [ - { - "name": "message", - "type": "string", - "required": true, - "description": "Message that needs to be signed by the end user.", - "example": "defi.finance wants you to sign in with your Aptos account:\n0xfb2853744bb8afd58d9386d1856afd8e08de135019961dfa3a10d8c9bf83b99d\n\n\nURI: https://defi.finance\nVersion: 1\nChain ID: 1\nNonce: Px7Nh1RPzlCLwqgOb\nIssued At: 2022-11-30T10:20:00.262Z" - }, - { - "name": "signature", - "type": "string", - "required": true, - "description": "EIP-191 compliant signature signed by the Aptos account address requesting authentication.", - "example": "0xa8f89a58bf9b433d3100f9e41ee35b5e31fb8c7cd62547acb113162ec6f2e4140207e2dfbd4e387e1801ebc7f08a9dd105ac1d22b2e2ff0df5fa8b6d9bdcfe491c" - } - ] - }, - "responses": [ - { - "status": "201", - "description": "The token to be used to call the third party API from the client", - "body": { - "type": "object", - "fields": [ - { - "name": "id", - "type": "string", - "description": "17-characters Alphanumeric string Secret Challenge ID used to identify this particular request. Is should be used at the backend of the calling service to identify the completed request.", - "example": "fRyt67D3eRss3RrX" - }, - { - "name": "domain", - "type": "string", - "description": "RFC 4501 dns authority that is requesting the signing.", - "example": "defi.finance" - }, - { - "name": "statement", - "type": "string", - "description": "Human-readable ASCII assertion that the user will sign, and it must not contain `\n`.", - "example": "Please confirm" - }, - { - "name": "uri", - "type": "string", - "description": "RFC 3986 URI referring to the resource that is the subject of the signing (as in the __subject__ of a claim).", - "example": "https://defi.finance/" - }, - { - "name": "expirationTime", - "type": "string", - "description": "ISO 8601 datetime string that, if present, indicates when the signed authentication message is no longer valid.", - "example": "2020-01-01T00:00:00.000Z" - }, - { - "name": "notBefore", - "type": "string", - "description": "ISO 8601 datetime string that, if present, indicates when the signed authentication message will become valid.", - "example": "2020-01-01T00:00:00.000Z" - }, - { - "name": "resources", - "type": "array", - "description": "List of information or references to information the user wishes to have resolved as part of authentication by the relying party. They are expressed as RFC 3986 URIs separated by `\n- `.", - "example": ["https://docs.moralis.io/"], - "field": { "type": "string" } - }, - { - "name": "version", - "type": "string", - "description": "EIP-155 Chain ID to which the session is bound, and the network where Contract Accounts must be resolved.", - "example": "1.0" - }, - { - "name": "nonce", - "type": "string", - "example": "0x1234567890abcdef0123456789abcdef1234567890abcdef" - }, - { - "name": "profileId", - "type": "string", - "description": "Unique identifier with a length of 66 characters", - "example": "0xbfbcfab169c67072ff418133124480fea02175f1402aaa497daa4fd09026b0e1" - }, - { - "name": "chainId", - "type": "string", - "description": "Chain ID to which the session is bound, and the network where Contract Accounts must be resolved.", - "example": 1 - }, - { - "name": "address", - "type": "string", - "description": "Aptos address performing the signing conformant.", - "example": "0xfb2853744bb8afd58d9386d1856afd8e08de135019961dfa3a10d8c9bf83b99d" - }, - { - "name": "publicKey", - "type": "string", - "description": "Aptos public key performing the signing conformant.", - "example": "0xfb2853744bb8afd58d9386d1856afd8e08de135019961dfa3a10d8c9bf83b99d" - } - ] - } - } - ] - }, - "getAddresses": { - "apiHost": "https://authapi.moralis.io", - "summary": "Get addresses that are bound to the specific profileId", - "method": "GET", - "path": "/profile/:profileId/addresses", - "pathParams": [ - { - "name": "profileId", - "description": "Unique identifier with a length of 66 characters", - "required": true, - "type": "string" - } - ], - "queryParams": [], - "responses": [ - { - "status": "201", - "description": "The addresses that are bound to the speicifc profileId" - } - ] - }, - "requestBind": { - "apiHost": "https://authapi.moralis.io", - "summary": "Request bind between profile of two addresses", - "description": "Request for message to bind profile that is belong to the two addresses
\n All profiles under the addresses will be bound and new profile will be generated.", - "method": "POST", - "path": "/bind/request", - "pathParams": [], - "queryParams": [], - "bodyParam": { - "required": true, - "description": "The two addresses that are required to be bind.", - "type": "object", - "fields": [ - { - "name": "addresses", - "type": "object", - "required": true, - "description": "An array of addresses that needs to be bind", - "fields": [ - { - "name": "blockchainType", - "type": "string", - "required": true, - "description": "The chain in which the address belongs to", - "example": "evm" - }, - { - "name": "address", - "type": "string", - "required": true, - "description": "Address performing the signing conformant to capitalization encoded checksum specified in EIP-55 where applicable.", - "example": "0x57af6B90c2237d2F888bf4CAe56f25FE1b14e531" - }, - { - "name": "publicKey", - "type": "string", - "description": "Public key performing the signing conformant. (This is only needed for Aptos address)", - "example": "0xfb2853744bb8afd58d9386d1856afd8e08de135019961dfa3a10d8c9bf83b99d" - } - ] - } - ] - }, - "responses": [ - { - "status": "201", - "description": "The messages that is required to be signed by each of the address", - "body": { - "type": "object", - "fields": [ - { - "name": "messages", - "type": "array", - "description": "Message that needs to be signed by the end user", - "example": [ - "Please sign this message to bind:\nProfile Ids:\n- 0x0b2bbac1251651c0cbbdbbb29fed5a03adc8b05a2a9eb10a02aaa489b9c1f8ff\n\nwith\n\nAddress: 0x6ed338bcB610640e81465FCfb9894DDfA354Cc91\nNonce: 5pXWu7aGkY2J7II0X", - "Please sign this message to bind:\nProfile Ids:\n- 0x0b2bbac1251651c0cbbdbbb29fed5a03adc8b05a2a9eb10a02aaa489b9c1f8ff\n\nwith\n\nAddress: 0x6ed338bcB610640e81465FCfb9894DDfA354Cc91\nNonce: 5pXWu7aGkY2J7II0X" - ], - "field": { "type": "string" } - } - ] - } - } - ] - }, - "verifyRequestBind": { - "apiHost": "https://authapi.moralis.io", - "summary": "Verify bind request", - "method": "POST", - "path": "/bind/request/verify", - "pathParams": [], - "queryParams": [], - "bodyParam": { - "required": true, - "description": "Messages and its signatures that is used for verification", - "type": "object", - "fields": [ - { - "name": "verifications", - "type": "object", - "required": true, - "description": "Message that needs to be signed by the end user", - "fields": [ - { - "name": "message", - "type": "string", - "required": true, - "description": "Message that needs to be signed by the end user", - "example": "Please sign this message to bind:\nProfile Ids:\n- 0x0b2bbac1251651c0cbbdbbb29fed5a03adc8b05a2a9eb10a02aaa489b9c1f8ff\n\nwith\n\nAddress: 0x6ed338bcB610640e81465FCfb9894DDfA354Cc91\nNonce: 5pXWu7aGkY2J7II0X" - }, - { - "name": "signature", - "type": "string", - "required": true, - "description": "EIP-191 compliant signature signed by the Ethereum account address requesting authentication.", - "example": "0xc4f2f59d80e036ecab4eaaac5d4ee713ab94264ca584839c98b5743c4f6777322038225a4bc1e0f13b8382166816737369f26bd66f0479cfa80d4c52c02eb2cb1b" - } - ] - } - ] - }, - "responses": [ - { - "status": "201", - "description": "The profileId that all the addresses have been bind into.", - "body": { - "type": "object", - "fields": [ - { - "name": "profileId", - "type": "string", - "description": "Unique identifier with a length of 66 characters", - "example": "0xbfbcfab169c67072ff418133124480fea02175f1402aaa497daa4fd09026b0e1" - } - ] - } - } - ] - }, - "removeBind": { - "apiHost": "https://authapi.moralis.io", - "summary": "Request to remove bind of an address from a profile", - "method": "POST", - "path": "/bind/remove", - "pathParams": [], - "queryParams": [], - "bodyParam": { - "required": true, - "description": "The address that is required to be removed from the bind of the profileId.", - "type": "object", - "fields": [ - { - "name": "blockchainType", - "type": "string", - "required": true, - "description": "The chain in which the address belongs to", - "example": "evm" - }, - { - "name": "address", - "type": "string", - "required": true, - "description": "Address performing the signing conformant to capitalization encoded checksum specified in EIP-55 where applicable.", - "example": "0x57af6B90c2237d2F888bf4CAe56f25FE1b14e531" - }, - { - "name": "publicKey", - "type": "string", - "description": "Public key performing the signing conformant. (This is only needed for Aptos address)", - "example": "0xfb2853744bb8afd58d9386d1856afd8e08de135019961dfa3a10d8c9bf83b99d" - }, - { - "name": "profileId", - "type": "string", - "required": true, - "description": "Unique identifier with a length of 66 characters", - "example": "0xbfbcfab169c67072ff418133124480fea02175f1402aaa497daa4fd09026b0e1" - } - ] - }, - "responses": [ - { - "status": "201", - "description": "The messages that is required to be signed by each of the address", - "body": { - "type": "object", - "fields": [ - { - "name": "message", - "type": "string", - "description": "Message that needs to be signed by the end user", - "example": "Please sign this message to unbind:\nAddress: 0x6ed338bcB610640e81465FCfb9894DDfA354Cc91\nfrom\nProfile Id:\n- 0x0b2bbac1251651c0cbbdbbb29fed5a03adc8b05a2a9eb10a02aaa489b9c1f8ff\nNonce: 5pXWu7aGkY2J7II0X" - } - ] - } - } - ] - }, - "verifyRemoveBind": { - "apiHost": "https://authapi.moralis.io", - "summary": "Verify remove bind request", - "method": "POST", - "path": "/bind/remove/verify", - "pathParams": [], - "queryParams": [], - "bodyParam": { - "required": true, - "description": "Messages and its signatures that is used for verification", - "type": "object", - "fields": [ - { - "name": "message", - "type": "string", - "required": true, - "description": "Message that needs to be signed by the end user", - "example": "Please sign this message to unbind:\nAddress: 0x6ed338bcB610640e81465FCfb9894DDfA354Cc91\nfrom\nProfile Id:\n- 0x0b2bbac1251651c0cbbdbbb29fed5a03adc8b05a2a9eb10a02aaa489b9c1f8ff\nNonce: 5pXWu7aGkY2J7II0X" - }, - { - "name": "signature", - "type": "string", - "required": true, - "description": "EIP-191 compliant signature signed by the Ethereum account address requesting authentication.", - "example": "0xc4f2f59d80e036ecab4eaaac5d4ee713ab94264ca584839c98b5743c4f6777322038225a4bc1e0f13b8382166816737369f26bd66f0479cfa80d4c52c02eb2cb1b" - } - ] - }, - "responses": [ - { - "status": "201", - "description": "The new profileId that is being generated for this address.", - "body": { - "type": "object", - "fields": [ - { - "name": "profileId", - "type": "string", - "description": "Unique identifier with a length of 66 characters", - "example": "0xbfbcfab169c67072ff418133124480fea02175f1402aaa497daa4fd09026b0e1" - } - ] - } - } - ] - } - }, - "streams": { - "GetHistory": { - "apiHost": "https://api.moralis-streams.com", - "summary": "Get history", - "description": "Get all history", - "method": "GET", - "path": "/history", - "pathParams": [], - "queryParams": [ - { "name": "limit", "required": true, "type": "number" }, - { "name": "cursor", "required": false, "type": "string" }, - { "name": "excludePayload", "required": false, "type": "boolean" } - ], - "responses": [ - { - "status": "200", - "description": "Ok", - "body": { - "type": "object", - "fields": [ - { - "name": "result", - "type": "object", - "fields": [ - { - "name": "id", + "getTransaction": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get transaction by hash", + "description": "Get the contents of a transaction by the given transaction hash.", + "method": "GET", + "path": "/transaction/:transaction_hash", + "pathParams": [ + { + "name": "transaction_hash", + "description": "The transaction hash", + "required": true, + "example": "0xdc85cb1b75fd09c2f6d001fea4aba83764193cbd7881a1fa8ccde350a5681109", + "type": "string" + } + ], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", "type": "string", - "description": "Stringified UUIDv4.\nSee [RFC 4112](https://tools.ietf.org/html/rfc4122)", - "format": "uuid", - "pattern": "[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}" - }, - { "name": "date", "type": "string" }, - { - "name": "payload", - "type": "object", - "fields": [ - { - "name": "block", + "enum": [ + "eth", + "0x1", + "sepolia", + "0xaa36a7", + "holesky", + "0x4268", + "polygon", + "0x89", + "amoy", + "0x13882", + "bsc", + "0x38", + "bsc testnet", + "0x61", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "gnosis", + "0x64", + "gnosis testnet", + "0x27d8", + "chiliz", + "0x15b38", + "chiliz testnet", + "0x15b32", + "base", + "0x2105", + "base sepolia", + "0x14a34", + "optimism", + "0xa", + "optimism sepolia", + "0xaa37dc", + "linea", + "0xe705", + "linea sepolia", + "0xe705" + ] + }, + { + "name": "include", + "description": "If the result should contain the internal transactions.", + "required": false, + "type": "string", + "enum": ["internal_transactions"] + } + ], + "responses": [ + { + "status": "200", + "description": "Transaction details by transaction hash", + "body": { "type": "object", - "required": true, "fields": [ - { - "name": "number", - "type": "string", - "required": true - }, - { - "name": "hash", - "type": "string", - "required": true - }, - { - "name": "timestamp", - "type": "string", - "required": true - } - ] - }, - { "name": "chainId", "type": "string", "required": true }, - { - "name": "logs", - "required": true, - "field": { - "type": "object", - "fields": [ { - "name": "triggers", - "field": { - "type": "object", - "fields": [ - { - "name": "value", - "type": "string", - "required": true - }, - { - "name": "name", - "type": "string", - "required": true - } - ] - }, - "type": "array" + "name": "hash", + "type": "string", + "description": "The hash of the transaction", + "example": "0x1ed85b3757a6d31d01a4d6677fc52fd3911d649a0af21fe5ca3f886b153773ed" + }, + { + "name": "nonce", + "type": "string", + "description": "The nonce", + "example": "1848059" + }, + { + "name": "transaction_index", + "type": "string", + "example": "108" + }, + { + "name": "from_address", + "type": "string", + "description": "The from address", + "example": "0x267be1c1d684f78cb4f6a176c4911b741e4ffdc0" }, { - "name": "logIndex", - "type": "string", - "required": true + "name": "to_address", + "type": "string", + "description": "The to address", + "example": "0x003dde3494f30d861d063232c6a8c04394b686ff" }, { - "name": "transactionHash", - "type": "string", - "required": true + "name": "from_address_label", + "type": "string", + "description": "The label of the from address", + "example": "Binance 1" }, { - "name": "address", - "type": "string", - "required": true + "name": "to_address_label", + "type": "string", + "description": "The label of the to address", + "example": "Binance 2" }, { - "name": "data", - "type": "string", - "required": true + "name": "value", + "type": "string", + "description": "The value sent", + "example": "115580000000000000" }, { - "name": "topic0", - "type": "string", - "nullable": true, - "required": true + "name": "gas", + "type": "string", + "example": "30000" }, { - "name": "topic1", - "type": "string", - "nullable": true, - "required": true + "name": "gas_price", + "type": "string", + "description": "The gas price", + "example": "52500000000" }, { - "name": "topic2", - "type": "string", - "nullable": true, - "required": true + "name": "input", + "type": "string", + "example": "0x" }, { - "name": "topic3", - "type": "string", - "nullable": true, - "required": true - } - ] - }, - "type": "array" - }, - { - "name": "txs", - "required": true, - "field": { - "type": "object", - "fields": [ + "name": "receipt_cumulative_gas_used", + "type": "string", + "example": "4923073" + }, + { + "name": "receipt_gas_used", + "type": "string", + "example": "21000" + }, + { + "name": "receipt_contract_address", + "type": "string", + "example": null + }, + { + "name": "receipt_root", + "type": "string", + "example": null + }, + { + "name": "receipt_status", + "type": "string", + "example": "1" + }, + { + "name": "block_timestamp", + "type": "string", + "description": "The block timestamp", + "example": "2021-05-07T11:08:35.000Z" + }, + { + "name": "block_number", + "type": "string", + "description": "The block number", + "example": "12386788" + }, { - "name": "triggers", - "field": { + "name": "block_hash", + "type": "string", + "description": "The hash of the block", + "example": "0x9b559aef7ea858608c2e554246fe4a24287e7aeeb976848df2b9a2531f4b9171" + }, + { + "name": "logs", "type": "object", + "description": "The logs of the transaction", "fields": [ - { - "name": "value", - "type": "string", - "required": true - }, - { - "name": "name", - "type": "string", - "required": true - } + { + "name": "log_index", + "type": "string", + "example": "273" + }, + { + "name": "transaction_hash", + "type": "string", + "description": "The hash of the transaction", + "example": "0xdd9006489e46670e0e85d1fb88823099e7f596b08aeaac023e9da0851f26fdd5" + }, + { + "name": "transaction_index", + "type": "string", + "example": "204" + }, + { + "name": "address", + "type": "string", + "description": "The address of the contract", + "example": "0x3105d328c66d8d55092358cf595d54608178e9b5" + }, + { + "name": "data", + "type": "string", + "description": "The data of the log", + "example": "0x00000000000000000000000000000000000000000000000de05239bccd4d537400000000000000000000000000024dbc80a9f80e3d5fc0a0ee30e2693781a443" + }, + { + "name": "topic0", + "type": "string", + "example": "0x2caecd17d02f56fa897705dcc740da2d237c373f70686f4e0d9bd3bf0400ea7a" + }, + { + "name": "topic1", + "type": "string", + "example": "0x000000000000000000000000031002d15b0d0cd7c9129d6f644446368deae391" + }, + { + "name": "topic2", + "type": "string", + "example": "0x000000000000000000000000d25943be09f968ba740e0782a34e710100defae9" + }, + { + "name": "topic3", + "type": "string", + "example": null + }, + { + "name": "block_timestamp", + "type": "string", + "description": "The timestamp of the block", + "example": "2021-05-07T11:08:35.000Z" + }, + { + "name": "block_number", + "type": "string", + "description": "The block number", + "example": "12386788" + }, + { + "name": "block_hash", + "type": "string", + "description": "The hash of the block", + "example": "0x9b559aef7ea858608c2e554246fe4a24287e7aeeb976848df2b9a2531f4b9171" + } ] - }, - "type": "array" }, { - "name": "hash", - "type": "string", - "required": true + "name": "internal_transactions", + "type": "object", + "description": "The internal transactions of the transaction", + "fields": [ + { + "name": "transaction_hash", + "type": "string", + "description": "The hash of the transaction", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "block_number", + "type": "string", + "description": "The block number", + "example": 12526958 + }, + { + "name": "block_hash", + "type": "string", + "description": "The block hash", + "example": "0x0372c302e3c52e8f2e15d155e2c545e6d802e479236564af052759253b20fd86" + }, + { + "name": "type", + "type": "string", + "description": "Call type", + "example": "CALL" + }, + { + "name": "from", + "type": "string", + "description": "The sender", + "example": "0xd4a3BebD824189481FC45363602b83C9c7e9cbDf" + }, + { + "name": "to", + "type": "string", + "description": "The recipient", + "example": "0xa71db868318f0a0bae9411347cd4a6fa23d8d4ef" + }, + { + "name": "value", + "type": "string", + "description": "The value that was transfered (in wei)", + "example": "650000000000000000" + }, + { + "name": "gas", + "type": "string", + "description": "The gas of the transaction", + "example": "6721975" + }, + { + "name": "gas_used", + "type": "string", + "description": "The used gas", + "example": "6721975" + }, + { + "name": "input", + "type": "string", + "description": "The input", + "example": "0x" + }, + { + "name": "output", + "type": "string", + "description": "The output", + "example": "0x" + } + ] + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.transaction.getTransaction({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.transaction.get_transaction(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getTransactionVerbose": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get decoded transaction by hash", + "description": "Get the contents of a transaction by the given transaction hash.", + "method": "GET", + "path": "/transaction/:transaction_hash/verbose", + "pathParams": [ + { + "name": "transaction_hash", + "description": "The transaction hash", + "required": true, + "example": "0x012b9b98e21664117ec0b499d726a39f492ac8bd402cca8bebcbd163b9f75760", + "type": "string" + } + ], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", + "type": "string", + "enum": [ + "eth", + "0x1", + "sepolia", + "0xaa36a7", + "holesky", + "0x4268", + "polygon", + "0x89", + "amoy", + "0x13882", + "bsc", + "0x38", + "bsc testnet", + "0x61", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "gnosis", + "0x64", + "gnosis testnet", + "0x27d8", + "chiliz", + "0x15b38", + "chiliz testnet", + "0x15b32", + "base", + "0x2105", + "base sepolia", + "0x14a34", + "optimism", + "0xa", + "optimism sepolia", + "0xaa37dc", + "linea", + "0xe705", + "linea sepolia", + "0xe705" + ] + }, + { + "name": "include", + "description": "If the result should contain the internal transactions.", + "required": false, + "type": "string", + "enum": ["internal_transactions"] + } + ], + "responses": [ + { + "status": "200", + "description": "Transaction details by transaction hash", + "body": { + "type": "object", + "fields": [ + { + "name": "hash", + "type": "string", + "description": "The hash of the transaction", + "example": "0x1ed85b3757a6d31d01a4d6677fc52fd3911d649a0af21fe5ca3f886b153773ed" }, { - "name": "gas", - "type": "string", - "nullable": true, - "required": true + "name": "nonce", + "type": "string", + "description": "The nonce", + "example": "1848059" }, { - "name": "gasPrice", - "type": "string", - "nullable": true, - "required": true + "name": "transaction_index", + "type": "string", + "example": "108" }, { - "name": "nonce", - "type": "string", - "nullable": true, - "required": true + "name": "from_address", + "type": "string", + "description": "The from address", + "example": "0x267be1c1d684f78cb4f6a176c4911b741e4ffdc0" }, { - "name": "input", - "type": "string", - "nullable": true, - "required": true + "name": "to_address", + "type": "string", + "description": "The to address", + "example": "0x003dde3494f30d861d063232c6a8c04394b686ff" }, { - "name": "transactionIndex", - "type": "string", - "required": true + "name": "from_address_label", + "type": "string", + "description": "The label of the from address", + "example": "Binance 1" }, { - "name": "fromAddress", - "type": "string", - "required": true + "name": "to_address_label", + "type": "string", + "description": "The label of the to address", + "example": "Binance 2" }, { - "name": "toAddress", - "type": "string", - "nullable": true, - "required": true + "name": "value", + "type": "string", + "description": "The value sent", + "example": "115580000000000000" }, { - "name": "value", - "type": "string", - "nullable": true, - "required": true + "name": "gas", + "type": "string", + "example": "30000" }, { - "name": "type", - "type": "string", - "nullable": true, - "required": true + "name": "gas_price", + "type": "string", + "description": "The gas price", + "example": "52500000000" }, { - "name": "v", - "type": "string", - "nullable": true, - "required": true + "name": "input", + "type": "string", + "example": "0x" }, { - "name": "r", - "type": "string", - "nullable": true, - "required": true + "name": "receipt_cumulative_gas_used", + "type": "string", + "example": "4923073" }, { - "name": "s", - "type": "string", - "nullable": true, - "required": true + "name": "receipt_gas_used", + "type": "string", + "example": "21000" }, { - "name": "receiptCumulativeGasUsed", - "type": "string", - "nullable": true, - "required": true + "name": "receipt_contract_address", + "type": "string", + "example": null }, { - "name": "receiptGasUsed", - "type": "string", - "nullable": true, - "required": true + "name": "receipt_root", + "type": "string", + "example": null }, { - "name": "receiptContractAddress", - "type": "string", - "nullable": true, - "required": true + "name": "receipt_status", + "type": "string", + "example": "1" }, { - "name": "receiptRoot", - "type": "string", - "nullable": true, - "required": true + "name": "block_timestamp", + "type": "string", + "description": "The block timestamp", + "example": "2021-05-07T11:08:35.000Z" }, { - "name": "receiptStatus", - "type": "string", - "nullable": true, - "required": true - } - ] - }, - "type": "array" - }, - { - "name": "txsInternal", - "required": true, - "field": { - "type": "object", - "fields": [ - { - "name": "from", - "type": "string", - "nullable": true, - "required": true + "name": "block_number", + "type": "string", + "description": "The block number", + "example": "12386788" }, { - "name": "to", - "type": "string", - "nullable": true, - "required": true + "name": "block_hash", + "type": "string", + "description": "The hash of the block", + "example": "0x9b559aef7ea858608c2e554246fe4a24287e7aeeb976848df2b9a2531f4b9171" }, { - "name": "value", - "type": "string", - "nullable": true, - "required": true + "name": "logs", + "type": "object", + "description": "The logs of the transaction", + "fields": [ + { + "name": "log_index", + "type": "string", + "example": "273" + }, + { + "name": "transaction_hash", + "type": "string", + "description": "The hash of the transaction", + "example": "0xdd9006489e46670e0e85d1fb88823099e7f596b08aeaac023e9da0851f26fdd5" + }, + { + "name": "transaction_index", + "type": "string", + "example": "204" + }, + { + "name": "address", + "type": "string", + "description": "The address of the contract", + "example": "0x3105d328c66d8d55092358cf595d54608178e9b5" + }, + { + "name": "data", + "type": "string", + "description": "The data of the log", + "example": "0x00000000000000000000000000000000000000000000000de05239bccd4d537400000000000000000000000000024dbc80a9f80e3d5fc0a0ee30e2693781a443" + }, + { + "name": "topic0", + "type": "string", + "example": "0x2caecd17d02f56fa897705dcc740da2d237c373f70686f4e0d9bd3bf0400ea7a" + }, + { + "name": "topic1", + "type": "string", + "example": "0x000000000000000000000000031002d15b0d0cd7c9129d6f644446368deae391" + }, + { + "name": "topic2", + "type": "string", + "example": "0x000000000000000000000000d25943be09f968ba740e0782a34e710100defae9" + }, + { + "name": "topic3", + "type": "string", + "example": null + }, + { + "name": "block_timestamp", + "type": "string", + "description": "The timestamp of the block", + "example": "2021-05-07T11:08:35.000Z" + }, + { + "name": "block_number", + "type": "string", + "description": "The block number", + "example": "12386788" + }, + { + "name": "block_hash", + "type": "string", + "description": "The hash of the block", + "example": "0x9b559aef7ea858608c2e554246fe4a24287e7aeeb976848df2b9a2531f4b9171" + }, + { + "name": "decoded_event", + "type": "object", + "fields": [ + { + "name": "signature", + "type": "string", + "example": "Transfer(address,address,uint256)" + }, + { + "name": "label", + "type": "string", + "example": "Transfer" + }, + { + "name": "type", + "type": "string", + "example": "event" + }, + { + "name": "params", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "from" + }, + { + "name": "value", + "type": "string", + "example": "0x26C5011483Add49801eA8E3Ee354fE013895aCe5" + }, + { + "name": "type", + "type": "string", + "example": "address" + } + ] + } + } + ] + } + ] }, { - "name": "transactionHash", - "type": "string", - "required": true + "name": "decoded_call", + "type": "object", + "fields": [ + { + "name": "signature", + "type": "string", + "example": "transfer(address,uint256)" + }, + { + "name": "label", + "type": "string", + "example": "transfer" + }, + { + "name": "type", + "type": "string", + "example": "function" + }, + { + "name": "params", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "_to" + }, + { + "name": "value", + "type": "string", + "example": "0x1CA455A55108874A95C84620dDA2566c54D17953" + }, + { + "name": "type", + "type": "string", + "example": "address" + } + ] + } + } + ] }, { - "name": "gas", - "type": "string", - "nullable": true, - "required": true - } - ] - }, - "type": "array" - }, - { - "name": "abi", - "field": { "type": "json" }, - "type": "array", - "required": true - }, - { - "name": "retries", - "type": "number", - "format": "double", - "required": true - }, - { - "name": "confirmed", - "type": "boolean", - "required": true - }, - { "name": "tag", "type": "string", "required": true }, - { "name": "streamId", "type": "string", "required": true } - ], - "additionalProperties": false - }, - { - "name": "tinyPayload", - "type": "object", - "fields": [ - { "name": "chainId", "type": "string", "required": true }, - { - "name": "confirmed", - "type": "boolean", - "required": true - }, - { "name": "block", "type": "string", "required": true }, - { - "name": "records", - "type": "number", - "format": "double", - "required": true - }, - { - "name": "retries", - "type": "number", - "format": "double", - "required": true - } - ], - "additionalProperties": false - }, - { "name": "errorMessage", "type": "string" }, - { "name": "webhookUrl", "type": "string" }, - { "name": "streamId", "type": "string" }, - { "name": "tag", "type": "string" } - ] - }, - { "name": "cursor", "type": "string" }, - { "name": "total", "type": "number" } - ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = Moralis.Streams.getHistory({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import streams\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = streams.history.get_history(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "SetSettings": { - "apiHost": "https://api.moralis-streams.com", - "summary": "Set project settings", - "description": "Set the settings for the current project based on the project api-key.", - "method": "POST", - "path": "/settings", - "pathParams": [], - "queryParams": [], - "bodyParam": { - "required": true, - "type": "object", - "fields": [ - { - "name": "region", - "type": "string", - "required": true, - "description": "The region from where all the webhooks will be posted for this project", - "enum": ["us-east-1", "us-west-2", "eu-central-1", "ap-southeast-1"] - } - ] - }, - "responses": [ - { - "status": "200", - "description": "Ok", - "body": { - "type": "object", - "fields": [ - { - "name": "region", - "type": "string", - "description": "The region from where all the webhooks will be posted for this project", - "enum": [ - "us-east-1", - "us-west-2", - "eu-central-1", - "ap-southeast-1" - ] - } - ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = Moralis.Streams.setSettings({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import streams\n\napi_key = \"YOUR_API_KEY\"\n\nbody = []\n\nresult = streams.project.set_settings(\n api_key=api_key,\n body=body,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "GetSettings": { - "apiHost": "https://api.moralis-streams.com", - "summary": "Get project settings", - "description": "Get the settings for the current project based on the project api-key.", - "method": "GET", - "path": "/settings", - "pathParams": [], - "queryParams": [], - "responses": [ - { - "status": "200", - "description": "Ok", - "body": { - "type": "object", - "fields": [ - { - "name": "region", - "type": "string", - "description": "The region from where all the webhooks will be posted for this project", - "enum": [ - "us-east-1", - "us-west-2", - "eu-central-1", - "ap-southeast-1" - ] - } - ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = Moralis.Streams.readSettings({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import streams\n\napi_key = \"YOUR_API_KEY\"\n\nresult = streams.project.get_settings(\n api_key=api_key,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "GetStats": { - "apiHost": "https://api.moralis-streams.com", - "summary": "Get project stats", - "description": "Get the global stats for the account.", - "method": "GET", - "path": "/stats", - "pathParams": [], - "queryParams": [], - "responses": [ - { - "status": "200", - "description": "Ok", - "body": { - "type": "object", - "fields": [ - { - "name": "totalWebhooksDelivered", - "type": "number", - "description": "The total amount of webhooks delivered across all streams" - }, - { - "name": "totalWebhooksFailed", - "type": "number", - "description": "The total amount of failed webhooks across all streams" - }, - { - "name": "totalLogsProcessed", - "type": "number", - "description": "The total amount of logs processed across all streams, this includes failed webhooks" - }, - { - "name": "totalTxsProcessed", - "type": "number", - "description": "The total amount of txs processed across all streams, this includes failed webhooks" - }, - { - "name": "totalTxsInternalProcessed", - "type": "number", - "description": "The total amount of internal txs processed across all streams, this includes failed webhooks" - }, - { - "name": "streams", - "type": "object", - "description": "Array of stream stats", - "fields": [ - { - "name": "totalWebhooksDelivered", - "type": "number", - "description": "The total amount of webhooks delivered across all streams" - }, - { - "name": "totalWebhooksFailed", - "type": "number", - "description": "The total amount of failed webhooks across all streams" - }, - { - "name": "totalLogsProcessed", - "type": "number", - "description": "The total amount of logs processed across all streams, this includes failed webhooks" - }, - { - "name": "totalTxsProcessed", - "type": "number", - "description": "The total amount of txs processed across all streams, this includes failed webhooks" - }, - { - "name": "totalTxsInternalProcessed", - "type": "number", - "description": "The total amount of internal txs processed across all streams, this includes failed webhooks" - }, - { - "name": "streamId", - "type": "string", - "description": "The stream id" - } - ] - }, - { - "name": "createdAt", - "type": "string", - "description": "The date since this stats are being counted" - }, - { - "name": "updatedAt", - "type": "string", - "description": "The date since this stats were last updated" - } - ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = Moralis.Streams.getStats({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import streams\n\napi_key = \"YOUR_API_KEY\"\n\nresult = streams.stats.get_stats(\n api_key=api_key,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "GetStatsByStreamId": { - "apiHost": "https://api.moralis-streams.com", - "summary": "Get project stats by Stream ID", - "description": "Get the stats for the streamId specified", - "method": "GET", - "path": "/stats/:streamId", - "pathParams": [ - { - "name": "streamId", - "description": "The id of the stream to get the stats", - "required": true, - "type": "string" - } - ], - "queryParams": [], - "responses": [ - { - "status": "200", - "description": "Ok", - "body": { - "type": "object", - "fields": [ - { - "name": "totalWebhooksDelivered", - "type": "number", - "description": "The total amount of webhooks delivered across all streams" - }, - { - "name": "totalWebhooksFailed", - "type": "number", - "description": "The total amount of failed webhooks across all streams" - }, - { - "name": "totalLogsProcessed", - "type": "number", - "description": "The total amount of logs processed across all streams, this includes failed webhooks" - }, - { - "name": "totalTxsProcessed", - "type": "number", - "description": "The total amount of txs processed across all streams, this includes failed webhooks" - }, - { - "name": "totalTxsInternalProcessed", - "type": "number", - "description": "The total amount of internal txs processed across all streams, this includes failed webhooks" - }, - { - "name": "streams", - "type": "object", - "description": "Array of stream stats", - "fields": [ - { - "name": "totalWebhooksDelivered", - "type": "number", - "description": "The total amount of webhooks delivered across all streams" - }, - { - "name": "totalWebhooksFailed", - "type": "number", - "description": "The total amount of failed webhooks across all streams" - }, - { - "name": "totalLogsProcessed", - "type": "number", - "description": "The total amount of logs processed across all streams, this includes failed webhooks" - }, - { - "name": "totalTxsProcessed", - "type": "number", - "description": "The total amount of txs processed across all streams, this includes failed webhooks" - }, - { - "name": "totalTxsInternalProcessed", - "type": "number", - "description": "The total amount of internal txs processed across all streams, this includes failed webhooks" - }, - { - "name": "streamId", - "type": "string", - "description": "The stream id" - } - ] - }, - { - "name": "createdAt", - "type": "string", - "description": "The date since this stats are being counted" - }, - { - "name": "updatedAt", - "type": "string", - "description": "The date since this stats were last updated" - } - ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = Moralis.Streams.getStatsById({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import streams\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = streams.stats.get_stats_by_stream_id(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "GetStreams": { - "apiHost": "https://api.moralis-streams.com", - "summary": "Get streams", - "description": "Get all the evm streams for the current project based on the project api-key.", - "method": "GET", - "path": "/streams/evm", - "pathParams": [], - "queryParams": [ - { - "name": "limit", - "description": "Limit response results max value 100", - "required": true, - "type": "number" - }, - { - "name": "cursor", - "description": "Cursor for fetching next page", - "required": false, - "type": "string" - } - ], - "responses": [ - { - "status": "200", - "description": "Ok", - "body": { - "type": "object", - "fields": [ - { - "name": "result", - "type": "object", - "description": "Array of project Streams", - "fields": [ - { - "name": "webhookUrl", - "type": "string", - "description": "Webhook URL where moralis will send the POST request." - }, - { - "name": "description", - "type": "string", - "description": "A description for this stream" - }, - { - "name": "tag", - "type": "string", - "description": "A user-provided tag that will be send along the webhook, the user can use this tag to identify the specific stream if multiple streams are present" - }, - { - "name": "topic0", - "type": "array", - "description": "An Array of topic0's in string-signature format ex: ['FunctionName(address,uint256)']", - "field": { "type": "string" } - }, - { - "name": "allAddresses", - "type": "boolean", - "description": "Include events for all addresses (only applied when abi and topic0 is provided)" - }, - { - "name": "includeNativeTxs", - "type": "boolean", - "description": "Include or not native transactions defaults to false" - }, - { - "name": "includeContractLogs", - "type": "boolean", - "description": "Include or not logs of contract interactions defaults to false" - }, - { - "name": "includeInternalTxs", - "type": "boolean", - "description": "Include or not include internal transactions defaults to false" - }, - { - "name": "includeAllTxLogs", - "type": "boolean", - "description": "Include all logs if atleast one value in tx or log matches stream config" - }, - { - "name": "getNativeBalances", - "type": "object", - "description": "Include native balances for each address in the webhook", - "fields": [ - { - "name": "selectors", - "type": "array", - "field": { "type": "string" } - }, - { "name": "type", "type": "string" } - ] - }, - { - "name": "abi", - "type": "object", - "fields": [ - { "name": "anonymous", "type": "boolean" }, - { "name": "constant", "type": "boolean" }, - { - "name": "inputs", - "type": "object", - "fields": [ - { "name": "name", "type": "string" }, - { "name": "type", "type": "string" }, - { "name": "indexed", "type": "boolean" }, - { "name": "components", "type": "json" }, - { "name": "internalType", "type": "string" } - ] - }, - { "name": "name", "type": "string" }, - { - "name": "outputs", - "type": "object", - "fields": [ - { "name": "name", "type": "string" }, - { "name": "type", "type": "string" }, - { "name": "components", "type": "json" }, - { "name": "internalType", "type": "string" } + "name": "internal_transactions", + "type": "object", + "description": "The internal transactions of the transaction", + "fields": [ + { + "name": "transaction_hash", + "type": "string", + "description": "The hash of the transaction", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "block_number", + "type": "string", + "description": "The block number", + "example": 12526958 + }, + { + "name": "block_hash", + "type": "string", + "description": "The block hash", + "example": "0x0372c302e3c52e8f2e15d155e2c545e6d802e479236564af052759253b20fd86" + }, + { + "name": "type", + "type": "string", + "description": "Call type", + "example": "CALL" + }, + { + "name": "from", + "type": "string", + "description": "The sender", + "example": "0xd4a3BebD824189481FC45363602b83C9c7e9cbDf" + }, + { + "name": "to", + "type": "string", + "description": "The recipient", + "example": "0xa71db868318f0a0bae9411347cd4a6fa23d8d4ef" + }, + { + "name": "value", + "type": "string", + "description": "The value that was transfered (in wei)", + "example": "650000000000000000" + }, + { + "name": "gas", + "type": "string", + "description": "The gas of the transaction", + "example": "6721975" + }, + { + "name": "gas_used", + "type": "string", + "description": "The used gas", + "example": "6721975" + }, + { + "name": "input", + "type": "string", + "description": "The input", + "example": "0x" + }, + { + "name": "output", + "type": "string", + "description": "The output", + "example": "0x" + } + ] + } ] - }, - { "name": "payable", "type": "boolean" }, - { "name": "stateMutability", "type": "string" }, - { "name": "type", "type": "string" }, - { "name": "gas", "type": "number" } - ] - }, - { - "name": "advancedOptions", - "type": "object", - "fields": [ - { "name": "topic0", "type": "string" }, - { - "name": "filter", - "type": "json", - "description": "The filter object for the topic0\nhttps://docs.moralis.io/docs/filter-streams", - "example": {} - }, - { "name": "includeNativeTxs", "type": "boolean" } - ] - }, - { - "name": "chainIds", - "type": "array", - "description": "The ids of the chains for this stream in hex Ex: [\"0x1\",\"0x38\"]", - "field": { "type": "string" } - }, - { - "name": "demo", - "type": "boolean", - "description": "Indicator if it is a demo stream" - }, - { - "name": "triggers", - "type": "object", - "description": "triggers", - "fields": [ - { "name": "type", "type": "string" }, - { "name": "contractAddress", "type": "string" }, - { - "name": "inputs", - "type": "array", - "field": { - "anyOf": [{ "type": "string" }, { "type": "json" }] - } - }, - { - "name": "functionAbi", - "type": "object", - "description": "The abi to parse the log object of the contract", - "fields": [ - { "name": "anonymous", "type": "boolean" }, - { "name": "constant", "type": "boolean" }, - { - "name": "inputs", - "field": { "type": "json" }, - "type": "array" - }, - { "name": "name", "type": "string" }, - { - "name": "outputs", - "field": { "type": "json" }, - "type": "array" - }, - { "name": "payable", "type": "boolean" }, - { "name": "stateMutability", "type": "string" }, - { - "name": "type", - "type": "string", - "required": true - }, - { - "name": "gas", - "type": "number", - "format": "double" - } - ], - "additionalProperties": false, - "example": {} - }, - { "name": "topic0", "type": "string" }, - { "name": "callFrom", "type": "string" } - ] - }, - { - "name": "id", - "type": "string", - "description": "Stringified UUIDv4.\nSee [RFC 4112](https://tools.ietf.org/html/rfc4122)", - "format": "uuid", - "pattern": "[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}" - }, - { - "name": "status", - "type": "string", - "description": "The stream status:\n[active] The Stream is healthy and processing blocks\n[paused] The Stream is paused and is not processing blocks\n[error] The Stream has encountered an error and is not processing blocks", - "enum": ["active", "paused", "error", "terminated"] - }, - { - "name": "statusMessage", - "type": "string", - "description": "Description of current status of stream." - } - ] - }, - { - "name": "cursor", - "type": "string", - "description": "Cursor for fetching next page" - }, - { - "name": "total", - "type": "number", - "description": "Total count of streams on the project" - } - ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = Moralis.Streams.getAll({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import streams\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = streams.evm_streams.get_streams(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "CreateStream": { - "apiHost": "https://api.moralis-streams.com", - "summary": "Create stream", - "description": "Creates a new evm stream.", - "method": "PUT", - "path": "/streams/evm", - "pathParams": [], - "queryParams": [], - "bodyParam": { - "required": true, - "description": "Provide a Stream Model", - "type": "object", - "fields": [ - { - "name": "webhookUrl", - "type": "string", - "required": true, - "description": "Webhook URL where moralis will send the POST request." - }, - { - "name": "description", - "type": "string", - "required": true, - "description": "A description for this stream" - }, - { - "name": "tag", - "type": "string", - "required": true, - "description": "A user-provided tag that will be send along the webhook, the user can use this tag to identify the specific stream if multiple streams are present" - }, - { - "name": "topic0", - "type": "array", - "description": "An Array of topic0's in string-signature format ex: ['FunctionName(address,uint256)']", - "field": { "type": "string" } - }, - { - "name": "allAddresses", - "type": "boolean", - "description": "Include events for all addresses (only applied when abi and topic0 is provided)" - }, - { - "name": "includeNativeTxs", - "type": "boolean", - "description": "Include or not native transactions defaults to false" - }, - { - "name": "includeContractLogs", - "type": "boolean", - "description": "Include or not logs of contract interactions defaults to false" - }, - { - "name": "includeInternalTxs", - "type": "boolean", - "description": "Include or not include internal transactions defaults to false" - }, - { - "name": "includeAllTxLogs", - "type": "boolean", - "description": "Include all logs if atleast one value in tx or log matches stream config" - }, - { - "name": "getNativeBalances", - "type": "object", - "description": "Include native balances for each address in the webhook", - "fields": [ - { - "name": "selectors", - "type": "array", - "field": { "type": "string" } - }, - { "name": "type", "type": "string" } - ] - }, - { - "name": "abi", - "type": "object", - "fields": [ - { "name": "anonymous", "type": "boolean" }, - { "name": "constant", "type": "boolean" }, - { - "name": "inputs", - "type": "object", - "fields": [ - { "name": "name", "type": "string" }, - { "name": "type", "type": "string" }, - { "name": "indexed", "type": "boolean" }, - { "name": "components", "type": "json" }, - { "name": "internalType", "type": "string" } - ] - }, - { "name": "name", "type": "string" }, - { - "name": "outputs", - "type": "object", - "fields": [ - { "name": "name", "type": "string" }, - { "name": "type", "type": "string" }, - { "name": "components", "type": "json" }, - { "name": "internalType", "type": "string" } - ] - }, - { "name": "payable", "type": "boolean" }, - { "name": "stateMutability", "type": "string" }, - { "name": "type", "type": "string" }, - { "name": "gas", "type": "number" } - ] - }, - { - "name": "advancedOptions", - "type": "object", - "fields": [ - { "name": "topic0", "type": "string" }, - { - "name": "filter", - "type": "json", - "description": "The filter object for the topic0\nhttps://docs.moralis.io/docs/filter-streams", - "example": {} - }, - { "name": "includeNativeTxs", "type": "boolean" } - ] - }, - { - "name": "chainIds", - "type": "array", - "required": true, - "description": "The ids of the chains for this stream in hex Ex: [\"0x1\",\"0x38\"]", - "field": { "type": "string" } - }, - { - "name": "demo", - "type": "boolean", - "description": "Indicator if it is a demo stream" - }, - { - "name": "triggers", - "type": "object", - "description": "triggers", - "fields": [ - { "name": "type", "type": "string" }, - { "name": "contractAddress", "type": "string" }, - { - "name": "inputs", - "type": "array", - "field": { "anyOf": [{ "type": "string" }, { "type": "json" }] } - }, - { - "name": "functionAbi", - "type": "object", - "description": "The abi to parse the log object of the contract", - "fields": [ - { "name": "anonymous", "type": "boolean" }, - { "name": "constant", "type": "boolean" }, - { - "name": "inputs", - "field": { "type": "json" }, - "type": "array" - }, - { "name": "name", "type": "string" }, - { - "name": "outputs", - "field": { "type": "json" }, - "type": "array" - }, - { "name": "payable", "type": "boolean" }, - { "name": "stateMutability", "type": "string" }, - { "name": "type", "type": "string", "required": true }, - { "name": "gas", "type": "number", "format": "double" } - ], - "example": {} - }, - { "name": "topic0", "type": "string" }, - { "name": "callFrom", "type": "string" } - ] - } - ] - }, - "responses": [ - { - "status": "200", - "description": "Ok", - "body": { - "type": "object", - "fields": [ - { - "name": "webhookUrl", - "type": "string", - "description": "Webhook URL where moralis will send the POST request." - }, - { - "name": "description", - "type": "string", - "description": "A description for this stream" - }, - { - "name": "tag", - "type": "string", - "description": "A user-provided tag that will be send along the webhook, the user can use this tag to identify the specific stream if multiple streams are present" - }, - { - "name": "topic0", - "type": "array", - "description": "An Array of topic0's in string-signature format ex: ['FunctionName(address,uint256)']", - "field": { "type": "string" } - }, - { - "name": "allAddresses", - "type": "boolean", - "description": "Include events for all addresses (only applied when abi and topic0 is provided)" - }, - { - "name": "includeNativeTxs", - "type": "boolean", - "description": "Include or not native transactions defaults to false" - }, - { - "name": "includeContractLogs", - "type": "boolean", - "description": "Include or not logs of contract interactions defaults to false" - }, - { - "name": "includeInternalTxs", - "type": "boolean", - "description": "Include or not include internal transactions defaults to false" - }, - { - "name": "includeAllTxLogs", - "type": "boolean", - "description": "Include all logs if atleast one value in tx or log matches stream config" - }, - { - "name": "getNativeBalances", - "type": "object", - "description": "Include native balances for each address in the webhook", - "fields": [ - { - "name": "selectors", - "type": "array", - "field": { "type": "string" } - }, - { "name": "type", "type": "string" } - ] - }, - { - "name": "abi", - "type": "object", - "fields": [ - { "name": "anonymous", "type": "boolean" }, - { "name": "constant", "type": "boolean" }, - { - "name": "inputs", - "type": "object", - "fields": [ - { "name": "name", "type": "string" }, - { "name": "type", "type": "string" }, - { "name": "indexed", "type": "boolean" }, - { "name": "components", "type": "json" }, - { "name": "internalType", "type": "string" } - ] - }, - { "name": "name", "type": "string" }, - { - "name": "outputs", - "type": "object", - "fields": [ - { "name": "name", "type": "string" }, - { "name": "type", "type": "string" }, - { "name": "components", "type": "json" }, - { "name": "internalType", "type": "string" } - ] - }, - { "name": "payable", "type": "boolean" }, - { "name": "stateMutability", "type": "string" }, - { "name": "type", "type": "string" }, - { "name": "gas", "type": "number" } - ] - }, - { - "name": "advancedOptions", - "type": "object", - "fields": [ - { "name": "topic0", "type": "string" }, - { - "name": "filter", - "type": "json", - "description": "The filter object for the topic0\nhttps://docs.moralis.io/docs/filter-streams", - "example": {} - }, - { "name": "includeNativeTxs", "type": "boolean" } - ] - }, - { - "name": "chainIds", - "type": "array", - "description": "The ids of the chains for this stream in hex Ex: [\"0x1\",\"0x38\"]", - "field": { "type": "string" } - }, - { - "name": "demo", - "type": "boolean", - "description": "Indicator if it is a demo stream" - }, - { - "name": "triggers", - "type": "object", - "description": "triggers", - "fields": [ - { "name": "type", "type": "string" }, - { "name": "contractAddress", "type": "string" }, - { - "name": "inputs", - "type": "array", - "field": { - "anyOf": [{ "type": "string" }, { "type": "json" }] - } - }, - { - "name": "functionAbi", - "type": "object", - "description": "The abi to parse the log object of the contract", - "fields": [ - { "name": "anonymous", "type": "boolean" }, - { "name": "constant", "type": "boolean" }, - { - "name": "inputs", - "field": { "type": "json" }, - "type": "array" - }, - { "name": "name", "type": "string" }, - { - "name": "outputs", - "field": { "type": "json" }, - "type": "array" - }, - { "name": "payable", "type": "boolean" }, - { "name": "stateMutability", "type": "string" }, - { "name": "type", "type": "string", "required": true }, - { "name": "gas", "type": "number", "format": "double" } - ], - "additionalProperties": false, - "example": {} - }, - { "name": "topic0", "type": "string" }, - { "name": "callFrom", "type": "string" } - ] - }, - { - "name": "id", - "type": "string", - "description": "Stringified UUIDv4.\nSee [RFC 4112](https://tools.ietf.org/html/rfc4122)", - "format": "uuid", - "pattern": "[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}" - }, - { - "name": "status", - "type": "string", - "description": "The stream status:\n[active] The Stream is healthy and processing blocks\n[paused] The Stream is paused and is not processing blocks\n[error] The Stream has encountered an error and is not processing blocks", - "enum": ["active", "paused", "error", "terminated"] - }, - { - "name": "statusMessage", - "type": "string", - "description": "Description of current status of stream." - } - ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = Moralis.Streams.createStream({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import streams\n\napi_key = \"YOUR_API_KEY\"\n\nbody = []\n\nresult = streams.evm_streams.create_stream(\n api_key=api_key,\n body=body,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "GetStream": { - "apiHost": "https://api.moralis-streams.com", - "summary": "Get a specific evm stream.", - "description": "Get a specific evm stream.", - "method": "GET", - "path": "/streams/evm/:id", - "pathParams": [ - { - "name": "id", - "description": "The id of the stream to get", - "required": true, - "type": "string" - } - ], - "queryParams": [], - "responses": [ - { - "status": "200", - "description": "Ok", - "body": { - "type": "object", - "fields": [ - { - "name": "webhookUrl", - "type": "string", - "description": "Webhook URL where moralis will send the POST request." - }, - { - "name": "description", - "type": "string", - "description": "A description for this stream" - }, - { - "name": "tag", - "type": "string", - "description": "A user-provided tag that will be send along the webhook, the user can use this tag to identify the specific stream if multiple streams are present" - }, - { - "name": "topic0", - "type": "array", - "description": "An Array of topic0's in string-signature format ex: ['FunctionName(address,uint256)']", - "field": { "type": "string" } - }, - { - "name": "allAddresses", - "type": "boolean", - "description": "Include events for all addresses (only applied when abi and topic0 is provided)" - }, - { - "name": "includeNativeTxs", - "type": "boolean", - "description": "Include or not native transactions defaults to false" - }, - { - "name": "includeContractLogs", - "type": "boolean", - "description": "Include or not logs of contract interactions defaults to false" - }, - { - "name": "includeInternalTxs", - "type": "boolean", - "description": "Include or not include internal transactions defaults to false" - }, - { - "name": "includeAllTxLogs", - "type": "boolean", - "description": "Include all logs if atleast one value in tx or log matches stream config" - }, - { - "name": "getNativeBalances", - "type": "object", - "description": "Include native balances for each address in the webhook", - "fields": [ - { - "name": "selectors", - "type": "array", - "field": { "type": "string" } - }, - { "name": "type", "type": "string" } - ] - }, - { - "name": "abi", - "type": "object", - "fields": [ - { "name": "anonymous", "type": "boolean" }, - { "name": "constant", "type": "boolean" }, - { - "name": "inputs", - "type": "object", - "fields": [ - { "name": "name", "type": "string" }, - { "name": "type", "type": "string" }, - { "name": "indexed", "type": "boolean" }, - { "name": "components", "type": "json" }, - { "name": "internalType", "type": "string" } - ] - }, - { "name": "name", "type": "string" }, - { - "name": "outputs", - "type": "object", - "fields": [ - { "name": "name", "type": "string" }, - { "name": "type", "type": "string" }, - { "name": "components", "type": "json" }, - { "name": "internalType", "type": "string" } - ] - }, - { "name": "payable", "type": "boolean" }, - { "name": "stateMutability", "type": "string" }, - { "name": "type", "type": "string" }, - { "name": "gas", "type": "number" } - ] - }, - { - "name": "advancedOptions", - "type": "object", - "fields": [ - { "name": "topic0", "type": "string" }, - { - "name": "filter", - "type": "json", - "description": "The filter object for the topic0\nhttps://docs.moralis.io/docs/filter-streams", - "example": {} - }, - { "name": "includeNativeTxs", "type": "boolean" } - ] - }, - { - "name": "chainIds", - "type": "array", - "description": "The ids of the chains for this stream in hex Ex: [\"0x1\",\"0x38\"]", - "field": { "type": "string" } - }, - { - "name": "demo", - "type": "boolean", - "description": "Indicator if it is a demo stream" - }, - { - "name": "triggers", - "type": "object", - "description": "triggers", - "fields": [ - { "name": "type", "type": "string" }, - { "name": "contractAddress", "type": "string" }, - { - "name": "inputs", - "type": "array", - "field": { - "anyOf": [{ "type": "string" }, { "type": "json" }] } - }, - { - "name": "functionAbi", - "type": "object", - "description": "The abi to parse the log object of the contract", - "fields": [ - { "name": "anonymous", "type": "boolean" }, - { "name": "constant", "type": "boolean" }, - { - "name": "inputs", - "field": { "type": "json" }, - "type": "array" - }, - { "name": "name", "type": "string" }, - { - "name": "outputs", - "field": { "type": "json" }, - "type": "array" - }, - { "name": "payable", "type": "boolean" }, - { "name": "stateMutability", "type": "string" }, - { "name": "type", "type": "string", "required": true }, - { "name": "gas", "type": "number", "format": "double" } - ], - "additionalProperties": false, - "example": {} - }, - { "name": "topic0", "type": "string" }, - { "name": "callFrom", "type": "string" } - ] - }, - { - "name": "id", - "type": "string", - "description": "Stringified UUIDv4.\nSee [RFC 4112](https://tools.ietf.org/html/rfc4122)", - "format": "uuid", - "pattern": "[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}" - }, - { - "name": "status", - "type": "string", - "description": "The stream status:\n[active] The Stream is healthy and processing blocks\n[paused] The Stream is paused and is not processing blocks\n[error] The Stream has encountered an error and is not processing blocks", - "enum": ["active", "paused", "error", "terminated"] - }, - { - "name": "statusMessage", - "type": "string", - "description": "Description of current status of stream." - } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.transaction.getTransactionVerbose({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.transaction.get_transaction_verbose(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = Moralis.Streams.getById({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import streams\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = streams.evm_streams.get_stream(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] }, - "UpdateStream": { - "apiHost": "https://api.moralis-streams.com", - "summary": "Update stream", - "description": "Updates a specific evm stream.", - "method": "POST", - "path": "/streams/evm/:id", - "pathParams": [ - { - "name": "id", - "description": "The id of the stream to update", - "required": true, - "type": "string" - } - ], - "queryParams": [], - "bodyParam": { - "required": true, - "description": "Provide a Stream Model", - "type": "object", - "fields": [ - { - "name": "webhookUrl", - "type": "string", - "description": "Webhook URL where moralis will send the POST request." - }, - { - "name": "description", - "type": "string", - "description": "A description for this stream" - }, - { - "name": "tag", - "type": "string", - "description": "A user-provided tag that will be send along the webhook, the user can use this tag to identify the specific stream if multiple streams are present" - }, - { - "name": "topic0", - "type": "array", - "description": "An Array of topic0's in string-signature format ex: ['FunctionName(address,uint256)']", - "field": { "type": "string" } - }, - { - "name": "allAddresses", - "type": "boolean", - "description": "Include events for all addresses (only applied when abi and topic0 is provided)" - }, - { - "name": "includeNativeTxs", - "type": "boolean", - "description": "Include or not native transactions defaults to false" - }, - { - "name": "includeContractLogs", - "type": "boolean", - "description": "Include or not logs of contract interactions defaults to false" - }, - { - "name": "includeInternalTxs", - "type": "boolean", - "description": "Include or not include internal transactions defaults to false" - }, - { - "name": "includeAllTxLogs", - "type": "boolean", - "description": "Include all logs if atleast one value in tx or log matches stream config" - }, - { - "name": "getNativeBalances", - "type": "object", - "description": "Include native balances for each address in the webhook", - "fields": [ - { - "name": "selectors", - "type": "array", - "field": { "type": "string" } - }, - { "name": "type", "type": "string" } - ] - }, - { - "name": "abi", - "type": "object", - "fields": [ - { "name": "anonymous", "type": "boolean" }, - { "name": "constant", "type": "boolean" }, - { - "name": "inputs", - "type": "object", - "fields": [ - { "name": "name", "type": "string" }, - { "name": "type", "type": "string" }, - { "name": "indexed", "type": "boolean" }, - { "name": "components", "type": "json" }, - { "name": "internalType", "type": "string" } - ] - }, - { "name": "name", "type": "string" }, - { - "name": "outputs", - "type": "object", - "fields": [ - { "name": "name", "type": "string" }, - { "name": "type", "type": "string" }, - { "name": "components", "type": "json" }, - { "name": "internalType", "type": "string" } - ] - }, - { "name": "payable", "type": "boolean" }, - { "name": "stateMutability", "type": "string" }, - { "name": "type", "type": "string" }, - { "name": "gas", "type": "number" } - ] - }, - { - "name": "advancedOptions", - "type": "object", - "fields": [ - { "name": "topic0", "type": "string" }, - { - "name": "filter", - "type": "json", - "description": "The filter object for the topic0\nhttps://docs.moralis.io/docs/filter-streams", - "example": {} - }, - { "name": "includeNativeTxs", "type": "boolean" } - ] - }, - { - "name": "chainIds", - "type": "array", - "description": "The ids of the chains for this stream in hex Ex: [\"0x1\",\"0x38\"]", - "field": { "type": "string" } - }, - { - "name": "demo", - "type": "boolean", - "description": "Indicator if it is a demo stream" - }, - { - "name": "triggers", - "type": "object", - "description": "triggers", - "fields": [ - { "name": "type", "type": "string" }, - { "name": "contractAddress", "type": "string" }, - { - "name": "inputs", - "type": "array", - "field": { "anyOf": [{ "type": "string" }, { "type": "json" }] } - }, - { - "name": "functionAbi", - "type": "object", - "description": "The abi to parse the log object of the contract", - "fields": [ - { "name": "anonymous", "type": "boolean" }, - { "name": "constant", "type": "boolean" }, - { - "name": "inputs", - "field": { "type": "json" }, - "type": "array" - }, - { "name": "name", "type": "string" }, - { - "name": "outputs", - "field": { "type": "json" }, - "type": "array" - }, - { "name": "payable", "type": "boolean" }, - { "name": "stateMutability", "type": "string" }, - { "name": "type", "type": "string", "required": true }, - { "name": "gas", "type": "number", "format": "double" } - ], - "additionalProperties": false, - "example": {} - }, - { "name": "topic0", "type": "string" }, - { "name": "callFrom", "type": "string" } - ] - } - ] - }, - "responses": [ - { - "status": "200", - "description": "Ok", - "body": { - "type": "object", - "fields": [ - { - "name": "webhookUrl", - "type": "string", - "description": "Webhook URL where moralis will send the POST request." - }, - { - "name": "description", - "type": "string", - "description": "A description for this stream" - }, - { - "name": "tag", - "type": "string", - "description": "A user-provided tag that will be send along the webhook, the user can use this tag to identify the specific stream if multiple streams are present" - }, - { - "name": "topic0", - "type": "array", - "description": "An Array of topic0's in string-signature format ex: ['FunctionName(address,uint256)']", - "field": { "type": "string" } - }, - { - "name": "allAddresses", - "type": "boolean", - "description": "Include events for all addresses (only applied when abi and topic0 is provided)" - }, - { - "name": "includeNativeTxs", - "type": "boolean", - "description": "Include or not native transactions defaults to false" - }, - { - "name": "includeContractLogs", - "type": "boolean", - "description": "Include or not logs of contract interactions defaults to false" - }, - { - "name": "includeInternalTxs", - "type": "boolean", - "description": "Include or not include internal transactions defaults to false" - }, - { - "name": "includeAllTxLogs", - "type": "boolean", - "description": "Include all logs if atleast one value in tx or log matches stream config" - }, - { - "name": "getNativeBalances", - "type": "object", - "description": "Include native balances for each address in the webhook", - "fields": [ - { - "name": "selectors", - "type": "array", - "field": { "type": "string" } - }, - { "name": "type", "type": "string" } - ] - }, - { - "name": "abi", - "type": "object", - "fields": [ - { "name": "anonymous", "type": "boolean" }, - { "name": "constant", "type": "boolean" }, - { - "name": "inputs", - "type": "object", - "fields": [ - { "name": "name", "type": "string" }, - { "name": "type", "type": "string" }, - { "name": "indexed", "type": "boolean" }, - { "name": "components", "type": "json" }, - { "name": "internalType", "type": "string" } - ] - }, - { "name": "name", "type": "string" }, - { - "name": "outputs", - "type": "object", - "fields": [ - { "name": "name", "type": "string" }, - { "name": "type", "type": "string" }, - { "name": "components", "type": "json" }, - { "name": "internalType", "type": "string" } + "events": { + "getContractLogs": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get logs by contract", + "description": "Get the logs for a contract.", + "method": "GET", + "path": "/:address/logs", + "pathParams": [ + { + "name": "address", + "description": "The address of the contract", + "required": true, + "example": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB", + "type": "string" + } + ], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", + "type": "string", + "enum": [ + "eth", + "0x1", + "sepolia", + "0xaa36a7", + "holesky", + "0x4268", + "polygon", + "0x89", + "amoy", + "0x13882", + "bsc", + "0x38", + "bsc testnet", + "0x61", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "gnosis", + "0x64", + "gnosis testnet", + "0x27d8", + "chiliz", + "0x15b38", + "chiliz testnet", + "0x15b32", + "base", + "0x2105", + "base sepolia", + "0x14a34", + "optimism", + "0xa", + "optimism sepolia", + "0xaa37dc", + "linea", + "0xe705", + "linea sepolia", + "0xe705" ] - }, - { "name": "payable", "type": "boolean" }, - { "name": "stateMutability", "type": "string" }, - { "name": "type", "type": "string" }, - { "name": "gas", "type": "number" } - ] - }, - { - "name": "advancedOptions", - "type": "object", - "fields": [ - { "name": "topic0", "type": "string" }, - { - "name": "filter", - "type": "json", - "description": "The filter object for the topic0\nhttps://docs.moralis.io/docs/filter-streams", - "example": {} - }, - { "name": "includeNativeTxs", "type": "boolean" } - ] - }, - { - "name": "chainIds", - "type": "array", - "description": "The ids of the chains for this stream in hex Ex: [\"0x1\",\"0x38\"]", - "field": { "type": "string" } - }, - { - "name": "demo", - "type": "boolean", - "description": "Indicator if it is a demo stream" - }, - { - "name": "triggers", - "type": "object", - "description": "triggers", - "fields": [ - { "name": "type", "type": "string" }, - { "name": "contractAddress", "type": "string" }, - { - "name": "inputs", - "type": "array", - "field": { - "anyOf": [{ "type": "string" }, { "type": "json" }] + }, + { + "name": "block_number", + "description": "The block number\n* Provide the param 'block_numer' or ('from_block' and / or 'to_block')\n* If 'block_numer' is provided in combination with 'from_block' and / or 'to_block', 'block_number' will be used\n", + "required": false, + "type": "string" + }, + { + "name": "from_block", + "description": "The minimum block number from which to get the logs\n* Provide the param 'block_numer' or ('from_block' and / or 'to_block')\n* If 'block_numer' is provided in combination with 'from_block' and / or 'to_block', 'block_number' will be used\n", + "required": false, + "type": "string" + }, + { + "name": "to_block", + "description": "The maximum block number from which to get the logs\n* Provide the param 'block_numer' or ('from_block' and / or 'to_block')\n* If 'block_numer' is provided in combination with 'from_block' and / or 'to_block', 'block_number' will be used\n", + "required": false, + "type": "string" + }, + { + "name": "from_date", + "description": "The start date from which to get the logs (any format that is accepted by momentjs)\n* Provide the param 'from_block' or 'from_date'\n* If 'from_date' and 'from_block' are provided, 'from_block' will be used.\n* If 'from_date' and the block params are provided, the block params will be used. Please refer to the blocks params sections (block_number,from_block and to_block) on how to use them\n", + "required": false, + "type": "string" + }, + { + "name": "to_date", + "description": "Get the logs up to this date (any format that is accepted by momentjs)\n* Provide the param 'to_block' or 'to_date'\n* If 'to_date' and 'to_block' are provided, 'to_block' will be used.\n* If 'to_date' and the block params are provided, the block params will be used. Please refer to the blocks params sections (block_number,from_block and to_block) on how to use them\n", + "required": false, + "type": "string" + }, + { + "name": "topic0", + "description": "topic0", + "required": true, + "type": "string" + }, + { + "name": "limit", + "description": "The desired page size of the result.", + "required": false, + "type": "number" + }, + { + "name": "order", + "required": false, + "type": "string", + "description": "The order of the result, in ascending (ASC) or descending (DESC)", + "example": "DESC", + "enum": ["ASC", "DESC"] + }, + { + "name": "cursor", + "description": "The cursor returned in the previous response (used for getting the next page).", + "type": "string" + } + ], + "responses": [ + { + "status": "200", + "description": "Returns the logs for an address", + "body": { + "type": "object", + "fields": [ + { + "name": "page", + "type": "number", + "description": "The current page of the result", + "example": "1" + }, + { + "name": "page_size", + "type": "number", + "description": "The number of results per page", + "example": "100" + }, + { + "name": "cursor", + "type": "string", + "description": "The cursor to get to the next page" + }, + { + "name": "result", + "type": "object", + "fields": [ + { + "name": "transaction_hash", + "type": "string", + "description": "The transaction hash", + "example": "0x2d30ca6f024dbc1307ac8a1a44ca27de6f797ec22ef20627a1307243b0ab7d09" + }, + { + "name": "address", + "type": "string", + "description": "The address of the contract", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "block_timestamp", + "type": "string", + "description": "The block timestamp", + "example": "2021-04-02T10:07:54.000Z" + }, + { + "name": "block_number", + "type": "string", + "description": "The block number", + "example": 12526958 + }, + { + "name": "block_hash", + "type": "string", + "description": "The block hash", + "example": "0x0372c302e3c52e8f2e15d155e2c545e6d802e479236564af052759253b20fd86" + }, + { + "name": "data", + "type": "string", + "description": "The data of the log", + "example": "0x00000000000000000000000000000000000000000000000de05239bccd4d537400000000000000000000000000024dbc80a9f80e3d5fc0a0ee30e2693781a443" + }, + { + "name": "topic0", + "type": "string", + "example": "0x2caecd17d02f56fa897705dcc740da2d237c373f70686f4e0d9bd3bf0400ea7a" + }, + { + "name": "topic1", + "type": "string", + "example": "0x000000000000000000000000031002d15b0d0cd7c9129d6f644446368deae391" + }, + { + "name": "topic2", + "type": "string", + "example": "0x000000000000000000000000d25943be09f968ba740e0782a34e710100defae9" + }, + { + "name": "topic3", + "type": "string", + "example": null + }, + { + "name": "transaction_index", + "type": "number", + "description": "The Transaction index of the log within the block", + "example": 12 + }, + { + "name": "log_index", + "type": "number", + "description": "The log index of the log within the block", + "example": 15 + } + ] + } + ] } - }, - { - "name": "functionAbi", - "type": "object", - "description": "The abi to parse the log object of the contract", - "fields": [ - { "name": "anonymous", "type": "boolean" }, - { "name": "constant", "type": "boolean" }, - { - "name": "inputs", - "field": { "type": "json" }, - "type": "array" - }, - { "name": "name", "type": "string" }, - { - "name": "outputs", - "field": { "type": "json" }, - "type": "array" - }, - { "name": "payable", "type": "boolean" }, - { "name": "stateMutability", "type": "string" }, - { "name": "type", "type": "string", "required": true }, - { "name": "gas", "type": "number", "format": "double" } - ], - "additionalProperties": false, - "example": {} - }, - { "name": "topic0", "type": "string" }, - { "name": "callFrom", "type": "string" } - ] - }, - { - "name": "id", - "type": "string", - "description": "Stringified UUIDv4.\nSee [RFC 4112](https://tools.ietf.org/html/rfc4122)", - "format": "uuid", - "pattern": "[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}" - }, - { - "name": "status", - "type": "string", - "description": "The stream status:\n[active] The Stream is healthy and processing blocks\n[paused] The Stream is paused and is not processing blocks\n[error] The Stream has encountered an error and is not processing blocks", - "enum": ["active", "paused", "error", "terminated"] - }, - { - "name": "statusMessage", - "type": "string", - "description": "Description of current status of stream." - } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.events.getContractLogs({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.events.get_contract_logs(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = Moralis.Streams.update({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" }, - { - "language": "python", - "code": "from moralis import streams\n\napi_key = \"YOUR_API_KEY\"\n\nbody = []\n\nparams = {}\n\nresult = streams.evm_streams.update_stream(\n api_key=api_key,\n body=body,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" + "getContractEvents": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get events by contract", + "description": "Get events for a contract ordered by block number in descending order. [Try it with Swagger](https://deep-index.moralis.io/api-docs-2.1/#/Events/getContractEvents).", + "method": "POST", + "path": "/:address/events", + "pathParams": [ + { + "name": "address", + "description": "The address of the contract", + "required": true, + "example": "0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB", + "type": "string" + } + ], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", + "type": "string", + "enum": [ + "eth", + "0x1", + "sepolia", + "0xaa36a7", + "holesky", + "0x4268", + "polygon", + "0x89", + "amoy", + "0x13882", + "bsc", + "0x38", + "bsc testnet", + "0x61", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "gnosis", + "0x64", + "gnosis testnet", + "0x27d8", + "chiliz", + "0x15b38", + "chiliz testnet", + "0x15b32", + "base", + "0x2105", + "base sepolia", + "0x14a34", + "optimism", + "0xa", + "optimism sepolia", + "0xaa37dc", + "linea", + "0xe705", + "linea sepolia", + "0xe705" + ] + }, + { + "name": "from_block", + "description": "The minimum block number from which to get the logs\n* Provide the param 'from_block' or 'from_date'\n* If 'from_date' and 'from_block' are provided, 'from_block' will be used.\n", + "required": false, + "type": "number" + }, + { + "name": "to_block", + "description": "The maximum block number from which to get the logs.\n* Provide the param 'to_block' or 'to_date'\n* If 'to_date' and 'to_block' are provided, 'to_block' will be used.\n", + "required": false, + "type": "number" + }, + { + "name": "from_date", + "description": "The start date from which to get the logs (any format that is accepted by momentjs)\n* Provide the param 'from_block' or 'from_date'\n* If 'from_date' and 'from_block' are provided, 'from_block' will be used.\n", + "required": false, + "type": "string" + }, + { + "name": "to_date", + "description": "Get the logs up to this date (any format that is accepted by momentjs)\n* Provide the param 'to_block' or 'to_date'\n* If 'to_date' and 'to_block' are provided, 'to_block' will be used.\n", + "type": "string" + }, + { + "name": "topic", + "description": "The topic of the event", + "required": true, + "type": "string" + }, + { + "name": "offset", + "description": "offset", + "required": false, + "type": "number" + }, + { + "name": "limit", + "description": "The desired page size of the result.", + "required": false, + "type": "number" + }, + { + "name": "order", + "required": false, + "type": "string", + "description": "The order of the result, in ascending (ASC) or descending (DESC)", + "example": "DESC", + "enum": ["ASC", "DESC"] + }, + { + "name": "cursor", + "description": "The cursor returned in the previous response (used for getting the next page).", + "type": "string" + } + ], + "bodyParam": { + "required": true, + "description": "ABI of the specific event", + "type": "json" + }, + "responses": [ + { + "status": "200", + "description": "Returns a collection of events by topic" + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.events.getContractEvents({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nbody = []\n\nparams = {}\n\nresult = evm_api.events.get_contract_events(\n api_key=api_key,\n body=body,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] } - ] }, - "DeleteStream": { - "apiHost": "https://api.moralis-streams.com", - "summary": "Delete stream", - "description": "Delete a specific evm stream.", - "method": "DELETE", - "path": "/streams/evm/:id", - "pathParams": [ - { - "name": "id", - "description": "The id of the stream to delete", - "required": true, - "type": "string" - } - ], - "queryParams": [], - "responses": [ - { - "status": "200", - "description": "Ok", - "body": { - "type": "object", - "fields": [ - { - "name": "webhookUrl", - "type": "string", - "description": "Webhook URL where moralis will send the POST request." - }, - { - "name": "description", - "type": "string", - "description": "A description for this stream" - }, - { - "name": "tag", - "type": "string", - "description": "A user-provided tag that will be send along the webhook, the user can use this tag to identify the specific stream if multiple streams are present" - }, - { - "name": "topic0", - "type": "array", - "description": "An Array of topic0's in string-signature format ex: ['FunctionName(address,uint256)']", - "field": { "type": "string" } - }, - { - "name": "allAddresses", - "type": "boolean", - "description": "Include events for all addresses (only applied when abi and topic0 is provided)" - }, - { - "name": "includeNativeTxs", - "type": "boolean", - "description": "Include or not native transactions defaults to false" - }, - { - "name": "includeContractLogs", - "type": "boolean", - "description": "Include or not logs of contract interactions defaults to false" - }, - { - "name": "includeInternalTxs", - "type": "boolean", - "description": "Include or not include internal transactions defaults to false" - }, - { - "name": "includeAllTxLogs", - "type": "boolean", - "description": "Include all logs if atleast one value in tx or log matches stream config" - }, - { - "name": "getNativeBalances", - "type": "object", - "description": "Include native balances for each address in the webhook", - "fields": [ - { - "name": "selectors", - "type": "array", - "field": { "type": "string" } - }, - { "name": "type", "type": "string" } - ] - }, - { - "name": "abi", - "type": "object", - "fields": [ - { "name": "anonymous", "type": "boolean" }, - { "name": "constant", "type": "boolean" }, - { - "name": "inputs", - "type": "object", - "fields": [ - { "name": "name", "type": "string" }, - { "name": "type", "type": "string" }, - { "name": "indexed", "type": "boolean" }, - { "name": "components", "type": "json" }, - { "name": "internalType", "type": "string" } - ] - }, - { "name": "name", "type": "string" }, - { - "name": "outputs", - "type": "object", - "fields": [ - { "name": "name", "type": "string" }, - { "name": "type", "type": "string" }, - { "name": "components", "type": "json" }, - { "name": "internalType", "type": "string" } + "block": { + "getBlock": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get block by hash", + "description": "Get the contents of a block given the block hash.", + "method": "GET", + "path": "/block/:block_number_or_hash", + "pathParams": [ + { + "name": "block_number_or_hash", + "description": "The block number or block hash", + "required": true, + "example": "18541416", + "type": "string" + } + ], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", + "type": "string", + "enum": [ + "eth", + "0x1", + "sepolia", + "0xaa36a7", + "holesky", + "0x4268", + "polygon", + "0x89", + "amoy", + "0x13882", + "bsc", + "0x38", + "bsc testnet", + "0x61", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "gnosis", + "0x64", + "gnosis testnet", + "0x27d8", + "chiliz", + "0x15b38", + "chiliz testnet", + "0x15b32", + "base", + "0x2105", + "base sepolia", + "0x14a34", + "optimism", + "0xa", + "optimism sepolia", + "0xaa37dc", + "linea", + "0xe705", + "linea sepolia", + "0xe705" ] - }, - { "name": "payable", "type": "boolean" }, - { "name": "stateMutability", "type": "string" }, - { "name": "type", "type": "string" }, - { "name": "gas", "type": "number" } - ] - }, - { - "name": "advancedOptions", - "type": "object", - "fields": [ - { "name": "topic0", "type": "string" }, - { - "name": "filter", - "type": "json", - "description": "The filter object for the topic0\nhttps://docs.moralis.io/docs/filter-streams", - "example": {} - }, - { "name": "includeNativeTxs", "type": "boolean" } - ] - }, - { - "name": "chainIds", - "type": "array", - "description": "The ids of the chains for this stream in hex Ex: [\"0x1\",\"0x38\"]", - "field": { "type": "string" } - }, - { - "name": "demo", - "type": "boolean", - "description": "Indicator if it is a demo stream" - }, - { - "name": "triggers", - "type": "object", - "description": "triggers", - "fields": [ - { "name": "type", "type": "string" }, - { "name": "contractAddress", "type": "string" }, - { - "name": "inputs", - "type": "array", - "field": { - "anyOf": [{ "type": "string" }, { "type": "json" }] + }, + { + "name": "include", + "description": "If the result should contain the internal transactions.", + "required": false, + "type": "string", + "enum": ["internal_transactions"] + } + ], + "responses": [ + { + "status": "200", + "description": "Returns the contents of a block", + "body": { + "type": "object", + "fields": [ + { + "name": "timestamp", + "type": "string", + "description": "The block timestamp", + "example": "2021-05-07T11:08:35.000Z" + }, + { + "name": "number", + "type": "string", + "description": "The block number", + "example": 12386788 + }, + { + "name": "hash", + "type": "string", + "description": "The block hash", + "example": "0x9b559aef7ea858608c2e554246fe4a24287e7aeeb976848df2b9a2531f4b9171" + }, + { + "name": "parent_hash", + "type": "string", + "description": "The block hash of the parent block", + "example": "0x011d1fc45839de975cc55d758943f9f1d204f80a90eb631f3bf064b80d53e045" + }, + { + "name": "nonce", + "type": "string", + "description": "The nonce", + "example": "0xedeb2d8fd2b2bdec" + }, + { + "name": "sha3_uncles", + "type": "string", + "example": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + { + "name": "logs_bloom", + "type": "string", + "example": "0xdde5fc46c5d8bcbd58207bc9f267bf43298e23791a326ff02661e99790da9996b3e0dd912c0b8202d389d282c56e4d11eb2dec4898a32b6b165f1f4cae6aa0079498eab50293f3b8defbf6af11bb75f0408a563ddfc26a3323d1ff5f9849e95d5f034d88a757ddea032c75c00708c9ff34d2207f997cc7d93fd1fa160a6bfaf62a54e31f9fe67ab95752106ba9d185bfdc9b6dc3e17427f844ee74e5c09b17b83ad6e8fc7360f5c7c3e4e1939e77a6374bee57d1fa6b2322b11ad56ad0398302de9b26d6fbfe414aa416bff141fad9d4af6aea19322e47595e342cd377403f417dfd396ab5f151095a5535f51cbc34a40ce9648927b7d1d72ab9daf253e31daf" + }, + { + "name": "transactions_root", + "type": "string", + "example": "0xe4c7bf3aff7ad07f9e80d57f7189f0252592fee6321c2a9bd9b09b6ce0690d27" + }, + { + "name": "state_root", + "type": "string", + "example": "0x49e3bfe7b618e27fde8fa08884803a8458b502c6534af69873a3cc926a7c724b" + }, + { + "name": "receipts_root", + "type": "string", + "example": "0x7cf43d7e837284f036cf92c56973f5e27bdd253ca46168fa195a6b07fa719f23" + }, + { + "name": "miner", + "type": "string", + "description": "The address of the miner", + "example": "0xea674fdde714fd979de3edf0f56aa9716b898ec8" + }, + { + "name": "difficulty", + "type": "string", + "description": "The difficulty of the block", + "example": "7253857437305950" + }, + { + "name": "total_difficulty", + "type": "string", + "description": "The total difficulty", + "example": "24325637817906576196890" + }, + { + "name": "size", + "type": "string", + "description": "The block size", + "example": "61271" + }, + { + "name": "extra_data", + "type": "string", + "example": "0x65746865726d696e652d6575726f70652d7765737433" + }, + { + "name": "gas_limit", + "type": "string", + "description": "The gas limit", + "example": "14977947" + }, + { + "name": "gas_used", + "type": "string", + "description": "The gas used", + "example": "14964688" + }, + { + "name": "transaction_count", + "type": "string", + "description": "The number of transactions in the block", + "example": "252" + }, + { + "name": "transactions", + "type": "object", + "description": "The transactions in the block", + "fields": [ + { + "name": "hash", + "type": "string", + "description": "The hash of the transaction", + "example": "0x1ed85b3757a6d31d01a4d6677fc52fd3911d649a0af21fe5ca3f886b153773ed" + }, + { + "name": "nonce", + "type": "string", + "description": "The nonce", + "example": "1848059" + }, + { + "name": "transaction_index", + "type": "string", + "example": "108" + }, + { + "name": "from_address", + "type": "string", + "description": "The from address", + "example": "0x267be1c1d684f78cb4f6a176c4911b741e4ffdc0" + }, + { + "name": "to_address", + "type": "string", + "description": "The to address", + "example": "0x003dde3494f30d861d063232c6a8c04394b686ff" + }, + { + "name": "from_address_label", + "type": "string", + "description": "The label of the from address", + "example": "Binance 1" + }, + { + "name": "to_address_label", + "type": "string", + "description": "The label of the to address", + "example": "Binance 2" + }, + { + "name": "value", + "type": "string", + "description": "The value sent", + "example": "115580000000000000" + }, + { + "name": "gas", + "type": "string", + "example": "30000" + }, + { + "name": "gas_price", + "type": "string", + "description": "The gas price", + "example": "52500000000" + }, + { + "name": "input", + "type": "string", + "example": "0x" + }, + { + "name": "receipt_cumulative_gas_used", + "type": "string", + "example": "4923073" + }, + { + "name": "receipt_gas_used", + "type": "string", + "example": "21000" + }, + { + "name": "receipt_contract_address", + "type": "string", + "example": null + }, + { + "name": "receipt_root", + "type": "string", + "example": null + }, + { + "name": "receipt_status", + "type": "string", + "example": "1" + }, + { + "name": "block_timestamp", + "type": "string", + "description": "The block timestamp", + "example": "2021-05-07T11:08:35.000Z" + }, + { + "name": "block_number", + "type": "string", + "description": "The block number", + "example": "12386788" + }, + { + "name": "block_hash", + "type": "string", + "description": "The hash of the block", + "example": "0x9b559aef7ea858608c2e554246fe4a24287e7aeeb976848df2b9a2531f4b9171" + }, + { + "name": "logs", + "type": "object", + "description": "The logs of the transaction", + "fields": [ + { + "name": "log_index", + "type": "string", + "example": "273" + }, + { + "name": "transaction_hash", + "type": "string", + "description": "The hash of the transaction", + "example": "0xdd9006489e46670e0e85d1fb88823099e7f596b08aeaac023e9da0851f26fdd5" + }, + { + "name": "transaction_index", + "type": "string", + "example": "204" + }, + { + "name": "address", + "type": "string", + "description": "The address of the contract", + "example": "0x3105d328c66d8d55092358cf595d54608178e9b5" + }, + { + "name": "data", + "type": "string", + "description": "The data of the log", + "example": "0x00000000000000000000000000000000000000000000000de05239bccd4d537400000000000000000000000000024dbc80a9f80e3d5fc0a0ee30e2693781a443" + }, + { + "name": "topic0", + "type": "string", + "example": "0x2caecd17d02f56fa897705dcc740da2d237c373f70686f4e0d9bd3bf0400ea7a" + }, + { + "name": "topic1", + "type": "string", + "example": "0x000000000000000000000000031002d15b0d0cd7c9129d6f644446368deae391" + }, + { + "name": "topic2", + "type": "string", + "example": "0x000000000000000000000000d25943be09f968ba740e0782a34e710100defae9" + }, + { + "name": "topic3", + "type": "string", + "example": null + }, + { + "name": "block_timestamp", + "type": "string", + "description": "The timestamp of the block", + "example": "2021-05-07T11:08:35.000Z" + }, + { + "name": "block_number", + "type": "string", + "description": "The block number", + "example": "12386788" + }, + { + "name": "block_hash", + "type": "string", + "description": "The hash of the block", + "example": "0x9b559aef7ea858608c2e554246fe4a24287e7aeeb976848df2b9a2531f4b9171" + } + ] + }, + { + "name": "internal_transactions", + "type": "object", + "description": "The internal transactions of the transaction", + "fields": [ + { + "name": "transaction_hash", + "type": "string", + "description": "The hash of the transaction", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + }, + { + "name": "block_number", + "type": "string", + "description": "The block number", + "example": 12526958 + }, + { + "name": "block_hash", + "type": "string", + "description": "The block hash", + "example": "0x0372c302e3c52e8f2e15d155e2c545e6d802e479236564af052759253b20fd86" + }, + { + "name": "type", + "type": "string", + "description": "Call type", + "example": "CALL" + }, + { + "name": "from", + "type": "string", + "description": "The sender", + "example": "0xd4a3BebD824189481FC45363602b83C9c7e9cbDf" + }, + { + "name": "to", + "type": "string", + "description": "The recipient", + "example": "0xa71db868318f0a0bae9411347cd4a6fa23d8d4ef" + }, + { + "name": "value", + "type": "string", + "description": "The value that was transfered (in wei)", + "example": "650000000000000000" + }, + { + "name": "gas", + "type": "string", + "description": "The gas of the transaction", + "example": "6721975" + }, + { + "name": "gas_used", + "type": "string", + "description": "The used gas", + "example": "6721975" + }, + { + "name": "input", + "type": "string", + "description": "The input", + "example": "0x" + }, + { + "name": "output", + "type": "string", + "description": "The output", + "example": "0x" + } + ] + } + ] + } + ] } - }, - { - "name": "functionAbi", - "type": "object", - "description": "The abi to parse the log object of the contract", - "fields": [ - { "name": "anonymous", "type": "boolean" }, - { "name": "constant", "type": "boolean" }, - { - "name": "inputs", - "field": { "type": "json" }, - "type": "array" - }, - { "name": "name", "type": "string" }, - { - "name": "outputs", - "field": { "type": "json" }, - "type": "array" - }, - { "name": "payable", "type": "boolean" }, - { "name": "stateMutability", "type": "string" }, - { "name": "type", "type": "string", "required": true }, - { "name": "gas", "type": "number", "format": "double" } - ], - "additionalProperties": false, - "example": {} - }, - { "name": "topic0", "type": "string" }, - { "name": "callFrom", "type": "string" } - ] - }, - { - "name": "id", - "type": "string", - "description": "Stringified UUIDv4.\nSee [RFC 4112](https://tools.ietf.org/html/rfc4122)", - "format": "uuid", - "pattern": "[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}" - }, - { - "name": "status", - "type": "string", - "description": "The stream status:\n[active] The Stream is healthy and processing blocks\n[paused] The Stream is paused and is not processing blocks\n[error] The Stream has encountered an error and is not processing blocks", - "enum": ["active", "paused", "error", "terminated"] - }, - { - "name": "statusMessage", - "type": "string", - "description": "Description of current status of stream." - } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.block.getBlock({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.block.get_block(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = Moralis.Streams.delete({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" }, - { - "language": "python", - "code": "from moralis import streams\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = streams.evm_streams.delete_stream(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "UpdateStreamStatus": { - "apiHost": "https://api.moralis-streams.com", - "summary": "Update stream status", - "description": "Updates the status of specific evm stream.", - "method": "POST", - "path": "/streams/evm/:id/status", - "pathParams": [ - { - "name": "id", - "description": "The id of the stream to update", - "required": true, - "type": "string" - } - ], - "queryParams": [], - "bodyParam": { - "required": true, - "description": "Provide a Stream Model", - "type": "object", - "fields": [ - { - "name": "status", - "type": "string", - "required": true, - "description": "The stream status:\n[active] The Stream is healthy and processing blocks\n[paused] The Stream is paused and is not processing blocks\n[error] The Stream has encountered an error and is not processing blocks", - "enum": ["active", "paused", "error", "terminated"] - } - ] - }, - "responses": [ - { - "status": "200", - "description": "Ok", - "body": { - "type": "object", - "fields": [ - { - "name": "webhookUrl", - "type": "string", - "description": "Webhook URL where moralis will send the POST request." - }, - { - "name": "description", - "type": "string", - "description": "A description for this stream" - }, - { - "name": "tag", - "type": "string", - "description": "A user-provided tag that will be send along the webhook, the user can use this tag to identify the specific stream if multiple streams are present" - }, - { - "name": "topic0", - "type": "array", - "description": "An Array of topic0's in string-signature format ex: ['FunctionName(address,uint256)']", - "field": { "type": "string" } - }, - { - "name": "allAddresses", - "type": "boolean", - "description": "Include events for all addresses (only applied when abi and topic0 is provided)" - }, - { - "name": "includeNativeTxs", - "type": "boolean", - "description": "Include or not native transactions defaults to false" - }, - { - "name": "includeContractLogs", - "type": "boolean", - "description": "Include or not logs of contract interactions defaults to false" - }, - { - "name": "includeInternalTxs", - "type": "boolean", - "description": "Include or not include internal transactions defaults to false" - }, - { - "name": "includeAllTxLogs", - "type": "boolean", - "description": "Include all logs if atleast one value in tx or log matches stream config" - }, - { - "name": "getNativeBalances", - "type": "object", - "description": "Include native balances for each address in the webhook", - "fields": [ - { - "name": "selectors", - "type": "array", - "field": { "type": "string" } - }, - { "name": "type", "type": "string" } - ] - }, - { - "name": "abi", - "type": "object", - "fields": [ - { "name": "anonymous", "type": "boolean" }, - { "name": "constant", "type": "boolean" }, - { - "name": "inputs", - "type": "object", - "fields": [ - { "name": "name", "type": "string" }, - { "name": "type", "type": "string" }, - { "name": "indexed", "type": "boolean" }, - { "name": "components", "type": "json" }, - { "name": "internalType", "type": "string" } - ] - }, - { "name": "name", "type": "string" }, - { - "name": "outputs", - "type": "object", - "fields": [ - { "name": "name", "type": "string" }, - { "name": "type", "type": "string" }, - { "name": "components", "type": "json" }, - { "name": "internalType", "type": "string" } + "getDateToBlock": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get block by date", + "description": "Get the closest block given the date.", + "method": "GET", + "path": "/dateToBlock", + "pathParams": [], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", + "type": "string", + "enum": [ + "eth", + "0x1", + "sepolia", + "0xaa36a7", + "holesky", + "0x4268", + "polygon", + "0x89", + "amoy", + "0x13882", + "bsc", + "0x38", + "bsc testnet", + "0x61", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "gnosis", + "0x64", + "gnosis testnet", + "0x27d8", + "chiliz", + "0x15b38", + "chiliz testnet", + "0x15b32", + "base", + "0x2105", + "base sepolia", + "0x14a34", + "optimism", + "0xa", + "optimism sepolia", + "0xaa37dc", + "linea", + "0xe705", + "linea sepolia", + "0xe705" ] - }, - { "name": "payable", "type": "boolean" }, - { "name": "stateMutability", "type": "string" }, - { "name": "type", "type": "string" }, - { "name": "gas", "type": "number" } - ] - }, - { - "name": "advancedOptions", - "type": "object", - "fields": [ - { "name": "topic0", "type": "string" }, - { - "name": "filter", - "type": "json", - "description": "The filter object for the topic0\nhttps://docs.moralis.io/docs/filter-streams", - "example": {} - }, - { "name": "includeNativeTxs", "type": "boolean" } - ] - }, - { - "name": "chainIds", - "type": "array", - "description": "The ids of the chains for this stream in hex Ex: [\"0x1\",\"0x38\"]", - "field": { "type": "string" } - }, - { - "name": "demo", - "type": "boolean", - "description": "Indicator if it is a demo stream" - }, - { - "name": "triggers", - "type": "object", - "description": "triggers", - "fields": [ - { "name": "type", "type": "string" }, - { "name": "contractAddress", "type": "string" }, - { - "name": "inputs", - "type": "array", - "field": { - "anyOf": [{ "type": "string" }, { "type": "json" }] + }, + { + "name": "date", + "description": "Unix date in seconds or a datestring (any format that is accepted by momentjs)", + "required": true, + "type": "string" + } + ], + "responses": [ + { + "status": "200", + "description": "Returns the block number and corresponding date and timestamp", + "body": { + "type": "object", + "fields": [ + { + "name": "date", + "type": "string", + "description": "The date of the block", + "example": "2020-01-01T00:00:00+00:00" + }, + { + "name": "block", + "type": "number", + "description": "The block number", + "example": 9193266 + }, + { + "name": "timestamp", + "type": "number", + "description": "The timestamp of the block", + "example": 1577836811 + }, + { + "name": "block_timestamp", + "type": "string", + "description": "The timestamp of the block", + "example": "2019-12-31T23:59:45.000Z" + }, + { + "name": "hash", + "type": "string", + "description": "The block hash", + "example": "0x9b559aef7ea858608c2e554246fe4a24287e7aeeb976848df2b9a2531f4b9171" + }, + { + "name": "parent_hash", + "type": "string", + "description": "The block hash of the parent block", + "example": "0x011d1fc45839de975cc55d758943f9f1d204f80a90eb631f3bf064b80d53e045" + } + ] } - }, - { - "name": "functionAbi", - "type": "object", - "description": "The abi to parse the log object of the contract", - "fields": [ - { "name": "anonymous", "type": "boolean" }, - { "name": "constant", "type": "boolean" }, - { - "name": "inputs", - "field": { "type": "json" }, - "type": "array" - }, - { "name": "name", "type": "string" }, - { - "name": "outputs", - "field": { "type": "json" }, - "type": "array" - }, - { "name": "payable", "type": "boolean" }, - { "name": "stateMutability", "type": "string" }, - { "name": "type", "type": "string", "required": true }, - { "name": "gas", "type": "number", "format": "double" } - ], - "additionalProperties": false, - "example": {} - }, - { "name": "topic0", "type": "string" }, - { "name": "callFrom", "type": "string" } - ] - }, - { - "name": "id", - "type": "string", - "description": "Stringified UUIDv4.\nSee [RFC 4112](https://tools.ietf.org/html/rfc4122)", - "format": "uuid", - "pattern": "[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}" - }, - { - "name": "status", - "type": "string", - "description": "The stream status:\n[active] The Stream is healthy and processing blocks\n[paused] The Stream is paused and is not processing blocks\n[error] The Stream has encountered an error and is not processing blocks", - "enum": ["active", "paused", "error", "terminated"] - }, - { - "name": "statusMessage", - "type": "string", - "description": "Description of current status of stream." - } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.block.getDateToBlock({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.block.get_date_to_block(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = Moralis.Streams.updateStatus({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" }, - { - "language": "python", - "code": "from moralis import streams\n\napi_key = \"YOUR_API_KEY\"\n\nbody = []\n\nparams = {}\n\nresult = streams.evm_streams.update_stream_status(\n api_key=api_key,\n body=body,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "GetAddresses": { - "apiHost": "https://api.moralis-streams.com", - "summary": "Get addresses by stream", - "description": "Get all addresses associated with a specific stream.", - "method": "GET", - "path": "/streams/evm/:id/address", - "pathParams": [ - { - "name": "id", - "description": "the id of the stream to get the addresses from", - "required": true, - "type": "string" - } - ], - "queryParams": [ - { - "name": "limit", - "description": "Limit response results max value 100", - "required": true, - "type": "number" - }, - { - "name": "cursor", - "description": "Cursor for fetching next page", - "required": false, - "type": "string" - } - ], - "responses": [ - { - "status": "200", - "description": "Ok", - "body": { - "type": "object", - "fields": [ - { - "name": "result", - "type": "object", - "description": "Array of project Streams", - "fields": [ - { - "name": "address", + "getBlockStats": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get the block stats", + "description": "Get the stats for a block", + "method": "GET", + "path": "/block/:block_number_or_hash/stats", + "pathParams": [ + { + "name": "block_number_or_hash", + "description": "The block number or hash", + "required": true, "type": "string", - "description": "Address" - } - ] - }, - { - "name": "cursor", - "type": "string", - "description": "Cursor for fetching next page" - }, - { - "name": "total", - "type": "number", - "description": "Total count of streams on the project" - } - ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = Moralis.Streams.getAddresses({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import streams\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = streams.evm_streams.get_addresses(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "AddAddressToStream": { - "apiHost": "https://api.moralis-streams.com", - "summary": "Add address to stream", - "description": "Adds an address to a Stream.", - "method": "POST", - "path": "/streams/evm/:id/address", - "pathParams": [ - { - "name": "id", - "description": "The id of the stream to add the address to", - "required": true, - "type": "string" - } - ], - "queryParams": [], - "bodyParam": { - "required": true, - "description": "Provide a Address Model", - "type": "object", - "fields": [ - { - "name": "address", - "description": "The address or a list of addresses to be added to the Stream.", - "type": "oneOf", - "required": true, - "options": [ - { "type": "string" }, - { "field": { "type": "string" }, "type": "array" } - ] - } - ] - }, - "responses": [ - { - "status": "200", - "description": "Ok", - "body": { - "type": "object", - "fields": [ - { - "name": "streamId", - "type": "string", - "description": "The streamId" - }, - { - "name": "address", - "description": "Address", - "type": "oneOf", - "options": [ - { "type": "string" }, - { "field": { "type": "string" }, "type": "array" } - ] - } - ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = Moralis.Streams.addAddress({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import streams\n\napi_key = \"YOUR_API_KEY\"\n\nbody = []\n\nparams = {}\n\nresult = streams.evm_streams.add_address_to_stream(\n api_key=api_key,\n body=body,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "DeleteAddressFromStream": { - "apiHost": "https://api.moralis-streams.com", - "summary": "Delete address from stream", - "description": "Deletes an address from a Stream.", - "method": "DELETE", - "path": "/streams/evm/:id/address", - "pathParams": [ - { - "name": "id", - "description": "The id of the stream to delete the address from", - "required": true, - "type": "string" - } - ], - "queryParams": [], - "bodyParam": { - "required": true, - "description": "Provide a Address Model", - "type": "object", - "fields": [ - { - "name": "address", - "description": "The address or a list of addresses to be removed from the Stream.", - "type": "oneOf", - "options": [ - { "type": "string" }, - { "field": { "type": "string" }, "type": "array" } - ] - } - ] - }, - "responses": [ - { - "status": "200", - "description": "Ok", - "body": { - "type": "object", - "fields": [ - { - "name": "streamId", - "type": "string", - "description": "The streamId" - }, - { - "name": "address", - "description": "Address", - "type": "oneOf", - "options": [ - { "type": "string" }, - { "field": { "type": "string" }, "type": "array" } - ] - } - ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = Moralis.Streams.deleteAddress({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import streams\n\napi_key = \"YOUR_API_KEY\"\n\nbody = []\n\nparams = {}\n\nresult = streams.evm_streams.delete_address_from_stream(\n api_key=api_key,\n body=body,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "aptosStreamsGetAll": { - "apiHost": "https://api.moralis-streams.com", - "summary": "Gets all aptos streams.", - "description": "Get all aptos streams.", - "method": "GET", - "path": "/streams/aptos", - "pathParams": [], - "queryParams": [ - { - "name": "limit", - "description": "Limit response results max value 100", - "required": true, - "type": "number" - }, - { - "name": "cursor", - "description": "Cursor for fetching next page", - "required": false, - "type": "string" - } - ], - "responses": [{ "status": "200", "description": "Ok" }] - }, - "aptosStreamsCreate": { - "apiHost": "https://api.moralis-streams.com", - "summary": "Create stream", - "description": "Creates a new aptos stream.", - "method": "PUT", - "path": "/streams/aptos", - "pathParams": [], - "queryParams": [], - "bodyParam": { - "required": true, - "description": "Provide a valid Aptos Stream Model", - "type": "object", - "fields": [ - { - "name": "webhookUrl", - "type": "string", - "description": "Webhook URL where moralis will send the POST request." - }, - { - "name": "tag", - "type": "string", - "description": "A user-provided tag that will be send along the webhook, the user can use this tag to identify the specific stream if multiple streams are present" - }, - { - "name": "functions", - "type": "array", - "description": "An Array of events in string-signature format ex: ['0x1::aptos_account::transfer']", - "field": { "type": "string" } - }, - { - "name": "events", - "type": "array", - "description": "An Array of events in string-signature format ex: ['0x1::coin::WithdrawEvent']", - "field": { "type": "string" } - }, - { - "name": "network", - "type": "array", - "description": "The network to listen to", - "field": { "type": "string", "enum": ["mainnet", "testnet"] } - }, - { - "name": "includePayload", - "type": "boolean", - "description": "Include or not payload for every transaction in webhook defaults to false" - }, - { - "name": "includeEvents", - "type": "boolean", - "description": "Include or not events in webhook defaults to false" - }, - { - "name": "includeChanges", - "type": "boolean", - "description": "Include or not raw changes for every transaction in webhook defaults to false" - }, - { - "name": "description", - "type": "string", - "description": "A description for this stream" - }, - { - "name": "demo", - "type": "boolean", - "description": "Indicator if it is a demo stream" - }, - { - "name": "allAddresses", - "type": "boolean", - "description": "Include events for all addresses (only applied when at least one event or function is provided)" - } - ] - }, - "responses": [ - { - "status": "200", - "description": "Ok", - "body": { - "type": "object", - "fields": [ - { "name": "id", "type": "string" }, - { "name": "allAddresses", "type": "boolean" }, - { "name": "demo", "type": "boolean" }, - { "name": "description", "type": "string" }, - { "name": "includeChanges", "type": "boolean" }, - { "name": "includeEvents", "type": "boolean" }, - { "name": "includePayload", "type": "boolean" }, - { "name": "isErrorSince", "type": "string" }, - { - "name": "network", - "type": "array", - "field": { "type": "string", "enum": ["mainnet", "testnet"] } - }, - { - "name": "status", - "type": "string", - "description": "The stream status:\n[active] The Stream is healthy and processing blocks\n[paused] The Stream is paused and is not processing blocks\n[error] The Stream has encountered an error and is not processing blocks", - "enum": ["active", "paused", "error", "terminated"] - }, - { "name": "statusMessage", "type": "string" }, - { - "name": "events", - "type": "array", - "field": { "type": "string" } - }, - { - "name": "functions", - "type": "array", - "field": { "type": "string" } - }, - { "name": "tag", "type": "string" }, - { "name": "webhookUrl", "type": "string" }, - { "name": "amountOfAddresses", "type": "number" } - ] - } - } - ] - }, - "aptosStreamsGet": { - "apiHost": "https://api.moralis-streams.com", - "summary": "Get a specific aptos stream.", - "description": "Get a specific aptos stream.", - "method": "GET", - "path": "/streams/aptos/:id", - "pathParams": [ - { - "name": "id", - "description": "The id of the stream to get", - "required": true, - "type": "string" - } - ], - "queryParams": [], - "responses": [ - { - "status": "200", - "description": "Ok", - "body": { - "type": "object", - "fields": [ - { "name": "id", "type": "string" }, - { "name": "allAddresses", "type": "boolean" }, - { "name": "demo", "type": "boolean" }, - { "name": "description", "type": "string" }, - { "name": "includeChanges", "type": "boolean" }, - { "name": "includeEvents", "type": "boolean" }, - { "name": "includePayload", "type": "boolean" }, - { "name": "isErrorSince", "type": "string" }, - { - "name": "network", - "type": "array", - "field": { "type": "string", "enum": ["mainnet", "testnet"] } - }, - { - "name": "status", - "type": "string", - "description": "The stream status:\n[active] The Stream is healthy and processing blocks\n[paused] The Stream is paused and is not processing blocks\n[error] The Stream has encountered an error and is not processing blocks", - "enum": ["active", "paused", "error", "terminated"] - }, - { "name": "statusMessage", "type": "string" }, - { - "name": "events", - "type": "array", - "field": { "type": "string" } - }, - { - "name": "functions", - "type": "array", - "field": { "type": "string" } - }, - { "name": "tag", "type": "string" }, - { "name": "webhookUrl", "type": "string" }, - { "name": "amountOfAddresses", "type": "number" } - ] - } - } - ] - }, - "aptosStreamsUpdate": { - "apiHost": "https://api.moralis-streams.com", - "summary": "Update stream", - "description": "Updates a new aptos stream.", - "method": "POST", - "path": "/streams/aptos/:id", - "pathParams": [{ "name": "id", "required": true, "type": "string" }], - "queryParams": [], - "bodyParam": { - "required": true, - "description": "Provide valid values of a Aptos Stream Model", - "type": "object", - "fields": [ - { - "name": "allAddresses", - "type": "boolean", - "description": "Include events for all addresses (only applied when at least one event or function is provided)" - }, - { - "name": "demo", - "type": "boolean", - "description": "Indicator if it is a demo stream" - }, - { - "name": "description", - "type": "string", - "description": "A description for this stream" - }, - { - "name": "includeChanges", - "type": "boolean", - "description": "Include or not raw changes for every transaction in webhook defaults to false" - }, - { - "name": "includeEvents", - "type": "boolean", - "description": "Include or not events in webhook defaults to false" - }, - { - "name": "includePayload", - "type": "boolean", - "description": "Include or not payload for every transaction in webhook defaults to false" - }, - { - "name": "network", - "type": "array", - "description": "The network to listen to", - "field": { "type": "string", "enum": ["mainnet", "testnet"] } - }, - { - "name": "events", - "type": "array", - "description": "An Array of events in string-signature format ex: ['0x1::coin::WithdrawEvent']", - "field": { "type": "string" } - }, - { - "name": "functions", - "type": "array", - "description": "An Array of events in string-signature format ex: ['0x1::aptos_account::transfer']", - "field": { "type": "string" } - }, - { - "name": "tag", - "type": "string", - "description": "A user-provided tag that will be send along the webhook, the user can use this tag to identify the specific stream if multiple streams are present" - }, - { - "name": "webhookUrl", - "type": "string", - "description": "Webhook URL where moralis will send the POST request." - } - ] - }, - "responses": [ - { - "status": "200", - "description": "Ok", - "body": { - "type": "object", - "fields": [ - { "name": "id", "type": "string" }, - { "name": "allAddresses", "type": "boolean" }, - { "name": "demo", "type": "boolean" }, - { "name": "description", "type": "string" }, - { "name": "includeChanges", "type": "boolean" }, - { "name": "includeEvents", "type": "boolean" }, - { "name": "includePayload", "type": "boolean" }, - { "name": "isErrorSince", "type": "string" }, - { - "name": "network", - "type": "array", - "field": { "type": "string", "enum": ["mainnet", "testnet"] } - }, - { - "name": "status", - "type": "string", - "description": "The stream status:\n[active] The Stream is healthy and processing blocks\n[paused] The Stream is paused and is not processing blocks\n[error] The Stream has encountered an error and is not processing blocks", - "enum": ["active", "paused", "error", "terminated"] - }, - { "name": "statusMessage", "type": "string" }, - { - "name": "events", - "type": "array", - "field": { "type": "string" } - }, - { - "name": "functions", - "type": "array", - "field": { "type": "string" } - }, - { "name": "tag", "type": "string" }, - { "name": "webhookUrl", "type": "string" }, - { "name": "amountOfAddresses", "type": "number" } - ] - } - } - ] - }, - "aptosStreamsDelete": { - "apiHost": "https://api.moralis-streams.com", - "summary": "Delete a stream", - "description": "Deletes a aptos stream.", - "method": "DELETE", - "path": "/streams/aptos/:id", - "pathParams": [ - { - "name": "id", - "description": "the id of the aptos stream to delete", - "required": true, - "type": "string" - } - ], - "queryParams": [], - "responses": [{ "status": "200", "description": "Ok" }] - }, - "aptosStreamsAddAddresses": { - "apiHost": "https://api.moralis-streams.com", - "summary": "Add addresses to an aptos stream", - "description": "Adds addresses to an existing aptos stream", - "method": "POST", - "path": "/streams/aptos/:id/address", - "pathParams": [ - { - "name": "id", - "description": "the id of the aptos stream to get the addresses from", - "required": true, - "type": "string" - } - ], - "queryParams": [], - "bodyParam": { "required": true, "type": "json" }, - "responses": [{ "status": "200", "description": "Ok" }] - }, - "aptosStreamsDeleteAddresses": { - "apiHost": "https://api.moralis-streams.com", - "summary": "Delete addresses of an aptos stream", - "description": "Deletes addresses of an existing aptos stream", - "method": "DELETE", - "path": "/streams/aptos/:id/address", - "pathParams": [ - { - "name": "id", - "description": "the id of the aptos stream to get the addresses from", - "required": true, - "type": "string" - } - ], - "queryParams": [], - "bodyParam": { - "required": true, - "description": "Provide a list of valid Aptos addresses, or a single address", - "type": "json" - }, - "responses": [{ "status": "200", "description": "Ok" }] - }, - "aptosStreamsGetAddresses": { - "apiHost": "https://api.moralis-streams.com", - "summary": "Get addresses by aptos stream id", - "description": "Get all addresses associated with a specific aptos stream.", - "method": "GET", - "path": "/streams/aptos/:id/address", - "pathParams": [ - { - "name": "id", - "description": "the id of the aptos stream to get the addresses from", - "required": true, - "type": "string" - } - ], - "queryParams": [ - { - "name": "limit", - "description": "Limit response results max value 100", - "required": true, - "type": "number" - }, - { - "name": "cursor", - "description": "Cursor for fetching next page", - "required": false, - "type": "string" - } - ], - "responses": [{ "status": "200", "description": "Ok" }] - }, - "aptosStreamsUpdateStatus": { - "apiHost": "https://api.moralis-streams.com", - "summary": "Update a Stream Status", - "description": "Update a Stream Status", - "method": "POST", - "path": "/streams/aptos/:id/status", - "pathParams": [ - { - "name": "id", - "description": "the id of the aptos stream to update the status", - "required": true, - "type": "string" - } - ], - "queryParams": [], - "bodyParam": { - "required": true, - "description": "Provide an object with the status to update can be 'active' or 'paused'", - "type": "object", - "fields": [ - { - "name": "status", - "type": "string", - "description": "The stream status:\n[active] The Stream is healthy and processing blocks\n[paused] The Stream is paused and is not processing blocks\n[error] The Stream has encountered an error and is not processing blocks", - "enum": ["active", "paused", "error", "terminated"] - } - ] - }, - "responses": [ - { - "status": "200", - "description": "Ok", - "body": { - "type": "object", - "fields": [ - { - "name": "status", - "type": "string", - "description": "The stream status:\n[active] The Stream is healthy and processing blocks\n[paused] The Stream is paused and is not processing blocks\n[error] The Stream has encountered an error and is not processing blocks", - "enum": ["active", "paused", "error", "terminated"] - }, - { "name": "statusMessage", "type": "string" } - ] - } - } - ] - } - }, - "solana": { - "balance": { - "apiHost": "https://solana-gateway.moralis.io", - "summary": "Get native balance by wallet", - "description": "Gets the native balance owned by a given network and address.", - "method": "GET", - "path": "/account/:network/:address/balance", - "pathParams": [ - { - "name": "network", - "description": "The network to query", - "required": true, - "type": "string", - "enum": ["mainnet", "devnet"], - "example": "mainnet" - }, - { - "name": "address", - "description": "The address for which the native balance will be checked", - "required": true, - "type": "string", - "example": "EJpLyTeE8XHG9CeREeHd6pr6hNhaRnTRJx4Z5DPhEJJ6" - } - ], - "queryParams": [], - "responses": [ - { - "status": "200", - "description": "", - "body": { - "type": "object", - "fields": [ - { "name": "solana", "type": "string" }, - { "name": "lamports", "type": "string" } - ] - } - }, - { "status": "400", "description": "" } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = Moralis.SolApi.account.getBalance({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import sol_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = sol_api.account.balance(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getSPL": { - "apiHost": "https://solana-gateway.moralis.io", - "summary": "Get token balance by wallet", - "description": "Gets the token balances owned by a given network and address.", - "method": "GET", - "path": "/account/:network/:address/tokens", - "pathParams": [ - { - "name": "network", - "description": "The network to query", - "required": true, - "type": "string", - "enum": ["mainnet", "devnet"], - "example": "mainnet" - }, - { - "name": "address", - "description": "The address for which token balances will be checked", - "required": true, - "type": "string", - "example": "EJpLyTeE8XHG9CeREeHd6pr6hNhaRnTRJx4Z5DPhEJJ6" - } - ], - "queryParams": [], - "responses": [ - { "status": "200", "description": "" }, - { "status": "400", "description": "" } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = Moralis.SolApi.account.getSPL({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import sol_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = sol_api.account.get_spl(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getNFTs": { - "apiHost": "https://solana-gateway.moralis.io", - "summary": "Get NFTs by wallet", - "description": "Gets NFTs owned by a given network and address.", - "method": "GET", - "path": "/account/:network/:address/nft", - "pathParams": [ - { - "name": "network", - "description": "The network to query", - "required": true, - "type": "string", - "enum": ["mainnet", "devnet"], - "example": "mainnet" - }, - { - "name": "address", - "description": "The address of the wallet", - "required": true, - "type": "string", - "example": "DDy5QHKEDgg5ZyWmwi1rJKwYHe7ZR5udGQfJkc8EPfLM" - } - ], - "queryParams": [], - "responses": [ - { "status": "200", "description": "" }, - { "status": "400", "description": "" } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = Moralis.SolApi.account.getNFTs({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import sol_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = sol_api.account.get_nfts(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getPortfolio": { - "apiHost": "https://solana-gateway.moralis.io", - "summary": "Gets portfolio by wallet", - "description": "Gets the portfolio for a given network and address.", - "method": "GET", - "path": "/account/:network/:address/portfolio", - "pathParams": [ - { - "name": "network", - "description": "The network to query", - "required": true, - "type": "string", - "enum": ["mainnet", "devnet"], - "example": "mainnet" - }, - { - "name": "address", - "description": "The address of the token contract", - "required": true, - "type": "string", - "example": "EJpLyTeE8XHG9CeREeHd6pr6hNhaRnTRJx4Z5DPhEJJ6" - } - ], - "queryParams": [], - "responses": [ - { - "status": "200", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "nativeBalance", - "type": "object", - "fields": [ - { "name": "solana", "type": "string", "required": true }, - { "name": "lamports", "type": "string", "required": true } - ] - }, - { - "name": "nfts", - "type": "object", - "fields": [ - { "name": "associatedTokenAddress", "type": "string" }, - { "name": "mint", "type": "string" }, - { "name": "name", "type": "string" }, - { "name": "symbol", "type": "string" } - ] - }, - { - "name": "tokens", - "type": "object", - "fields": [ - { "name": "associatedTokenAddress", "type": "string" }, - { "name": "mint", "type": "string" }, - { "name": "name", "type": "string" }, - { "name": "symbol", "type": "string" }, - { "name": "amount", "type": "string" }, - { "name": "amountRaw", "type": "string" }, - { "name": "decimals", "type": "number" } - ] - } - ] - } - }, - { "status": "400", "description": "" } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = Moralis.SolApi.account.getPortfolio({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import sol_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = sol_api.account.get_portfolio(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getNFTMetadata": { - "apiHost": "https://solana-gateway.moralis.io", - "summary": "Get NFT metadata", - "description": "Get the global NFT metadata for a given network and contract (mint, standard, name, symbol, metaplex).", - "method": "GET", - "path": "/nft/:network/:address/metadata", - "pathParams": [ - { - "name": "network", - "description": "The network to query", - "required": true, - "type": "string", - "enum": ["mainnet", "devnet"], - "example": "mainnet" - }, - { - "name": "address", - "description": "The address of the contract", - "required": true, - "type": "string", - "example": "DDy5QHKEDgg5ZyWmwi1rJKwYHe7ZR5udGQfJkc8EPfLM" - } - ], - "queryParams": [], - "responses": [ - { - "status": "200", - "description": "", - "body": { - "type": "object", - "fields": [ - { "name": "mint", "type": "string" }, - { "name": "standard", "type": "string" }, - { "name": "name", "type": "string" }, - { "name": "symbol", "type": "string" }, - { - "name": "metaplex", - "type": "object", - "fields": [ - { "name": "metadataUri", "type": "string", "required": true }, - { - "name": "masterEdition", - "type": "boolean", - "required": true - }, - { "name": "isMutable", "type": "boolean", "required": true }, - { - "name": "primarySaleHappened", - "type": "boolean", - "required": true - }, - { - "name": "sellerFeeBasisPoints", - "type": "number", - "required": true - }, - { - "name": "updateAuthority", + "example": 1023323 + } + ], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", "type": "string", - "required": true - } - ] - } + "enum": [ + "eth", + "0x1", + "sepolia", + "0xaa36a7", + "holesky", + "0x4268", + "polygon", + "0x89", + "amoy", + "0x13882", + "bsc", + "0x38", + "bsc testnet", + "0x61", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "gnosis", + "0x64", + "gnosis testnet", + "0x27d8", + "chiliz", + "0x15b38", + "chiliz testnet", + "0x15b32", + "base", + "0x2105", + "base sepolia", + "0x14a34", + "optimism", + "0xa", + "optimism sepolia", + "0xaa37dc", + "linea", + "0xe705", + "linea sepolia", + "0xe705" + ] + } + ], + "responses": [ + { + "status": "200", + "description": "Returns the stats for the wallet address.", + "body": { + "type": "object", + "fields": [ + { + "name": "transactions", + "type": "object", + "description": "Transaction stats", + "fields": [ + { + "name": "total", + "type": "string", + "description": "The number of transactions sent by a wallet", + "example": "1000" + } + ] + }, + { + "name": "nft_transfers", + "type": "object", + "description": "NFT transfer stats", + "fields": [ + { + "name": "total", + "type": "string", + "description": "The number of NFT transfers of a wallet", + "example": "1000" + } + ] + }, + { + "name": "token_transfers", + "type": "object", + "description": "Token transfer stats", + "fields": [ + { + "name": "total", + "type": "string", + "description": "The number of ERC20 token transfers of a wallet", + "example": "1000" + } + ] + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.block.getBlockStats({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.block.get_block_stats(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } - }, - { "status": "400", "description": "" } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = Moralis.SolApi.nft.getNFTMetadata({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import sol_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = sol_api.nft.get_nft_metadata(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" } - ] }, - "getTokenPrice": { - "apiHost": "https://solana-gateway.moralis.io", - "summary": "Get token price", - "description": "Gets the token price (usd and native) for a given contract address and network. Currently, this API only support fetching token price listed on [Raydium DEX](https://raydium.io/).", - "method": "GET", - "path": "/token/:network/:address/price", - "pathParams": [ - { - "name": "network", - "description": "The network to query", - "required": true, - "type": "string", - "enum": ["mainnet", "devnet"], - "example": "mainnet" - }, - { - "name": "address", - "description": "The address of the token contract", - "required": true, - "type": "string", - "example": "SRMuApVNdxXokk5GT7XD5cUUgXMBCoAz2LHeuAoKWRt" - } - ], - "queryParams": [], - "responses": [ - { - "status": "200", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "nativePrice", + "utils": { + "runContractFunction": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Run contract function", + "description": "Run a given function of a contract ABI and retrieve readonly data. [Try it with Swagger](https://deep-index.moralis.io/api-docs-2.1/#/Utils/runContractFunction).", + "method": "POST", + "path": "/:address/function", + "pathParams": [ + { + "name": "address", + "description": "The address of the contract", + "required": true, + "type": "string" + } + ], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", + "type": "string", + "enum": [ + "eth", + "0x1", + "sepolia", + "0xaa36a7", + "holesky", + "0x4268", + "polygon", + "0x89", + "amoy", + "0x13882", + "bsc", + "0x38", + "bsc testnet", + "0x61", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "gnosis", + "0x64", + "gnosis testnet", + "0x27d8", + "chiliz", + "0x15b38", + "chiliz testnet", + "0x15b32", + "base", + "0x2105", + "base sepolia", + "0x14a34", + "optimism", + "0xa", + "optimism sepolia", + "0xaa37dc", + "linea", + "0xe705", + "linea sepolia", + "0xe705" + ] + }, + { + "name": "function_name", + "description": "The function name of the contract", + "required": true, + "type": "string" + } + ], + "bodyParam": { + "required": true, + "description": "Body", "type": "object", "fields": [ - { "name": "value", "type": "string", "required": true }, - { "name": "decimals", "type": "number", "required": true }, - { "name": "name", "type": "string", "required": true }, - { "name": "symbol", "type": "string", "required": true } + { + "name": "abi", + "type": "array", + "description": "The contract ABI", + "example": [], + "field": { "type": "json" } + }, + { + "name": "params", + "type": "json", + "description": "The params for the given function", + "example": {} + } ] - }, - { "name": "usdPrice", "type": "number" }, - { "name": "exchangeAddress", "type": "string" }, - { "name": "exchangeName", "type": "string" } + }, + "responses": [ + { + "status": "200", + "description": "Returns response of the function executed" + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.utils.runContractFunction({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nbody = []\n\nparams = {}\n\nresult = evm_api.utils.run_contract_function(\n api_key=api_key,\n body=body,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } - }, - { "status": "400", "description": "" } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = Moralis.SolApi.token.getTokenPrice({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import sol_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = sol_api.token.get_token_price(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getTokenMetadata": { - "apiHost": "https://solana-gateway.moralis.io", - "summary": "Get Token metadata", - "description": "Get the global token metadata for a given network and contract (mint, standard, name, symbol, metaplex).", - "method": "GET", - "path": "/token/:network/:address/metadata", - "pathParams": [ - { - "name": "network", - "description": "The network to query", - "required": true, - "type": "string", - "enum": ["mainnet", "devnet"], - "example": "mainnet" }, - { - "name": "address", - "description": "The address of the contract", - "required": true, - "type": "string", - "example": "SRMuApVNdxXokk5GT7XD5cUUgXMBCoAz2LHeuAoKWRt" - } - ], - "queryParams": [], - "responses": [ - { - "status": "200", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "mint", - "type": "string" - }, - { - "name": "standard", - "type": "string" - }, - { - "name": "name", - "type": "string" - }, - { - "name": "symbol", - "type": "string" - }, - { - "name": "metaplex", - "type": "object", - "properties": { - "metadataUri": { - "type": "string" - }, - "masterEdition": { - "type": "boolean" - }, - "isMutable": { - "type": "boolean" - }, - "primarySaleHappened": { - "type": "number" - }, - "sellerFeeBasisPoints": { - "type": "number" - }, - "updateAuthority": { - "type": "string" - } - }, - "required": [ - "metadataUri", - "masterEdition", - "isMutable", - "primarySaleHappened", - "sellerFeeBasisPoints", - "updateAuthority" - ] - } + "web3ApiVersion": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get API version", + "description": "Get the current version of the Moralis Web3 API.", + "method": "GET", + "path": "/web3/version", + "pathParams": [], + "queryParams": [], + "responses": [ + { + "status": "200", + "description": "Get the current version of the Moralis Web3 API.", + "body": { + "type": "object", + "fields": [ + { + "name": "version", + "type": "string", + "description": "The version of the API", + "example": "1.0.0" + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.utils.web3ApiVersion({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nresult = evm_api.utils.web3_api_version(\n api_key=api_key,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } - }, - { - "status": "400", - "description": "" - } - ] - } - }, - "aptos-web3": { - "getNFTsByIds": { - "apiHost": "https://mainnet-aptos-api.moralis.io", - "testHost": "https://testnet-aptos-api.moralis.io", - "summary": "Get NFTs by token ID hashes", - "description": "Get one or many NFTs by token ID hash. Learn more about token ID hashes [here](/web3-data-api/aptos/token-id-hashes).", - "method": "GET", - "path": "/nfts", - "pathParams": [], - "queryParams": [ - { - "name": "token_ids", - "description": "The identifiers of the tokens to get", - "required": true, - "type": "array", - "field": { - "type": "string", - "example": "9a47523002a8940afaae60cb01d13ccea0408b17e958ebf1940a9f687785d6da" - } - } - ], - "responses": [ - { - "status": "200", - "description": "", - "body": { - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "collection_data_id_hash", - "type": "string", - "example": "6993fb8b5688d392a2d94127b9926519d6327e69f2bcf3dc0c5df2c060aec97d", - "description": "The identifier of the collection", - "maxLength": 64, - "minLength": 64, - "nullable": false, - "required": true - }, - { - "name": "collection_name", - "type": "string", - "example": "Topaz Troopers", - "description": "The name of the collection", - "maxLength": 128, - "minLength": 1, - "nullable": false, - "required": true - }, - { - "name": "creator_address", - "type": "string", - "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac", - "description": "The address of the creator of the collection", - "maxLength": 66, - "minLength": 66, - "nullable": false, - "required": true - }, - { - "name": "default_properties", - "type": "object", - "example": "{\"point\": \"0x30\", \"author\": \"0x33454e4a4f59204c616273\"}", - "description": "The default properties of the token", - "nullable": true, - "required": true - }, - { - "name": "description", - "type": "string", - "example": "A badge which proves you are an OG #TopazTrooper.", - "description": "The description of the collection", - "nullable": false, - "required": true - }, - { - "name": "description_mutable", - "type": "boolean", - "example": "false", - "description": "Whether the description can be changed", - "nullable": false, - "required": true - }, - { - "name": "largest_property_version", - "type": "string", - "example": "1", - "description": "largest_property_version", - "nullable": false, - "required": true - }, - { - "name": "last_transaction_timestamp", - "type": "string", - "nullable": false, - "example": "2022-09-17T22:03:32.000000Z", - "description": "The timestamp of the last transaction returned in milliseconds", - "required": true - }, - { - "name": "last_transaction_version", - "type": "string", - "example": "210373856", - "description": "The version of the last transaction", - "nullable": false, - "required": true - }, - { - "name": "maximum", - "type": "string", - "example": "18446744073709551615", - "description": "The maximum number of tokens that can be minted", - "nullable": false, - "required": true - }, - { - "name": "maximum_mutable", - "type": "boolean", - "example": "false", - "description": "Whether the maximum number of tokens can be changed", - "nullable": false, - "required": true - }, - { - "name": "metadata_uri", - "type": "string", - "example": "https://static-cdn.risewallet.io/nft/aptos-monkeys/1572.jpeg", - "description": "The URI of the image of the token", - "nullable": false, - "required": true - }, - { - "name": "name", - "type": "string", - "example": "Souffl3 Testnet NFT", - "description": "The name of the token", - "maxLength": 128, - "minLength": 1, - "nullable": false, - "required": true - }, - { - "name": "payee_address", - "type": "string", - "example": "0x0b11e89a399fa11c802099024498da9fc6512bd3d2d3068f0e78320bd6243990", - "description": "The address that last payed for the token", - "maxLength": 66, - "minLength": 66, - "nullable": false, - "required": true - }, - { - "name": "properties_mutable", - "type": "boolean", - "example": "false", - "description": "Whether the properties of the token can be changed", - "nullable": false, - "required": true - }, - { - "name": "royalty_mutable", - "type": "boolean", - "example": "false", - "description": "Whether the royalty of the token can be changed", - "nullable": false, - "required": true - }, - { - "name": "royalty_points_denominator", - "type": "string", - "example": "100", - "description": "The denominator for royalty points", - "nullable": false, - "required": true - }, - { - "name": "royalty_points_numerator", - "type": "string", - "example": "20", - "description": "The numerator for royalty points", - "nullable": false, - "required": true - }, - { - "name": "supply", - "type": "string", - "example": "32976", - "description": "The number of tokens minted", - "nullable": false, - "required": true - }, - { - "name": "token_data_id_hash", - "type": "string", - "example": "1824178d98256f40046db3db8cf462f1c0a8e0d37304218044f11e69761c88e1", - "description": "The identifier of the token", - "maxLength": 64, - "minLength": 64, - "nullable": false, - "required": true - }, - { - "name": "uri_mutable", - "type": "boolean", - "example": "false", - "description": "Whether the URI of the image can be changed", - "nullable": false, - "required": true - } - ] - } - } }, - { - "status": "400", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "statusCode", - "type": "string", - "description": "The status code", - "example": "400" - }, - { - "name": "message", - "type": "array", - "description": "List of things to correct", - "example": ["creator_address must be 66 characters"], - "field": { "type": "string" } - }, - { - "name": "error", - "type": "string", - "description": "Type of error", - "example": "Bad Request" - } + "endpointWeights": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get weights of endpoints", + "description": "Get the cost and rate limit for each API endpoint.", + "method": "GET", + "path": "/info/endpointWeights", + "pathParams": [], + "queryParams": [], + "responses": [ + { + "status": "200", + "description": "The cost and rate limit for each API endpoint." + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.utils.endpointWeights({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nresult = evm_api.utils.endpoint_weights(\n api_key=api_key,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.nfts.getNFTsByIds({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.nfts.get_nfts_by_ids(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getNFTsByCollection": { - "apiHost": "https://mainnet-aptos-api.moralis.io", - "testHost": "https://testnet-aptos-api.moralis.io", - "summary": "Get NFTs by collection", - "description": "Get NFTs by one or many collection ID hashes.", - "method": "GET", - "path": "/nfts/collections/:collection_data_id_hash/tokens", - "pathParams": [ - { - "name": "collection_data_id_hash", - "description": "The collection data id hash of the collection", - "required": true, - "type": "string", - "example": "7ac8cecb76edbbd5da40d719bbb9795fc5744e4098ee0ce1be4bb86c90f42301" - } - ], - "queryParams": [ - { - "name": "limit", - "description": "The number of results to return", - "required": true, - "type": "number", - "example": 5 - }, - { - "name": "offset", - "description": "The number of results to skip", - "required": false, - "type": "number" }, - { - "name": "cursor", - "description": "The cursor to use for getting the next page", - "required": false, - "type": "string" - } - ], - "responses": [ - { - "status": "200", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "cursor", - "type": "string", - "description": "The cursor to use for the next page of results. (Cursor is null on last page)", - "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4" - }, - { - "name": "hasNextPage", - "type": "boolean", - "description": "Indicates if there is a next page of results", - "example": true - }, - { - "name": "result", + "contractsReview": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Review contracts", + "description": "Review contracts as spam or not spam", + "method": "POST", + "path": "/contracts-review", + "pathParams": [], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", + "type": "string", + "enum": [ + "eth", + "0x1", + "sepolia", + "0xaa36a7", + "holesky", + "0x4268", + "polygon", + "0x89", + "amoy", + "0x13882", + "bsc", + "0x38", + "bsc testnet", + "0x61", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "gnosis", + "0x64", + "gnosis testnet", + "0x27d8", + "chiliz", + "0x15b38", + "chiliz testnet", + "0x15b32", + "base", + "0x2105", + "base sepolia", + "0x14a34", + "optimism", + "0xa", + "optimism sepolia", + "0xaa37dc", + "linea", + "0xe705", + "linea sepolia", + "0xe705" + ] + } + ], + "bodyParam": { + "required": true, + "description": "Body", "type": "object", - "description": "The tokens for the given collection", - "example": [], "fields": [ - { - "name": "collection_data_id_hash", - "type": "string", - "description": "The identifier of the collection", - "example": "6993fb8b5688d392a2d94127b9926519d6327e69f2bcf3dc0c5df2c060aec97d" - }, - { - "name": "collection_name", - "type": "string", - "description": "The name of the collection", - "example": "Topaz Troopers" - }, - { - "name": "creator_address", - "type": "string", - "description": "The address of the creator of the collection", - "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" - }, - { - "name": "default_properties", - "type": "json", - "description": "The default properties of the token", - "example": "{\"point\": \"0x30\", \"author\": \"0x33454e4a4f59204c616273\"}" - }, - { - "name": "description", - "type": "string", - "description": "The description of the collection", - "example": "A badge which proves you are an OG #TopazTrooper." - }, - { - "name": "description_mutable", - "type": "boolean", - "description": "Whether the description can be changed", - "example": "false" - }, - { - "name": "largest_property_version", - "type": "string", - "description": "largest_property_version", - "example": "1" - }, - { - "name": "last_transaction_timestamp", - "type": "string", - "description": "The timestamp of the last transaction returned in milliseconds", - "example": "2022-09-17T22:03:32.000000Z" - }, - { - "name": "last_transaction_version", - "type": "string", - "description": "The version of the last transaction", - "example": "210373856" - }, - { - "name": "maximum", - "type": "string", - "description": "The maximum number of tokens that can be minted", - "example": "18446744073709551615" - }, - { - "name": "maximum_mutable", - "type": "boolean", - "description": "Whether the maximum number of tokens can be changed", - "example": "false" - }, - { - "name": "metadata_uri", - "type": "string", - "description": "The URI of the image of the token", - "example": "https://static-cdn.risewallet.io/nft/aptos-monkeys/1572.jpeg" - }, - { - "name": "name", - "type": "string", - "description": "The name of the token", - "example": "Souffl3 Testnet NFT" - }, - { - "name": "payee_address", - "type": "string", - "description": "The address that last payed for the token", - "example": "0x0b11e89a399fa11c802099024498da9fc6512bd3d2d3068f0e78320bd6243990" - }, - { - "name": "properties_mutable", - "type": "boolean", - "description": "Whether the properties of the token can be changed", - "example": "false" - }, - { - "name": "royalty_mutable", - "type": "boolean", - "description": "Whether the royalty of the token can be changed", - "example": "false" - }, - { - "name": "royalty_points_denominator", - "type": "string", - "description": "The denominator for royalty points", - "example": "100" - }, - { - "name": "royalty_points_numerator", - "type": "string", - "description": "The numerator for royalty points", - "example": "20" - }, - { - "name": "supply", - "type": "string", - "description": "The number of tokens minted", - "example": "32976" - }, - { - "name": "token_data_id_hash", - "type": "string", - "description": "The identifier of the token", - "example": "1824178d98256f40046db3db8cf462f1c0a8e0d37304218044f11e69761c88e1" - }, - { - "name": "uri_mutable", - "type": "boolean", - "description": "Whether the URI of the image can be changed", - "example": "false" - } + { + "name": "contracts", + "type": "object", + "description": "The contracts to be reported", + "example": [ + { + "contract_address": "0xa4991609c508b6d4fb7156426db0bd49fe298bd8", + "report_type": "spam", + "contract_type": "ERC20", + "reason": "The contract contains shady code" + } + ], + "fields": [ + { + "name": "contract_address", + "type": "string", + "description": "The contract address", + "example": "0x06012c8cf97bead5deae237070f9587f8e7a266d" + }, + { + "name": "reason", + "type": "string", + "description": "The reason for the contract being spam", + "example": 100 + }, + { + "name": "report_type", + "type": "string", + "description": "This can be spam or not_spam", + "example": "spam", + "enum": ["spam", "not_spam"] + }, + { + "name": "contract_type", + "type": "string", + "description": "This can be ERC20, or NFT", + "example": "ERC20", + "enum": ["ERC20", "NFT"] + } + ] + } ] - } - ] - } - }, - { - "status": "400", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "statusCode", - "type": "string", - "description": "The status code", - "example": "400" - }, - { - "name": "message", - "type": "array", - "description": "List of things to correct", - "example": ["creator_address must be 66 characters"], - "field": { "type": "string" } - }, - { - "name": "error", - "type": "string", - "description": "Type of error", - "example": "Bad Request" - } + }, + "responses": [ + { + "status": "200", + "description": "Returns a message acknowledging the report" + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.utils.contractsReview({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nbody = []\n\nparams = {}\n\nresult = evm_api.utils.contracts_review(\n api_key=api_key,\n body=body,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.nfts.getNFTsByCollection({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.nfts.get_nfts_by_collection(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" } - ] }, - "getNFTsByCreators": { - "apiHost": "https://mainnet-aptos-api.moralis.io", - "testHost": "https://testnet-aptos-api.moralis.io", - "summary": "Get NFTs by creator(s)", - "description": "Get NFTs by one or many creator addresses.", - "method": "GET", - "path": "/nfts/creators", - "pathParams": [], - "queryParams": [ - { - "name": "limit", - "description": "The number of tokens to return", - "required": true, - "type": "number", - "example": 5 - }, - { - "name": "offset", - "description": "The number of results to skip", - "required": false, - "type": "number" + "resolve": { + "resolveAddress": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "ENS Lookup by Address", + "description": "Reverse resolve a given ETH address to its ENS domain.", + "method": "GET", + "path": "/resolve/:address/reverse", + "pathParams": [ + { + "name": "address", + "description": "The address to be resolved", + "required": true, + "example": "0x1f9090aaE28b8a3dCeaDf281B0F12828e676c326", + "type": "string" + } + ], + "queryParams": [], + "responses": [ + { + "status": "200", + "description": "Returns an ENS", + "body": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "description": "Resolved ENS address", + "example": "Vitalik.eth" + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.resolve.resolveAddress({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.resolve.resolve_address(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] }, - { - "name": "cursor", - "description": "The cursor to use for getting the next page", - "required": false, - "type": "string" + "resolveDomain": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Resolve Unstoppable domain", + "description": "Resolve a specific Unstoppable domain to its address.", + "method": "GET", + "path": "/resolve/:domain", + "pathParams": [ + { + "name": "domain", + "description": "The domain to be resolved", + "required": true, + "example": "brad.crypto", + "type": "string" + } + ], + "queryParams": [ + { + "name": "currency", + "description": "The currency to query", + "required": false, + "example": "eth", + "type": "string" + } + ], + "responses": [ + { + "status": "200", + "description": "Returns an address", + "body": { + "type": "object", + "fields": [ + { + "name": "address", + "type": "string", + "description": "Resolved domain address", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + } + ] + } + }, + { "status": "404", "description": "Returns an address" } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.resolve.resolveDomain({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.resolve.resolve_domain(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] }, - { - "name": "creator_addresses", - "description": "The addresses of the creators", - "required": true, - "type": "array", - "field": { - "type": "string", - "example": "0xf932dcb9835e681b21d2f411ef99f4f5e577e6ac299eebee2272a39fb348f702" - } - } - ], - "responses": [ - { - "status": "200", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "cursor", - "type": "string", - "description": "The cursor to use for the next page of results. (Cursor is null on last page)", - "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4" - }, - { - "name": "hasNextPage", - "type": "boolean", - "description": "Indicates if there is a next page of results", - "example": true - }, - { - "name": "result", - "type": "object", - "description": "The collections for the given creators", - "example": [], - "fields": [ - { - "name": "collection_data_id_hash", - "type": "string", - "description": "The identifier of the collection", - "example": "6993fb8b5688d392a2d94127b9926519d6327e69f2bcf3dc0c5df2c060aec97d" - }, - { - "name": "collection_name", - "type": "string", - "description": "The name of the collection", - "example": "Topaz Troopers" - }, - { - "name": "creator_address", - "type": "string", - "description": "The address of the creator of the collection", - "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" - }, - { - "name": "default_properties", - "type": "json", - "description": "The default properties of the token", - "example": "{\"point\": \"0x30\", \"author\": \"0x33454e4a4f59204c616273\"}" - }, - { - "name": "description", - "type": "string", - "description": "The description of the collection", - "example": "A badge which proves you are an OG #TopazTrooper." - }, - { - "name": "description_mutable", - "type": "boolean", - "description": "Whether the description can be changed", - "example": "false" - }, - { - "name": "largest_property_version", - "type": "string", - "description": "largest_property_version", - "example": "1" - }, - { - "name": "last_transaction_timestamp", - "type": "string", - "description": "The timestamp of the last transaction returned in milliseconds", - "example": "2022-09-17T22:03:32.000000Z" - }, - { - "name": "last_transaction_version", - "type": "string", - "description": "The version of the last transaction", - "example": "210373856" - }, - { - "name": "maximum", - "type": "string", - "description": "The maximum number of tokens that can be minted", - "example": "18446744073709551615" - }, - { - "name": "maximum_mutable", - "type": "boolean", - "description": "Whether the maximum number of tokens can be changed", - "example": "false" - }, - { - "name": "metadata_uri", - "type": "string", - "description": "The URI of the image of the token", - "example": "https://static-cdn.risewallet.io/nft/aptos-monkeys/1572.jpeg" - }, - { - "name": "name", - "type": "string", - "description": "The name of the token", - "example": "Souffl3 Testnet NFT" - }, - { - "name": "payee_address", - "type": "string", - "description": "The address that last payed for the token", - "example": "0x0b11e89a399fa11c802099024498da9fc6512bd3d2d3068f0e78320bd6243990" - }, - { - "name": "properties_mutable", - "type": "boolean", - "description": "Whether the properties of the token can be changed", - "example": "false" - }, - { - "name": "royalty_mutable", - "type": "boolean", - "description": "Whether the royalty of the token can be changed", - "example": "false" - }, - { - "name": "royalty_points_denominator", - "type": "string", - "description": "The denominator for royalty points", - "example": "100" - }, - { - "name": "royalty_points_numerator", - "type": "string", - "description": "The numerator for royalty points", - "example": "20" - }, - { - "name": "supply", - "type": "string", - "description": "The number of tokens minted", - "example": "32976" - }, - { - "name": "token_data_id_hash", - "type": "string", - "description": "The identifier of the token", - "example": "1824178d98256f40046db3db8cf462f1c0a8e0d37304218044f11e69761c88e1" - }, - { - "name": "uri_mutable", - "type": "boolean", - "description": "Whether the URI of the image can be changed", - "example": "false" - } - ] - } + "resolveAddressToDomain": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Resolve Address to Unstoppable domain", + "description": "Resolve a specific address to its Unstoppable domain", + "method": "GET", + "path": "/resolve/:address/domain", + "pathParams": [ + { + "name": "address", + "description": "The address to be resolved", + "required": true, + "example": "0x94ef5300cbc0aa600a821ccbc561b057e456ab23", + "type": "string" + } + ], + "queryParams": [], + "responses": [ + { + "status": "200", + "description": "Returns an unstoppable domain", + "body": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "description": "Resolved unstoppable domain address", + "example": "sandy.nft" + } + ] + } + }, + { + "status": "404", + "description": "Returns an unstoppable domain" + } ] - } }, - { - "status": "400", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "statusCode", - "type": "string", - "description": "The status code", - "example": "400" - }, - { - "name": "message", - "type": "array", - "description": "List of things to correct", - "example": ["creator_address must be 66 characters"], - "field": { "type": "string" } - }, - { - "name": "error", - "type": "string", - "description": "Type of error", - "example": "Bad Request" - } + "resolveENSDomain": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "ENS Lookup by Domain", + "description": "Resolve a specific ENS domain to its address.", + "method": "GET", + "path": "/resolve/ens/:domain", + "pathParams": [ + { + "name": "domain", + "description": "The domain to be resolved", + "required": true, + "example": "vitalik.eth", + "type": "string" + } + ], + "queryParams": [], + "responses": [ + { + "status": "200", + "description": "Returns an address", + "body": { + "type": "object", + "fields": [ + { + "name": "address", + "type": "string", + "description": "Resolved domain address", + "example": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e" + } + ] + } + }, + { "status": "404", "description": "Returns an address" } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.resolve.resolveENSDomain({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.resolve.resolve_e_n_s_domain(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.nfts.getNFTsByCreators({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.nfts.get_nfts_by_creators(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" } - ] }, - "getNFTCollections": { - "apiHost": "https://mainnet-aptos-api.moralis.io", - "testHost": "https://testnet-aptos-api.moralis.io", - "summary": "Get NFT Collections", - "descipriton": "Get NFT Collections by searching collection title using `fromName` or `toName`, or combine both to return collections within a range (e.g. all collections `fromName` \"A\" to `toName` \"D\" will return all collections from A to D). Returns all collections in A-Z order if `fromName` or `toName` is not specified", - "method": "GET", - "path": "/collections", - "pathParams": [], - "queryParams": [ - { - "name": "limit", - "description": "The number of results to return", - "required": true, - "type": "number", - "example": 5 - }, - { - "name": "offset", - "description": "The number of results to skip", - "required": false, - "type": "number" - }, - { - "name": "cursor", - "description": "The cursor to use for getting the next page", - "required": false, - "type": "string" - }, - { - "name": "fromName", - "description": "The name of the collection to start from (inclusive and case sensitive)", - "required": false, - "type": "string" - }, - { - "name": "toName", - "description": "The name of the collection to end at (inclusive and case sensitive)", - "required": false, - "type": "string" - } - ], - "responses": [ - { - "status": "200", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "cursor", - "type": "string", - "description": "The cursor to use for the next page of results. (Cursor is null on last page)", - "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4" - }, - { - "name": "hasNextPage", - "type": "boolean", - "description": "Indicates if there is a next page of results", - "example": true - }, - { - "name": "result", - "type": "object", - "description": "The collections for the given creator", - "example": [], - "fields": [ - { - "name": "collection_data_id_hash", - "type": "string", - "description": "The identifier of the collection", - "example": "6993fb8b5688d392a2d94127b9926519d6327e69f2bcf3dc0c5df2c060aec97d" - }, - { - "name": "collection_name", - "type": "string", - "description": "The name of the collection", - "example": "Topaz Troopers" - }, - { - "name": "creator_address", - "type": "string", - "description": "The address of the creator of the collection", - "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" - }, - { - "name": "description", - "type": "string", - "description": "The description of the collection", - "example": "A badge which proves you are an OG #TopazTrooper." - }, - { - "name": "description_mutable", - "type": "boolean", - "description": "Whether the description can be changed", - "example": "false" - }, - { - "name": "last_transaction_timestamp", - "type": "string", - "description": "The timestamp of the last transaction returned in milliseconds", - "example": "2022-09-17T22:03:32.000000Z" - }, - { - "name": "last_transaction_version", - "type": "string", - "description": "The version of the last transaction", - "example": "210373856" - }, - { - "name": "maximum", - "type": "string", - "description": "The maximum number of tokens that can be minted", - "example": "18446744073709551615" - }, - { - "name": "maximum_mutable", - "type": "boolean", - "description": "Whether the maximum number of tokens can be changed", - "example": "false" - }, - { - "name": "metadata_uri", - "type": "string", - "description": "The URI of the image of the collection", - "example": "https://static-cdn.risewallet.io/nft/aptos-monkeys/1572.jpeg" - }, - { - "name": "supply", - "type": "string", - "description": "The number of tokens minted", - "example": "32976" - }, - { - "name": "table_handle", + "defi": { + "getPairReserves": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get DEX token pair reserves", + "description": "Get the liquidity reserves for a given pair address. Only Uniswap V2 based exchanges supported at the moment.", + "method": "GET", + "path": "/:pair_address/reserves", + "pathParams": [ + { + "name": "pair_address", + "description": "The liquidity pair address", + "required": true, + "example": "0xa2107fa5b38d9bbd2c461d6edf11b11a50f6b974", + "type": "string" + } + ], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", "type": "string", - "description": "The address of the table that stores the tokens", - "example": "0x293d59ded27fc85fef070b026834d2be7e7ced76c3c32ecbcd4f44b461518c30" - }, - { - "name": "uri_mutable", - "type": "boolean", - "description": "Whether the URI of the image can be changed", - "example": "false" - } - ] - } + "enum": [ + "eth", + "0x1", + "polygon", + "0x89", + "bsc", + "0x38", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "gnosis", + "0x64", + "chiliz", + "0x15b38", + "base", + "0x2105", + "optimism", + "0xa", + "linea", + "0xe705" + ] + }, + { + "name": "to_block", + "description": "The block number to get the reserves from", + "required": false, + "type": "string" + }, + { + "name": "to_date", + "description": "Get the reserves up to this date (any format that is accepted by momentjs)\n* Provide the param 'to_block' or 'to_date'\n* If 'to_date' and 'to_block' are provided, 'to_block' will be used.\n", + "type": "string" + } + ], + "responses": [ + { "status": "200", "description": "Returns the pair reserves" } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.defi.getPairReserves({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.defi.get_pair_reserves(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } }, - { - "status": "400", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "statusCode", - "type": "string", - "description": "The status code", - "example": "400" - }, - { - "name": "message", - "type": "array", - "description": "List of things to correct", - "example": ["creator_address must be 66 characters"], - "field": { "type": "string" } - }, - { - "name": "error", - "type": "string", - "description": "Type of error", - "example": "Bad Request" - } + "getPairAddress": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get DEX token pair address", + "description": "Fetch the pair data of the provided token0+token1 combination.\nThe token0 and token1 options are interchangable (ie. there is no different outcome in \"token0=WETH and token1=USDT\" or \"token0=USDT and token1=WETH\")\n", + "method": "GET", + "path": "/:token0_address/:token1_address/pairAddress", + "pathParams": [ + { + "name": "token0_address", + "description": "The token0 address", + "required": true, + "example": "0x2b591e99afe9f32eaa6214f7b7629768c40eeb39", + "type": "string" + }, + { + "name": "token1_address", + "description": "The token1 address", + "required": true, + "example": "0xdac17f958d2ee523a2206206994597c13d831ec7", + "type": "string" + } + ], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", + "type": "string", + "enum": [ + "eth", + "0x1", + "polygon", + "0x89", + "bsc", + "0x38", + "avalanche", + "0xa86a", + "fantom", + "0xfa", + "palm", + "0x2a15c308d", + "cronos", + "0x19", + "arbitrum", + "0xa4b1", + "gnosis", + "0x64", + "chiliz", + "0x15b38", + "base", + "0x2105", + "optimism", + "0xa", + "linea", + "0xe705" + ] + }, + { + "name": "to_block", + "description": "The block number to get the reserves from", + "required": false, + "type": "string" + }, + { + "name": "to_date", + "description": "Get the reserves up to this date (any format that is accepted by momentjs)\n* Provide the param 'to_block' or 'to_date'\n* If 'to_date' and 'to_block' are provided, 'to_block' will be used.\n", + "type": "string" + }, + { + "name": "exchange", + "description": "The factory name or address of the token exchange", + "required": true, + "example": "uniswapv2", + "type": "string", + "enum": [ + "uniswapv2", + "uniswapv3", + "sushiswapv2", + "pancakeswapv1", + "pancakeswapv2", + "quickswap", + "quickswapv2", + "traderjoe", + "pangolin", + "spookyswap", + "vvs", + "camelotv2" + ] + } + ], + "responses": [ + { + "status": "200", + "description": "Returns the pair address of the two tokens.", + "body": { + "type": "object", + "fields": [ + { "name": "token0", "type": "json" }, + { "name": "token1", "type": "json" }, + { + "name": "pairAddress", + "type": "string", + "example": "0xbbb9bf440d0f686487925fef3b0a0f9aa67753f6" + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.defi.getPairAddress({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = evm_api.defi.get_pair_address(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.collections.getNFTCollections({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.collections.get_nft_collections(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" } - ] }, - "getNFTCollectionsByIds": { - "apiHost": "https://mainnet-aptos-api.moralis.io", - "testHost": "https://testnet-aptos-api.moralis.io", - "summary": "Get NFT collections by collection ID hashes", - "description": "Get one or many NFT Collections by collection ID hash.", - "method": "GET", - "path": "/collections/ids", - "pathParams": [], - "queryParams": [ - { - "name": "ids", - "description": "The identifiers of the collections to get", - "required": true, - "type": "array", - "field": { - "type": "string", - "example": "7ac8cecb76edbbd5da40d719bbb9795fc5744e4098ee0ce1be4bb86c90f42301" - } - } - ], - "responses": [ - { - "status": "200", - "description": "", - "body": { - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "collection_data_id_hash", - "type": "string", - "example": "6993fb8b5688d392a2d94127b9926519d6327e69f2bcf3dc0c5df2c060aec97d", - "description": "The identifier of the collection", - "maxLength": 64, - "minLength": 64, - "nullable": false, - "required": true - }, - { - "name": "collection_name", - "type": "string", - "example": "Topaz Troopers", - "description": "The name of the collection", - "maxLength": 128, - "minLength": 1, - "nullable": false, - "required": true - }, - { - "name": "creator_address", - "type": "string", - "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac", - "description": "The address of the creator of the collection", - "maxLength": 66, - "minLength": 66, - "nullable": false, - "required": true - }, - { - "name": "description", - "type": "string", - "example": "A badge which proves you are an OG #TopazTrooper.", - "description": "The description of the collection", - "nullable": false, - "required": true - }, - { - "name": "description_mutable", - "type": "boolean", - "example": "false", - "description": "Whether the description can be changed", - "nullable": false, - "required": true - }, - { - "name": "last_transaction_timestamp", - "type": "string", - "nullable": false, - "example": "2022-09-17T22:03:32.000000Z", - "description": "The timestamp of the last transaction returned in milliseconds", - "required": true - }, - { - "name": "last_transaction_version", - "type": "string", - "example": "210373856", - "description": "The version of the last transaction", - "nullable": false, - "required": true - }, - { - "name": "maximum", - "type": "string", - "example": "18446744073709551615", - "description": "The maximum number of tokens that can be minted", - "nullable": false, - "required": true - }, - { - "name": "maximum_mutable", - "type": "boolean", - "example": "false", - "description": "Whether the maximum number of tokens can be changed", - "nullable": false, - "required": true - }, - { - "name": "metadata_uri", - "type": "string", - "example": "https://static-cdn.risewallet.io/nft/aptos-monkeys/1572.jpeg", - "description": "The URI of the image of the collection", - "nullable": false, - "required": true - }, - { - "name": "supply", - "type": "string", - "example": "32976", - "description": "The number of tokens minted", - "nullable": false, - "required": true - }, - { - "name": "table_handle", - "type": "string", - "nullable": false, - "example": "0x293d59ded27fc85fef070b026834d2be7e7ced76c3c32ecbcd4f44b461518c30", - "description": "The address of the table that stores the tokens", - "required": true - }, - { - "name": "uri_mutable", - "type": "boolean", - "example": "false", - "description": "Whether the URI of the image can be changed", - "nullable": false, - "required": true - } - ] - } - } - }, - { - "status": "400", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "statusCode", - "type": "string", - "description": "The status code", - "example": "400" - }, - { - "name": "message", + "ipfs": { + "uploadFolder": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Upload folder to IPFS", + "description": "Upload multiple files to IPFS and place them in a folder directory. To use the API, [sign up to Moralis](https://admin.moralis.io/register) and get your API key from the dashboard.\n", + "method": "POST", + "path": "/ipfs/uploadFolder", + "pathParams": [], + "queryParams": [], + "bodyParam": { + "required": false, + "description": "Array of JSON and Base64 Supported", "type": "array", - "description": "List of things to correct", - "example": ["creator_address must be 66 characters"], - "field": { "type": "string" } - }, - { - "name": "error", - "type": "string", - "description": "Type of error", - "example": "Bad Request" - } + "field": { + "type": "object", + "fields": [ + { + "name": "path", + "type": "string", + "description": "Path to the file", + "example": "moralis/logo.jpg", + "disabled": true + }, + { + "name": "content", + "type": "string", + "description": "Base64 or JSON", + "example": "iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAApgAAAKYB3X3", + "disabled": true + } + ] + } + }, + "responses": [ + { + "status": "200", + "description": "Returns the path to the uploaded files" + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.EvmApi.ipfs.uploadFolder({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\n\nbody = []\n\nresult = evm_api.ipfs.upload_folder(\n api_key=api_key,\n body=body,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.collections.getNFTCollectionsByIds({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.collections.get_nft_collections_by_ids(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" } - ] }, - "getNFTCollectionsByCreator": { - "apiHost": "https://mainnet-aptos-api.moralis.io", - "testHost": "https://testnet-aptos-api.moralis.io", - "summary": "Get NFT Collections by creator", - "description": "Get NFT Collections created by one or many creator addresses.", - "method": "GET", - "path": "/collections/creators", - "pathParams": [], - "queryParams": [ - { - "name": "limit", - "description": "The number of results to return", - "required": true, - "type": "number", - "example": 5 - }, - { - "name": "offset", - "description": "The number of results to skip", - "required": false, - "type": "number" - }, - { - "name": "cursor", - "description": "The cursor to use for getting the next page", - "required": false, - "type": "string" - }, - { - "name": "creator_address", - "description": "The address of the creator", - "required": true, - "type": "string", - "example": "0xf932dcb9835e681b21d2f411ef99f4f5e577e6ac299eebee2272a39fb348f702" - } - ], - "responses": [ - { - "status": "200", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "cursor", - "type": "string", - "description": "The cursor to use for the next page of results. (Cursor is null on last page)", - "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4" - }, - { - "name": "hasNextPage", - "type": "boolean", - "description": "Indicates if there is a next page of results", - "example": true - }, - { - "name": "result", + "auth": { + "requestChallengeEvm": { + "apiHost": "https://authapi.moralis.io", + "summary": "Request EVM challenge", + "method": "POST", + "path": "/challenge/request/evm", + "pathParams": [], + "queryParams": [], + "bodyParam": { + "required": true, + "description": "Request EVM challenge message.", "type": "object", - "description": "The collections for the given creator", - "example": [], "fields": [ - { - "name": "collection_data_id_hash", - "type": "string", - "description": "The identifier of the collection", - "example": "6993fb8b5688d392a2d94127b9926519d6327e69f2bcf3dc0c5df2c060aec97d" - }, - { - "name": "collection_name", - "type": "string", - "description": "The name of the collection", - "example": "Topaz Troopers" - }, - { - "name": "creator_address", - "type": "string", - "description": "The address of the creator of the collection", - "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" - }, - { - "name": "description", - "type": "string", - "description": "The description of the collection", - "example": "A badge which proves you are an OG #TopazTrooper." - }, - { - "name": "description_mutable", - "type": "boolean", - "description": "Whether the description can be changed", - "example": "false" - }, - { - "name": "last_transaction_timestamp", - "type": "string", - "description": "The timestamp of the last transaction returned in milliseconds", - "example": "2022-09-17T22:03:32.000000Z" - }, - { - "name": "last_transaction_version", - "type": "string", - "description": "The version of the last transaction", - "example": "210373856" - }, - { - "name": "maximum", - "type": "string", - "description": "The maximum number of tokens that can be minted", - "example": "18446744073709551615" - }, - { - "name": "maximum_mutable", - "type": "boolean", - "description": "Whether the maximum number of tokens can be changed", - "example": "false" - }, - { - "name": "metadata_uri", - "type": "string", - "description": "The URI of the image of the collection", - "example": "https://static-cdn.risewallet.io/nft/aptos-monkeys/1572.jpeg" - }, - { - "name": "supply", - "type": "string", - "description": "The number of tokens minted", - "example": "32976" - }, - { - "name": "table_handle", - "type": "string", - "description": "The address of the table that stores the tokens", - "example": "0x293d59ded27fc85fef070b026834d2be7e7ced76c3c32ecbcd4f44b461518c30" - }, - { - "name": "uri_mutable", - "type": "boolean", - "description": "Whether the URI of the image can be changed", - "example": "false" - } + { + "name": "domain", + "type": "string", + "required": true, + "description": "RFC 4501 dns authority that is requesting the signing.", + "example": "defi.finance" + }, + { + "name": "chainId", + "type": "string", + "required": true, + "description": "EIP-155 Chain ID to which the session is bound, and the network where Contract Accounts must be resolved.", + "example": 1 + }, + { + "name": "address", + "type": "string", + "required": true, + "description": "Ethereum address performing the signing conformant to capitalization encoded checksum specified in EIP-55 where applicable.", + "example": "0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B" + }, + { + "name": "statement", + "type": "string", + "description": "Human-readable ASCII assertion that the user will sign, and it must not contain `\n`.", + "example": "Please confirm" + }, + { + "name": "uri", + "type": "string", + "required": true, + "description": "RFC 3986 URI referring to the resource that is the subject of the signing (as in the __subject__ of a claim).", + "example": "https://defi.finance/" + }, + { + "name": "expirationTime", + "type": "string", + "description": "ISO 8601 datetime string that, if present, indicates when the signed authentication message is no longer valid.", + "example": "2020-01-01T00:00:00.000Z" + }, + { + "name": "notBefore", + "type": "string", + "description": "ISO 8601 datetime string that, if present, indicates when the signed authentication message will become valid.", + "example": "2020-01-01T00:00:00.000Z" + }, + { + "name": "resources", + "type": "array", + "description": "List of information or references to information the user wishes to have resolved as part of authentication by the relying party. They are expressed as RFC 3986 URIs separated by new lines.", + "example": ["https://docs.moralis.io/"], + "field": { "type": "string" } + }, + { + "name": "timeout", + "type": "number", + "required": true, + "description": "Time in seconds before the challenge is expired", + "example": 15 + } ] - } + }, + "responses": [ + { + "status": "201", + "description": "The back channel challenge containing the id to store on the api and the message to be signed by the user", + "body": { + "type": "object", + "fields": [ + { + "name": "id", + "type": "string", + "description": "17-characters Alphanumeric string Secret Challenge ID used to identify this particular request. Is should be used at the backend of the calling service to identify the completed request.", + "example": "fRyt67D3eRss3RrXa" + }, + { + "name": "message", + "type": "string", + "description": "Message that needs to be signed by the end user", + "example": "defi.finance wants you to sign in with your Ethereum account:\n0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B\n\nPlease confirm\n\nURI: https://defi.finance/\nVersion: 1\nChain ID: 1\nNonce: DbU1DCTmdzR4lg3wi\nIssued At: 2022-06-12T12:15:31.290Z\nExpiration Time: 2020-01-01T00:00:00.000Z\nNot Before: 2020-01-01T00:00:00.000Z\nResources:\n- https://docs.moralis.io/" + }, + { + "name": "profileId", + "type": "string", + "description": "Unique identifier with a length of 66 characters", + "example": "0xbfbcfab169c67072ff418133124480fea02175f1402aaa497daa4fd09026b0e1" + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n \n const response = Moralis.Auth.requestMessage({});\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import auth\napi_key = \"YOUR_API_KEY\"\n\nbody = []\n\nresult = auth.challenge.request_challenge_evm(\n api_key=api_key,\n body=body,\n)\nprint(result)", + "name": "Moralis Python SDK" + } ] - } }, - { - "status": "400", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "statusCode", - "type": "string", - "description": "The status code", - "example": "400" - }, - { - "name": "message", - "type": "array", - "description": "List of things to correct", - "example": ["creator_address must be 66 characters"], - "field": { "type": "string" } - }, - { - "name": "error", - "type": "string", - "description": "Type of error", - "example": "Bad Request" - } + "verifyChallengeEvm": { + "apiHost": "https://authapi.moralis.io", + "summary": "Verify EVM challenge", + "method": "POST", + "path": "/challenge/verify/evm", + "pathParams": [], + "queryParams": [], + "bodyParam": { + "required": true, + "description": "Verify EVM challenge message.", + "type": "object", + "fields": [ + { + "name": "message", + "type": "string", + "required": true, + "description": "Message that needs to be signed by the end user.", + "example": "defi.finance wants you to sign in with your Ethereum account:\n0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B\n\n\nURI: https://defi.finance\nVersion: 1\nChain ID: 1\nNonce: Px7Nh1RPzlCLwqgOb\nIssued At: 2022-11-30T10:20:00.262Z" + }, + { + "name": "signature", + "type": "string", + "required": true, + "description": "EIP-191 compliant signature signed by the Ethereum account address requesting authentication.", + "example": "0xa8f89a58bf9b433d3100f9e41ee35b5e31fb8c7cd62547acb113162ec6f2e4140207e2dfbd4e387e1801ebc7f08a9dd105ac1d22b2e2ff0df5fa8b6d9bdcfe491c" + } + ] + }, + "responses": [ + { + "status": "201", + "description": "The token to be used to call the third party API from the client", + "body": { + "type": "object", + "fields": [ + { + "name": "id", + "type": "string", + "description": "17-characters Alphanumeric string Secret Challenge ID used to identify this particular request. Is should be used at the backend of the calling service to identify the completed request.", + "example": "fRyt67D3eRss3RrX" + }, + { + "name": "domain", + "type": "string", + "description": "RFC 4501 dns authority that is requesting the signing.", + "example": "defi.finance" + }, + { + "name": "chainId", + "type": "string", + "description": "EIP-155 Chain ID to which the session is bound, and the network where Contract Accounts must be resolved.", + "example": 1 + }, + { + "name": "address", + "type": "string", + "description": "Ethereum address performing the signing conformant to capitalization encoded checksum specified in EIP-55 where applicable.", + "example": "0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B" + }, + { + "name": "statement", + "type": "string", + "description": "Human-readable ASCII assertion that the user will sign, and it must not contain `\n`.", + "example": "Please confirm" + }, + { + "name": "uri", + "type": "string", + "description": "RFC 3986 URI referring to the resource that is the subject of the signing (as in the __subject__ of a claim).", + "example": "https://defi.finance/" + }, + { + "name": "expirationTime", + "type": "string", + "description": "ISO 8601 datetime string that, if present, indicates when the signed authentication message is no longer valid.", + "example": "2020-01-01T00:00:00.000Z" + }, + { + "name": "notBefore", + "type": "string", + "description": "ISO 8601 datetime string that, if present, indicates when the signed authentication message will become valid.", + "example": "2020-01-01T00:00:00.000Z" + }, + { + "name": "resources", + "type": "array", + "description": "List of information or references to information the user wishes to have resolved as part of authentication by the relying party. They are expressed as RFC 3986 URIs separated by `\n- `.", + "example": ["https://docs.moralis.io/"], + "field": { "type": "string" } + }, + { + "name": "version", + "type": "string", + "description": "EIP-155 Chain ID to which the session is bound, and the network where Contract Accounts must be resolved.", + "example": "1.0" + }, + { + "name": "nonce", + "type": "string", + "example": "0x1234567890abcdef0123456789abcdef1234567890abcdef" + }, + { + "name": "profileId", + "type": "string", + "description": "Unique identifier with a length of 66 characters", + "example": "0xbfbcfab169c67072ff418133124480fea02175f1402aaa497daa4fd09026b0e1" + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n \n const response = Moralis.Auth.verify({});\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import auth\napi_key = \"YOUR_API_KEY\"\n\nbody = []\n\nresult = auth.challenge.verify_challenge_evm(\n api_key=api_key,\n body=body,\n)\nprint(result)", + "name": "Moralis Python SDK" + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.collections.getNFTCollectionsByCreator({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.collections.get_nft_collections_by_creator(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getNFTOwnersByTokens": { - "apiHost": "https://mainnet-aptos-api.moralis.io", - "testHost": "https://testnet-aptos-api.moralis.io", - "summary": "Get NFT owners by token(s)", - "description": "Get owners for one or many NFTs by token ID hash. Learn more about token ID hashes [here](/web3-data-api/aptos/token-id-hashes).", - "method": "GET", - "path": "/nfts/owners", - "pathParams": [], - "queryParams": [ - { - "name": "limit", - "description": "The number of results to return", - "required": true, - "type": "number", - "example": 5 - }, - { - "name": "offset", - "description": "The number of results to skip", - "required": false, - "type": "number" - }, - { - "name": "cursor", - "description": "The cursor to use for getting the next page", - "required": false, - "type": "string" }, - { - "name": "token_ids", - "description": "The identifiers of the tokens to get owners for", - "required": true, - "type": "array", - "field": { - "type": "string", - "example": "9a47523002a8940afaae60cb01d13ccea0408b17e958ebf1940a9f687785d6da" - } - } - ], - "responses": [ - { - "status": "200", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "cursor", - "type": "string", - "description": "The cursor to use for the next page of results. (Cursor is null on last page)", - "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4" - }, - { - "name": "hasNextPage", - "type": "boolean", - "description": "Indicates if there is a next page of results", - "example": true - }, - { - "name": "result", + "requestChallengeSolana": { + "apiHost": "https://authapi.moralis.io", + "summary": "Request Solana challenge", + "method": "POST", + "path": "/challenge/request/solana", + "pathParams": [], + "queryParams": [], + "bodyParam": { + "required": true, + "description": "Request Solana challenge message.", "type": "object", - "description": "The owners for the given tokens", - "example": [], "fields": [ - { - "name": "amount", - "type": "string", - "description": "The number of tokens that belonging to the owner", - "example": "2" - }, - { - "name": "collection_data_id_hash", - "type": "string", - "description": "The identifier of the collection", - "example": "6993fb8b5688d392a2d94127b9926519d6327e69f2bcf3dc0c5df2c060aec97d" - }, - { - "name": "collection_name", - "type": "string", - "description": "The name of the collection", - "example": "Topaz Troopers" - }, - { - "name": "creator_address", - "type": "string", - "description": "The address of the creator of the collection", - "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" - }, - { - "name": "last_transaction_timestamp", - "type": "string", - "description": "The timestamp of the last transaction returned in milliseconds", - "example": "2022-09-17T22:03:32.000000Z" - }, - { - "name": "last_transaction_version", - "type": "string", - "description": "The version of the last transaction", - "example": "210373856" - }, - { - "name": "name", - "type": "string", - "description": "The name of the token", - "example": "Topaz Troopers 123" - }, - { - "name": "owner_address", - "type": "string", - "description": "The address of the owner of the token", - "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" - }, - { - "name": "property_version", - "type": "string", - "description": "The property version of the token", - "example": "1" - }, - { - "name": "table_type", - "type": "string", - "description": "The data structure of the token", - "example": "0x3::token::TokenStore" - }, - { - "name": "token_data_id_hash", - "type": "string", - "description": "The identifier of the token", - "example": "1824178d98256f40046db3db8cf462f1c0a8e0d37304218044f11e69761c88e1" - }, - { - "name": "token_properties", - "type": "json", - "description": "The properties of the token", - "example": "{\"point\": \"0x30\", \"author\": \"0x33454e4a4f59204c616273\"}" - } + { + "name": "domain", + "type": "string", + "required": true, + "description": "RFC 4501 dns authority that is requesting the signing.", + "example": "defi.finance" + }, + { + "name": "network", + "type": "string", + "required": true, + "description": "The network where Contract Accounts must be resolved.", + "example": "mainnet" + }, + { + "name": "address", + "type": "string", + "required": true, + "description": "Solana address with a length of 32 - 44 characters that is used to perform the signing", + "example": "26qv4GCcx98RihuK3c4T6ozB3J7L6VwCuFVc7Ta2A3Uo" + }, + { + "name": "statement", + "type": "string", + "description": "Human-readable ASCII assertion that the user will sign, and it must not contain `\n`.", + "example": "Please confirm" + }, + { + "name": "uri", + "type": "string", + "required": true, + "description": "RFC 3986 URI referring to the resource that is the subject of the signing (as in the __subject__ of a claim).", + "example": "https://defi.finance/" + }, + { + "name": "expirationTime", + "type": "string", + "description": "ISO 8601 datetime string that, if present, indicates when the signed authentication message is no longer valid.", + "example": "2020-01-01T00:00:00.000Z" + }, + { + "name": "notBefore", + "type": "string", + "description": "ISO 8601 datetime string that, if present, indicates when the signed authentication message will become valid.", + "example": "2020-01-01T00:00:00.000Z" + }, + { + "name": "resources", + "type": "array", + "description": "List of information or references to information the user wishes to have resolved as part of authentication by the relying party. They are expressed as RFC 3986 URIs separated by new lines.", + "example": ["https://docs.moralis.io/"], + "field": { "type": "string" } + }, + { + "name": "timeout", + "type": "number", + "required": true, + "description": "Time in seconds before the challenge is expired", + "example": 15 + } ] - } - ] - } - }, - { - "status": "400", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "statusCode", - "type": "string", - "description": "The status code", - "example": "400" - }, - { - "name": "message", - "type": "array", - "description": "List of things to correct", - "example": ["creator_address must be 66 characters"], - "field": { "type": "string" } - }, - { - "name": "error", - "type": "string", - "description": "Type of error", - "example": "Bad Request" - } + }, + "responses": [ + { + "status": "201", + "description": "The back channel challenge containing the id to store on the api and the message to be signed by the user", + "body": { + "type": "object", + "fields": [ + { + "name": "id", + "type": "string", + "description": "17-characters Alphanumeric string Secret Challenge ID used to identify this particular request. Is should be used at the backend of the calling service to identify the completed request.", + "example": "fRyt67D3eRss3RrXa" + }, + { + "name": "message", + "type": "string", + "description": "Message that needs to be signed by the end user", + "example": "defi.finance wants you to sign in with your Solana account:\n26qv4GCcx98RihuK3c4T6ozB3J7L6VwCuFVc7Ta2A3Uo\n\nI am a third party API\n\nURI: http://defi.finance\nVersion: 1\nNetwork: mainnet\nNonce: PYxxb9msdjVXsMQ9x\nIssued At: 2022-08-25T11:02:34.097Z\nExpiration Time: 2022-08-25T11:12:38.243Z\nResources:\n- https://docs.moralis.io/" + }, + { + "name": "profileId", + "type": "string", + "description": "Unique identifier with a length of 66 characters", + "example": "0xbfbcfab169c67072ff418133124480fea02175f1402aaa497daa4fd09026b0e1" + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n \n const response = Moralis.Auth.requestMessage({});\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import auth\napi_key = \"YOUR_API_KEY\"\n\nbody = []\n\nresult = auth.challenge.request_challenge_solana(\n api_key=api_key,\n body=body,\n)\nprint(result)", + "name": "Moralis Python SDK" + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.nfts.getNFTOwnersByTokens({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.nfts.get_nft_owners_by_tokens(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getNFTOwnersByCollection": { - "apiHost": "https://mainnet-aptos-api.moralis.io", - "testHost": "https://testnet-aptos-api.moralis.io", - "summary": "Get NFT transfers by collection", - "description": "Get NFT transfers for a given collection ID hash.", - "method": "GET", - "path": "/nfts/collections/:collection_data_id_hash/owners", - "pathParams": [ - { - "name": "collection_data_id_hash", - "description": "The id of the token", - "required": true, - "type": "string", - "example": "7ac8cecb76edbbd5da40d719bbb9795fc5744e4098ee0ce1be4bb86c90f42301" - } - ], - "queryParams": [ - { - "name": "limit", - "description": "The number of results to return", - "required": true, - "type": "number", - "example": 5 - }, - { - "name": "offset", - "description": "The number of results to skip", - "required": false, - "type": "number" }, - { - "name": "cursor", - "description": "The cursor to use for getting the next page", - "required": false, - "type": "string" - }, - { - "name": "wallet_blacklist", - "description": "The addresses of the wallets to blacklist", - "required": false, - "type": "array", - "field": { "type": "string" } - }, - { - "name": "wallet_whitelist", - "description": "The addresses of the wallets to whitelist", - "required": false, - "type": "array", - "field": { "type": "string" } - } - ], - "responses": [ - { - "status": "200", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "cursor", - "type": "string", - "required": true, - "description": "The cursor to use for the next page of results. (Cursor is null on last page)", - "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4" - }, - { - "name": "hasNextPage", - "type": "boolean", + "verifyChallengeSolana": { + "apiHost": "https://authapi.moralis.io", + "summary": "Verify Solana challenge", + "method": "POST", + "path": "/challenge/verify/solana", + "pathParams": [], + "queryParams": [], + "bodyParam": { "required": true, - "description": "Indicates if there is a next page of results", - "example": true - }, - { - "name": "result", + "description": "Verify Solana challenge message.", "type": "object", - "required": true, - "description": "The owners for the given collection", - "example": [], "fields": [ - { - "name": "amount", - "type": "string", - "description": "The number of tokens that belonging to the owner", - "example": "2" - }, - { - "name": "collection_data_id_hash", - "type": "string", - "description": "The identifier of the collection", - "example": "6993fb8b5688d392a2d94127b9926519d6327e69f2bcf3dc0c5df2c060aec97d" - }, - { - "name": "collection_name", - "type": "string", - "description": "The name of the collection", - "example": "Topaz Troopers" - }, - { - "name": "creator_address", - "type": "string", - "description": "The address of the creator of the collection", - "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" - }, - { - "name": "last_transaction_timestamp", - "type": "string", - "description": "The timestamp of the last transaction returned in milliseconds", - "example": "2022-09-17T22:03:32.000000Z" - }, - { - "name": "last_transaction_version", - "type": "string", - "description": "The version of the last transaction", - "example": "210373856" - }, - { - "name": "name", - "type": "string", - "description": "The name of the token", - "example": "Topaz Troopers 123" - }, - { - "name": "owner_address", - "type": "string", - "description": "The address of the owner of the token", - "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" - }, - { - "name": "property_version", - "type": "string", - "description": "The property version of the token", - "example": "1" - }, - { - "name": "table_type", - "type": "string", - "description": "The data structure of the token", - "example": "0x3::token::TokenStore" - }, - { - "name": "token_data_id_hash", - "type": "string", - "description": "The identifier of the token", - "example": "1824178d98256f40046db3db8cf462f1c0a8e0d37304218044f11e69761c88e1" - }, - { - "name": "token_properties", - "type": "json", - "description": "The properties of the token", - "example": "{\"point\": \"0x30\", \"author\": \"0x33454e4a4f59204c616273\"}" - } + { + "name": "message", + "type": "string", + "required": true, + "description": "Message that needs to be signed by the end user", + "example": "defi.finance wants you to sign in with your Solana account:\n26qv4GCcx98RihuK3c4T6ozB3J7L6VwCuFVc7Ta2A3Uo\n\nI am a third party API\n\nURI: http://defi.finance\nVersion: 1\nNetwork: mainnet\nNonce: PYxxb9msdjVXsMQ9x\nIssued At: 2022-08-25T11:02:34.097Z\nExpiration Time: 2022-08-25T11:12:38.243Z\nResources:\n- https://docs.moralis.io/" + }, + { + "name": "signature", + "type": "string", + "required": true, + "description": "Base58 signature that needs to be used to verify end user", + "example": "2pH9DqD5rve2qV4yBDshcAjWd2y8TqMx8BPb7f3KoNnuLEhE5JwjruYi4jaFaD4HN6wriLz2Vdr32kRBAJmHcyny" + } ] - } - ] - } - }, - { - "status": "400", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "statusCode", - "type": "string", - "description": "The status code", - "example": "400" - }, - { - "name": "message", - "type": "array", - "description": "List of things to correct", - "example": ["creator_address must be 66 characters"], - "field": { "type": "string" } - }, - { - "name": "error", - "type": "string", - "description": "Type of error", - "example": "Bad Request" - } + }, + "responses": [ + { + "status": "201", + "description": "The token to be used to call the third party API from the client", + "body": { + "type": "object", + "fields": [ + { + "name": "id", + "type": "string", + "description": "17-characters Alphanumeric string Secret Challenge ID used to identify this particular request. Is should be used at the backend of the calling service to identify the completed request.", + "example": "fRyt67D3eRss3RrX" + }, + { + "name": "domain", + "type": "string", + "description": "RFC 4501 dns authority that is requesting the signing.", + "example": "defi.finance" + }, + { + "name": "network", + "type": "string", + "description": "The network where Contract Accounts must be resolved.", + "example": "mainnet" + }, + { + "name": "address", + "type": "string", + "description": "Solana address with a length of 32 - 44 characters that is used to perform the signing", + "example": "26qv4GCcx98RihuK3c4T6ozB3J7L6VwCuFVc7Ta2A3Uo" + }, + { + "name": "statement", + "type": "string", + "description": "Human-readable ASCII assertion that the user will sign, and it must not contain `\n`.", + "example": "Please confirm" + }, + { + "name": "uri", + "type": "string", + "description": "RFC 3986 URI referring to the resource that is the subject of the signing (as in the __subject__ of a claim).", + "example": "https://defi.finance/" + }, + { + "name": "expirationTime", + "type": "string", + "description": "ISO 8601 datetime string that, if present, indicates when the signed authentication message is no longer valid.", + "example": "2020-01-01T00:00:00.000Z" + }, + { + "name": "notBefore", + "type": "string", + "description": "ISO 8601 datetime string that, if present, indicates when the signed authentication message will become valid.", + "example": "2020-01-01T00:00:00.000Z" + }, + { + "name": "resources", + "type": "array", + "description": "List of information or references to information the user wishes to have resolved as part of authentication by the relying party. They are expressed as RFC 3986 URIs separated by `\n- `.", + "example": ["https://docs.moralis.io/"], + "field": { "type": "string" } + }, + { + "name": "version", + "type": "string", + "description": "EIP-155 Chain ID to which the session is bound, and the network where Contract Accounts must be resolved.", + "example": "1.0" + }, + { + "name": "nonce", + "type": "string", + "example": "0x1234567890abcdef0123456789abcdef1234567890abcdef" + }, + { + "name": "profileId", + "type": "string", + "description": "Unique identifier with a length of 66 characters", + "example": "0xbfbcfab169c67072ff418133124480fea02175f1402aaa497daa4fd09026b0e1" + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n \n const response = Moralis.Auth.verify({});\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import auth\napi_key = \"YOUR_API_KEY\"\n\nbody = []\n\nresult = auth.challenge.verify_challenge_solana(\n api_key=api_key,\n body=body,\n)\nprint(result)", + "name": "Moralis Python SDK" + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.nfts.getNFTOwnersByCollection({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.nfts.get_nft_owners_by_collection(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getNFTOwnersOfCollection": { - "apiHost": "https://mainnet-aptos-api.moralis.io", - "testHost": "https://testnet-aptos-api.moralis.io", - "summary": "Get NFT owners of collection", - "description": "Get owners of a given NFT collection.", - "method": "GET", - "path": "/nfts/collections/:collection_data_id_hash/owners/list", - "pathParams": [ - { - "name": "collection_data_id_hash", - "description": "The id of the token", - "required": true, - "type": "string", - "example": "7ac8cecb76edbbd5da40d719bbb9795fc5744e4098ee0ce1be4bb86c90f42301" - } - ], - "queryParams": [ - { - "name": "limit", - "description": "The number of results to return", - "required": true, - "type": "number", - "example": 5 - }, - { - "name": "offset", - "description": "The number of results to skip", - "required": false, - "type": "number" }, - { - "name": "cursor", - "description": "The cursor to use for getting the next page", - "required": false, - "type": "string" - } - ], - "responses": [ - { - "status": "200", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "cursor", - "type": "string", - "required": true, - "description": "The cursor to use for the next page of results. (Cursor is null on last page)", - "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4" - }, - { - "name": "hasNextPage", - "type": "boolean", + "requestChallengeAptos": { + "apiHost": "https://authapi.moralis.io", + "summary": "Request Aptos challenge", + "method": "POST", + "path": "/challenge/request/aptos", + "pathParams": [], + "queryParams": [], + "bodyParam": { "required": true, - "description": "Indicates if there is a next page of results", - "example": true - }, - { - "name": "result", - "type": "array", - "required": true, - "description": "The owner addresses for the given collection", - "example": [], - "field": { "type": "string" } - } - ] - } - }, - { - "status": "400", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "statusCode", - "type": "string", - "description": "The status code", - "example": "400" - }, - { - "name": "message", - "type": "array", - "description": "List of things to correct", - "example": ["creator_address must be 66 characters"], - "field": { "type": "string" } - }, - { - "name": "error", - "type": "string", - "description": "Type of error", - "example": "Bad Request" - } - ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.nfts.getNFTOwnersOfCollection({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.nfts.get_nft_owners_of_collection(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getNFTTransfersByIds": { - "apiHost": "https://mainnet-aptos-api.moralis.io", - "testHost": "https://testnet-aptos-api.moralis.io", - "summary": "Get NFT transfers by token(s)", - "description": "Get NFT transfers for one or many NFT token ID hashes. Learn more about token ID hashes [here](/web3-data-api/aptos/token-id-hashes).", - "method": "GET", - "path": "/nfts/transfers", - "pathParams": [], - "queryParams": [ - { - "name": "limit", - "description": "The number of tokens to return", - "required": true, - "type": "number", - "example": 5 - }, - { - "name": "offset", - "description": "The number of results to skip", - "required": false, - "type": "number" - }, - { - "name": "cursor", - "description": "The cursor to use for getting the next page", - "required": false, - "type": "string" - }, - { - "name": "wallet_blacklist", - "description": "The addresses of the wallets to blacklist", - "required": false, - "type": "array", - "field": { "type": "string" } - }, - { - "name": "wallet_whitelist", - "description": "The addresses of the wallets to whitelist", - "required": false, - "type": "array", - "field": { "type": "string" } - }, - { - "name": "token_ids", - "description": "The identifiers of the tokens to get", - "required": true, - "type": "array", - "field": { - "type": "string", - "example": "9a47523002a8940afaae60cb01d13ccea0408b17e958ebf1940a9f687785d6da" - } - } - ], - "responses": [ - { - "status": "200", - "description": "", - "body": { - "cursor": { - "type": "string", - "nullable": true, - "required": true, - "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4", - "description": "The cursor to use for the next page of results. (Cursor is null on last page)" - }, - "hasNextPage": { - "type": "boolean", - "example": true, - "description": "Indicates if there is a next page of results", - "nullable": false, - "required": true - }, - "result": { - "description": "The collections for the given creators", - "example": [], - "nullable": false, - "maxItems": 100, - "minItems": 0, - "required": true, - "type": "array", - "field": { + "description": "Request Aptos challenge message.", "type": "object", "fields": [ - { - "name": "coin_amount", - "type": "string", - "nullable": false, - "example": "2", - "description": "The number of tokens transferred", - "required": true - }, - { - "name": "coin_type", - "type": "string", - "nullable": false, - "example": null, - "description": "The type of tokens transferred", - "required": true - }, - { - "name": "collection_data_id_hash", - "type": "string", - "example": "6993fb8b5688d392a2d94127b9926519d6327e69f2bcf3dc0c5df2c060aec97d", - "description": "The identifier of the collection", - "maxLength": 64, - "minLength": 64, - "nullable": false, - "required": true - }, - { - "name": "collection_name", - "type": "string", - "example": "Topaz Troopers", - "description": "The name of the collection", - "maxLength": 128, - "minLength": 1, - "nullable": false, - "required": true - }, - { - "name": "creator_address", - "type": "string", - "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac", - "description": "The address of the creator of the collection", - "maxLength": 66, - "minLength": 66, - "nullable": false, - "required": true - }, - { - "name": "event_account_address", - "type": "string", - "example": "0xa748de66f1eea7d32399b59027ab0b3786295313e2c3a1608b5d51e759aee6dd", - "description": "The account address of the transfer", - "nullable": false, - "required": true - }, - { - "name": "event_creation_number", - "type": "string", - "example": "2", - "description": "The creation number of the event", - "nullable": false, - "required": true - }, - { - "name": "event_sequence_number", - "type": "string", - "example": "2", - "description": "The sequence number of the event", - "nullable": false, - "required": true - }, - { - "name": "from_address", - "type": "string", - "nullable": false, - "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac", - "description": "The address sending the transfer", - "maxLength": 66, - "minLength": 66, - "required": true - }, - { - "name": "name", - "type": "string", - "example": "Topaz Troopers 123", - "description": "The name of the token", - "maxLength": 128, - "minLength": 1, - "nullable": false, - "required": true - }, - { - "name": "property_version", - "type": "string", - "example": "1", - "description": "The property version of the token", - "nullable": false, - "required": true - }, - { - "name": "to_address", - "type": "string", - "nullable": false, - "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac", - "description": "The address recieving the transfer", - "maxLength": 66, - "minLength": 66, - "required": true - }, - { - "name": "token_amount", - "type": "string", - "example": "2", - "description": "The number of tokens transferred", - "nullable": false, - "required": true - }, - { - "name": "token_data_id_hash", - "type": "string", - "example": "1824178d98256f40046db3db8cf462f1c0a8e0d37304218044f11e69761c88e1", - "description": "The identifier of the token", - "maxLength": 64, - "minLength": 64, - "nullable": false, - "required": true - }, - { - "name": "transaction_timestamp", - "type": "string", - "nullable": false, - "example": "2022-09-17T22:03:32.000000Z", - "description": "The timestamp of the transfer returned in milliseconds", - "required": true - }, - { - "name": "transaction_version", - "type": "string", - "example": "210373856", - "description": "The version of the transaction that the transfer is a part of", - "nullable": false, - "required": true - }, - { - "name": "transfer_type", - "type": "string", - "example": "0x3::token::DepositEvent", - "description": "The type of transfer", - "nullable": false, - "required": true - } + { + "name": "domain", + "type": "string", + "required": true, + "description": "RFC 4501 dns authority that is requesting the signing.", + "example": "defi.finance" + }, + { + "name": "statement", + "type": "string", + "description": "Human-readable ASCII assertion that the user will sign, and it must not contain `\n`.", + "example": "Please confirm" + }, + { + "name": "uri", + "type": "string", + "required": true, + "description": "RFC 3986 URI referring to the resource that is the subject of the signing (as in the __subject__ of a claim).", + "example": "https://defi.finance/" + }, + { + "name": "expirationTime", + "type": "string", + "description": "ISO 8601 datetime string that, if present, indicates when the signed authentication message is no longer valid.", + "example": "2020-01-01T00:00:00.000Z" + }, + { + "name": "notBefore", + "type": "string", + "description": "ISO 8601 datetime string that, if present, indicates when the signed authentication message will become valid.", + "example": "2020-01-01T00:00:00.000Z" + }, + { + "name": "resources", + "type": "array", + "description": "List of information or references to information the user wishes to have resolved as part of authentication by the relying party. They are expressed as RFC 3986 URIs separated by new lines.", + "example": ["https://docs.moralis.io/"], + "field": { "type": "string" } + }, + { + "name": "timeout", + "type": "number", + "required": true, + "description": "Time in seconds before the challenge is expired", + "example": 15 + }, + { + "name": "chainId", + "type": "string", + "required": true, + "description": "Chain ID to which the session is bound, and the network where Contract Accounts must be resolved.", + "example": 1 + }, + { + "name": "address", + "type": "string", + "required": true, + "description": "Aptos address performing the signing conformant.", + "example": "0xfb2853744bb8afd58d9386d1856afd8e08de135019961dfa3a10d8c9bf83b99d" + }, + { + "name": "publicKey", + "type": "string", + "required": true, + "description": "Aptos public key performing the signing conformant.", + "example": "0xfb2853744bb8afd58d9386d1856afd8e08de135019961dfa3a10d8c9bf83b99d" + } ] - } - } - } - }, - { - "status": "400", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "statusCode", - "type": "string", - "description": "The status code", - "example": "400" - }, - { - "name": "message", - "type": "array", - "description": "List of things to correct", - "example": ["creator_address must be 66 characters"], - "field": { "type": "string" } - }, - { - "name": "error", - "type": "string", - "description": "Type of error", - "example": "Bad Request" - } + }, + "responses": [ + { + "status": "201", + "description": "The back channel challenge containing the id to store on the api and the message to be signed by the user", + "body": { + "type": "object", + "fields": [ + { + "name": "id", + "type": "string", + "description": "17-characters Alphanumeric string Secret Challenge ID used to identify this particular request. Is should be used at the backend of the calling service to identify the completed request.", + "example": "fRyt67D3eRss3RrXa" + }, + { + "name": "profileId", + "type": "string", + "description": "Unique identifier with a length of 66 characters", + "example": "0xbfbcfab169c67072ff418133124480fea02175f1402aaa497daa4fd09026b0e1" + }, + { + "name": "message", + "type": "string", + "description": "Message that needs to be signed by the end user", + "example": "defi.finance wants you to sign in with your Aptos account:\n0xfb2853744bb8afd58d9386d1856afd8e08de135019961dfa3a10d8c9bf83b99d\n\nPlease confirm\n\nURI: https://defi.finance/\nVersion: 1\nChain ID: 1\nNonce: DbU1DCTmdzR4lg3wi\nIssued At: 2022-06-12T12:15:31.290Z\nExpiration Time: 2020-01-01T00:00:00.000Z\nNot Before: 2020-01-01T00:00:00.000Z\nResources:\n- https://docs.moralis.io/" + } + ] + } + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.nfts.getNFTTransfersByIds({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.nfts.get_nft_transfers_by_ids(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getNFTTransfersByCollection": { - "apiHost": "https://mainnet-aptos-api.moralis.io", - "testHost": "https://testnet-aptos-api.moralis.io", - "summary": "Get NFT transfers by collection", - "description": "Get NFT transfers for a given collection.", - "method": "GET", - "path": "/nfts/transfers/collections/:collection_data_id_hash", - "pathParams": [ - { - "name": "collection_data_id_hash", - "description": "The collection data id hash of the token", - "required": true, - "type": "string", - "example": "7ac8cecb76edbbd5da40d719bbb9795fc5744e4098ee0ce1be4bb86c90f42301" - } - ], - "queryParams": [ - { - "name": "limit", - "description": "The number of results to return", - "required": true, - "type": "number", - "example": 5 }, - { - "name": "offset", - "description": "The number of results to skip", - "required": false, - "type": "number" - }, - { - "name": "cursor", - "description": "The cursor to use for getting the next page", - "required": false, - "type": "string" - }, - { - "name": "wallet_whitelist", - "description": "The addresses of the wallets to whitelist", - "required": false, - "type": "array", - "field": { "type": "string" } - }, - { - "name": "wallet_blacklist", - "description": "The addresses of the wallets to blacklist", - "required": false, - "type": "array", - "field": { "type": "string" } - } - ], - "responses": [ - { - "status": "200", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "cursor", - "type": "string", - "description": "The cursor to use for the next page of results. (Cursor is null on last page)", - "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4" - }, - { - "name": "hasNextPage", - "type": "boolean", - "description": "Indicates if there is a next page of results", - "example": true - }, - { - "name": "result", + "verifyChallengeAptos": { + "apiHost": "https://authapi.moralis.io", + "summary": "Verify Aptos challenge", + "method": "POST", + "path": "/challenge/verify/aptos", + "pathParams": [], + "queryParams": [], + "bodyParam": { + "required": true, + "description": "Verify Aptos challenge message.", "type": "object", - "description": "The collections for the given creators", - "example": [], "fields": [ - { - "name": "coin_amount", - "type": "string", - "description": "The number of tokens transferred", - "example": "2" - }, - { - "name": "coin_type", - "type": "string", - "description": "The type of tokens transferred", - "example": null - }, - { - "name": "collection_data_id_hash", - "type": "string", - "description": "The identifier of the collection", - "example": "6993fb8b5688d392a2d94127b9926519d6327e69f2bcf3dc0c5df2c060aec97d" - }, - { - "name": "collection_name", - "type": "string", - "description": "The name of the collection", - "example": "Topaz Troopers" - }, - { - "name": "creator_address", - "type": "string", - "description": "The address of the creator of the collection", - "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" - }, - { - "name": "event_account_address", - "type": "string", - "description": "The account address of the transfer", - "example": "0xa748de66f1eea7d32399b59027ab0b3786295313e2c3a1608b5d51e759aee6dd" - }, - { - "name": "event_creation_number", - "type": "string", - "description": "The creation number of the event", - "example": "2" - }, - { - "name": "event_sequence_number", - "type": "string", - "description": "The sequence number of the event", - "example": "2" - }, - { - "name": "from_address", - "type": "string", - "description": "The address sending the transfer", - "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" - }, - { - "name": "name", - "type": "string", - "description": "The name of the token", - "example": "Topaz Troopers 123" - }, - { - "name": "property_version", - "type": "string", - "description": "The property version of the token", - "example": "1" - }, - { - "name": "to_address", - "type": "string", - "description": "The address recieving the transfer", - "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" - }, - { - "name": "token_amount", - "type": "string", - "description": "The number of tokens transferred", - "example": "2" - }, - { - "name": "token_data_id_hash", - "type": "string", - "description": "The identifier of the token", - "example": "1824178d98256f40046db3db8cf462f1c0a8e0d37304218044f11e69761c88e1" - }, - { - "name": "transaction_timestamp", - "type": "string", - "description": "The timestamp of the transfer returned in milliseconds", - "example": "2022-09-17T22:03:32.000000Z" - }, - { - "name": "transaction_version", - "type": "string", - "description": "The version of the transaction that the transfer is a part of", - "example": "210373856" - }, - { - "name": "transfer_type", - "type": "string", - "description": "The type of transfer", - "example": "0x3::token::DepositEvent" - } + { + "name": "message", + "type": "string", + "required": true, + "description": "Message that needs to be signed by the end user.", + "example": "defi.finance wants you to sign in with your Aptos account:\n0xfb2853744bb8afd58d9386d1856afd8e08de135019961dfa3a10d8c9bf83b99d\n\n\nURI: https://defi.finance\nVersion: 1\nChain ID: 1\nNonce: Px7Nh1RPzlCLwqgOb\nIssued At: 2022-11-30T10:20:00.262Z" + }, + { + "name": "signature", + "type": "string", + "required": true, + "description": "EIP-191 compliant signature signed by the Aptos account address requesting authentication.", + "example": "0xa8f89a58bf9b433d3100f9e41ee35b5e31fb8c7cd62547acb113162ec6f2e4140207e2dfbd4e387e1801ebc7f08a9dd105ac1d22b2e2ff0df5fa8b6d9bdcfe491c" + } ] - } + }, + "responses": [ + { + "status": "201", + "description": "The token to be used to call the third party API from the client", + "body": { + "type": "object", + "fields": [ + { + "name": "id", + "type": "string", + "description": "17-characters Alphanumeric string Secret Challenge ID used to identify this particular request. Is should be used at the backend of the calling service to identify the completed request.", + "example": "fRyt67D3eRss3RrX" + }, + { + "name": "domain", + "type": "string", + "description": "RFC 4501 dns authority that is requesting the signing.", + "example": "defi.finance" + }, + { + "name": "statement", + "type": "string", + "description": "Human-readable ASCII assertion that the user will sign, and it must not contain `\n`.", + "example": "Please confirm" + }, + { + "name": "uri", + "type": "string", + "description": "RFC 3986 URI referring to the resource that is the subject of the signing (as in the __subject__ of a claim).", + "example": "https://defi.finance/" + }, + { + "name": "expirationTime", + "type": "string", + "description": "ISO 8601 datetime string that, if present, indicates when the signed authentication message is no longer valid.", + "example": "2020-01-01T00:00:00.000Z" + }, + { + "name": "notBefore", + "type": "string", + "description": "ISO 8601 datetime string that, if present, indicates when the signed authentication message will become valid.", + "example": "2020-01-01T00:00:00.000Z" + }, + { + "name": "resources", + "type": "array", + "description": "List of information or references to information the user wishes to have resolved as part of authentication by the relying party. They are expressed as RFC 3986 URIs separated by `\n- `.", + "example": ["https://docs.moralis.io/"], + "field": { "type": "string" } + }, + { + "name": "version", + "type": "string", + "description": "EIP-155 Chain ID to which the session is bound, and the network where Contract Accounts must be resolved.", + "example": "1.0" + }, + { + "name": "nonce", + "type": "string", + "example": "0x1234567890abcdef0123456789abcdef1234567890abcdef" + }, + { + "name": "profileId", + "type": "string", + "description": "Unique identifier with a length of 66 characters", + "example": "0xbfbcfab169c67072ff418133124480fea02175f1402aaa497daa4fd09026b0e1" + }, + { + "name": "chainId", + "type": "string", + "description": "Chain ID to which the session is bound, and the network where Contract Accounts must be resolved.", + "example": 1 + }, + { + "name": "address", + "type": "string", + "description": "Aptos address performing the signing conformant.", + "example": "0xfb2853744bb8afd58d9386d1856afd8e08de135019961dfa3a10d8c9bf83b99d" + }, + { + "name": "publicKey", + "type": "string", + "description": "Aptos public key performing the signing conformant.", + "example": "0xfb2853744bb8afd58d9386d1856afd8e08de135019961dfa3a10d8c9bf83b99d" + } + ] + } + } ] - } }, - { - "status": "400", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "statusCode", - "type": "string", - "description": "The status code", - "example": "400" - }, - { - "name": "message", - "type": "array", - "description": "List of things to correct", - "example": ["creator_address must be 66 characters"], - "field": { "type": "string" } - }, - { - "name": "error", - "type": "string", - "description": "Type of error", - "example": "Bad Request" - } + "getAddresses": { + "apiHost": "https://authapi.moralis.io", + "summary": "Get addresses that are bound to the specific profileId", + "method": "GET", + "path": "/profile/:profileId/addresses", + "pathParams": [ + { + "name": "profileId", + "description": "Unique identifier with a length of 66 characters", + "required": true, + "type": "string" + } + ], + "queryParams": [], + "responses": [ + { + "status": "201", + "description": "The addresses that are bound to the speicifc profileId" + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.nfts.getNFTTransfersByCollection({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.nfts.get_nft_transfers_by_collection(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getNFTTransfersByCreators": { - "apiHost": "https://mainnet-aptos-api.moralis.io", - "testHost": "https://testnet-aptos-api.moralis.io", - "summary": "Get NFT Transfers by creators", - "description": "Get NFT transfers for NFTs created by one or many specific creator addresses.", - "method": "GET", - "path": "/nfts/transfers/creators", - "pathParams": [], - "queryParams": [ - { - "name": "limit", - "description": "The number of results to return", - "required": true, - "type": "number", - "example": 5 - }, - { - "name": "offset", - "description": "The number of results to skip", - "required": false, - "type": "number" - }, - { - "name": "cursor", - "description": "The cursor to use for getting the next page", - "required": false, - "type": "string" - }, - { - "name": "creator_addresses", - "description": "The addresses of the creators", - "required": true, - "type": "array", - "field": { - "type": "string", - "example": "0xf932dcb9835e681b21d2f411ef99f4f5e577e6ac299eebee2272a39fb348f702" - } }, - { - "name": "collection_blacklist", - "description": "The ids of the collections to whitelist", - "required": false, - "type": "array", - "field": { "type": "string" } - }, - { - "name": "collection_whitelist", - "description": "The ids of the collections to whitelist", - "required": false, - "type": "array", - "field": { "type": "string" } - } - ], - "responses": [ - { - "status": "200", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "cursor", - "type": "string", - "description": "The cursor to use for the next page of results. (Cursor is null on last page)", - "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4" - }, - { - "name": "hasNextPage", - "type": "boolean", - "description": "Indicates if there is a next page of results", - "example": true - }, - { - "name": "result", + "requestBind": { + "apiHost": "https://authapi.moralis.io", + "summary": "Request bind between profile of two addresses", + "description": "Request for message to bind profile that is belong to the two addresses
\n All profiles under the addresses will be bound and new profile will be generated.", + "method": "POST", + "path": "/bind/request", + "pathParams": [], + "queryParams": [], + "bodyParam": { + "required": true, + "description": "The two addresses that are required to be bind.", "type": "object", - "description": "The collections for the given creators", - "example": [], "fields": [ - { - "name": "coin_amount", - "type": "string", - "description": "The number of tokens transferred", - "example": "2" - }, - { - "name": "coin_type", - "type": "string", - "description": "The type of tokens transferred", - "example": null - }, - { - "name": "collection_data_id_hash", - "type": "string", - "description": "The identifier of the collection", - "example": "6993fb8b5688d392a2d94127b9926519d6327e69f2bcf3dc0c5df2c060aec97d" - }, - { - "name": "collection_name", - "type": "string", - "description": "The name of the collection", - "example": "Topaz Troopers" - }, - { - "name": "creator_address", - "type": "string", - "description": "The address of the creator of the collection", - "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" - }, - { - "name": "event_account_address", - "type": "string", - "description": "The account address of the transfer", - "example": "0xa748de66f1eea7d32399b59027ab0b3786295313e2c3a1608b5d51e759aee6dd" - }, - { - "name": "event_creation_number", - "type": "string", - "description": "The creation number of the event", - "example": "2" - }, - { - "name": "event_sequence_number", - "type": "string", - "description": "The sequence number of the event", - "example": "2" - }, - { - "name": "from_address", - "type": "string", - "description": "The address sending the transfer", - "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" - }, - { - "name": "name", - "type": "string", - "description": "The name of the token", - "example": "Topaz Troopers 123" - }, - { - "name": "property_version", - "type": "string", - "description": "The property version of the token", - "example": "1" - }, - { - "name": "to_address", - "type": "string", - "description": "The address recieving the transfer", - "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" - }, - { - "name": "token_amount", - "type": "string", - "description": "The number of tokens transferred", - "example": "2" - }, - { - "name": "token_data_id_hash", - "type": "string", - "description": "The identifier of the token", - "example": "1824178d98256f40046db3db8cf462f1c0a8e0d37304218044f11e69761c88e1" - }, - { - "name": "transaction_timestamp", - "type": "string", - "description": "The timestamp of the transfer returned in milliseconds", - "example": "2022-09-17T22:03:32.000000Z" - }, - { - "name": "transaction_version", - "type": "string", - "description": "The version of the transaction that the transfer is a part of", - "example": "210373856" - }, - { - "name": "transfer_type", - "type": "string", - "description": "The type of transfer", - "example": "0x3::token::DepositEvent" - } + { + "name": "addresses", + "type": "object", + "required": true, + "description": "An array of addresses that needs to be bind", + "fields": [ + { + "name": "blockchainType", + "type": "string", + "required": true, + "description": "The chain in which the address belongs to", + "example": "evm" + }, + { + "name": "address", + "type": "string", + "required": true, + "description": "Address performing the signing conformant to capitalization encoded checksum specified in EIP-55 where applicable.", + "example": "0x57af6B90c2237d2F888bf4CAe56f25FE1b14e531" + }, + { + "name": "publicKey", + "type": "string", + "description": "Public key performing the signing conformant. (This is only needed for Aptos address)", + "example": "0xfb2853744bb8afd58d9386d1856afd8e08de135019961dfa3a10d8c9bf83b99d" + } + ] + } ] - } - ] - } - }, - { - "status": "400", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "statusCode", - "type": "string", - "description": "The status code", - "example": "400" - }, - { - "name": "message", - "type": "array", - "description": "List of things to correct", - "example": ["creator_address must be 66 characters"], - "field": { "type": "string" } - }, - { - "name": "error", - "type": "string", - "description": "Type of error", - "example": "Bad Request" - } + }, + "responses": [ + { + "status": "201", + "description": "The messages that is required to be signed by each of the address", + "body": { + "type": "object", + "fields": [ + { + "name": "messages", + "type": "array", + "description": "Message that needs to be signed by the end user", + "example": [ + "Please sign this message to bind:\nProfile Ids:\n- 0x0b2bbac1251651c0cbbdbbb29fed5a03adc8b05a2a9eb10a02aaa489b9c1f8ff\n\nwith\n\nAddress: 0x6ed338bcB610640e81465FCfb9894DDfA354Cc91\nNonce: 5pXWu7aGkY2J7II0X", + "Please sign this message to bind:\nProfile Ids:\n- 0x0b2bbac1251651c0cbbdbbb29fed5a03adc8b05a2a9eb10a02aaa489b9c1f8ff\n\nwith\n\nAddress: 0x6ed338bcB610640e81465FCfb9894DDfA354Cc91\nNonce: 5pXWu7aGkY2J7II0X" + ], + "field": { "type": "string" } + } + ] + } + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.nfts.getNFTTransfersByCreators({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" }, - { - "language": "python", - "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.nfts.get_nft_transfers_by_creators(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getNFTTransfersByWallets": { - "apiHost": "https://mainnet-aptos-api.moralis.io", - "testHost": "https://testnet-aptos-api.moralis.io", - "summary": "Get NFT transfers by wallet(s)", - "description": "Get NFT transfers from one or many wallet addresses.", - "method": "GET", - "path": "/nfts/transfers/wallets", - "pathParams": [], - "queryParams": [ - { - "name": "limit", - "description": "The number of tokens to return", - "required": true, - "type": "number", - "example": 5 - }, - { - "name": "offset", - "description": "The number of results to skip", - "required": false, - "type": "number" - }, - { - "name": "cursor", - "description": "The cursor to use for getting the next page", - "required": false, - "type": "string" - }, - { - "name": "wallet_addresses", - "description": "The addresses of the wallets to get transfers for", - "required": true, - "type": "array", - "field": { - "type": "string", - "example": "0x274c398a921b8e2ba345feac3039e1c8b196a7eb1395cdd3584af3a85eb9ec50" - } - }, - { - "name": "collection_blacklist", - "description": "The ids of the collections to whitelist", - "required": false, - "type": "array", - "field": { "type": "string" } - }, - { - "name": "collection_whitelist", - "description": "The ids of the collections to whitelist", - "required": false, - "type": "array", - "field": { "type": "string" } - } - ], - "responses": [ - { - "status": "200", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "cursor", - "type": "string", - "description": "The cursor to use for the next page of results. (Cursor is null on last page)", - "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4" - }, - { - "name": "hasNextPage", - "type": "boolean", - "description": "Indicates if there is a next page of results", - "example": true - }, - { - "name": "result", + "verifyRequestBind": { + "apiHost": "https://authapi.moralis.io", + "summary": "Verify bind request", + "method": "POST", + "path": "/bind/request/verify", + "pathParams": [], + "queryParams": [], + "bodyParam": { + "required": true, + "description": "Messages and its signatures that is used for verification", "type": "object", - "description": "The collections for the given creators", - "example": [], "fields": [ - { - "name": "coin_amount", - "type": "string", - "description": "The number of tokens transferred", - "example": "2" - }, - { - "name": "coin_type", - "type": "string", - "description": "The type of tokens transferred", - "example": null - }, - { - "name": "collection_data_id_hash", - "type": "string", - "description": "The identifier of the collection", - "example": "6993fb8b5688d392a2d94127b9926519d6327e69f2bcf3dc0c5df2c060aec97d" - }, - { - "name": "collection_name", - "type": "string", - "description": "The name of the collection", - "example": "Topaz Troopers" - }, - { - "name": "creator_address", - "type": "string", - "description": "The address of the creator of the collection", - "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" - }, - { - "name": "event_account_address", - "type": "string", - "description": "The account address of the transfer", - "example": "0xa748de66f1eea7d32399b59027ab0b3786295313e2c3a1608b5d51e759aee6dd" - }, - { - "name": "event_creation_number", - "type": "string", - "description": "The creation number of the event", - "example": "2" - }, - { - "name": "event_sequence_number", - "type": "string", - "description": "The sequence number of the event", - "example": "2" - }, - { - "name": "from_address", - "type": "string", - "description": "The address sending the transfer", - "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" - }, - { - "name": "name", - "type": "string", - "description": "The name of the token", - "example": "Topaz Troopers 123" - }, - { - "name": "property_version", - "type": "string", - "description": "The property version of the token", - "example": "1" - }, - { - "name": "to_address", - "type": "string", - "description": "The address recieving the transfer", - "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" - }, - { - "name": "token_amount", - "type": "string", - "description": "The number of tokens transferred", - "example": "2" - }, - { - "name": "token_data_id_hash", - "type": "string", - "description": "The identifier of the token", - "example": "1824178d98256f40046db3db8cf462f1c0a8e0d37304218044f11e69761c88e1" - }, - { - "name": "transaction_timestamp", - "type": "string", - "description": "The timestamp of the transfer returned in milliseconds", - "example": "2022-09-17T22:03:32.000000Z" - }, - { - "name": "transaction_version", - "type": "string", - "description": "The version of the transaction that the transfer is a part of", - "example": "210373856" - }, - { - "name": "transfer_type", - "type": "string", - "description": "The type of transfer", - "example": "0x3::token::DepositEvent" - } + { + "name": "verifications", + "type": "object", + "required": true, + "description": "Message that needs to be signed by the end user", + "fields": [ + { + "name": "message", + "type": "string", + "required": true, + "description": "Message that needs to be signed by the end user", + "example": "Please sign this message to bind:\nProfile Ids:\n- 0x0b2bbac1251651c0cbbdbbb29fed5a03adc8b05a2a9eb10a02aaa489b9c1f8ff\n\nwith\n\nAddress: 0x6ed338bcB610640e81465FCfb9894DDfA354Cc91\nNonce: 5pXWu7aGkY2J7II0X" + }, + { + "name": "signature", + "type": "string", + "required": true, + "description": "EIP-191 compliant signature signed by the Ethereum account address requesting authentication.", + "example": "0xc4f2f59d80e036ecab4eaaac5d4ee713ab94264ca584839c98b5743c4f6777322038225a4bc1e0f13b8382166816737369f26bd66f0479cfa80d4c52c02eb2cb1b" + } + ] + } ] - } - ] - } - }, - { - "status": "400", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "statusCode", - "type": "string", - "description": "The status code", - "example": "400" - }, - { - "name": "message", - "type": "array", - "description": "List of things to correct", - "example": ["creator_address must be 66 characters"], - "field": { "type": "string" } - }, - { - "name": "error", - "type": "string", - "description": "Type of error", - "example": "Bad Request" - } - ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.nfts.getNFTTransfersByWallets({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.nfts.get_nft_transfers_by_wallets(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getCoinInfoByCoinTypeHashes": { - "apiHost": "https://mainnet-aptos-api.moralis.io", - "testHost": "https://testnet-aptos-api.moralis.io", - "summary": "Get Coins by coin type hash", - "description": "Get one or many Coins by coin type hash.", - "method": "GET", - "path": "/coins", - "pathParams": [], - "queryParams": [ - { - "name": "coin_type_hashes", - "description": "The coin type hashes to fetch info about", - "required": true, - "type": "array", - "field": { - "type": "string", - "example": "91ceb1308a98389691e05158b07ed5f079ab78461a6bb8d5a4054b1bb5cb8bb6" - } - } - ], - "responses": [ - { - "status": "200", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "coin_type", - "type": "string", - "example": "T0xa911c7236486be921f6cc9227b09afe4a4ad14d291ba1bb8a9b7c4d628759de::gegg::GEGG", - "description": "The definition of the coin structure (identifier)", - "maxLength": 5000, - "minLength": 1, - "nullable": false, - "required": true - }, - { - "name": "coin_type_hash", - "type": "string", - "example": "6993fb8b5688d392a2d94127b9926519d6327e69f2bcf3dc0c5df2c060aec97d", - "description": "The hash of the coin_type (identifier) and a known fixed length", - "maxLength": 64, - "minLength": 64, - "nullable": false, - "required": true - }, - { - "name": "creator_address", - "type": "string", - "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac", - "description": "The address of the creator of the coin", - "maxLength": 66, - "minLength": 66, - "nullable": false, - "required": true - }, - { - "name": "decimals", - "type": "number", - "example": 8, - "description": "The number of decimals of the coin", - "nullable": false, - "required": true - }, - { - "name": "name", - "type": "string", - "example": "GEGG Coin", - "description": "The name of the Coin", - "maxLength": 32, - "minLength": 1, - "nullable": false, - "required": true - }, - { - "name": "supply_aggregator_table_handle", - "type": "string", - "nullable": false, - "example": "0x3::token::TokenStore", - "description": "The data structure of the token", - "required": true - }, - { - "name": "supply_aggregator_table_key", - "type": "string", - "nullable": false, - "example": "0x3::token::TokenStore", - "description": "The data structure of the token", - "required": true - }, - { - "name": "symbol", - "type": "string", - "example": "GEGG", - "description": "The symbol of the coin", - "maxLength": 10, - "minLength": 1, - "nullable": false, - "required": true - }, - { - "name": "transaction_created_timestamp", - "type": "string", - "nullable": false, - "example": "2022-09-17T22:03:32.000000Z", - "description": "The timestamp of the transaction of when the coin was created returned in milliseconds", - "required": true - }, - { - "name": "transaction_version_created", - "type": "string", - "example": "210373856", - "description": "The version of the transaction where the coin was created", - "nullable": false, - "required": true - } + }, + "responses": [ + { + "status": "201", + "description": "The profileId that all the addresses have been bind into.", + "body": { + "type": "object", + "fields": [ + { + "name": "profileId", + "type": "string", + "description": "Unique identifier with a length of 66 characters", + "example": "0xbfbcfab169c67072ff418133124480fea02175f1402aaa497daa4fd09026b0e1" + } + ] + } + } ] - } }, - { - "status": "400", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "statusCode", - "type": "string", - "description": "The status code", - "example": "400" - }, - { - "name": "message", - "type": "array", - "description": "List of things to correct", - "example": ["creator_address must be 66 characters"], - "field": { "type": "string" } - }, - { - "name": "error", - "type": "string", - "description": "Type of error", - "example": "Bad Request" - } + "removeBind": { + "apiHost": "https://authapi.moralis.io", + "summary": "Request to remove bind of an address from a profile", + "method": "POST", + "path": "/bind/remove", + "pathParams": [], + "queryParams": [], + "bodyParam": { + "required": true, + "description": "The address that is required to be removed from the bind of the profileId.", + "type": "object", + "fields": [ + { + "name": "blockchainType", + "type": "string", + "required": true, + "description": "The chain in which the address belongs to", + "example": "evm" + }, + { + "name": "address", + "type": "string", + "required": true, + "description": "Address performing the signing conformant to capitalization encoded checksum specified in EIP-55 where applicable.", + "example": "0x57af6B90c2237d2F888bf4CAe56f25FE1b14e531" + }, + { + "name": "publicKey", + "type": "string", + "description": "Public key performing the signing conformant. (This is only needed for Aptos address)", + "example": "0xfb2853744bb8afd58d9386d1856afd8e08de135019961dfa3a10d8c9bf83b99d" + }, + { + "name": "profileId", + "type": "string", + "required": true, + "description": "Unique identifier with a length of 66 characters", + "example": "0xbfbcfab169c67072ff418133124480fea02175f1402aaa497daa4fd09026b0e1" + } + ] + }, + "responses": [ + { + "status": "201", + "description": "The messages that is required to be signed by each of the address", + "body": { + "type": "object", + "fields": [ + { + "name": "message", + "type": "string", + "description": "Message that needs to be signed by the end user", + "example": "Please sign this message to unbind:\nAddress: 0x6ed338bcB610640e81465FCfb9894DDfA354Cc91\nfrom\nProfile Id:\n- 0x0b2bbac1251651c0cbbdbbb29fed5a03adc8b05a2a9eb10a02aaa489b9c1f8ff\nNonce: 5pXWu7aGkY2J7II0X" + } + ] + } + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.coins.getCoinInfoByCoinTypeHashes({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.coins.get_coin_info_by_coin_type_hashes(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getLatestCoins": { - "apiHost": "https://mainnet-aptos-api.moralis.io", - "testHost": "https://testnet-aptos-api.moralis.io", - "summary": "Get latest deployed coins", - "description": "Get the latest deployed Coins.", - "method": "GET", - "path": "/coins/latest", - "pathParams": [], - "queryParams": [ - { - "name": "limit", - "description": "The number of results to return", - "required": true, - "type": "number", - "example": 5 - }, - { - "name": "offset", - "description": "The number of results to skip", - "required": false, - "type": "number" }, - { - "name": "cursor", - "description": "The cursor to use for getting the next page", - "required": false, - "type": "string" - } - ], - "responses": [ - { - "status": "200", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "cursor", - "type": "string", - "description": "The cursor to use for the next page of results. (Cursor is null on last page)", - "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4" - }, - { - "name": "hasNextPage", - "type": "boolean", - "description": "Indicates if there is a next page of results", - "example": true - }, - { - "name": "result", + "verifyRemoveBind": { + "apiHost": "https://authapi.moralis.io", + "summary": "Verify remove bind request", + "method": "POST", + "path": "/bind/remove/verify", + "pathParams": [], + "queryParams": [], + "bodyParam": { + "required": true, + "description": "Messages and its signatures that is used for verification", "type": "object", - "description": "The coins matching the query", - "example": [], "fields": [ - { - "name": "coin_type", - "type": "string", - "description": "The definition of the coin structure (identifier)", - "example": "T0xa911c7236486be921f6cc9227b09afe4a4ad14d291ba1bb8a9b7c4d628759de::gegg::GEGG" - }, - { - "name": "coin_type_hash", - "type": "string", - "description": "The hash of the coin_type (identifier) and a known fixed length", - "example": "6993fb8b5688d392a2d94127b9926519d6327e69f2bcf3dc0c5df2c060aec97d" - }, - { - "name": "creator_address", - "type": "string", - "description": "The address of the creator of the coin", - "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" - }, - { - "name": "decimals", - "type": "number", - "description": "The number of decimals of the coin", - "example": 8 - }, - { - "name": "name", - "type": "string", - "description": "The name of the Coin", - "example": "GEGG Coin" - }, - { - "name": "supply_aggregator_table_handle", - "type": "string", - "description": "The data structure of the token", - "example": "0x3::token::TokenStore" - }, - { - "name": "supply_aggregator_table_key", - "type": "string", - "description": "The data structure of the token", - "example": "0x3::token::TokenStore" - }, - { - "name": "symbol", - "type": "string", - "description": "The symbol of the coin", - "example": "GEGG" - }, - { - "name": "transaction_created_timestamp", - "type": "string", - "description": "The timestamp of the transaction of when the coin was created returned in milliseconds", - "example": "2022-09-17T22:03:32.000000Z" - }, - { - "name": "transaction_version_created", - "type": "string", - "description": "The version of the transaction where the coin was created", - "example": "210373856" - } + { + "name": "message", + "type": "string", + "required": true, + "description": "Message that needs to be signed by the end user", + "example": "Please sign this message to unbind:\nAddress: 0x6ed338bcB610640e81465FCfb9894DDfA354Cc91\nfrom\nProfile Id:\n- 0x0b2bbac1251651c0cbbdbbb29fed5a03adc8b05a2a9eb10a02aaa489b9c1f8ff\nNonce: 5pXWu7aGkY2J7II0X" + }, + { + "name": "signature", + "type": "string", + "required": true, + "description": "EIP-191 compliant signature signed by the Ethereum account address requesting authentication.", + "example": "0xc4f2f59d80e036ecab4eaaac5d4ee713ab94264ca584839c98b5743c4f6777322038225a4bc1e0f13b8382166816737369f26bd66f0479cfa80d4c52c02eb2cb1b" + } ] - } + }, + "responses": [ + { + "status": "201", + "description": "The new profileId that is being generated for this address.", + "body": { + "type": "object", + "fields": [ + { + "name": "profileId", + "type": "string", + "description": "Unique identifier with a length of 66 characters", + "example": "0xbfbcfab169c67072ff418133124480fea02175f1402aaa497daa4fd09026b0e1" + } + ] + } + } ] - } - }, - { - "status": "400", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "statusCode", - "type": "string", - "description": "The status code", - "example": "400" - }, - { - "name": "message", - "type": "array", - "description": "List of things to correct", - "example": ["creator_address must be 66 characters"], - "field": { "type": "string" } - }, - { - "name": "error", - "type": "string", - "description": "Type of error", - "example": "Bad Request" - } + } + }, + "streams": { + "GetHistory": { + "apiHost": "https://api.moralis-streams.com", + "summary": "Get history", + "description": "Get all history", + "method": "GET", + "path": "/history", + "pathParams": [], + "queryParams": [ + { "name": "limit", "required": true, "type": "number" }, + { "name": "cursor", "required": false, "type": "string" }, + { + "name": "excludePayload", + "required": false, + "type": "boolean" + } + ], + "responses": [ + { + "status": "200", + "description": "Ok", + "body": { + "type": "object", + "fields": [ + { + "name": "result", + "type": "object", + "fields": [ + { + "name": "id", + "type": "string", + "description": "Stringified UUIDv4.\nSee [RFC 4112](https://tools.ietf.org/html/rfc4122)", + "format": "uuid", + "pattern": "[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}" + }, + { "name": "date", "type": "string" }, + { + "name": "payload", + "type": "object", + "fields": [ + { + "name": "block", + "type": "object", + "required": true, + "fields": [ + { + "name": "number", + "type": "string", + "required": true + }, + { + "name": "hash", + "type": "string", + "required": true + }, + { + "name": "timestamp", + "type": "string", + "required": true + } + ] + }, + { + "name": "chainId", + "type": "string", + "required": true + }, + { + "name": "logs", + "required": true, + "field": { + "type": "object", + "fields": [ + { + "name": "triggers", + "field": { + "type": "object", + "fields": [ + { + "name": "value", + "type": "string", + "required": true + }, + { + "name": "name", + "type": "string", + "required": true + } + ] + }, + "type": "array" + }, + { + "name": "logIndex", + "type": "string", + "required": true + }, + { + "name": "transactionHash", + "type": "string", + "required": true + }, + { + "name": "address", + "type": "string", + "required": true + }, + { + "name": "data", + "type": "string", + "required": true + }, + { + "name": "topic0", + "type": "string", + "nullable": true, + "required": true + }, + { + "name": "topic1", + "type": "string", + "nullable": true, + "required": true + }, + { + "name": "topic2", + "type": "string", + "nullable": true, + "required": true + }, + { + "name": "topic3", + "type": "string", + "nullable": true, + "required": true + } + ] + }, + "type": "array" + }, + { + "name": "txs", + "required": true, + "field": { + "type": "object", + "fields": [ + { + "name": "triggers", + "field": { + "type": "object", + "fields": [ + { + "name": "value", + "type": "string", + "required": true + }, + { + "name": "name", + "type": "string", + "required": true + } + ] + }, + "type": "array" + }, + { + "name": "hash", + "type": "string", + "required": true + }, + { + "name": "gas", + "type": "string", + "nullable": true, + "required": true + }, + { + "name": "gasPrice", + "type": "string", + "nullable": true, + "required": true + }, + { + "name": "nonce", + "type": "string", + "nullable": true, + "required": true + }, + { + "name": "input", + "type": "string", + "nullable": true, + "required": true + }, + { + "name": "transactionIndex", + "type": "string", + "required": true + }, + { + "name": "fromAddress", + "type": "string", + "required": true + }, + { + "name": "toAddress", + "type": "string", + "nullable": true, + "required": true + }, + { + "name": "value", + "type": "string", + "nullable": true, + "required": true + }, + { + "name": "type", + "type": "string", + "nullable": true, + "required": true + }, + { + "name": "v", + "type": "string", + "nullable": true, + "required": true + }, + { + "name": "r", + "type": "string", + "nullable": true, + "required": true + }, + { + "name": "s", + "type": "string", + "nullable": true, + "required": true + }, + { + "name": "receiptCumulativeGasUsed", + "type": "string", + "nullable": true, + "required": true + }, + { + "name": "receiptGasUsed", + "type": "string", + "nullable": true, + "required": true + }, + { + "name": "receiptContractAddress", + "type": "string", + "nullable": true, + "required": true + }, + { + "name": "receiptRoot", + "type": "string", + "nullable": true, + "required": true + }, + { + "name": "receiptStatus", + "type": "string", + "nullable": true, + "required": true + } + ] + }, + "type": "array" + }, + { + "name": "txsInternal", + "required": true, + "field": { + "type": "object", + "fields": [ + { + "name": "from", + "type": "string", + "nullable": true, + "required": true + }, + { + "name": "to", + "type": "string", + "nullable": true, + "required": true + }, + { + "name": "value", + "type": "string", + "nullable": true, + "required": true + }, + { + "name": "transactionHash", + "type": "string", + "required": true + }, + { + "name": "gas", + "type": "string", + "nullable": true, + "required": true + } + ] + }, + "type": "array" + }, + { + "name": "abi", + "field": { "type": "json" }, + "type": "array", + "required": true + }, + { + "name": "retries", + "type": "number", + "format": "double", + "required": true + }, + { + "name": "confirmed", + "type": "boolean", + "required": true + }, + { + "name": "tag", + "type": "string", + "required": true + }, + { + "name": "streamId", + "type": "string", + "required": true + } + ], + "additionalProperties": false + }, + { + "name": "tinyPayload", + "type": "object", + "fields": [ + { + "name": "chainId", + "type": "string", + "required": true + }, + { + "name": "confirmed", + "type": "boolean", + "required": true + }, + { + "name": "block", + "type": "string", + "required": true + }, + { + "name": "records", + "type": "number", + "format": "double", + "required": true + }, + { + "name": "retries", + "type": "number", + "format": "double", + "required": true + } + ], + "additionalProperties": false + }, + { + "name": "errorMessage", + "type": "string" + }, + { "name": "webhookUrl", "type": "string" }, + { "name": "streamId", "type": "string" }, + { "name": "tag", "type": "string" } + ] + }, + { "name": "cursor", "type": "string" }, + { "name": "total", "type": "number" } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = Moralis.Streams.getHistory({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import streams\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = streams.history.get_history(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.coins.getLatestCoins({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.coins.get_latest_coins(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getCoinsByNameRange": { - "apiHost": "https://mainnet-aptos-api.moralis.io", - "testHost": "https://testnet-aptos-api.moralis.io", - "summary": "Get Coins by name", - "description": "Get Coins by searching coin name using `from_name` or `to_name`, or combine both to return coins within a range (e.g. all coins `from_name` \"A\" to `to_name` \"D\" will return all coins from A to D). Returns all coins in A-Z order if `from_name` or `to_name` is not specified.", - "method": "GET", - "path": "/coins/names", - "pathParams": [], - "queryParams": [ - { - "name": "limit", - "description": "The number of results to return", - "required": true, - "type": "number", - "example": 5 - }, - { - "name": "offset", - "description": "The number of results to skip", - "required": false, - "type": "number" }, - { - "name": "cursor", - "description": "The cursor to use for getting the next page", - "required": false, - "type": "string" - }, - { - "name": "from_name", - "description": "The name of the coin to start from (inclusive and case sensitive)", - "required": false, - "type": "string" - }, - { - "name": "to_name", - "description": "The name of the coin to end at (inclusive and case sensitive)", - "required": false, - "type": "string" - } - ], - "responses": [ - { - "status": "200", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "cursor", - "type": "string", - "description": "The cursor to use for the next page of results. (Cursor is null on last page)", - "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4" - }, - { - "name": "hasNextPage", - "type": "boolean", - "description": "Indicates if there is a next page of results", - "example": true - }, - { - "name": "result", + "SetSettings": { + "apiHost": "https://api.moralis-streams.com", + "summary": "Set project settings", + "description": "Set the settings for the current project based on the project api-key.", + "method": "POST", + "path": "/settings", + "pathParams": [], + "queryParams": [], + "bodyParam": { + "required": true, "type": "object", - "description": "The coins matching the query", - "example": [], "fields": [ - { - "name": "coin_type", - "type": "string", - "description": "The definition of the coin structure (identifier)", - "example": "T0xa911c7236486be921f6cc9227b09afe4a4ad14d291ba1bb8a9b7c4d628759de::gegg::GEGG" - }, - { - "name": "coin_type_hash", - "type": "string", - "description": "The hash of the coin_type (identifier) and a known fixed length", - "example": "6993fb8b5688d392a2d94127b9926519d6327e69f2bcf3dc0c5df2c060aec97d" - }, - { - "name": "creator_address", - "type": "string", - "description": "The address of the creator of the coin", - "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" - }, - { - "name": "decimals", - "type": "number", - "description": "The number of decimals of the coin", - "example": 8 - }, - { - "name": "name", - "type": "string", - "description": "The name of the Coin", - "example": "GEGG Coin" - }, - { - "name": "supply_aggregator_table_handle", - "type": "string", - "description": "The data structure of the token", - "example": "0x3::token::TokenStore" - }, - { - "name": "supply_aggregator_table_key", - "type": "string", - "description": "The data structure of the token", - "example": "0x3::token::TokenStore" - }, - { - "name": "symbol", - "type": "string", - "description": "The symbol of the coin", - "example": "GEGG" - }, - { - "name": "transaction_created_timestamp", - "type": "string", - "description": "The timestamp of the transaction of when the coin was created returned in milliseconds", - "example": "2022-09-17T22:03:32.000000Z" - }, - { - "name": "transaction_version_created", - "type": "string", - "description": "The version of the transaction where the coin was created", - "example": "210373856" - } + { + "name": "region", + "type": "string", + "required": true, + "description": "The region from where all the webhooks will be posted for this project", + "enum": [ + "us-east-1", + "us-west-2", + "eu-central-1", + "ap-southeast-1" + ] + } ] - } + }, + "responses": [ + { + "status": "200", + "description": "Ok", + "body": { + "type": "object", + "fields": [ + { + "name": "region", + "type": "string", + "description": "The region from where all the webhooks will be posted for this project", + "enum": [ + "us-east-1", + "us-west-2", + "eu-central-1", + "ap-southeast-1" + ] + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = Moralis.Streams.setSettings({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import streams\n\napi_key = \"YOUR_API_KEY\"\n\nbody = []\n\nresult = streams.project.set_settings(\n api_key=api_key,\n body=body,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } }, - { - "status": "400", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "statusCode", - "type": "string", - "description": "The status code", - "example": "400" - }, - { - "name": "message", - "type": "array", - "description": "List of things to correct", - "example": ["creator_address must be 66 characters"], - "field": { "type": "string" } - }, - { - "name": "error", - "type": "string", - "description": "Type of error", - "example": "Bad Request" - } + "GetSettings": { + "apiHost": "https://api.moralis-streams.com", + "summary": "Get project settings", + "description": "Get the settings for the current project based on the project api-key.", + "method": "GET", + "path": "/settings", + "pathParams": [], + "queryParams": [], + "responses": [ + { + "status": "200", + "description": "Ok", + "body": { + "type": "object", + "fields": [ + { + "name": "region", + "type": "string", + "description": "The region from where all the webhooks will be posted for this project", + "enum": [ + "us-east-1", + "us-west-2", + "eu-central-1", + "ap-southeast-1" + ] + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = Moralis.Streams.readSettings({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import streams\n\napi_key = \"YOUR_API_KEY\"\n\nresult = streams.project.get_settings(\n api_key=api_key,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.coins.getCoinsByNameRange({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.coins.get_coins_by_name_range(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getCoinsBySymbolRange": { - "apiHost": "https://mainnet-aptos-api.moralis.io", - "testHost": "https://testnet-aptos-api.moralis.io", - "summary": "Get Coins by symbol", - "description": "Get Coins by searching coin symbol using `from_symbol` or `to_symbol`, or combine both to return coins within a range (e.g. all coins `from_symbol` \"A\" to `to_symbol` \"D\" will return all coins from A to D). Returns all coins in A-Z order if `from_symbol` or `to_symbol` is not specified.", - "method": "GET", - "path": "/coins/symbols", - "pathParams": [], - "queryParams": [ - { - "name": "limit", - "description": "The number of results to return", - "required": true, - "type": "number", - "example": 5 - }, - { - "name": "offset", - "description": "The number of results to skip", - "required": false, - "type": "number" - }, - { - "name": "cursor", - "description": "The cursor to use for getting the next page", - "required": false, - "type": "string" }, - { - "name": "from_symbol", - "description": "The name of the coin to start from (inclusive and case sensitive)", - "required": false, - "type": "string" + "GetStats": { + "apiHost": "https://api.moralis-streams.com", + "summary": "Get project stats", + "description": "Get the global stats for the account.", + "method": "GET", + "path": "/stats", + "pathParams": [], + "queryParams": [], + "responses": [ + { + "status": "200", + "description": "Ok", + "body": { + "type": "object", + "fields": [ + { + "name": "totalWebhooksDelivered", + "type": "number", + "description": "The total amount of webhooks delivered across all streams" + }, + { + "name": "totalWebhooksFailed", + "type": "number", + "description": "The total amount of failed webhooks across all streams" + }, + { + "name": "totalLogsProcessed", + "type": "number", + "description": "The total amount of logs processed across all streams, this includes failed webhooks" + }, + { + "name": "totalTxsProcessed", + "type": "number", + "description": "The total amount of txs processed across all streams, this includes failed webhooks" + }, + { + "name": "totalTxsInternalProcessed", + "type": "number", + "description": "The total amount of internal txs processed across all streams, this includes failed webhooks" + }, + { + "name": "streams", + "type": "object", + "description": "Array of stream stats", + "fields": [ + { + "name": "totalWebhooksDelivered", + "type": "number", + "description": "The total amount of webhooks delivered across all streams" + }, + { + "name": "totalWebhooksFailed", + "type": "number", + "description": "The total amount of failed webhooks across all streams" + }, + { + "name": "totalLogsProcessed", + "type": "number", + "description": "The total amount of logs processed across all streams, this includes failed webhooks" + }, + { + "name": "totalTxsProcessed", + "type": "number", + "description": "The total amount of txs processed across all streams, this includes failed webhooks" + }, + { + "name": "totalTxsInternalProcessed", + "type": "number", + "description": "The total amount of internal txs processed across all streams, this includes failed webhooks" + }, + { + "name": "streamId", + "type": "string", + "description": "The stream id" + } + ] + }, + { + "name": "createdAt", + "type": "string", + "description": "The date since this stats are being counted" + }, + { + "name": "updatedAt", + "type": "string", + "description": "The date since this stats were last updated" + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = Moralis.Streams.getStats({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import streams\n\napi_key = \"YOUR_API_KEY\"\n\nresult = streams.stats.get_stats(\n api_key=api_key,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] }, - { - "name": "to_symbol", - "description": "The name of the coin to end at (inclusive and case sensitive)", - "required": false, - "type": "string" - } - ], - "responses": [ - { - "status": "200", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "cursor", - "type": "string", - "description": "The cursor to use for the next page of results. (Cursor is null on last page)", - "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4" - }, - { - "name": "hasNextPage", - "type": "boolean", - "description": "Indicates if there is a next page of results", - "example": true - }, - { - "name": "result", - "type": "object", - "description": "The coins matching the query", - "example": [], - "fields": [ - { - "name": "coin_type", - "type": "string", - "description": "The definition of the coin structure (identifier)", - "example": "T0xa911c7236486be921f6cc9227b09afe4a4ad14d291ba1bb8a9b7c4d628759de::gegg::GEGG" - }, - { - "name": "coin_type_hash", - "type": "string", - "description": "The hash of the coin_type (identifier) and a known fixed length", - "example": "6993fb8b5688d392a2d94127b9926519d6327e69f2bcf3dc0c5df2c060aec97d" - }, - { - "name": "creator_address", - "type": "string", - "description": "The address of the creator of the coin", - "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" - }, - { - "name": "decimals", - "type": "number", - "description": "The number of decimals of the coin", - "example": 8 - }, - { - "name": "name", - "type": "string", - "description": "The name of the Coin", - "example": "GEGG Coin" - }, - { - "name": "supply_aggregator_table_handle", - "type": "string", - "description": "The data structure of the token", - "example": "0x3::token::TokenStore" - }, - { - "name": "supply_aggregator_table_key", - "type": "string", - "description": "The data structure of the token", - "example": "0x3::token::TokenStore" - }, - { - "name": "symbol", - "type": "string", - "description": "The symbol of the coin", - "example": "GEGG" - }, - { - "name": "transaction_created_timestamp", - "type": "string", - "description": "The timestamp of the transaction of when the coin was created returned in milliseconds", - "example": "2022-09-17T22:03:32.000000Z" - }, - { - "name": "transaction_version_created", - "type": "string", - "description": "The version of the transaction where the coin was created", - "example": "210373856" - } - ] - } + "GetStatsByStreamId": { + "apiHost": "https://api.moralis-streams.com", + "summary": "Get project stats by Stream ID", + "description": "Get the stats for the streamId specified", + "method": "GET", + "path": "/stats/:streamId", + "pathParams": [ + { + "name": "streamId", + "description": "The id of the stream to get the stats", + "required": true, + "type": "string" + } + ], + "queryParams": [], + "responses": [ + { + "status": "200", + "description": "Ok", + "body": { + "type": "object", + "fields": [ + { + "name": "totalWebhooksDelivered", + "type": "number", + "description": "The total amount of webhooks delivered across all streams" + }, + { + "name": "totalWebhooksFailed", + "type": "number", + "description": "The total amount of failed webhooks across all streams" + }, + { + "name": "totalLogsProcessed", + "type": "number", + "description": "The total amount of logs processed across all streams, this includes failed webhooks" + }, + { + "name": "totalTxsProcessed", + "type": "number", + "description": "The total amount of txs processed across all streams, this includes failed webhooks" + }, + { + "name": "totalTxsInternalProcessed", + "type": "number", + "description": "The total amount of internal txs processed across all streams, this includes failed webhooks" + }, + { + "name": "streams", + "type": "object", + "description": "Array of stream stats", + "fields": [ + { + "name": "totalWebhooksDelivered", + "type": "number", + "description": "The total amount of webhooks delivered across all streams" + }, + { + "name": "totalWebhooksFailed", + "type": "number", + "description": "The total amount of failed webhooks across all streams" + }, + { + "name": "totalLogsProcessed", + "type": "number", + "description": "The total amount of logs processed across all streams, this includes failed webhooks" + }, + { + "name": "totalTxsProcessed", + "type": "number", + "description": "The total amount of txs processed across all streams, this includes failed webhooks" + }, + { + "name": "totalTxsInternalProcessed", + "type": "number", + "description": "The total amount of internal txs processed across all streams, this includes failed webhooks" + }, + { + "name": "streamId", + "type": "string", + "description": "The stream id" + } + ] + }, + { + "name": "createdAt", + "type": "string", + "description": "The date since this stats are being counted" + }, + { + "name": "updatedAt", + "type": "string", + "description": "The date since this stats were last updated" + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = Moralis.Streams.getStatsById({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import streams\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = streams.stats.get_stats_by_stream_id(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } }, - { - "status": "400", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "statusCode", - "type": "string", - "description": "The status code", - "example": "400" - }, - { - "name": "message", - "type": "array", - "description": "List of things to correct", - "example": ["creator_address must be 66 characters"], - "field": { "type": "string" } - }, - { - "name": "error", - "type": "string", - "description": "Type of error", - "example": "Bad Request" - } + "GetStreams": { + "apiHost": "https://api.moralis-streams.com", + "summary": "Get streams", + "description": "Get all the evm streams for the current project based on the project api-key.", + "method": "GET", + "path": "/streams/evm", + "pathParams": [], + "queryParams": [ + { + "name": "limit", + "description": "Limit response results max value 100", + "required": true, + "type": "number" + }, + { + "name": "cursor", + "description": "Cursor for fetching next page", + "required": false, + "type": "string" + } + ], + "responses": [ + { + "status": "200", + "description": "Ok", + "body": { + "type": "object", + "fields": [ + { + "name": "result", + "type": "object", + "description": "Array of project Streams", + "fields": [ + { + "name": "webhookUrl", + "type": "string", + "description": "Webhook URL where moralis will send the POST request." + }, + { + "name": "description", + "type": "string", + "description": "A description for this stream" + }, + { + "name": "tag", + "type": "string", + "description": "A user-provided tag that will be send along the webhook, the user can use this tag to identify the specific stream if multiple streams are present" + }, + { + "name": "topic0", + "type": "array", + "description": "An Array of topic0's in string-signature format ex: ['FunctionName(address,uint256)']", + "field": { "type": "string" } + }, + { + "name": "allAddresses", + "type": "boolean", + "description": "Include events for all addresses (only applied when abi and topic0 is provided)" + }, + { + "name": "includeNativeTxs", + "type": "boolean", + "description": "Include or not native transactions defaults to false" + }, + { + "name": "includeContractLogs", + "type": "boolean", + "description": "Include or not logs of contract interactions defaults to false" + }, + { + "name": "includeInternalTxs", + "type": "boolean", + "description": "Include or not include internal transactions defaults to false" + }, + { + "name": "includeAllTxLogs", + "type": "boolean", + "description": "Include all logs if atleast one value in tx or log matches stream config" + }, + { + "name": "getNativeBalances", + "type": "object", + "description": "Include native balances for each address in the webhook", + "fields": [ + { + "name": "selectors", + "type": "array", + "field": { "type": "string" } + }, + { "name": "type", "type": "string" } + ] + }, + { + "name": "abi", + "type": "object", + "fields": [ + { + "name": "anonymous", + "type": "boolean" + }, + { + "name": "constant", + "type": "boolean" + }, + { + "name": "inputs", + "type": "object", + "fields": [ + { + "name": "name", + "type": "string" + }, + { + "name": "type", + "type": "string" + }, + { + "name": "indexed", + "type": "boolean" + }, + { + "name": "components", + "type": "json" + }, + { + "name": "internalType", + "type": "string" + } + ] + }, + { + "name": "name", + "type": "string" + }, + { + "name": "outputs", + "type": "object", + "fields": [ + { + "name": "name", + "type": "string" + }, + { + "name": "type", + "type": "string" + }, + { + "name": "components", + "type": "json" + }, + { + "name": "internalType", + "type": "string" + } + ] + }, + { + "name": "payable", + "type": "boolean" + }, + { + "name": "stateMutability", + "type": "string" + }, + { + "name": "type", + "type": "string" + }, + { "name": "gas", "type": "number" } + ] + }, + { + "name": "advancedOptions", + "type": "object", + "fields": [ + { + "name": "topic0", + "type": "string" + }, + { + "name": "filter", + "type": "json", + "description": "The filter object for the topic0\nhttps://docs.moralis.io/docs/filter-streams", + "example": {} + }, + { + "name": "includeNativeTxs", + "type": "boolean" + } + ] + }, + { + "name": "chainIds", + "type": "array", + "description": "The ids of the chains for this stream in hex Ex: [\"0x1\",\"0x38\"]", + "field": { "type": "string" } + }, + { + "name": "demo", + "type": "boolean", + "description": "Indicator if it is a demo stream" + }, + { + "name": "triggers", + "type": "object", + "description": "triggers", + "fields": [ + { + "name": "type", + "type": "string" + }, + { + "name": "contractAddress", + "type": "string" + }, + { + "name": "inputs", + "type": "array", + "field": { + "anyOf": [ + { "type": "string" }, + { "type": "json" } + ] + } + }, + { + "name": "functionAbi", + "type": "object", + "description": "The abi to parse the log object of the contract", + "fields": [ + { + "name": "anonymous", + "type": "boolean" + }, + { + "name": "constant", + "type": "boolean" + }, + { + "name": "inputs", + "field": { + "type": "json" + }, + "type": "array" + }, + { + "name": "name", + "type": "string" + }, + { + "name": "outputs", + "field": { + "type": "json" + }, + "type": "array" + }, + { + "name": "payable", + "type": "boolean" + }, + { + "name": "stateMutability", + "type": "string" + }, + { + "name": "type", + "type": "string", + "required": true + }, + { + "name": "gas", + "type": "number", + "format": "double" + } + ], + "additionalProperties": false, + "example": {} + }, + { + "name": "topic0", + "type": "string" + }, + { + "name": "callFrom", + "type": "string" + } + ] + }, + { + "name": "id", + "type": "string", + "description": "Stringified UUIDv4.\nSee [RFC 4112](https://tools.ietf.org/html/rfc4122)", + "format": "uuid", + "pattern": "[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}" + }, + { + "name": "status", + "type": "string", + "description": "The stream status:\n[active] The Stream is healthy and processing blocks\n[paused] The Stream is paused and is not processing blocks\n[error] The Stream has encountered an error and is not processing blocks", + "enum": [ + "active", + "paused", + "error", + "terminated" + ] + }, + { + "name": "statusMessage", + "type": "string", + "description": "Description of current status of stream." + } + ] + }, + { + "name": "cursor", + "type": "string", + "description": "Cursor for fetching next page" + }, + { + "name": "total", + "type": "number", + "description": "Total count of streams on the project" + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = Moralis.Streams.getAll({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import streams\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = streams.evm_streams.get_streams(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.coins.getCoinsBySymbolRange({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.coins.get_coins_by_symbol_range(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getCoinsByCreators": { - "apiHost": "https://mainnet-aptos-api.moralis.io", - "testHost": "https://testnet-aptos-api.moralis.io", - "summary": "Get Coins by creator", - "description": "Get Coins created by one or many creator addresses.", - "method": "GET", - "path": "/coins/creators", - "pathParams": [], - "queryParams": [ - { - "name": "limit", - "description": "The number of results to return", - "required": true, - "type": "number", - "example": 5 - }, - { - "name": "offset", - "description": "The number of results to skip", - "required": false, - "type": "number" - }, - { - "name": "cursor", - "description": "The cursor to use for getting the next page", - "required": false, - "type": "string" }, - { - "name": "creator_addresses", - "description": "The addresses of the creators", - "required": true, - "type": "array", - "field": { "type": "string" } - } - ], - "responses": [ - { - "status": "200", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "cursor", - "type": "string", - "description": "The cursor to use for the next page of results. (Cursor is null on last page)", - "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4" - }, - { - "name": "hasNextPage", - "type": "boolean", - "description": "Indicates if there is a next page of results", - "example": true - }, - { - "name": "result", + "CreateStream": { + "apiHost": "https://api.moralis-streams.com", + "summary": "Create stream", + "description": "Creates a new evm stream.", + "method": "PUT", + "path": "/streams/evm", + "pathParams": [], + "queryParams": [], + "bodyParam": { + "required": true, + "description": "Provide a Stream Model", "type": "object", - "description": "The coins created by the given creators", - "example": [], "fields": [ - { - "name": "coin_type", - "type": "string", - "description": "The definition of the coin structure (identifier)", - "example": "T0xa911c7236486be921f6cc9227b09afe4a4ad14d291ba1bb8a9b7c4d628759de::gegg::GEGG" - }, - { - "name": "coin_type_hash", - "type": "string", - "description": "The hash of the coin_type (identifier) and a known fixed length", - "example": "6993fb8b5688d392a2d94127b9926519d6327e69f2bcf3dc0c5df2c060aec97d" - }, - { - "name": "creator_address", - "type": "string", - "description": "The address of the creator of the coin", - "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" - }, - { - "name": "decimals", - "type": "number", - "description": "The number of decimals of the coin", - "example": 8 - }, - { - "name": "name", - "type": "string", - "description": "The name of the Coin", - "example": "GEGG Coin" - }, - { - "name": "supply_aggregator_table_handle", - "type": "string", - "description": "The data structure of the token", - "example": "0x3::token::TokenStore" - }, - { - "name": "supply_aggregator_table_key", - "type": "string", - "description": "The data structure of the token", - "example": "0x3::token::TokenStore" - }, - { - "name": "symbol", - "type": "string", - "description": "The symbol of the coin", - "example": "GEGG" - }, - { - "name": "transaction_created_timestamp", - "type": "string", - "description": "The timestamp of the transaction of when the coin was created returned in milliseconds", - "example": "2022-09-17T22:03:32.000000Z" - }, - { - "name": "transaction_version_created", - "type": "string", - "description": "The version of the transaction where the coin was created", - "example": "210373856" - } + { + "name": "webhookUrl", + "type": "string", + "required": true, + "description": "Webhook URL where moralis will send the POST request." + }, + { + "name": "description", + "type": "string", + "required": true, + "description": "A description for this stream" + }, + { + "name": "tag", + "type": "string", + "required": true, + "description": "A user-provided tag that will be send along the webhook, the user can use this tag to identify the specific stream if multiple streams are present" + }, + { + "name": "topic0", + "type": "array", + "description": "An Array of topic0's in string-signature format ex: ['FunctionName(address,uint256)']", + "field": { "type": "string" } + }, + { + "name": "allAddresses", + "type": "boolean", + "description": "Include events for all addresses (only applied when abi and topic0 is provided)" + }, + { + "name": "includeNativeTxs", + "type": "boolean", + "description": "Include or not native transactions defaults to false" + }, + { + "name": "includeContractLogs", + "type": "boolean", + "description": "Include or not logs of contract interactions defaults to false" + }, + { + "name": "includeInternalTxs", + "type": "boolean", + "description": "Include or not include internal transactions defaults to false" + }, + { + "name": "includeAllTxLogs", + "type": "boolean", + "description": "Include all logs if atleast one value in tx or log matches stream config" + }, + { + "name": "getNativeBalances", + "type": "object", + "description": "Include native balances for each address in the webhook", + "fields": [ + { + "name": "selectors", + "type": "array", + "field": { "type": "string" } + }, + { "name": "type", "type": "string" } + ] + }, + { + "name": "abi", + "type": "object", + "fields": [ + { "name": "anonymous", "type": "boolean" }, + { "name": "constant", "type": "boolean" }, + { + "name": "inputs", + "type": "object", + "fields": [ + { "name": "name", "type": "string" }, + { "name": "type", "type": "string" }, + { "name": "indexed", "type": "boolean" }, + { "name": "components", "type": "json" }, + { "name": "internalType", "type": "string" } + ] + }, + { "name": "name", "type": "string" }, + { + "name": "outputs", + "type": "object", + "fields": [ + { "name": "name", "type": "string" }, + { "name": "type", "type": "string" }, + { "name": "components", "type": "json" }, + { "name": "internalType", "type": "string" } + ] + }, + { "name": "payable", "type": "boolean" }, + { "name": "stateMutability", "type": "string" }, + { "name": "type", "type": "string" }, + { "name": "gas", "type": "number" } + ] + }, + { + "name": "advancedOptions", + "type": "object", + "fields": [ + { "name": "topic0", "type": "string" }, + { + "name": "filter", + "type": "json", + "description": "The filter object for the topic0\nhttps://docs.moralis.io/docs/filter-streams", + "example": {} + }, + { "name": "includeNativeTxs", "type": "boolean" } + ] + }, + { + "name": "chainIds", + "type": "array", + "required": true, + "description": "The ids of the chains for this stream in hex Ex: [\"0x1\",\"0x38\"]", + "field": { "type": "string" } + }, + { + "name": "demo", + "type": "boolean", + "description": "Indicator if it is a demo stream" + }, + { + "name": "triggers", + "type": "object", + "description": "triggers", + "fields": [ + { "name": "type", "type": "string" }, + { "name": "contractAddress", "type": "string" }, + { + "name": "inputs", + "type": "array", + "field": { + "anyOf": [ + { "type": "string" }, + { "type": "json" } + ] + } + }, + { + "name": "functionAbi", + "type": "object", + "description": "The abi to parse the log object of the contract", + "fields": [ + { "name": "anonymous", "type": "boolean" }, + { "name": "constant", "type": "boolean" }, + { + "name": "inputs", + "field": { "type": "json" }, + "type": "array" + }, + { "name": "name", "type": "string" }, + { + "name": "outputs", + "field": { "type": "json" }, + "type": "array" + }, + { "name": "payable", "type": "boolean" }, + { + "name": "stateMutability", + "type": "string" + }, + { + "name": "type", + "type": "string", + "required": true + }, + { + "name": "gas", + "type": "number", + "format": "double" + } + ], + "example": {} + }, + { "name": "topic0", "type": "string" }, + { "name": "callFrom", "type": "string" } + ] + } ] - } + }, + "responses": [ + { + "status": "200", + "description": "Ok", + "body": { + "type": "object", + "fields": [ + { + "name": "webhookUrl", + "type": "string", + "description": "Webhook URL where moralis will send the POST request." + }, + { + "name": "description", + "type": "string", + "description": "A description for this stream" + }, + { + "name": "tag", + "type": "string", + "description": "A user-provided tag that will be send along the webhook, the user can use this tag to identify the specific stream if multiple streams are present" + }, + { + "name": "topic0", + "type": "array", + "description": "An Array of topic0's in string-signature format ex: ['FunctionName(address,uint256)']", + "field": { "type": "string" } + }, + { + "name": "allAddresses", + "type": "boolean", + "description": "Include events for all addresses (only applied when abi and topic0 is provided)" + }, + { + "name": "includeNativeTxs", + "type": "boolean", + "description": "Include or not native transactions defaults to false" + }, + { + "name": "includeContractLogs", + "type": "boolean", + "description": "Include or not logs of contract interactions defaults to false" + }, + { + "name": "includeInternalTxs", + "type": "boolean", + "description": "Include or not include internal transactions defaults to false" + }, + { + "name": "includeAllTxLogs", + "type": "boolean", + "description": "Include all logs if atleast one value in tx or log matches stream config" + }, + { + "name": "getNativeBalances", + "type": "object", + "description": "Include native balances for each address in the webhook", + "fields": [ + { + "name": "selectors", + "type": "array", + "field": { "type": "string" } + }, + { "name": "type", "type": "string" } + ] + }, + { + "name": "abi", + "type": "object", + "fields": [ + { "name": "anonymous", "type": "boolean" }, + { "name": "constant", "type": "boolean" }, + { + "name": "inputs", + "type": "object", + "fields": [ + { + "name": "name", + "type": "string" + }, + { + "name": "type", + "type": "string" + }, + { + "name": "indexed", + "type": "boolean" + }, + { + "name": "components", + "type": "json" + }, + { + "name": "internalType", + "type": "string" + } + ] + }, + { "name": "name", "type": "string" }, + { + "name": "outputs", + "type": "object", + "fields": [ + { + "name": "name", + "type": "string" + }, + { + "name": "type", + "type": "string" + }, + { + "name": "components", + "type": "json" + }, + { + "name": "internalType", + "type": "string" + } + ] + }, + { "name": "payable", "type": "boolean" }, + { + "name": "stateMutability", + "type": "string" + }, + { "name": "type", "type": "string" }, + { "name": "gas", "type": "number" } + ] + }, + { + "name": "advancedOptions", + "type": "object", + "fields": [ + { "name": "topic0", "type": "string" }, + { + "name": "filter", + "type": "json", + "description": "The filter object for the topic0\nhttps://docs.moralis.io/docs/filter-streams", + "example": {} + }, + { + "name": "includeNativeTxs", + "type": "boolean" + } + ] + }, + { + "name": "chainIds", + "type": "array", + "description": "The ids of the chains for this stream in hex Ex: [\"0x1\",\"0x38\"]", + "field": { "type": "string" } + }, + { + "name": "demo", + "type": "boolean", + "description": "Indicator if it is a demo stream" + }, + { + "name": "triggers", + "type": "object", + "description": "triggers", + "fields": [ + { "name": "type", "type": "string" }, + { + "name": "contractAddress", + "type": "string" + }, + { + "name": "inputs", + "type": "array", + "field": { + "anyOf": [ + { "type": "string" }, + { "type": "json" } + ] + } + }, + { + "name": "functionAbi", + "type": "object", + "description": "The abi to parse the log object of the contract", + "fields": [ + { + "name": "anonymous", + "type": "boolean" + }, + { + "name": "constant", + "type": "boolean" + }, + { + "name": "inputs", + "field": { "type": "json" }, + "type": "array" + }, + { + "name": "name", + "type": "string" + }, + { + "name": "outputs", + "field": { "type": "json" }, + "type": "array" + }, + { + "name": "payable", + "type": "boolean" + }, + { + "name": "stateMutability", + "type": "string" + }, + { + "name": "type", + "type": "string", + "required": true + }, + { + "name": "gas", + "type": "number", + "format": "double" + } + ], + "additionalProperties": false, + "example": {} + }, + { "name": "topic0", "type": "string" }, + { "name": "callFrom", "type": "string" } + ] + }, + { + "name": "id", + "type": "string", + "description": "Stringified UUIDv4.\nSee [RFC 4112](https://tools.ietf.org/html/rfc4122)", + "format": "uuid", + "pattern": "[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}" + }, + { + "name": "status", + "type": "string", + "description": "The stream status:\n[active] The Stream is healthy and processing blocks\n[paused] The Stream is paused and is not processing blocks\n[error] The Stream has encountered an error and is not processing blocks", + "enum": [ + "active", + "paused", + "error", + "terminated" + ] + }, + { + "name": "statusMessage", + "type": "string", + "description": "Description of current status of stream." + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = Moralis.Streams.createStream({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import streams\n\napi_key = \"YOUR_API_KEY\"\n\nbody = []\n\nresult = streams.evm_streams.create_stream(\n api_key=api_key,\n body=body,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } }, - { - "status": "400", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "statusCode", - "type": "string", - "description": "The status code", - "example": "400" - }, - { - "name": "message", - "type": "array", - "description": "List of things to correct", - "example": ["creator_address must be 66 characters"], - "field": { "type": "string" } - }, - { - "name": "error", - "type": "string", - "description": "Type of error", - "example": "Bad Request" - } + "GetStream": { + "apiHost": "https://api.moralis-streams.com", + "summary": "Get a specific evm stream.", + "description": "Get a specific evm stream.", + "method": "GET", + "path": "/streams/evm/:id", + "pathParams": [ + { + "name": "id", + "description": "The id of the stream to get", + "required": true, + "type": "string" + } + ], + "queryParams": [], + "responses": [ + { + "status": "200", + "description": "Ok", + "body": { + "type": "object", + "fields": [ + { + "name": "webhookUrl", + "type": "string", + "description": "Webhook URL where moralis will send the POST request." + }, + { + "name": "description", + "type": "string", + "description": "A description for this stream" + }, + { + "name": "tag", + "type": "string", + "description": "A user-provided tag that will be send along the webhook, the user can use this tag to identify the specific stream if multiple streams are present" + }, + { + "name": "topic0", + "type": "array", + "description": "An Array of topic0's in string-signature format ex: ['FunctionName(address,uint256)']", + "field": { "type": "string" } + }, + { + "name": "allAddresses", + "type": "boolean", + "description": "Include events for all addresses (only applied when abi and topic0 is provided)" + }, + { + "name": "includeNativeTxs", + "type": "boolean", + "description": "Include or not native transactions defaults to false" + }, + { + "name": "includeContractLogs", + "type": "boolean", + "description": "Include or not logs of contract interactions defaults to false" + }, + { + "name": "includeInternalTxs", + "type": "boolean", + "description": "Include or not include internal transactions defaults to false" + }, + { + "name": "includeAllTxLogs", + "type": "boolean", + "description": "Include all logs if atleast one value in tx or log matches stream config" + }, + { + "name": "getNativeBalances", + "type": "object", + "description": "Include native balances for each address in the webhook", + "fields": [ + { + "name": "selectors", + "type": "array", + "field": { "type": "string" } + }, + { "name": "type", "type": "string" } + ] + }, + { + "name": "abi", + "type": "object", + "fields": [ + { "name": "anonymous", "type": "boolean" }, + { "name": "constant", "type": "boolean" }, + { + "name": "inputs", + "type": "object", + "fields": [ + { + "name": "name", + "type": "string" + }, + { + "name": "type", + "type": "string" + }, + { + "name": "indexed", + "type": "boolean" + }, + { + "name": "components", + "type": "json" + }, + { + "name": "internalType", + "type": "string" + } + ] + }, + { "name": "name", "type": "string" }, + { + "name": "outputs", + "type": "object", + "fields": [ + { + "name": "name", + "type": "string" + }, + { + "name": "type", + "type": "string" + }, + { + "name": "components", + "type": "json" + }, + { + "name": "internalType", + "type": "string" + } + ] + }, + { "name": "payable", "type": "boolean" }, + { + "name": "stateMutability", + "type": "string" + }, + { "name": "type", "type": "string" }, + { "name": "gas", "type": "number" } + ] + }, + { + "name": "advancedOptions", + "type": "object", + "fields": [ + { "name": "topic0", "type": "string" }, + { + "name": "filter", + "type": "json", + "description": "The filter object for the topic0\nhttps://docs.moralis.io/docs/filter-streams", + "example": {} + }, + { + "name": "includeNativeTxs", + "type": "boolean" + } + ] + }, + { + "name": "chainIds", + "type": "array", + "description": "The ids of the chains for this stream in hex Ex: [\"0x1\",\"0x38\"]", + "field": { "type": "string" } + }, + { + "name": "demo", + "type": "boolean", + "description": "Indicator if it is a demo stream" + }, + { + "name": "triggers", + "type": "object", + "description": "triggers", + "fields": [ + { "name": "type", "type": "string" }, + { + "name": "contractAddress", + "type": "string" + }, + { + "name": "inputs", + "type": "array", + "field": { + "anyOf": [ + { "type": "string" }, + { "type": "json" } + ] + } + }, + { + "name": "functionAbi", + "type": "object", + "description": "The abi to parse the log object of the contract", + "fields": [ + { + "name": "anonymous", + "type": "boolean" + }, + { + "name": "constant", + "type": "boolean" + }, + { + "name": "inputs", + "field": { "type": "json" }, + "type": "array" + }, + { + "name": "name", + "type": "string" + }, + { + "name": "outputs", + "field": { "type": "json" }, + "type": "array" + }, + { + "name": "payable", + "type": "boolean" + }, + { + "name": "stateMutability", + "type": "string" + }, + { + "name": "type", + "type": "string", + "required": true + }, + { + "name": "gas", + "type": "number", + "format": "double" + } + ], + "additionalProperties": false, + "example": {} + }, + { "name": "topic0", "type": "string" }, + { "name": "callFrom", "type": "string" } + ] + }, + { + "name": "id", + "type": "string", + "description": "Stringified UUIDv4.\nSee [RFC 4112](https://tools.ietf.org/html/rfc4122)", + "format": "uuid", + "pattern": "[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}" + }, + { + "name": "status", + "type": "string", + "description": "The stream status:\n[active] The Stream is healthy and processing blocks\n[paused] The Stream is paused and is not processing blocks\n[error] The Stream has encountered an error and is not processing blocks", + "enum": [ + "active", + "paused", + "error", + "terminated" + ] + }, + { + "name": "statusMessage", + "type": "string", + "description": "Description of current status of stream." + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = Moralis.Streams.getById({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import streams\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = streams.evm_streams.get_stream(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.coins.getCoinsByCreators({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.coins.get_coins_by_creators(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getCoinTransfersByOwnerAddresses": { - "apiHost": "https://mainnet-aptos-api.moralis.io", - "testHost": "https://testnet-aptos-api.moralis.io", - "summary": "Get Coin transfers by wallet(s)", - "description": "", - "method": "GET", - "path": "/coins/transfers/wallets", - "pathParams": [], - "queryParams": [ - { - "name": "limit", - "description": "The number of results to return", - "required": true, - "type": "number", - "example": 5 - }, - { - "name": "offset", - "description": "The number of results to skip", - "required": false, - "type": "number" - }, - { - "name": "cursor", - "description": "The cursor to use for getting the next page", - "required": false, - "type": "string" - }, - { - "name": "owner_addresses", - "description": "The addresses of the owners to get tokens for", - "required": true, - "type": "array", - "field": { - "type": "string", - "example": "0x274c398a921b8e2ba345feac3039e1c8b196a7eb1395cdd3584af3a85eb9ec50" - } }, - { - "name": "from_date", - "description": "The date from which to fetch coin transfers", - "required": false, - "type": "string" - }, - { - "name": "to_date", - "description": "The date to which to fetch coin transfers", - "required": false, - "type": "string" - }, - { - "name": "coin_type_blacklist", - "description": "The coin types of the coins to whitelist", - "required": false, - "type": "array", - "field": { "type": "string" } - }, - { - "name": "coin_type_whitelist", - "description": "The coin types of the coins to whitelist", - "required": false, - "type": "array", - "field": { "type": "string" } - } - ], - "responses": [ - { - "status": "200", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "cursor", - "type": "string", - "description": "The cursor to use for the next page of results. (Cursor is null on last page)", - "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4" - }, - { - "name": "hasNextPage", - "type": "boolean", - "description": "Indicates if there is a next page of results", - "example": true - }, - { - "name": "result", + "UpdateStream": { + "apiHost": "https://api.moralis-streams.com", + "summary": "Update stream", + "description": "Updates a specific evm stream.", + "method": "POST", + "path": "/streams/evm/:id", + "pathParams": [ + { + "name": "id", + "description": "The id of the stream to update", + "required": true, + "type": "string" + } + ], + "queryParams": [], + "bodyParam": { + "required": true, + "description": "Provide a Stream Model", "type": "object", - "description": "The coins transfers for the provided owner addresses", - "example": [], "fields": [ - { - "name": "activity_type", - "type": "string", - "description": "The definition of the coin activity", - "example": "0x1::coin::WithdrawEvent" - }, - { - "name": "amount", - "type": "string", - "description": "The amount being transfered", - "example": "324933484" - }, - { - "name": "block_height", - "type": "string", - "description": "The blockheight that the transfer was included in", - "example": "49661526" - }, - { - "name": "coin_type", - "type": "string", - "description": "The definition of the coin structure (identifier)", - "example": "T0xa911c7236486be921f6cc9227b09afe4a4ad14d291ba1bb8a9b7c4d628759de::gegg::GEGG" - }, - { - "name": "entry_function_id_str", - "type": "string", - "description": "The function that was called to transfer the coin", - "example": "0x563e8382514ccdcc0c0a83469c9262d22d0b052316c1bd67286ba42bb11d0815::AtodexSwapPoolV1::swap_exact_coi" - }, - { - "name": "event_account_address", - "type": "string", - "description": "The address of the event account", - "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" - }, - { - "name": "event_creation_number", - "type": "string", - "description": "The event creation number", - "example": "9" - }, - { - "name": "event_sequence_number", - "type": "string", - "description": "The sequence number of the event", - "example": "59" - }, - { - "name": "is_gas_fee", - "type": "boolean", - "description": "If the transfer was a gas fee or not", - "example": false - }, - { - "name": "is_transaction_success", - "type": "boolean", - "description": "If the transfer was successful or not", - "example": true - }, - { - "name": "owner_address", - "type": "string", - "description": "The address of the owner of the coin", - "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" - }, - { - "name": "transaction_timestamp", - "type": "string", - "description": "The timestamp of the transaction of when the coin was transfered returned in milliseconds", - "example": "2022-09-17T22:03:32.000000Z" - }, - { - "name": "transaction_version", - "type": "string", - "description": "The version of the transaction where the coin was transfered", - "example": "210373856" - } + { + "name": "webhookUrl", + "type": "string", + "description": "Webhook URL where moralis will send the POST request." + }, + { + "name": "description", + "type": "string", + "description": "A description for this stream" + }, + { + "name": "tag", + "type": "string", + "description": "A user-provided tag that will be send along the webhook, the user can use this tag to identify the specific stream if multiple streams are present" + }, + { + "name": "topic0", + "type": "array", + "description": "An Array of topic0's in string-signature format ex: ['FunctionName(address,uint256)']", + "field": { "type": "string" } + }, + { + "name": "allAddresses", + "type": "boolean", + "description": "Include events for all addresses (only applied when abi and topic0 is provided)" + }, + { + "name": "includeNativeTxs", + "type": "boolean", + "description": "Include or not native transactions defaults to false" + }, + { + "name": "includeContractLogs", + "type": "boolean", + "description": "Include or not logs of contract interactions defaults to false" + }, + { + "name": "includeInternalTxs", + "type": "boolean", + "description": "Include or not include internal transactions defaults to false" + }, + { + "name": "includeAllTxLogs", + "type": "boolean", + "description": "Include all logs if atleast one value in tx or log matches stream config" + }, + { + "name": "getNativeBalances", + "type": "object", + "description": "Include native balances for each address in the webhook", + "fields": [ + { + "name": "selectors", + "type": "array", + "field": { "type": "string" } + }, + { "name": "type", "type": "string" } + ] + }, + { + "name": "abi", + "type": "object", + "fields": [ + { "name": "anonymous", "type": "boolean" }, + { "name": "constant", "type": "boolean" }, + { + "name": "inputs", + "type": "object", + "fields": [ + { "name": "name", "type": "string" }, + { "name": "type", "type": "string" }, + { "name": "indexed", "type": "boolean" }, + { "name": "components", "type": "json" }, + { "name": "internalType", "type": "string" } + ] + }, + { "name": "name", "type": "string" }, + { + "name": "outputs", + "type": "object", + "fields": [ + { "name": "name", "type": "string" }, + { "name": "type", "type": "string" }, + { "name": "components", "type": "json" }, + { "name": "internalType", "type": "string" } + ] + }, + { "name": "payable", "type": "boolean" }, + { "name": "stateMutability", "type": "string" }, + { "name": "type", "type": "string" }, + { "name": "gas", "type": "number" } + ] + }, + { + "name": "advancedOptions", + "type": "object", + "fields": [ + { "name": "topic0", "type": "string" }, + { + "name": "filter", + "type": "json", + "description": "The filter object for the topic0\nhttps://docs.moralis.io/docs/filter-streams", + "example": {} + }, + { "name": "includeNativeTxs", "type": "boolean" } + ] + }, + { + "name": "chainIds", + "type": "array", + "description": "The ids of the chains for this stream in hex Ex: [\"0x1\",\"0x38\"]", + "field": { "type": "string" } + }, + { + "name": "demo", + "type": "boolean", + "description": "Indicator if it is a demo stream" + }, + { + "name": "triggers", + "type": "object", + "description": "triggers", + "fields": [ + { "name": "type", "type": "string" }, + { "name": "contractAddress", "type": "string" }, + { + "name": "inputs", + "type": "array", + "field": { + "anyOf": [ + { "type": "string" }, + { "type": "json" } + ] + } + }, + { + "name": "functionAbi", + "type": "object", + "description": "The abi to parse the log object of the contract", + "fields": [ + { "name": "anonymous", "type": "boolean" }, + { "name": "constant", "type": "boolean" }, + { + "name": "inputs", + "field": { "type": "json" }, + "type": "array" + }, + { "name": "name", "type": "string" }, + { + "name": "outputs", + "field": { "type": "json" }, + "type": "array" + }, + { "name": "payable", "type": "boolean" }, + { + "name": "stateMutability", + "type": "string" + }, + { + "name": "type", + "type": "string", + "required": true + }, + { + "name": "gas", + "type": "number", + "format": "double" + } + ], + "additionalProperties": false, + "example": {} + }, + { "name": "topic0", "type": "string" }, + { "name": "callFrom", "type": "string" } + ] + } ] - } + }, + "responses": [ + { + "status": "200", + "description": "Ok", + "body": { + "type": "object", + "fields": [ + { + "name": "webhookUrl", + "type": "string", + "description": "Webhook URL where moralis will send the POST request." + }, + { + "name": "description", + "type": "string", + "description": "A description for this stream" + }, + { + "name": "tag", + "type": "string", + "description": "A user-provided tag that will be send along the webhook, the user can use this tag to identify the specific stream if multiple streams are present" + }, + { + "name": "topic0", + "type": "array", + "description": "An Array of topic0's in string-signature format ex: ['FunctionName(address,uint256)']", + "field": { "type": "string" } + }, + { + "name": "allAddresses", + "type": "boolean", + "description": "Include events for all addresses (only applied when abi and topic0 is provided)" + }, + { + "name": "includeNativeTxs", + "type": "boolean", + "description": "Include or not native transactions defaults to false" + }, + { + "name": "includeContractLogs", + "type": "boolean", + "description": "Include or not logs of contract interactions defaults to false" + }, + { + "name": "includeInternalTxs", + "type": "boolean", + "description": "Include or not include internal transactions defaults to false" + }, + { + "name": "includeAllTxLogs", + "type": "boolean", + "description": "Include all logs if atleast one value in tx or log matches stream config" + }, + { + "name": "getNativeBalances", + "type": "object", + "description": "Include native balances for each address in the webhook", + "fields": [ + { + "name": "selectors", + "type": "array", + "field": { "type": "string" } + }, + { "name": "type", "type": "string" } + ] + }, + { + "name": "abi", + "type": "object", + "fields": [ + { "name": "anonymous", "type": "boolean" }, + { "name": "constant", "type": "boolean" }, + { + "name": "inputs", + "type": "object", + "fields": [ + { + "name": "name", + "type": "string" + }, + { + "name": "type", + "type": "string" + }, + { + "name": "indexed", + "type": "boolean" + }, + { + "name": "components", + "type": "json" + }, + { + "name": "internalType", + "type": "string" + } + ] + }, + { "name": "name", "type": "string" }, + { + "name": "outputs", + "type": "object", + "fields": [ + { + "name": "name", + "type": "string" + }, + { + "name": "type", + "type": "string" + }, + { + "name": "components", + "type": "json" + }, + { + "name": "internalType", + "type": "string" + } + ] + }, + { "name": "payable", "type": "boolean" }, + { + "name": "stateMutability", + "type": "string" + }, + { "name": "type", "type": "string" }, + { "name": "gas", "type": "number" } + ] + }, + { + "name": "advancedOptions", + "type": "object", + "fields": [ + { "name": "topic0", "type": "string" }, + { + "name": "filter", + "type": "json", + "description": "The filter object for the topic0\nhttps://docs.moralis.io/docs/filter-streams", + "example": {} + }, + { + "name": "includeNativeTxs", + "type": "boolean" + } + ] + }, + { + "name": "chainIds", + "type": "array", + "description": "The ids of the chains for this stream in hex Ex: [\"0x1\",\"0x38\"]", + "field": { "type": "string" } + }, + { + "name": "demo", + "type": "boolean", + "description": "Indicator if it is a demo stream" + }, + { + "name": "triggers", + "type": "object", + "description": "triggers", + "fields": [ + { "name": "type", "type": "string" }, + { + "name": "contractAddress", + "type": "string" + }, + { + "name": "inputs", + "type": "array", + "field": { + "anyOf": [ + { "type": "string" }, + { "type": "json" } + ] + } + }, + { + "name": "functionAbi", + "type": "object", + "description": "The abi to parse the log object of the contract", + "fields": [ + { + "name": "anonymous", + "type": "boolean" + }, + { + "name": "constant", + "type": "boolean" + }, + { + "name": "inputs", + "field": { "type": "json" }, + "type": "array" + }, + { + "name": "name", + "type": "string" + }, + { + "name": "outputs", + "field": { "type": "json" }, + "type": "array" + }, + { + "name": "payable", + "type": "boolean" + }, + { + "name": "stateMutability", + "type": "string" + }, + { + "name": "type", + "type": "string", + "required": true + }, + { + "name": "gas", + "type": "number", + "format": "double" + } + ], + "additionalProperties": false, + "example": {} + }, + { "name": "topic0", "type": "string" }, + { "name": "callFrom", "type": "string" } + ] + }, + { + "name": "id", + "type": "string", + "description": "Stringified UUIDv4.\nSee [RFC 4112](https://tools.ietf.org/html/rfc4122)", + "format": "uuid", + "pattern": "[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}" + }, + { + "name": "status", + "type": "string", + "description": "The stream status:\n[active] The Stream is healthy and processing blocks\n[paused] The Stream is paused and is not processing blocks\n[error] The Stream has encountered an error and is not processing blocks", + "enum": [ + "active", + "paused", + "error", + "terminated" + ] + }, + { + "name": "statusMessage", + "type": "string", + "description": "Description of current status of stream." + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = Moralis.Streams.update({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import streams\n\napi_key = \"YOUR_API_KEY\"\n\nbody = []\n\nparams = {}\n\nresult = streams.evm_streams.update_stream(\n api_key=api_key,\n body=body,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } }, - { - "status": "400", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "statusCode", - "type": "string", - "description": "The status code", - "example": "400" - }, - { - "name": "message", - "type": "array", - "description": "List of things to correct", - "example": ["creator_address must be 66 characters"], - "field": { "type": "string" } - }, - { - "name": "error", - "type": "string", - "description": "Type of error", - "example": "Bad Request" - } + "DeleteStream": { + "apiHost": "https://api.moralis-streams.com", + "summary": "Delete stream", + "description": "Delete a specific evm stream.", + "method": "DELETE", + "path": "/streams/evm/:id", + "pathParams": [ + { + "name": "id", + "description": "The id of the stream to delete", + "required": true, + "type": "string" + } + ], + "queryParams": [], + "responses": [ + { + "status": "200", + "description": "Ok", + "body": { + "type": "object", + "fields": [ + { + "name": "webhookUrl", + "type": "string", + "description": "Webhook URL where moralis will send the POST request." + }, + { + "name": "description", + "type": "string", + "description": "A description for this stream" + }, + { + "name": "tag", + "type": "string", + "description": "A user-provided tag that will be send along the webhook, the user can use this tag to identify the specific stream if multiple streams are present" + }, + { + "name": "topic0", + "type": "array", + "description": "An Array of topic0's in string-signature format ex: ['FunctionName(address,uint256)']", + "field": { "type": "string" } + }, + { + "name": "allAddresses", + "type": "boolean", + "description": "Include events for all addresses (only applied when abi and topic0 is provided)" + }, + { + "name": "includeNativeTxs", + "type": "boolean", + "description": "Include or not native transactions defaults to false" + }, + { + "name": "includeContractLogs", + "type": "boolean", + "description": "Include or not logs of contract interactions defaults to false" + }, + { + "name": "includeInternalTxs", + "type": "boolean", + "description": "Include or not include internal transactions defaults to false" + }, + { + "name": "includeAllTxLogs", + "type": "boolean", + "description": "Include all logs if atleast one value in tx or log matches stream config" + }, + { + "name": "getNativeBalances", + "type": "object", + "description": "Include native balances for each address in the webhook", + "fields": [ + { + "name": "selectors", + "type": "array", + "field": { "type": "string" } + }, + { "name": "type", "type": "string" } + ] + }, + { + "name": "abi", + "type": "object", + "fields": [ + { "name": "anonymous", "type": "boolean" }, + { "name": "constant", "type": "boolean" }, + { + "name": "inputs", + "type": "object", + "fields": [ + { + "name": "name", + "type": "string" + }, + { + "name": "type", + "type": "string" + }, + { + "name": "indexed", + "type": "boolean" + }, + { + "name": "components", + "type": "json" + }, + { + "name": "internalType", + "type": "string" + } + ] + }, + { "name": "name", "type": "string" }, + { + "name": "outputs", + "type": "object", + "fields": [ + { + "name": "name", + "type": "string" + }, + { + "name": "type", + "type": "string" + }, + { + "name": "components", + "type": "json" + }, + { + "name": "internalType", + "type": "string" + } + ] + }, + { "name": "payable", "type": "boolean" }, + { + "name": "stateMutability", + "type": "string" + }, + { "name": "type", "type": "string" }, + { "name": "gas", "type": "number" } + ] + }, + { + "name": "advancedOptions", + "type": "object", + "fields": [ + { "name": "topic0", "type": "string" }, + { + "name": "filter", + "type": "json", + "description": "The filter object for the topic0\nhttps://docs.moralis.io/docs/filter-streams", + "example": {} + }, + { + "name": "includeNativeTxs", + "type": "boolean" + } + ] + }, + { + "name": "chainIds", + "type": "array", + "description": "The ids of the chains for this stream in hex Ex: [\"0x1\",\"0x38\"]", + "field": { "type": "string" } + }, + { + "name": "demo", + "type": "boolean", + "description": "Indicator if it is a demo stream" + }, + { + "name": "triggers", + "type": "object", + "description": "triggers", + "fields": [ + { "name": "type", "type": "string" }, + { + "name": "contractAddress", + "type": "string" + }, + { + "name": "inputs", + "type": "array", + "field": { + "anyOf": [ + { "type": "string" }, + { "type": "json" } + ] + } + }, + { + "name": "functionAbi", + "type": "object", + "description": "The abi to parse the log object of the contract", + "fields": [ + { + "name": "anonymous", + "type": "boolean" + }, + { + "name": "constant", + "type": "boolean" + }, + { + "name": "inputs", + "field": { "type": "json" }, + "type": "array" + }, + { + "name": "name", + "type": "string" + }, + { + "name": "outputs", + "field": { "type": "json" }, + "type": "array" + }, + { + "name": "payable", + "type": "boolean" + }, + { + "name": "stateMutability", + "type": "string" + }, + { + "name": "type", + "type": "string", + "required": true + }, + { + "name": "gas", + "type": "number", + "format": "double" + } + ], + "additionalProperties": false, + "example": {} + }, + { "name": "topic0", "type": "string" }, + { "name": "callFrom", "type": "string" } + ] + }, + { + "name": "id", + "type": "string", + "description": "Stringified UUIDv4.\nSee [RFC 4112](https://tools.ietf.org/html/rfc4122)", + "format": "uuid", + "pattern": "[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}" + }, + { + "name": "status", + "type": "string", + "description": "The stream status:\n[active] The Stream is healthy and processing blocks\n[paused] The Stream is paused and is not processing blocks\n[error] The Stream has encountered an error and is not processing blocks", + "enum": [ + "active", + "paused", + "error", + "terminated" + ] + }, + { + "name": "statusMessage", + "type": "string", + "description": "Description of current status of stream." + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = Moralis.Streams.delete({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import streams\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = streams.evm_streams.delete_stream(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.coins.getCoinTransfersByOwnerAddresses({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" }, - { - "language": "python", - "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.coins.get_coin_transfers_by_owner_addresses(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getCoinTransfersByBlockHeights": { - "apiHost": "https://mainnet-aptos-api.moralis.io", - "testHost": "https://testnet-aptos-api.moralis.io", - "summary": "Get Coin transfers by block height(s)", - "description": "Get Coin transfers from one or many block heights.", - "method": "GET", - "path": "/coins/transfers/blocks", - "pathParams": [], - "queryParams": [ - { - "name": "limit", - "description": "The number of results to return", - "required": true, - "type": "number", - "example": 5 - }, - { - "name": "offset", - "description": "The number of results to skip", - "required": false, - "type": "number" - }, - { - "name": "cursor", - "description": "The cursor to use for getting the next page", - "required": false, - "type": "string" - }, - { - "name": "block_heights", - "description": "The coin types to fetch info about", - "required": true, - "type": "array", - "field": { "type": "string" } - } - ], - "responses": [ - { - "status": "200", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "cursor", - "type": "string", - "description": "The cursor to use for the next page of results. (Cursor is null on last page)", - "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4" - }, - { - "name": "hasNextPage", - "type": "boolean", - "description": "Indicates if there is a next page of results", - "example": true - }, - { - "name": "result", + "UpdateStreamStatus": { + "apiHost": "https://api.moralis-streams.com", + "summary": "Update stream status", + "description": "Updates the status of specific evm stream.", + "method": "POST", + "path": "/streams/evm/:id/status", + "pathParams": [ + { + "name": "id", + "description": "The id of the stream to update", + "required": true, + "type": "string" + } + ], + "queryParams": [], + "bodyParam": { + "required": true, + "description": "Provide a Stream Model", "type": "object", - "description": "The coins transfers for the provided block heights", - "example": [], "fields": [ - { - "name": "activity_type", - "type": "string", - "description": "The definition of the coin activity", - "example": "0x1::coin::WithdrawEvent" - }, - { - "name": "amount", - "type": "string", - "description": "The amount being transfered", - "example": "324933484" - }, - { - "name": "block_height", - "type": "string", - "description": "The blockheight that the transfer was included in", - "example": "49661526" - }, - { - "name": "coin_type", - "type": "string", - "description": "The definition of the coin structure (identifier)", - "example": "T0xa911c7236486be921f6cc9227b09afe4a4ad14d291ba1bb8a9b7c4d628759de::gegg::GEGG" - }, - { - "name": "entry_function_id_str", - "type": "string", - "description": "The function that was called to transfer the coin", - "example": "0x563e8382514ccdcc0c0a83469c9262d22d0b052316c1bd67286ba42bb11d0815::AtodexSwapPoolV1::swap_exact_coi" - }, - { - "name": "event_account_address", - "type": "string", - "description": "The address of the event account", - "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" - }, - { - "name": "event_creation_number", - "type": "string", - "description": "The event creation number", - "example": "9" - }, - { - "name": "event_sequence_number", - "type": "string", - "description": "The sequence number of the event", - "example": "59" - }, - { - "name": "is_gas_fee", - "type": "boolean", - "description": "If the transfer was a gas fee or not", - "example": false - }, - { - "name": "is_transaction_success", - "type": "boolean", - "description": "If the transfer was successful or not", - "example": true - }, - { - "name": "owner_address", - "type": "string", - "description": "The address of the owner of the coin", - "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" - }, - { - "name": "transaction_timestamp", - "type": "string", - "description": "The timestamp of the transaction of when the coin was transfered returned in milliseconds", - "example": "2022-09-17T22:03:32.000000Z" - }, - { - "name": "transaction_version", - "type": "string", - "description": "The version of the transaction where the coin was transfered", - "example": "210373856" - } + { + "name": "status", + "type": "string", + "required": true, + "description": "The stream status:\n[active] The Stream is healthy and processing blocks\n[paused] The Stream is paused and is not processing blocks\n[error] The Stream has encountered an error and is not processing blocks", + "enum": ["active", "paused", "error", "terminated"] + } ] - } + }, + "responses": [ + { + "status": "200", + "description": "Ok", + "body": { + "type": "object", + "fields": [ + { + "name": "webhookUrl", + "type": "string", + "description": "Webhook URL where moralis will send the POST request." + }, + { + "name": "description", + "type": "string", + "description": "A description for this stream" + }, + { + "name": "tag", + "type": "string", + "description": "A user-provided tag that will be send along the webhook, the user can use this tag to identify the specific stream if multiple streams are present" + }, + { + "name": "topic0", + "type": "array", + "description": "An Array of topic0's in string-signature format ex: ['FunctionName(address,uint256)']", + "field": { "type": "string" } + }, + { + "name": "allAddresses", + "type": "boolean", + "description": "Include events for all addresses (only applied when abi and topic0 is provided)" + }, + { + "name": "includeNativeTxs", + "type": "boolean", + "description": "Include or not native transactions defaults to false" + }, + { + "name": "includeContractLogs", + "type": "boolean", + "description": "Include or not logs of contract interactions defaults to false" + }, + { + "name": "includeInternalTxs", + "type": "boolean", + "description": "Include or not include internal transactions defaults to false" + }, + { + "name": "includeAllTxLogs", + "type": "boolean", + "description": "Include all logs if atleast one value in tx or log matches stream config" + }, + { + "name": "getNativeBalances", + "type": "object", + "description": "Include native balances for each address in the webhook", + "fields": [ + { + "name": "selectors", + "type": "array", + "field": { "type": "string" } + }, + { "name": "type", "type": "string" } + ] + }, + { + "name": "abi", + "type": "object", + "fields": [ + { "name": "anonymous", "type": "boolean" }, + { "name": "constant", "type": "boolean" }, + { + "name": "inputs", + "type": "object", + "fields": [ + { + "name": "name", + "type": "string" + }, + { + "name": "type", + "type": "string" + }, + { + "name": "indexed", + "type": "boolean" + }, + { + "name": "components", + "type": "json" + }, + { + "name": "internalType", + "type": "string" + } + ] + }, + { "name": "name", "type": "string" }, + { + "name": "outputs", + "type": "object", + "fields": [ + { + "name": "name", + "type": "string" + }, + { + "name": "type", + "type": "string" + }, + { + "name": "components", + "type": "json" + }, + { + "name": "internalType", + "type": "string" + } + ] + }, + { "name": "payable", "type": "boolean" }, + { + "name": "stateMutability", + "type": "string" + }, + { "name": "type", "type": "string" }, + { "name": "gas", "type": "number" } + ] + }, + { + "name": "advancedOptions", + "type": "object", + "fields": [ + { "name": "topic0", "type": "string" }, + { + "name": "filter", + "type": "json", + "description": "The filter object for the topic0\nhttps://docs.moralis.io/docs/filter-streams", + "example": {} + }, + { + "name": "includeNativeTxs", + "type": "boolean" + } + ] + }, + { + "name": "chainIds", + "type": "array", + "description": "The ids of the chains for this stream in hex Ex: [\"0x1\",\"0x38\"]", + "field": { "type": "string" } + }, + { + "name": "demo", + "type": "boolean", + "description": "Indicator if it is a demo stream" + }, + { + "name": "triggers", + "type": "object", + "description": "triggers", + "fields": [ + { "name": "type", "type": "string" }, + { + "name": "contractAddress", + "type": "string" + }, + { + "name": "inputs", + "type": "array", + "field": { + "anyOf": [ + { "type": "string" }, + { "type": "json" } + ] + } + }, + { + "name": "functionAbi", + "type": "object", + "description": "The abi to parse the log object of the contract", + "fields": [ + { + "name": "anonymous", + "type": "boolean" + }, + { + "name": "constant", + "type": "boolean" + }, + { + "name": "inputs", + "field": { "type": "json" }, + "type": "array" + }, + { + "name": "name", + "type": "string" + }, + { + "name": "outputs", + "field": { "type": "json" }, + "type": "array" + }, + { + "name": "payable", + "type": "boolean" + }, + { + "name": "stateMutability", + "type": "string" + }, + { + "name": "type", + "type": "string", + "required": true + }, + { + "name": "gas", + "type": "number", + "format": "double" + } + ], + "additionalProperties": false, + "example": {} + }, + { "name": "topic0", "type": "string" }, + { "name": "callFrom", "type": "string" } + ] + }, + { + "name": "id", + "type": "string", + "description": "Stringified UUIDv4.\nSee [RFC 4112](https://tools.ietf.org/html/rfc4122)", + "format": "uuid", + "pattern": "[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}" + }, + { + "name": "status", + "type": "string", + "description": "The stream status:\n[active] The Stream is healthy and processing blocks\n[paused] The Stream is paused and is not processing blocks\n[error] The Stream has encountered an error and is not processing blocks", + "enum": [ + "active", + "paused", + "error", + "terminated" + ] + }, + { + "name": "statusMessage", + "type": "string", + "description": "Description of current status of stream." + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = Moralis.Streams.updateStatus({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import streams\n\napi_key = \"YOUR_API_KEY\"\n\nbody = []\n\nparams = {}\n\nresult = streams.evm_streams.update_stream_status(\n api_key=api_key,\n body=body,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } }, - { - "status": "400", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "statusCode", - "type": "string", - "description": "The status code", - "example": "400" - }, - { - "name": "message", - "type": "array", - "description": "List of things to correct", - "example": ["creator_address must be 66 characters"], - "field": { "type": "string" } - }, - { - "name": "error", - "type": "string", - "description": "Type of error", - "example": "Bad Request" - } + "GetAddresses": { + "apiHost": "https://api.moralis-streams.com", + "summary": "Get addresses by stream", + "description": "Get all addresses associated with a specific stream.", + "method": "GET", + "path": "/streams/evm/:id/address", + "pathParams": [ + { + "name": "id", + "description": "the id of the stream to get the addresses from", + "required": true, + "type": "string" + } + ], + "queryParams": [ + { + "name": "limit", + "description": "Limit response results max value 100", + "required": true, + "type": "number" + }, + { + "name": "cursor", + "description": "Cursor for fetching next page", + "required": false, + "type": "string" + } + ], + "responses": [ + { + "status": "200", + "description": "Ok", + "body": { + "type": "object", + "fields": [ + { + "name": "result", + "type": "object", + "description": "Array of project Streams", + "fields": [ + { + "name": "address", + "type": "string", + "description": "Address" + } + ] + }, + { + "name": "cursor", + "type": "string", + "description": "Cursor for fetching next page" + }, + { + "name": "total", + "type": "number", + "description": "Total count of streams on the project" + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = Moralis.Streams.getAddresses({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import streams\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = streams.evm_streams.get_addresses(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.coins.getCoinTransfersByBlockHeights({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.coins.get_coin_transfers_by_block_heights(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getCoinTransfersByCoinType": { - "apiHost": "https://mainnet-aptos-api.moralis.io", - "testHost": "https://testnet-aptos-api.moralis.io", - "summary": "Get Coin transfers by coin type", - "description": "Get Coin transfers by a specific coin type e.g. `0x1::aptos_coin::AptosCoin`", - "method": "GET", - "path": "/coins/transfers/:coin_type", - "pathParams": [ - { - "name": "coin_type", - "description": "The coin type to fetch info about", - "required": true, - "type": "string", - "example": "0x1::aptos_coin::AptosCoin" - } - ], - "queryParams": [ - { - "name": "limit", - "description": "The number of results to return", - "required": true, - "type": "number", - "example": 5 - }, - { - "name": "offset", - "description": "The number of results to skip", - "required": false, - "type": "number" - }, - { - "name": "cursor", - "description": "The cursor to use for getting the next page", - "required": false, - "type": "string" }, - { - "name": "from_date", - "description": "The date from which to fetch coin transfers", - "required": false, - "type": "string" - }, - { - "name": "to_date", - "description": "The date to which to fetch coin transfers", - "required": false, - "type": "string" - } - ], - "responses": [ - { - "status": "200", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "cursor", - "type": "string", - "description": "The cursor to use for the next page of results. (Cursor is null on last page)", - "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4" - }, - { - "name": "hasNextPage", - "type": "boolean", - "description": "Indicates if there is a next page of results", - "example": true - }, - { - "name": "result", + "AddAddressToStream": { + "apiHost": "https://api.moralis-streams.com", + "summary": "Add address to stream", + "description": "Adds an address to a Stream.", + "method": "POST", + "path": "/streams/evm/:id/address", + "pathParams": [ + { + "name": "id", + "description": "The id of the stream to add the address to", + "required": true, + "type": "string" + } + ], + "queryParams": [], + "bodyParam": { + "required": true, + "description": "Provide a Address Model", "type": "object", - "description": "The coins transfers for the provided coin type", - "example": [], "fields": [ - { - "name": "activity_type", - "type": "string", - "description": "The definition of the coin activity", - "example": "0x1::coin::WithdrawEvent" - }, - { - "name": "amount", - "type": "string", - "description": "The amount being transfered", - "example": "324933484" - }, - { - "name": "block_height", - "type": "string", - "description": "The blockheight that the transfer was included in", - "example": "49661526" - }, - { - "name": "coin_type", - "type": "string", - "description": "The definition of the coin structure (identifier)", - "example": "T0xa911c7236486be921f6cc9227b09afe4a4ad14d291ba1bb8a9b7c4d628759de::gegg::GEGG" - }, - { - "name": "entry_function_id_str", - "type": "string", - "description": "The function that was called to transfer the coin", - "example": "0x563e8382514ccdcc0c0a83469c9262d22d0b052316c1bd67286ba42bb11d0815::AtodexSwapPoolV1::swap_exact_coi" - }, - { - "name": "event_account_address", - "type": "string", - "description": "The address of the event account", - "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" - }, - { - "name": "event_creation_number", - "type": "string", - "description": "The event creation number", - "example": "9" - }, - { - "name": "event_sequence_number", - "type": "string", - "description": "The sequence number of the event", - "example": "59" - }, - { - "name": "is_gas_fee", - "type": "boolean", - "description": "If the transfer was a gas fee or not", - "example": false - }, - { - "name": "is_transaction_success", - "type": "boolean", - "description": "If the transfer was successful or not", - "example": true - }, - { - "name": "owner_address", - "type": "string", - "description": "The address of the owner of the coin", - "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" - }, - { - "name": "transaction_timestamp", - "type": "string", - "description": "The timestamp of the transaction of when the coin was transfered returned in milliseconds", - "example": "2022-09-17T22:03:32.000000Z" - }, - { - "name": "transaction_version", - "type": "string", - "description": "The version of the transaction where the coin was transfered", - "example": "210373856" - } + { + "name": "address", + "description": "The address or a list of addresses to be added to the Stream.", + "type": "oneOf", + "required": true, + "options": [ + { "type": "string" }, + { "field": { "type": "string" }, "type": "array" } + ] + } ] - } - ] - } - }, - { - "status": "400", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "statusCode", - "type": "string", - "description": "The status code", - "example": "400" - }, - { - "name": "message", - "type": "array", - "description": "List of things to correct", - "example": ["creator_address must be 66 characters"], - "field": { "type": "string" } - }, - { - "name": "error", - "type": "string", - "description": "Type of error", - "example": "Bad Request" - } + }, + "responses": [ + { + "status": "200", + "description": "Ok", + "body": { + "type": "object", + "fields": [ + { + "name": "streamId", + "type": "string", + "description": "The streamId" + }, + { + "name": "address", + "description": "Address", + "type": "oneOf", + "options": [ + { "type": "string" }, + { + "field": { "type": "string" }, + "type": "array" + } + ] + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = Moralis.Streams.addAddress({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import streams\n\napi_key = \"YOUR_API_KEY\"\n\nbody = []\n\nparams = {}\n\nresult = streams.evm_streams.add_address_to_stream(\n api_key=api_key,\n body=body,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.coins.getCoinTransfersByCoinType({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.coins.get_coin_transfers_by_coin_type(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getTopHoldersByCoin": { - "apiHost": "https://mainnet-aptos-api.moralis.io", - "summary": "Get Coin top holders", - "description": "Get the top holders of a coin by coin type hash.", - "method": "GET", - "path": "/coins/owners/:coin_type_hash/top-holders", - "pathParams": [ - { - "name": "coin_type_hash", - "description": "The coin type hash to fetch info about", - "required": true, - "type": "string", - "example": "91ceb1308a98389691e05158b07ed5f079ab78461a6bb8d5a4054b1bb5cb8bb6" - } - ], - "queryParams": [ - { - "name": "limit", - "description": "The number of results to return", - "required": true, - "type": "number", - "example": 5 - }, - { - "name": "offset", - "description": "The number of results to skip", - "required": false, - "type": "number" - }, - { - "name": "cursor", - "description": "The cursor to use for getting the next page", - "required": false, - "type": "string" - }, - { - "name": "min_amount", - "description": "The minimum amount of coins required for a wallet to be included in the results", - "required": false, - "type": "number" }, - { - "name": "min_version", - "description": "The minimum version on when the balance was last updated", - "required": false, - "type": "number" - }, - { - "name": "wallet_blacklist", - "description": "The addresses of the wallets to blacklist", - "required": false, - "type": "array", - "field": { "type": "string" } - }, - { - "name": "wallet_whitelist", - "description": "The addresses of the wallets to whitelist", - "required": false, - "type": "array", - "field": { "type": "string" } - } - ], - "responses": [ - { - "status": "200", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "cursor", - "type": "string", - "description": "The cursor to use for the next page of results. (Cursor is null on last page)", - "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4" - }, - { - "name": "hasNextPage", - "type": "boolean", - "description": "Indicates if there is a next page of results", - "example": true - }, - { - "name": "result", + "DeleteAddressFromStream": { + "apiHost": "https://api.moralis-streams.com", + "summary": "Delete address from stream", + "description": "Deletes an address from a Stream.", + "method": "DELETE", + "path": "/streams/evm/:id/address", + "pathParams": [ + { + "name": "id", + "description": "The id of the stream to delete the address from", + "required": true, + "type": "string" + } + ], + "queryParams": [], + "bodyParam": { + "required": true, + "description": "Provide a Address Model", "type": "object", - "description": "The top holders of the given coin", - "example": [], "fields": [ - { - "name": "amount", - "type": "string", - "description": "The amount being transfered", - "example": "324933484" - }, - { - "name": "coin_type", - "type": "string", - "description": "The definition of the coin structure (identifier)", - "example": "T0xa911c7236486be921f6cc9227b09afe4a4ad14d291ba1bb8a9b7c4d628759de::gegg::GEGG" - }, - { - "name": "coin_type_hash", - "type": "string", - "description": "The hash of the coin_type (identifier) and a known fixed length", - "example": "6993fb8b5688d392a2d94127b9926519d6327e69f2bcf3dc0c5df2c060aec97d" - }, - { - "name": "last_transaction_timestamp", - "type": "string", - "description": "The timestamp of the last update to the balance returned in milliseconds", - "example": "2022-09-17T22:03:32.000000Z" - }, - { - "name": "last_transaction_version", - "type": "string", - "description": "The version of the transaction where the balance was last s", - "example": "210373856" - }, - { - "name": "owner_address", - "type": "string", - "description": "The address of the owner of the coin", - "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" - } - ] - } - ] - } - }, - { - "status": "400", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "statusCode", - "type": "string", - "description": "The status code", - "example": "400" - }, - { - "name": "message", - "type": "array", - "description": "List of things to correct", - "example": ["creator_address must be 66 characters"], - "field": { "type": "string" } - }, - { - "name": "error", - "type": "string", - "description": "Type of error", - "example": "Bad Request" - } + { + "name": "address", + "description": "The address or a list of addresses to be removed from the Stream.", + "type": "oneOf", + "options": [ + { "type": "string" }, + { "field": { "type": "string" }, "type": "array" } + ] + } + ] + }, + "responses": [ + { + "status": "200", + "description": "Ok", + "body": { + "type": "object", + "fields": [ + { + "name": "streamId", + "type": "string", + "description": "The streamId" + }, + { + "name": "address", + "description": "Address", + "type": "oneOf", + "options": [ + { "type": "string" }, + { + "field": { "type": "string" }, + "type": "array" + } + ] + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = Moralis.Streams.deleteAddress({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import streams\n\napi_key = \"YOUR_API_KEY\"\n\nbody = []\n\nparams = {}\n\nresult = streams.evm_streams.delete_address_from_stream(\n api_key=api_key,\n body=body,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.coins.getTopHoldersByCoin({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.coins.get_top_holders_by_coin(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getCoinBalancesByWallets": { - "apiHost": "https://mainnet-aptos-api.moralis.io", - "testHost": "https://testnet-aptos-api.moralis.io", - "summary": "Get Coin balances by wallet(s)", - "description": "Get Coin balances for one or many wallet addresses.", - "method": "GET", - "path": "/wallets/coins", - "pathParams": [], - "queryParams": [ - { - "name": "limit", - "description": "The number of results to return", - "required": true, - "type": "number", - "example": 5 - }, - { - "name": "offset", - "description": "The number of results to skip", - "required": false, - "type": "number" - }, - { - "name": "cursor", - "description": "The cursor to use for getting the next page", - "required": false, - "type": "string" - }, - { - "name": "owner_addresses", - "description": "The addresses of the owners to get coin balances for", - "required": true, - "type": "array", - "field": { - "type": "string", - "example": "0x274c398a921b8e2ba345feac3039e1c8b196a7eb1395cdd3584af3a85eb9ec50" - } }, - { - "name": "coin_type_hash_blacklist", - "description": "The coin type hashes of the coins to whitelist", - "required": false, - "type": "array", - "field": { "type": "string" } - }, - { - "name": "coin_type_hash_whitelist", - "description": "The coin type hashes of the coins to whitelist", - "required": false, - "type": "array", - "field": { "type": "string" } - } - ], - "responses": [ - { - "status": "200", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "cursor", - "type": "string", - "description": "The cursor to use for the next page of results. (Cursor is null on last page)", - "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4" - }, - { - "name": "hasNextPage", - "type": "boolean", - "description": "Indicates if there is a next page of results", - "example": true - }, - { - "name": "result", + "aptosStreamsGetAll": { + "apiHost": "https://api.moralis-streams.com", + "summary": "Gets all aptos streams.", + "description": "Get all aptos streams.", + "method": "GET", + "path": "/streams/aptos", + "pathParams": [], + "queryParams": [ + { + "name": "limit", + "description": "Limit response results max value 100", + "required": true, + "type": "number" + }, + { + "name": "cursor", + "description": "Cursor for fetching next page", + "required": false, + "type": "string" + } + ], + "responses": [{ "status": "200", "description": "Ok" }] + }, + "aptosStreamsCreate": { + "apiHost": "https://api.moralis-streams.com", + "summary": "Create stream", + "description": "Creates a new aptos stream.", + "method": "PUT", + "path": "/streams/aptos", + "pathParams": [], + "queryParams": [], + "bodyParam": { + "required": true, + "description": "Provide a valid Aptos Stream Model", "type": "object", - "description": "The coins balances for the provided wallets", - "example": [], "fields": [ - { - "name": "amount", - "type": "string", - "description": "The amount being transfered", - "example": "324933484" - }, - { - "name": "coin_type", - "type": "string", - "description": "The definition of the coin structure (identifier)", - "example": "T0xa911c7236486be921f6cc9227b09afe4a4ad14d291ba1bb8a9b7c4d628759de::gegg::GEGG" - }, - { - "name": "coin_type_hash", - "type": "string", - "description": "The hash of the coin_type (identifier) and a known fixed length", - "example": "6993fb8b5688d392a2d94127b9926519d6327e69f2bcf3dc0c5df2c060aec97d" - }, - { - "name": "last_transaction_timestamp", - "type": "string", - "description": "The timestamp of the last update to the balance returned in milliseconds", - "example": "2022-09-17T22:03:32.000000Z" - }, - { - "name": "last_transaction_version", - "type": "string", - "description": "The version of the transaction where the balance was last s", - "example": "210373856" - }, - { - "name": "owner_address", - "type": "string", - "description": "The address of the owner of the coin", - "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" - } + { + "name": "webhookUrl", + "type": "string", + "description": "Webhook URL where moralis will send the POST request." + }, + { + "name": "tag", + "type": "string", + "description": "A user-provided tag that will be send along the webhook, the user can use this tag to identify the specific stream if multiple streams are present" + }, + { + "name": "functions", + "type": "array", + "description": "An Array of events in string-signature format ex: ['0x1::aptos_account::transfer']", + "field": { "type": "string" } + }, + { + "name": "events", + "type": "array", + "description": "An Array of events in string-signature format ex: ['0x1::coin::WithdrawEvent']", + "field": { "type": "string" } + }, + { + "name": "network", + "type": "array", + "description": "The network to listen to", + "field": { + "type": "string", + "enum": ["mainnet", "testnet"] + } + }, + { + "name": "includePayload", + "type": "boolean", + "description": "Include or not payload for every transaction in webhook defaults to false" + }, + { + "name": "includeEvents", + "type": "boolean", + "description": "Include or not events in webhook defaults to false" + }, + { + "name": "includeChanges", + "type": "boolean", + "description": "Include or not raw changes for every transaction in webhook defaults to false" + }, + { + "name": "description", + "type": "string", + "description": "A description for this stream" + }, + { + "name": "demo", + "type": "boolean", + "description": "Indicator if it is a demo stream" + }, + { + "name": "allAddresses", + "type": "boolean", + "description": "Include events for all addresses (only applied when at least one event or function is provided)" + } ] - } + }, + "responses": [ + { + "status": "200", + "description": "Ok", + "body": { + "type": "object", + "fields": [ + { "name": "id", "type": "string" }, + { "name": "allAddresses", "type": "boolean" }, + { "name": "demo", "type": "boolean" }, + { "name": "description", "type": "string" }, + { "name": "includeChanges", "type": "boolean" }, + { "name": "includeEvents", "type": "boolean" }, + { "name": "includePayload", "type": "boolean" }, + { "name": "isErrorSince", "type": "string" }, + { + "name": "network", + "type": "array", + "field": { + "type": "string", + "enum": ["mainnet", "testnet"] + } + }, + { + "name": "status", + "type": "string", + "description": "The stream status:\n[active] The Stream is healthy and processing blocks\n[paused] The Stream is paused and is not processing blocks\n[error] The Stream has encountered an error and is not processing blocks", + "enum": [ + "active", + "paused", + "error", + "terminated" + ] + }, + { "name": "statusMessage", "type": "string" }, + { + "name": "events", + "type": "array", + "field": { "type": "string" } + }, + { + "name": "functions", + "type": "array", + "field": { "type": "string" } + }, + { "name": "tag", "type": "string" }, + { "name": "webhookUrl", "type": "string" }, + { "name": "amountOfAddresses", "type": "number" } + ] + } + } ] - } }, - { - "status": "400", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "statusCode", - "type": "string", - "description": "The status code", - "example": "400" - }, - { - "name": "message", - "type": "array", - "description": "List of things to correct", - "example": ["creator_address must be 66 characters"], - "field": { "type": "string" } - }, - { - "name": "error", - "type": "string", - "description": "Type of error", - "example": "Bad Request" - } + "aptosStreamsGet": { + "apiHost": "https://api.moralis-streams.com", + "summary": "Get a specific aptos stream.", + "description": "Get a specific aptos stream.", + "method": "GET", + "path": "/streams/aptos/:id", + "pathParams": [ + { + "name": "id", + "description": "The id of the stream to get", + "required": true, + "type": "string" + } + ], + "queryParams": [], + "responses": [ + { + "status": "200", + "description": "Ok", + "body": { + "type": "object", + "fields": [ + { "name": "id", "type": "string" }, + { "name": "allAddresses", "type": "boolean" }, + { "name": "demo", "type": "boolean" }, + { "name": "description", "type": "string" }, + { "name": "includeChanges", "type": "boolean" }, + { "name": "includeEvents", "type": "boolean" }, + { "name": "includePayload", "type": "boolean" }, + { "name": "isErrorSince", "type": "string" }, + { + "name": "network", + "type": "array", + "field": { + "type": "string", + "enum": ["mainnet", "testnet"] + } + }, + { + "name": "status", + "type": "string", + "description": "The stream status:\n[active] The Stream is healthy and processing blocks\n[paused] The Stream is paused and is not processing blocks\n[error] The Stream has encountered an error and is not processing blocks", + "enum": [ + "active", + "paused", + "error", + "terminated" + ] + }, + { "name": "statusMessage", "type": "string" }, + { + "name": "events", + "type": "array", + "field": { "type": "string" } + }, + { + "name": "functions", + "type": "array", + "field": { "type": "string" } + }, + { "name": "tag", "type": "string" }, + { "name": "webhookUrl", "type": "string" }, + { "name": "amountOfAddresses", "type": "number" } + ] + } + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.wallets.getCoinBalancesByWallets({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.wallets.get_coin_balances_by_wallets(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getHistoricalCoinBalancesByWallets": { - "apiHost": "https://mainnet-aptos-api.moralis.io", - "testHost": "https://testnet-aptos-api.moralis.io", - "summary": "Get historical Coin balances by wallet(s)", - "description": "Get historical Coin balances for one or many wallet addresses. Filter by coin type hashes to retrieve specific balances.", - "method": "GET", - "path": "/wallets/coins/history", - "pathParams": [], - "queryParams": [ - { - "name": "limit", - "description": "The number of results to return", - "required": true, - "type": "number", - "example": 5 - }, - { - "name": "offset", - "description": "The number of results to skip", - "required": false, - "type": "number" - }, - { - "name": "cursor", - "description": "The cursor to use for getting the next page", - "required": false, - "type": "string" - }, - { - "name": "owner_addresses", - "description": "The addresses of the owner addresses to get historical balances for", - "required": true, - "type": "array", - "field": { - "type": "string", - "example": "0x274c398a921b8e2ba345feac3039e1c8b196a7eb1395cdd3584af3a85eb9ec50" - } }, - { - "name": "coin_type_hash_blacklist", - "description": "The coin type hash of the coins to whitelist", - "required": false, - "type": "array", - "field": { "type": "string" } - }, - { - "name": "coin_type_hash_whitelist", - "description": "The coin type hash of the coins to whitelist", - "required": false, - "type": "array", - "field": { "type": "string" } - } - ], - "responses": [ - { - "status": "200", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "cursor", - "type": "string", - "description": "The cursor to use for the next page of results. (Cursor is null on last page)", - "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4" - }, - { - "name": "hasNextPage", - "type": "boolean", - "description": "Indicates if there is a next page of results", - "example": true - }, - { - "name": "result", + "aptosStreamsUpdate": { + "apiHost": "https://api.moralis-streams.com", + "summary": "Update stream", + "description": "Updates a new aptos stream.", + "method": "POST", + "path": "/streams/aptos/:id", + "pathParams": [ + { "name": "id", "required": true, "type": "string" } + ], + "queryParams": [], + "bodyParam": { + "required": true, + "description": "Provide valid values of a Aptos Stream Model", "type": "object", - "description": "The coins balances for the provided wallets", - "example": [], "fields": [ - { - "name": "amount", - "type": "string", - "description": "The amount being transfered", - "example": "324933484" - }, - { - "name": "coin_type", - "type": "string", - "description": "The definition of the coin structure (identifier)", - "example": "T0xa911c7236486be921f6cc9227b09afe4a4ad14d291ba1bb8a9b7c4d628759de::gegg::GEGG" - }, - { - "name": "coin_type_hash", - "type": "string", - "description": "The hash of the coin_type (identifier) and a known fixed length", - "example": "6993fb8b5688d392a2d94127b9926519d6327e69f2bcf3dc0c5df2c060aec97d" - }, - { - "name": "transaction_timestamp", - "type": "string", - "description": "The timestamp of the updated balance returned in milliseconds", - "example": "2022-09-17T22:03:32.000000Z" - }, - { - "name": "transaction_version", - "type": "string", - "description": "The version of the transaction where the balacne was updated", - "example": "210373856" - }, - { - "name": "owner_address", - "type": "string", - "description": "The address of the owner of the coin", - "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" - } + { + "name": "allAddresses", + "type": "boolean", + "description": "Include events for all addresses (only applied when at least one event or function is provided)" + }, + { + "name": "demo", + "type": "boolean", + "description": "Indicator if it is a demo stream" + }, + { + "name": "description", + "type": "string", + "description": "A description for this stream" + }, + { + "name": "includeChanges", + "type": "boolean", + "description": "Include or not raw changes for every transaction in webhook defaults to false" + }, + { + "name": "includeEvents", + "type": "boolean", + "description": "Include or not events in webhook defaults to false" + }, + { + "name": "includePayload", + "type": "boolean", + "description": "Include or not payload for every transaction in webhook defaults to false" + }, + { + "name": "network", + "type": "array", + "description": "The network to listen to", + "field": { + "type": "string", + "enum": ["mainnet", "testnet"] + } + }, + { + "name": "events", + "type": "array", + "description": "An Array of events in string-signature format ex: ['0x1::coin::WithdrawEvent']", + "field": { "type": "string" } + }, + { + "name": "functions", + "type": "array", + "description": "An Array of events in string-signature format ex: ['0x1::aptos_account::transfer']", + "field": { "type": "string" } + }, + { + "name": "tag", + "type": "string", + "description": "A user-provided tag that will be send along the webhook, the user can use this tag to identify the specific stream if multiple streams are present" + }, + { + "name": "webhookUrl", + "type": "string", + "description": "Webhook URL where moralis will send the POST request." + } ] - } - ] - } - }, - { - "status": "400", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "statusCode", - "type": "string", - "description": "The status code", - "example": "400" - }, - { - "name": "message", - "type": "array", - "description": "List of things to correct", - "example": ["creator_address must be 66 characters"], - "field": { "type": "string" } - }, - { - "name": "error", - "type": "string", - "description": "Type of error", - "example": "Bad Request" - } + }, + "responses": [ + { + "status": "200", + "description": "Ok", + "body": { + "type": "object", + "fields": [ + { "name": "id", "type": "string" }, + { "name": "allAddresses", "type": "boolean" }, + { "name": "demo", "type": "boolean" }, + { "name": "description", "type": "string" }, + { "name": "includeChanges", "type": "boolean" }, + { "name": "includeEvents", "type": "boolean" }, + { "name": "includePayload", "type": "boolean" }, + { "name": "isErrorSince", "type": "string" }, + { + "name": "network", + "type": "array", + "field": { + "type": "string", + "enum": ["mainnet", "testnet"] + } + }, + { + "name": "status", + "type": "string", + "description": "The stream status:\n[active] The Stream is healthy and processing blocks\n[paused] The Stream is paused and is not processing blocks\n[error] The Stream has encountered an error and is not processing blocks", + "enum": [ + "active", + "paused", + "error", + "terminated" + ] + }, + { "name": "statusMessage", "type": "string" }, + { + "name": "events", + "type": "array", + "field": { "type": "string" } + }, + { + "name": "functions", + "type": "array", + "field": { "type": "string" } + }, + { "name": "tag", "type": "string" }, + { "name": "webhookUrl", "type": "string" }, + { "name": "amountOfAddresses", "type": "number" } + ] + } + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.wallets.getHistoricalCoinBalancesByWallets({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.wallets.get_historical_coin_balances_by_wallets(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getCoinTransfersByWalletAddresses": { - "apiHost": "https://mainnet-aptos-api.moralis.io", - "testHost": "https://testnet-aptos-api.moralis.io", - "summary": "Get Coin transfers by wallet(s)", - "description": "", - "method": "GET", - "path": "/wallets/coins/transfers", - "pathParams": [], - "queryParams": [ - { - "name": "limit", - "description": "The number of results to return", - "required": true, - "type": "number", - "example": 5 - }, - { - "name": "offset", - "description": "The number of results to skip", - "required": false, - "type": "number" - }, - { - "name": "cursor", - "description": "The cursor to use for getting the next page", - "required": false, - "type": "string" - }, - { - "name": "owner_addresses", - "description": "The addresses of the owners to get tokens for", - "required": true, - "type": "array", - "field": { "type": "string" } }, - { - "name": "from_date", - "description": "The date from which to fetch coin transfers", - "required": false, - "type": "string" + "aptosStreamsDelete": { + "apiHost": "https://api.moralis-streams.com", + "summary": "Delete a stream", + "description": "Deletes a aptos stream.", + "method": "DELETE", + "path": "/streams/aptos/:id", + "pathParams": [ + { + "name": "id", + "description": "the id of the aptos stream to delete", + "required": true, + "type": "string" + } + ], + "queryParams": [], + "responses": [{ "status": "200", "description": "Ok" }] }, - { - "name": "to_date", - "description": "The date to which to fetch coin transfers", - "required": false, - "type": "string" + "aptosStreamsAddAddresses": { + "apiHost": "https://api.moralis-streams.com", + "summary": "Add addresses to an aptos stream", + "description": "Adds addresses to an existing aptos stream", + "method": "POST", + "path": "/streams/aptos/:id/address", + "pathParams": [ + { + "name": "id", + "description": "the id of the aptos stream to get the addresses from", + "required": true, + "type": "string" + } + ], + "queryParams": [], + "bodyParam": { "required": true, "type": "json" }, + "responses": [{ "status": "200", "description": "Ok" }] + }, + "aptosStreamsDeleteAddresses": { + "apiHost": "https://api.moralis-streams.com", + "summary": "Delete addresses of an aptos stream", + "description": "Deletes addresses of an existing aptos stream", + "method": "DELETE", + "path": "/streams/aptos/:id/address", + "pathParams": [ + { + "name": "id", + "description": "the id of the aptos stream to get the addresses from", + "required": true, + "type": "string" + } + ], + "queryParams": [], + "bodyParam": { + "required": true, + "description": "Provide a list of valid Aptos addresses, or a single address", + "type": "json" + }, + "responses": [{ "status": "200", "description": "Ok" }] }, - { - "name": "coin_type_blacklist", - "description": "The coin types of the coins to whitelist", - "required": false, - "type": "array", - "field": { "type": "string" } + "aptosStreamsGetAddresses": { + "apiHost": "https://api.moralis-streams.com", + "summary": "Get addresses by aptos stream id", + "description": "Get all addresses associated with a specific aptos stream.", + "method": "GET", + "path": "/streams/aptos/:id/address", + "pathParams": [ + { + "name": "id", + "description": "the id of the aptos stream to get the addresses from", + "required": true, + "type": "string" + } + ], + "queryParams": [ + { + "name": "limit", + "description": "Limit response results max value 100", + "required": true, + "type": "number" + }, + { + "name": "cursor", + "description": "Cursor for fetching next page", + "required": false, + "type": "string" + } + ], + "responses": [{ "status": "200", "description": "Ok" }] }, - { - "name": "coin_type_whitelist", - "description": "The coin types of the coins to whitelist", - "required": false, - "type": "array", - "field": { "type": "string" } - } - ], - "responses": [ - { - "status": "200", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "cursor", - "type": "string", - "description": "The cursor to use for the next page of results. (Cursor is null on last page)", - "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4" - }, - { - "name": "hasNextPage", - "type": "boolean", - "description": "Indicates if there is a next page of results", - "example": true - }, - { - "name": "result", + "aptosStreamsUpdateStatus": { + "apiHost": "https://api.moralis-streams.com", + "summary": "Update a Stream Status", + "description": "Update a Stream Status", + "method": "POST", + "path": "/streams/aptos/:id/status", + "pathParams": [ + { + "name": "id", + "description": "the id of the aptos stream to update the status", + "required": true, + "type": "string" + } + ], + "queryParams": [], + "bodyParam": { + "required": true, + "description": "Provide an object with the status to update can be 'active' or 'paused'", "type": "object", - "description": "The coins transfers for the provided owner addresses", - "example": [], "fields": [ - { - "name": "activity_type", - "type": "string", - "description": "The definition of the coin activity", - "example": "0x1::coin::WithdrawEvent" - }, - { - "name": "amount", - "type": "string", - "description": "The amount being transfered", - "example": "324933484" - }, - { - "name": "block_height", - "type": "string", - "description": "The blockheight that the transfer was included in", - "example": "49661526" - }, - { - "name": "coin_type", - "type": "string", - "description": "The definition of the coin structure (identifier)", - "example": "T0xa911c7236486be921f6cc9227b09afe4a4ad14d291ba1bb8a9b7c4d628759de::gegg::GEGG" - }, - { - "name": "entry_function_id_str", - "type": "string", - "description": "The function that was called to transfer the coin", - "example": "0x563e8382514ccdcc0c0a83469c9262d22d0b052316c1bd67286ba42bb11d0815::AtodexSwapPoolV1::swap_exact_coi" - }, - { - "name": "event_account_address", - "type": "string", - "description": "The address of the event account", - "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" - }, - { - "name": "event_creation_number", - "type": "string", - "description": "The event creation number", - "example": "9" - }, - { - "name": "event_sequence_number", - "type": "string", - "description": "The sequence number of the event", - "example": "59" - }, - { - "name": "is_gas_fee", - "type": "boolean", - "description": "If the transfer was a gas fee or not", - "example": false - }, - { - "name": "is_transaction_success", - "type": "boolean", - "description": "If the transfer was successful or not", - "example": true - }, - { - "name": "owner_address", - "type": "string", - "description": "The address of the owner of the coin", - "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" - }, - { - "name": "transaction_timestamp", - "type": "string", - "description": "The timestamp of the transaction of when the coin was transfered returned in milliseconds", - "example": "2022-09-17T22:03:32.000000Z" - }, - { - "name": "transaction_version", - "type": "string", - "description": "The version of the transaction where the coin was transfered", - "example": "210373856" - } + { + "name": "status", + "type": "string", + "description": "The stream status:\n[active] The Stream is healthy and processing blocks\n[paused] The Stream is paused and is not processing blocks\n[error] The Stream has encountered an error and is not processing blocks", + "enum": ["active", "paused", "error", "terminated"] + } ] - } - ] - } - }, - { - "status": "400", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "statusCode", - "type": "string", - "description": "The status code", - "example": "400" - }, - { - "name": "message", - "type": "array", - "description": "List of things to correct", - "example": ["creator_address must be 66 characters"], - "field": { "type": "string" } - }, - { - "name": "error", - "type": "string", - "description": "Type of error", - "example": "Bad Request" - } + }, + "responses": [ + { + "status": "200", + "description": "Ok", + "body": { + "type": "object", + "fields": [ + { + "name": "status", + "type": "string", + "description": "The stream status:\n[active] The Stream is healthy and processing blocks\n[paused] The Stream is paused and is not processing blocks\n[error] The Stream has encountered an error and is not processing blocks", + "enum": [ + "active", + "paused", + "error", + "terminated" + ] + }, + { "name": "statusMessage", "type": "string" } + ] + } + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.wallets.getCoinTransfersByWalletAddresses({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.wallets.get_coin_transfers_by_wallet_addresses(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" } - ] }, - "getNFTByOwners": { - "apiHost": "https://mainnet-aptos-api.moralis.io", - "testHost": "https://testnet-aptos-api.moralis.io", - "summary": "Get NFTs by wallet(s)", - "description": "Get NFTs belonging to one or many wallets.", - "method": "GET", - "path": "/wallets/nfts", - "pathParams": [], - "queryParams": [ - { - "name": "limit", - "description": "The number of results to return", - "required": true, - "type": "number", - "example": 5 - }, - { - "name": "offset", - "description": "The number of results to skip", - "required": false, - "type": "number" - }, - { - "name": "cursor", - "description": "The cursor to use for getting the next page", - "required": false, - "type": "string" - }, - { - "name": "owner_addresses", - "description": "The addresses of the owners to get tokens for", - "required": true, - "type": "array", - "field": { - "type": "string", - "example": "0x274c398a921b8e2ba345feac3039e1c8b196a7eb1395cdd3584af3a85eb9ec50" - } - }, - { - "name": "collection_blacklist", - "description": "The collection data id hashes of the collections to whitelist", - "required": false, - "type": "array", - "field": { "type": "string" } - }, - { - "name": "collection_whitelist", - "description": "The collection data id hashes of the collections to whitelist", - "required": false, - "type": "array", - "field": { "type": "string" } - } - ], - "responses": [ - { - "status": "200", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "cursor", - "type": "string", - "description": "The cursor to use for the next page of results. (Cursor is null on last page)", - "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4" - }, - { - "name": "hasNextPage", - "type": "boolean", - "description": "Indicates if there is a next page of results", - "example": true - }, - { - "name": "result", - "type": "object", - "description": "The tokens for the given owners", - "example": [], - "fields": [ - { - "name": "amount", - "type": "string", - "description": "The number of tokens that belonging to the owner", - "example": "2" - }, - { - "name": "collection_data_id_hash", + "solana": { + "balance": { + "apiHost": "https://solana-gateway.moralis.io", + "summary": "Get native balance by wallet", + "description": "Gets the native balance owned by a given network and address.", + "method": "GET", + "path": "/account/:network/:address/balance", + "pathParams": [ + { + "name": "network", + "description": "The network to query", + "required": true, "type": "string", - "description": "The identifier of the collection", - "example": "6993fb8b5688d392a2d94127b9926519d6327e69f2bcf3dc0c5df2c060aec97d" - }, - { - "name": "collection_name", + "enum": ["mainnet", "devnet"], + "example": "mainnet" + }, + { + "name": "address", + "description": "The address for which the native balance will be checked", + "required": true, "type": "string", - "description": "The name of the collection", - "example": "Topaz Troopers" - }, - { - "name": "creator_address", + "example": "EJpLyTeE8XHG9CeREeHd6pr6hNhaRnTRJx4Z5DPhEJJ6" + } + ], + "queryParams": [], + "responses": [ + { + "status": "200", + "description": "", + "body": { + "type": "object", + "fields": [ + { "name": "solana", "type": "string" }, + { "name": "lamports", "type": "string" } + ] + } + }, + { "status": "400", "description": "" } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = Moralis.SolApi.account.getBalance({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import sol_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = sol_api.account.balance(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getSPL": { + "apiHost": "https://solana-gateway.moralis.io", + "summary": "Get token balance by wallet", + "description": "Gets the token balances owned by a given network and address.", + "method": "GET", + "path": "/account/:network/:address/tokens", + "pathParams": [ + { + "name": "network", + "description": "The network to query", + "required": true, "type": "string", - "description": "The address of the creator of the collection", - "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" - }, - { - "name": "last_transaction_timestamp", + "enum": ["mainnet", "devnet"], + "example": "mainnet" + }, + { + "name": "address", + "description": "The address for which token balances will be checked", + "required": true, "type": "string", - "description": "The timestamp of the last transaction returned in milliseconds", - "example": "2022-09-17T22:03:32.000000Z" - }, - { - "name": "last_transaction_version", + "example": "EJpLyTeE8XHG9CeREeHd6pr6hNhaRnTRJx4Z5DPhEJJ6" + } + ], + "queryParams": [], + "responses": [ + { "status": "200", "description": "" }, + { "status": "400", "description": "" } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = Moralis.SolApi.account.getSPL({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import sol_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = sol_api.account.get_spl(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getNFTs": { + "apiHost": "https://solana-gateway.moralis.io", + "summary": "Get NFTs by wallet", + "description": "Gets NFTs owned by a given network and address.", + "method": "GET", + "path": "/account/:network/:address/nft", + "pathParams": [ + { + "name": "network", + "description": "The network to query", + "required": true, "type": "string", - "description": "The version of the last transaction", - "example": "210373856" - }, - { - "name": "name", + "enum": ["mainnet", "devnet"], + "example": "mainnet" + }, + { + "name": "address", + "description": "The address of the wallet", + "required": true, "type": "string", - "description": "The name of the token", - "example": "Topaz Troopers 123" - }, - { - "name": "owner_address", + "example": "DDy5QHKEDgg5ZyWmwi1rJKwYHe7ZR5udGQfJkc8EPfLM" + } + ], + "queryParams": [], + "responses": [ + { "status": "200", "description": "" }, + { "status": "400", "description": "" } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = Moralis.SolApi.account.getNFTs({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import sol_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = sol_api.account.get_nfts(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getPortfolio": { + "apiHost": "https://solana-gateway.moralis.io", + "summary": "Gets portfolio by wallet", + "description": "Gets the portfolio for a given network and address.", + "method": "GET", + "path": "/account/:network/:address/portfolio", + "pathParams": [ + { + "name": "network", + "description": "The network to query", + "required": true, "type": "string", - "description": "The address of the owner of the token", - "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" - }, - { - "name": "property_version", + "enum": ["mainnet", "devnet"], + "example": "mainnet" + }, + { + "name": "address", + "description": "The address of the token contract", + "required": true, "type": "string", - "description": "The property version of the token", - "example": "1" - }, - { - "name": "table_type", + "example": "EJpLyTeE8XHG9CeREeHd6pr6hNhaRnTRJx4Z5DPhEJJ6" + } + ], + "queryParams": [], + "responses": [ + { + "status": "200", + "description": "", + "body": { + "type": "object", + "fields": [ + { + "name": "nativeBalance", + "type": "object", + "fields": [ + { + "name": "solana", + "type": "string", + "required": true + }, + { + "name": "lamports", + "type": "string", + "required": true + } + ] + }, + { + "name": "nfts", + "type": "object", + "fields": [ + { + "name": "associatedTokenAddress", + "type": "string" + }, + { "name": "mint", "type": "string" }, + { "name": "name", "type": "string" }, + { "name": "symbol", "type": "string" } + ] + }, + { + "name": "tokens", + "type": "object", + "fields": [ + { + "name": "associatedTokenAddress", + "type": "string" + }, + { "name": "mint", "type": "string" }, + { "name": "name", "type": "string" }, + { "name": "symbol", "type": "string" }, + { "name": "amount", "type": "string" }, + { "name": "amountRaw", "type": "string" }, + { "name": "decimals", "type": "number" } + ] + } + ] + } + }, + { "status": "400", "description": "" } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = Moralis.SolApi.account.getPortfolio({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import sol_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = sol_api.account.get_portfolio(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getNFTMetadata": { + "apiHost": "https://solana-gateway.moralis.io", + "summary": "Get NFT metadata", + "description": "Get the global NFT metadata for a given network and contract (mint, standard, name, symbol, metaplex).", + "method": "GET", + "path": "/nft/:network/:address/metadata", + "pathParams": [ + { + "name": "network", + "description": "The network to query", + "required": true, "type": "string", - "description": "The data structure of the token", - "example": "0x3::token::TokenStore" - }, - { - "name": "token_data_id_hash", + "enum": ["mainnet", "devnet"], + "example": "mainnet" + }, + { + "name": "address", + "description": "The address of the contract", + "required": true, "type": "string", - "description": "The identifier of the token", - "example": "1824178d98256f40046db3db8cf462f1c0a8e0d37304218044f11e69761c88e1" - }, - { - "name": "token_properties", - "type": "json", - "description": "The properties of the token", - "example": "{\"point\": \"0x30\", \"author\": \"0x33454e4a4f59204c616273\"}" - } - ] - } + "example": "DDy5QHKEDgg5ZyWmwi1rJKwYHe7ZR5udGQfJkc8EPfLM" + } + ], + "queryParams": [], + "responses": [ + { + "status": "200", + "description": "", + "body": { + "type": "object", + "fields": [ + { "name": "mint", "type": "string" }, + { "name": "standard", "type": "string" }, + { "name": "name", "type": "string" }, + { "name": "symbol", "type": "string" }, + { + "name": "metaplex", + "type": "object", + "fields": [ + { + "name": "metadataUri", + "type": "string", + "required": true + }, + { + "name": "masterEdition", + "type": "boolean", + "required": true + }, + { + "name": "isMutable", + "type": "boolean", + "required": true + }, + { + "name": "primarySaleHappened", + "type": "boolean", + "required": true + }, + { + "name": "sellerFeeBasisPoints", + "type": "number", + "required": true + }, + { + "name": "updateAuthority", + "type": "string", + "required": true + } + ] + } + ] + } + }, + { "status": "400", "description": "" } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = Moralis.SolApi.nft.getNFTMetadata({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import sol_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = sol_api.nft.get_nft_metadata(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } }, - { - "status": "400", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "statusCode", - "type": "string", - "description": "The status code", - "example": "400" - }, - { - "name": "message", - "type": "array", - "description": "List of things to correct", - "example": ["creator_address must be 66 characters"], - "field": { "type": "string" } - }, - { - "name": "error", - "type": "string", - "description": "Type of error", - "example": "Bad Request" - } + "getTokenPrice": { + "apiHost": "https://solana-gateway.moralis.io", + "summary": "Get token price", + "description": "Gets the token price (usd and native) for a given contract address and network. Currently, this API only support fetching token price listed on [Raydium DEX](https://raydium.io/).", + "method": "GET", + "path": "/token/:network/:address/price", + "pathParams": [ + { + "name": "network", + "description": "The network to query", + "required": true, + "type": "string", + "enum": ["mainnet", "devnet"], + "example": "mainnet" + }, + { + "name": "address", + "description": "The address of the token contract", + "required": true, + "type": "string", + "example": "SRMuApVNdxXokk5GT7XD5cUUgXMBCoAz2LHeuAoKWRt" + } + ], + "queryParams": [], + "responses": [ + { + "status": "200", + "description": "", + "body": { + "type": "object", + "fields": [ + { + "name": "nativePrice", + "type": "object", + "fields": [ + { + "name": "value", + "type": "string", + "required": true + }, + { + "name": "decimals", + "type": "number", + "required": true + }, + { + "name": "name", + "type": "string", + "required": true + }, + { + "name": "symbol", + "type": "string", + "required": true + } + ] + }, + { "name": "usdPrice", "type": "number" }, + { "name": "exchangeAddress", "type": "string" }, + { "name": "exchangeName", "type": "string" } + ] + } + }, + { "status": "400", "description": "" } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = Moralis.SolApi.token.getTokenPrice({});\n\n console.log(response.raw);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import sol_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = sol_api.token.get_token_price(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.wallets.getNFTByOwners({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.wallets.get_nft_by_owners(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getWalletsNFTTransfers": { - "apiHost": "https://mainnet-aptos-api.moralis.io", - "testHost": "https://testnet-aptos-api.moralis.io", - "summary": "Get NFT transfers by wallet(s)", - "description": "Get NFT transfers from one or many wallet addresses.", - "method": "GET", - "path": "/wallets/nfts/transfers", - "pathParams": [], - "queryParams": [ - { - "name": "limit", - "description": "The number of tokens to return", - "required": true, - "type": "number", - "example": 5 - }, - { - "name": "offset", - "description": "The number of results to skip", - "required": false, - "type": "number" }, - { - "name": "cursor", - "description": "The cursor to use for getting the next page", - "required": false, - "type": "string" - }, - { - "name": "wallet_addresses", - "description": "The addresses of the wallets to get transfers for", - "required": true, - "type": "array", - "field": { - "type": "string", - "example": "0x274c398a921b8e2ba345feac3039e1c8b196a7eb1395cdd3584af3a85eb9ec50" - } - }, - { - "name": "collection_blacklist", - "description": "The ids of the collections to whitelist", - "required": false, - "type": "array", - "field": { "type": "string" } - }, - { - "name": "collection_whitelist", - "description": "The ids of the collections to whitelist", - "required": false, - "type": "array", - "field": { "type": "string" } - } - ], - "responses": [ - { - "status": "200", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "cursor", - "type": "string", - "description": "The cursor to use for the next page of results. (Cursor is null on last page)", - "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4" - }, - { - "name": "hasNextPage", - "type": "boolean", - "description": "Indicates if there is a next page of results", - "example": true - }, - { - "name": "result", - "type": "object", - "description": "The collections for the given creators", - "example": [], - "fields": [ - { - "name": "coin_amount", - "type": "string", - "description": "The number of tokens transferred", - "example": "2" - }, - { - "name": "coin_type", - "type": "string", - "description": "The type of tokens transferred", - "example": null - }, - { - "name": "collection_data_id_hash", - "type": "string", - "description": "The identifier of the collection", - "example": "6993fb8b5688d392a2d94127b9926519d6327e69f2bcf3dc0c5df2c060aec97d" - }, - { - "name": "collection_name", - "type": "string", - "description": "The name of the collection", - "example": "Topaz Troopers" - }, - { - "name": "creator_address", - "type": "string", - "description": "The address of the creator of the collection", - "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" - }, - { - "name": "event_account_address", - "type": "string", - "description": "The account address of the transfer", - "example": "0xa748de66f1eea7d32399b59027ab0b3786295313e2c3a1608b5d51e759aee6dd" - }, - { - "name": "event_creation_number", - "type": "string", - "description": "The creation number of the event", - "example": "2" - }, - { - "name": "event_sequence_number", - "type": "string", - "description": "The sequence number of the event", - "example": "2" - }, - { - "name": "from_address", - "type": "string", - "description": "The address sending the transfer", - "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" - }, - { - "name": "name", - "type": "string", - "description": "The name of the token", - "example": "Topaz Troopers 123" - }, - { - "name": "property_version", - "type": "string", - "description": "The property version of the token", - "example": "1" - }, - { - "name": "to_address", - "type": "string", - "description": "The address recieving the transfer", - "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" - }, - { - "name": "token_amount", - "type": "string", - "description": "The number of tokens transferred", - "example": "2" - }, - { - "name": "token_data_id_hash", - "type": "string", - "description": "The identifier of the token", - "example": "1824178d98256f40046db3db8cf462f1c0a8e0d37304218044f11e69761c88e1" - }, - { - "name": "transaction_timestamp", - "type": "string", - "description": "The timestamp of the transfer returned in milliseconds", - "example": "2022-09-17T22:03:32.000000Z" - }, - { - "name": "transaction_version", + "getTokenMetadata": { + "apiHost": "https://solana-gateway.moralis.io", + "summary": "Get Token metadata", + "description": "Get the global token metadata for a given network and contract (mint, standard, name, symbol, metaplex).", + "method": "GET", + "path": "/token/:network/:address/metadata", + "pathParams": [ + { + "name": "network", + "description": "The network to query", + "required": true, "type": "string", - "description": "The version of the transaction that the transfer is a part of", - "example": "210373856" - }, - { - "name": "transfer_type", + "enum": ["mainnet", "devnet"], + "example": "mainnet" + }, + { + "name": "address", + "description": "The address of the contract", + "required": true, "type": "string", - "description": "The type of transfer", - "example": "0x3::token::DepositEvent" - } - ] - } - ] - } - }, - { - "status": "400", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "statusCode", - "type": "string", - "description": "The status code", - "example": "400" - }, - { - "name": "message", - "type": "array", - "description": "List of things to correct", - "example": ["creator_address must be 66 characters"], - "field": { "type": "string" } - }, - { - "name": "error", - "type": "string", - "description": "Type of error", - "example": "Bad Request" - } + "example": "SRMuApVNdxXokk5GT7XD5cUUgXMBCoAz2LHeuAoKWRt" + } + ], + "queryParams": [], + "responses": [ + { + "status": "200", + "description": "", + "body": { + "type": "object", + "fields": [ + { + "name": "mint", + "type": "string" + }, + { + "name": "standard", + "type": "string" + }, + { + "name": "name", + "type": "string" + }, + { + "name": "symbol", + "type": "string" + }, + { + "name": "metaplex", + "type": "object", + "properties": { + "metadataUri": { + "type": "string" + }, + "masterEdition": { + "type": "boolean" + }, + "isMutable": { + "type": "boolean" + }, + "primarySaleHappened": { + "type": "number" + }, + "sellerFeeBasisPoints": { + "type": "number" + }, + "updateAuthority": { + "type": "string" + } + }, + "required": [ + "metadataUri", + "masterEdition", + "isMutable", + "primarySaleHappened", + "sellerFeeBasisPoints", + "updateAuthority" + ] + } + ] + } + }, + { + "status": "400", + "description": "" + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.wallets.getWalletsNFTTransfers({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.wallets.get_wallets_nft_transfers(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" } - ] }, - "getAccount": { - "apiHost": "https://mainnet-aptos-api.moralis.io", - "testHost": "https://testnet-aptos-api.moralis.io", - "summary": "Get account", - "description": "Get account information for a given address.", - "method": "GET", - "path": "/accounts/:address", - "pathParams": [ - { - "name": "address", - "description": "Address of account with or without a 0x prefix", - "required": true, - "type": "string" - } - ], - "queryParams": [ - { - "name": "ledger_version", - "description": "Ledger version to get state of account.\nIf not provided, it will be the latest version", - "required": false, - "type": "string" - } - ], - "responses": [ - { - "status": "200", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "sequence_number", - "type": "string", - "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", - "example": "32425224034" - }, - { - "name": "authentication_key", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.\nUnlike the Address type, HexEncodedBytes will not trim any zeros.", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1" - } + "aptos-web3": { + "getNFTsByIds": { + "apiHost": "https://mainnet-aptos-api.moralis.io", + "testHost": "https://testnet-aptos-api.moralis.io", + "summary": "Get NFTs by token ID hashes", + "description": "Get one or many NFTs by token ID hash. Learn more about token ID hashes [here](/web3-data-api/aptos/token-id-hashes).", + "method": "GET", + "path": "/nfts", + "pathParams": [], + "queryParams": [ + { + "name": "token_ids", + "description": "The identifiers of the tokens to get", + "required": true, + "type": "array", + "field": { + "type": "string", + "example": "9a47523002a8940afaae60cb01d13ccea0408b17e958ebf1940a9f687785d6da" + } + } + ], + "responses": [ + { + "status": "200", + "description": "", + "body": { + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "collection_data_id_hash", + "type": "string", + "example": "6993fb8b5688d392a2d94127b9926519d6327e69f2bcf3dc0c5df2c060aec97d", + "description": "The identifier of the collection", + "maxLength": 64, + "minLength": 64, + "nullable": false, + "required": true + }, + { + "name": "collection_name", + "type": "string", + "example": "Topaz Troopers", + "description": "The name of the collection", + "maxLength": 128, + "minLength": 1, + "nullable": false, + "required": true + }, + { + "name": "creator_address", + "type": "string", + "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac", + "description": "The address of the creator of the collection", + "maxLength": 66, + "minLength": 66, + "nullable": false, + "required": true + }, + { + "name": "default_properties", + "type": "object", + "example": "{\"point\": \"0x30\", \"author\": \"0x33454e4a4f59204c616273\"}", + "description": "The default properties of the token", + "nullable": true, + "required": true + }, + { + "name": "description", + "type": "string", + "example": "A badge which proves you are an OG #TopazTrooper.", + "description": "The description of the collection", + "nullable": false, + "required": true + }, + { + "name": "description_mutable", + "type": "boolean", + "example": "false", + "description": "Whether the description can be changed", + "nullable": false, + "required": true + }, + { + "name": "largest_property_version", + "type": "string", + "example": "1", + "description": "largest_property_version", + "nullable": false, + "required": true + }, + { + "name": "last_transaction_timestamp", + "type": "string", + "nullable": false, + "example": "2022-09-17T22:03:32.000000Z", + "description": "The timestamp of the last transaction returned in milliseconds", + "required": true + }, + { + "name": "last_transaction_version", + "type": "string", + "example": "210373856", + "description": "The version of the last transaction", + "nullable": false, + "required": true + }, + { + "name": "maximum", + "type": "string", + "example": "18446744073709551615", + "description": "The maximum number of tokens that can be minted", + "nullable": false, + "required": true + }, + { + "name": "maximum_mutable", + "type": "boolean", + "example": "false", + "description": "Whether the maximum number of tokens can be changed", + "nullable": false, + "required": true + }, + { + "name": "metadata_uri", + "type": "string", + "example": "https://static-cdn.risewallet.io/nft/aptos-monkeys/1572.jpeg", + "description": "The URI of the image of the token", + "nullable": false, + "required": true + }, + { + "name": "name", + "type": "string", + "example": "Souffl3 Testnet NFT", + "description": "The name of the token", + "maxLength": 128, + "minLength": 1, + "nullable": false, + "required": true + }, + { + "name": "payee_address", + "type": "string", + "example": "0x0b11e89a399fa11c802099024498da9fc6512bd3d2d3068f0e78320bd6243990", + "description": "The address that last payed for the token", + "maxLength": 66, + "minLength": 66, + "nullable": false, + "required": true + }, + { + "name": "properties_mutable", + "type": "boolean", + "example": "false", + "description": "Whether the properties of the token can be changed", + "nullable": false, + "required": true + }, + { + "name": "royalty_mutable", + "type": "boolean", + "example": "false", + "description": "Whether the royalty of the token can be changed", + "nullable": false, + "required": true + }, + { + "name": "royalty_points_denominator", + "type": "string", + "example": "100", + "description": "The denominator for royalty points", + "nullable": false, + "required": true + }, + { + "name": "royalty_points_numerator", + "type": "string", + "example": "20", + "description": "The numerator for royalty points", + "nullable": false, + "required": true + }, + { + "name": "supply", + "type": "string", + "example": "32976", + "description": "The number of tokens minted", + "nullable": false, + "required": true + }, + { + "name": "token_data_id_hash", + "type": "string", + "example": "1824178d98256f40046db3db8cf462f1c0a8e0d37304218044f11e69761c88e1", + "description": "The identifier of the token", + "maxLength": 64, + "minLength": 64, + "nullable": false, + "required": true + }, + { + "name": "uri_mutable", + "type": "boolean", + "example": "false", + "description": "Whether the URI of the image can be changed", + "nullable": false, + "required": true + } + ] + } + } + }, + { + "status": "400", + "description": "", + "body": { + "type": "object", + "fields": [ + { + "name": "statusCode", + "type": "string", + "description": "The status code", + "example": "400" + }, + { + "name": "message", + "type": "array", + "description": "List of things to correct", + "example": [ + "creator_address must be 66 characters" + ], + "field": { "type": "string" } + }, + { + "name": "error", + "type": "string", + "description": "Type of error", + "example": "Bad Request" + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.nfts.getNFTsByIds({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.nfts.get_nfts_by_ids(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.accounts.getAccount({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.accounts.get_account(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getAccountResources": { - "apiHost": "https://mainnet-aptos-api.moralis.io", - "testHost": "https://testnet-aptos-api.moralis.io", - "summary": "Get account resources", - "description": "Get account resources for a given address.", - "method": "GET", - "path": "/accounts/:address/resources", - "pathParams": [ - { - "name": "address", - "description": "Address of account with or without a 0x prefix", - "required": true, - "type": "string" - } - ], - "queryParams": [ - { - "name": "ledger_version", - "description": "Ledger version to get state of account.\nIf not provided, it will be the latest version", - "required": false, - "type": "string" - }, - { - "name": "limit", - "description": "Max number of account resources to retrieve.\nIf not provided, defaults to default page size.", - "required": false, - "type": "number", - "example": 5 - }, - { - "name": "start", - "description": "Cursor specifying where to start for pagination\nThis cursor cannot be derived manually client-side. Instead, you must call this endpoint once without this query parameter specified, and then use the cursor returned in the X-Aptos-Cursor header in the response.", - "required": false, - "type": "string" - } - ], - "responses": [ - { - "status": "200", - "description": "", - "body": { - "type": "array", - "field": { - "type": "object", - "example": { - "type": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "data": { - "authentication_key": "0x0000000000000000000000000000000000000000000000000000000000000001", - "coin_register_events": { - "counter": "0", - "guid": { "id": { "addr": "0x1", "creation_num": "0" } } - }, - "self_address": "0x1", - "sequence_number": "0" - } - }, - "fields": [ - { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type). This exists so you can specify MoveStructTags as path / query parameters", - "required": true - }, - { - "name": "data", - "type": "json", - "example": { - "authentication_key": "0x0000000000000000000000000000000000000000000000000000000000000001", - "coin_register_events": { - "counter": "0", - "guid": { "id": { "addr": "0x1", "creation_num": "0" } } - }, - "self_address": "0x1", - "sequence_number": "0" - }, - "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", - "required": true - } - ] - } - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.accounts.getAccountResources({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" }, - { - "language": "python", - "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.accounts.get_account_resources(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getAccountModules": { - "apiHost": "https://mainnet-aptos-api.moralis.io", - "testHost": "https://testnet-aptos-api.moralis.io", - "summary": "Get account modules", - "description": "Get account modules for a given address.", - "method": "GET", - "path": "/accounts/:address/modules", - "pathParams": [ - { - "name": "address", - "description": "Address of account with or without a 0x prefix", - "required": true, - "type": "string" - } - ], - "queryParams": [ - { - "name": "ledger_version", - "description": "Ledger version to get state of account.\nIf not provided, it will be the latest version", - "required": false, - "type": "string" - }, - { - "name": "limit", - "description": "Max number of account resources to retrieve.\nIf not provided, defaults to default page size.", - "required": false, - "type": "number", - "example": 5 - }, - { - "name": "start", - "description": "Cursor specifying where to start for pagination\nThis cursor cannot be derived manually client-side. Instead, you must call this endpoint once without this query parameter specified, and then use the cursor returned in the X-Aptos-Cursor header in the response.", - "required": false, - "type": "string" - } - ], - "responses": [ - { - "status": "200", - "description": "", - "body": { - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "bytecode", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "required": true - }, - { - "name": "abi", - "example": { - "address": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 ", - "name": "string", - "friends": ["0x1::aptos_coin"], - "exposed_functions": [ - { - "name": "string", - "visibility": "private", - "is_entry": true, - "generic_type_params": [{ "constraints": ["string"] }], - "params": ["string"], - "return": ["string"] - } - ], - "structs": [ - { - "name": "string", - "is_native": true, - "abilities": ["string"], - "generic_type_params": [{ "constraints": ["string"] }], - "fields": [{ "name": "string", "type": "string" }] - } - ] - }, - "description": "A Move module", - "type": "object", - "fields": [ - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "name", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "friends", - "example": [], - "description": "Friends of the module", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "exposed_functions", - "example": [], - "description": "Public functions of the module", - "type": "array", - "field": { + "getNFTsByCollection": { + "apiHost": "https://mainnet-aptos-api.moralis.io", + "testHost": "https://testnet-aptos-api.moralis.io", + "summary": "Get NFTs by collection", + "description": "Get NFTs by one or many collection ID hashes.", + "method": "GET", + "path": "/nfts/collections/:collection_data_id_hash/tokens", + "pathParams": [ + { + "name": "collection_data_id_hash", + "description": "The collection data id hash of the collection", + "required": true, + "type": "string", + "example": "7ac8cecb76edbbd5da40d719bbb9795fc5744e4098ee0ce1be4bb86c90f42301" + } + ], + "queryParams": [ + { + "name": "limit", + "description": "The number of results to return", + "required": true, + "type": "number", + "example": 5 + }, + { + "name": "offset", + "description": "The number of results to skip", + "required": false, + "type": "number" + }, + { + "name": "cursor", + "description": "The cursor to use for getting the next page", + "required": false, + "type": "string" + } + ], + "responses": [ + { + "status": "200", + "description": "", + "body": { "type": "object", "fields": [ - { - "name": "name", - "type": "string", - "example": "", - "description": "Name of the function", - "required": true - }, - { - "name": "visibility", - "type": "string", - "example": "private", - "description": "Move function visibility", - "required": true - }, - { - "name": "is_entry", - "type": "boolean", - "example": true, - "description": "Whether the function can be called as an entry function directly in a transaction", - "required": true - }, - { - "name": "generic_type_params", - "example": [], - "description": "Generic type params associated with the Move function", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] + { + "name": "cursor", + "type": "string", + "description": "The cursor to use for the next page of results. (Cursor is null on last page)", + "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4" + }, + { + "name": "hasNextPage", + "type": "boolean", + "description": "Indicates if there is a next page of results", + "example": true }, - "required": true - }, - { - "name": "params", - "example": [], - "description": "Parameters associated with the move function", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "return", - "example": "", - "description": "Return type of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - } + { + "name": "result", + "type": "object", + "description": "The tokens for the given collection", + "example": [], + "fields": [ + { + "name": "collection_data_id_hash", + "type": "string", + "description": "The identifier of the collection", + "example": "6993fb8b5688d392a2d94127b9926519d6327e69f2bcf3dc0c5df2c060aec97d" + }, + { + "name": "collection_name", + "type": "string", + "description": "The name of the collection", + "example": "Topaz Troopers" + }, + { + "name": "creator_address", + "type": "string", + "description": "The address of the creator of the collection", + "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" + }, + { + "name": "default_properties", + "type": "json", + "description": "The default properties of the token", + "example": "{\"point\": \"0x30\", \"author\": \"0x33454e4a4f59204c616273\"}" + }, + { + "name": "description", + "type": "string", + "description": "The description of the collection", + "example": "A badge which proves you are an OG #TopazTrooper." + }, + { + "name": "description_mutable", + "type": "boolean", + "description": "Whether the description can be changed", + "example": "false" + }, + { + "name": "largest_property_version", + "type": "string", + "description": "largest_property_version", + "example": "1" + }, + { + "name": "last_transaction_timestamp", + "type": "string", + "description": "The timestamp of the last transaction returned in milliseconds", + "example": "2022-09-17T22:03:32.000000Z" + }, + { + "name": "last_transaction_version", + "type": "string", + "description": "The version of the last transaction", + "example": "210373856" + }, + { + "name": "maximum", + "type": "string", + "description": "The maximum number of tokens that can be minted", + "example": "18446744073709551615" + }, + { + "name": "maximum_mutable", + "type": "boolean", + "description": "Whether the maximum number of tokens can be changed", + "example": "false" + }, + { + "name": "metadata_uri", + "type": "string", + "description": "The URI of the image of the token", + "example": "https://static-cdn.risewallet.io/nft/aptos-monkeys/1572.jpeg" + }, + { + "name": "name", + "type": "string", + "description": "The name of the token", + "example": "Souffl3 Testnet NFT" + }, + { + "name": "payee_address", + "type": "string", + "description": "The address that last payed for the token", + "example": "0x0b11e89a399fa11c802099024498da9fc6512bd3d2d3068f0e78320bd6243990" + }, + { + "name": "properties_mutable", + "type": "boolean", + "description": "Whether the properties of the token can be changed", + "example": "false" + }, + { + "name": "royalty_mutable", + "type": "boolean", + "description": "Whether the royalty of the token can be changed", + "example": "false" + }, + { + "name": "royalty_points_denominator", + "type": "string", + "description": "The denominator for royalty points", + "example": "100" + }, + { + "name": "royalty_points_numerator", + "type": "string", + "description": "The numerator for royalty points", + "example": "20" + }, + { + "name": "supply", + "type": "string", + "description": "The number of tokens minted", + "example": "32976" + }, + { + "name": "token_data_id_hash", + "type": "string", + "description": "The identifier of the token", + "example": "1824178d98256f40046db3db8cf462f1c0a8e0d37304218044f11e69761c88e1" + }, + { + "name": "uri_mutable", + "type": "boolean", + "description": "Whether the URI of the image can be changed", + "example": "false" + } + ] + } ] - }, - "required": true - }, - { - "name": "structs", - "example": [], - "description": "Structs of the module", - "type": "array", - "field": { + } + }, + { + "status": "400", + "description": "", + "body": { "type": "object", "fields": [ - { - "name": "name", - "type": "string", - "example": "", - "description": "Name of the struct", - "required": true - }, - { - "name": "is_native", - "type": "boolean", - "example": true, - "description": "Whether the struct is a native struct of Move", - "required": true - }, - { - "name": "abilities", - "example": [], - "description": "Abilities associated with the struct", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "generic_type_params", - "example": [], - "description": "Generic types associated with the struct", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] + { + "name": "statusCode", + "type": "string", + "description": "The status code", + "example": "400" }, - "required": true - }, - { - "name": "fields", - "example": [], - "description": "Fields associated with the struct", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "sender", - "description": "Name of the field", - "required": true - }, - { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", - "required": true - } - ] + { + "name": "message", + "type": "array", + "description": "List of things to correct", + "example": [ + "creator_address must be 66 characters" + ], + "field": { "type": "string" } }, - "required": true - } + { + "name": "error", + "type": "string", + "description": "Type of error", + "example": "Bad Request" + } ] - }, - "required": true } - ], - "required": true } - ] - } - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.accounts.getAccountModules({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.accounts.get_account_modules(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getAccountResource": { - "apiHost": "https://mainnet-aptos-api.moralis.io", - "testHost": "https://testnet-aptos-api.moralis.io", - "summary": "Get account resource", - "description": "Get a specific account resource type for a given address.", - "method": "GET", - "path": "/accounts/:address/resource/:resource_type", - "pathParams": [ - { - "name": "address", - "description": "Address of account with or without a 0x prefix", - "required": true, - "type": "string" - }, - { - "name": "resource_type", - "description": "Name of struct to retrieve e.g. 0x1::account::Account", - "required": true, - "type": "string" - } - ], - "queryParams": [ - { - "name": "ledger_version", - "description": "Ledger version to get state of account.\nIf not provided, it will be the latest version", - "required": false, - "type": "string" - } - ], - "responses": [ - { - "status": "200", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "String representation of a MoveStructTag (on-chain Move struct type). This exists so you can specify MoveStructTags as path / query parameters", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>" - }, - { - "name": "data", - "type": "json", - "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", - "example": { - "authentication_key": "0x0000000000000000000000000000000000000000000000000000000000000001", - "coin_register_events": { - "counter": "0", - "guid": { "id": { "addr": "0x1", "creation_num": "0" } } - }, - "self_address": "0x1", - "sequence_number": "0" - } - } - ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.accounts.getAccountResource({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.accounts.get_account_resource(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getAccountModule": { - "apiHost": "https://mainnet-aptos-api.moralis.io", - "testHost": "https://testnet-aptos-api.moralis.io", - "summary": "Get account module", - "description": "Get a specific account module for a given address.", - "method": "GET", - "path": "/accounts/:address/resource/:module_name", - "pathParams": [ - { - "name": "address", - "description": "Address of account with or without a 0x prefix", - "required": true, - "type": "string" - }, - { - "name": "module_name", - "description": "Name of module to retrieve", - "required": true, - "type": "string" - } - ], - "queryParams": [ - { - "name": "ledger_version", - "description": "Ledger version to get state of account.\nIf not provided, it will be the latest version", - "required": false, - "type": "string" - } - ], - "responses": [ - { - "status": "200", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "bytecode", - "type": "string", - "description": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "example": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." - }, - { - "name": "abi", - "description": "A Move module", - "example": { - "address": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 ", - "name": "string", - "friends": ["0x1::aptos_coin"], - "exposed_functions": [ - { - "name": "string", - "visibility": "private", - "is_entry": true, - "generic_type_params": [{ "constraints": ["string"] }], - "params": ["string"], - "return": ["string"] - } - ], - "structs": [ - { - "name": "string", - "is_native": true, - "abilities": ["string"], - "generic_type_params": [{ "constraints": ["string"] }], - "fields": [{ "name": "string", "type": "string" }] - } - ] + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.nfts.getNFTsByCollection({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.nfts.get_nfts_by_collection(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" } - } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.accounts.getAccountModule({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" }, - { - "language": "python", - "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.accounts.get_account_module(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getEventsByCreationNumber": { - "apiHost": "https://mainnet-aptos-api.moralis.io", - "testHost": "https://testnet-aptos-api.moralis.io", - "summary": "Get events by creation number", - "description": "Get events by creation number for a given address.", - "method": "GET", - "path": "/accounts/:address/events/:creation_number", - "pathParams": [ - { - "name": "address", - "description": "Address of account with or without a 0x prefix", - "required": true, - "type": "string" - }, - { - "name": "creation_number", - "description": "Creation number corresponding to the event stream originating from the given account.", - "required": true, - "type": "string" - } - ], - "queryParams": [ - { - "name": "limit", - "description": "Max number of account resources to retrieve.\nIf not provided, defaults to default page size.", - "required": false, - "type": "number", - "example": 5 - }, - { - "name": "start", - "description": "Starting sequence number of events.\nIf unspecified, by default will retrieve the most recent events", - "required": false, - "type": "string" - } - ], - "responses": [ - { - "status": "200", - "description": "", - "body": { - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "version", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", - "required": true - }, - { - "name": "guid", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "creation_number", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", - "required": true - }, - { - "name": "account_address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.\nThis is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.", - "required": true - } - ], - "required": true + "getNFTsByCreators": { + "apiHost": "https://mainnet-aptos-api.moralis.io", + "testHost": "https://testnet-aptos-api.moralis.io", + "summary": "Get NFTs by creator(s)", + "description": "Get NFTs by one or many creator addresses.", + "method": "GET", + "path": "/nfts/creators", + "pathParams": [], + "queryParams": [ + { + "name": "limit", + "description": "The number of tokens to return", + "required": true, + "type": "number", + "example": 5 }, { - "name": "sequence_number", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", - "required": true + "name": "offset", + "description": "The number of results to skip", + "required": false, + "type": "number" }, { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", - "required": true + "name": "cursor", + "description": "The cursor to use for getting the next page", + "required": false, + "type": "string" }, { - "name": "data", - "type": "object", - "example": {}, - "description": "The JSON representation of the event", - "required": true + "name": "creator_addresses", + "description": "The addresses of the creators", + "required": true, + "type": "array", + "field": { + "type": "string", + "example": "0xf932dcb9835e681b21d2f411ef99f4f5e577e6ac299eebee2272a39fb348f702" + } } - ] - } - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.accounts.getEventsByCreationNumber({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.accounts.get_events_by_creation_number(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getEventsByEventHandle": { - "apiHost": "https://mainnet-aptos-api.moralis.io", - "testHost": "https://testnet-aptos-api.moralis.io", - "summary": "Get events by event handle", - "description": "Get events by event handle for a given address.", - "method": "GET", - "path": "/accounts/:address/events/:event_handle/:field_name", - "pathParams": [ - { - "name": "address", - "description": "Hex-encoded 32 byte Aptos account, with or without a 0x prefix, for which events are queried. This refers to the account that events were emitted to, not the account hosting the move module that emits that event type.", - "required": true, - "type": "string" - }, - { - "name": "event_handle", - "description": "Name of struct to lookup event handle.", - "required": true, - "type": "string" - }, - { - "name": "field_name", - "description": "Name of field to lookup event handle.", - "required": true, - "type": "string" - } - ], - "queryParams": [ - { - "name": "limit", - "description": "Max number of account resources to retrieve.\nIf not provided, defaults to default page size.", - "required": false, - "type": "number", - "example": 5 - }, - { - "name": "start", - "description": "Starting sequence number of events.\nIf unspecified, by default will retrieve the most recent events", - "required": false, - "type": "string" - } - ], - "responses": [ - { - "status": "200", - "description": "", - "body": { - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "version", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", - "required": true - }, - { - "name": "guid", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "creation_number", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", - "required": true - }, - { - "name": "account_address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.\nThis is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.", - "required": true + ], + "responses": [ + { + "status": "200", + "description": "", + "body": { + "type": "object", + "fields": [ + { + "name": "cursor", + "type": "string", + "description": "The cursor to use for the next page of results. (Cursor is null on last page)", + "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4" + }, + { + "name": "hasNextPage", + "type": "boolean", + "description": "Indicates if there is a next page of results", + "example": true + }, + { + "name": "result", + "type": "object", + "description": "The collections for the given creators", + "example": [], + "fields": [ + { + "name": "collection_data_id_hash", + "type": "string", + "description": "The identifier of the collection", + "example": "6993fb8b5688d392a2d94127b9926519d6327e69f2bcf3dc0c5df2c060aec97d" + }, + { + "name": "collection_name", + "type": "string", + "description": "The name of the collection", + "example": "Topaz Troopers" + }, + { + "name": "creator_address", + "type": "string", + "description": "The address of the creator of the collection", + "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" + }, + { + "name": "default_properties", + "type": "json", + "description": "The default properties of the token", + "example": "{\"point\": \"0x30\", \"author\": \"0x33454e4a4f59204c616273\"}" + }, + { + "name": "description", + "type": "string", + "description": "The description of the collection", + "example": "A badge which proves you are an OG #TopazTrooper." + }, + { + "name": "description_mutable", + "type": "boolean", + "description": "Whether the description can be changed", + "example": "false" + }, + { + "name": "largest_property_version", + "type": "string", + "description": "largest_property_version", + "example": "1" + }, + { + "name": "last_transaction_timestamp", + "type": "string", + "description": "The timestamp of the last transaction returned in milliseconds", + "example": "2022-09-17T22:03:32.000000Z" + }, + { + "name": "last_transaction_version", + "type": "string", + "description": "The version of the last transaction", + "example": "210373856" + }, + { + "name": "maximum", + "type": "string", + "description": "The maximum number of tokens that can be minted", + "example": "18446744073709551615" + }, + { + "name": "maximum_mutable", + "type": "boolean", + "description": "Whether the maximum number of tokens can be changed", + "example": "false" + }, + { + "name": "metadata_uri", + "type": "string", + "description": "The URI of the image of the token", + "example": "https://static-cdn.risewallet.io/nft/aptos-monkeys/1572.jpeg" + }, + { + "name": "name", + "type": "string", + "description": "The name of the token", + "example": "Souffl3 Testnet NFT" + }, + { + "name": "payee_address", + "type": "string", + "description": "The address that last payed for the token", + "example": "0x0b11e89a399fa11c802099024498da9fc6512bd3d2d3068f0e78320bd6243990" + }, + { + "name": "properties_mutable", + "type": "boolean", + "description": "Whether the properties of the token can be changed", + "example": "false" + }, + { + "name": "royalty_mutable", + "type": "boolean", + "description": "Whether the royalty of the token can be changed", + "example": "false" + }, + { + "name": "royalty_points_denominator", + "type": "string", + "description": "The denominator for royalty points", + "example": "100" + }, + { + "name": "royalty_points_numerator", + "type": "string", + "description": "The numerator for royalty points", + "example": "20" + }, + { + "name": "supply", + "type": "string", + "description": "The number of tokens minted", + "example": "32976" + }, + { + "name": "token_data_id_hash", + "type": "string", + "description": "The identifier of the token", + "example": "1824178d98256f40046db3db8cf462f1c0a8e0d37304218044f11e69761c88e1" + }, + { + "name": "uri_mutable", + "type": "boolean", + "description": "Whether the URI of the image can be changed", + "example": "false" + } + ] + } + ] + } + }, + { + "status": "400", + "description": "", + "body": { + "type": "object", + "fields": [ + { + "name": "statusCode", + "type": "string", + "description": "The status code", + "example": "400" + }, + { + "name": "message", + "type": "array", + "description": "List of things to correct", + "example": [ + "creator_address must be 66 characters" + ], + "field": { "type": "string" } + }, + { + "name": "error", + "type": "string", + "description": "Type of error", + "example": "Bad Request" + } + ] } - ], - "required": true + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.nfts.getNFTsByCreators({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.nfts.get_nfts_by_creators(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getNFTCollections": { + "apiHost": "https://mainnet-aptos-api.moralis.io", + "testHost": "https://testnet-aptos-api.moralis.io", + "summary": "Get NFT Collections", + "descipriton": "Get NFT Collections by searching collection title using `fromName` or `toName`, or combine both to return collections within a range (e.g. all collections `fromName` \"A\" to `toName` \"D\" will return all collections from A to D). Returns all collections in A-Z order if `fromName` or `toName` is not specified", + "method": "GET", + "path": "/collections", + "pathParams": [], + "queryParams": [ + { + "name": "limit", + "description": "The number of results to return", + "required": true, + "type": "number", + "example": 5 + }, + { + "name": "offset", + "description": "The number of results to skip", + "required": false, + "type": "number" }, { - "name": "sequence_number", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", - "required": true + "name": "cursor", + "description": "The cursor to use for getting the next page", + "required": false, + "type": "string" }, { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", - "required": true + "name": "fromName", + "description": "The name of the collection to start from (inclusive and case sensitive)", + "required": false, + "type": "string" }, { - "name": "data", - "type": "object", - "example": {}, - "description": "The JSON representation of the event", - "required": true + "name": "toName", + "description": "The name of the collection to end at (inclusive and case sensitive)", + "required": false, + "type": "string" } - ] - } - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.accounts.getEventsByEventHandle({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.accounts.get_events_by_event_handle(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getTransactions": { - "apiHost": "https://mainnet-aptos-api.moralis.io", - "testHost": "https://testnet-aptos-api.moralis.io", - "summary": "Get transactions", - "description": "Get latest transactions or from a specific account sequence number.", - "method": "GET", - "path": "/transactions", - "pathParams": [], - "queryParams": [ - { - "name": "limit", - "description": "Max number of transactions to retrieve.\nIf not provided, defaults to default page size", - "required": false, - "type": "number" - }, - { - "name": "start", - "description": "Account sequence number to start list of transactions.\nIf not provided, defaults to showing the latest transactions", - "required": false, - "type": "string" - } - ], - "responses": [{ "status": "200", "description": "" }], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.transactions.getTransactions({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.transactions.get_transactions(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "submitTransaction": { - "apiHost": "https://mainnet-aptos-api.moralis.io", - "testHost": "https://testnet-aptos-api.moralis.io", - "summary": "Submit transaction", - "description": "Submit a transaction to the Aptos Network.", - "method": "POST", - "path": "/transactions", - "pathParams": [], - "queryParams": [], - "bodyParam": { - "required": true, - "type": "object", - "fields": [ - { - "name": "sender", - "type": "string", - "description": "A hex encoded 32 byte Aptos account address." - }, - { - "name": "sequence_number", - "type": "string", - "description": "A string containing a 64-bit unsigned integer." - }, - { - "name": "max_gas_amount", - "type": "string", - "description": "A string containing a 64-bit unsigned integer." - }, - { - "name": "gas_unit_price", - "type": "string", - "description": "A string containing a 64-bit unsigned integer." - }, - { - "name": "expiration_timestamp_secs", - "type": "string", - "description": "A string containing a 64-bit unsigned integer returned in milliseconds." - }, - { - "name": "payload", - "type": "json", - "description": "An enum of the possible transaction payloads" - }, - { "name": "signature", "description": "", "type": "json" } - ] - }, - "responses": [ - { - "status": "200", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "hash", - "type": "string", - "description": "", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1" - }, - { - "name": "sender", - "type": "string", - "description": "A hex encoded 32 byte Aptos account address.", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1" - }, - { - "name": "sequence_number", - "type": "string", - "description": "A string containing a 64-bit unsigned integer.", - "example": "32425224034" - }, - { - "name": "max_gas_amount", - "type": "string", - "description": "A string containing a 64-bit unsigned integer.", - "example": "32425224034" - }, - { - "name": "gas_unit_price", - "type": "string", - "description": "A string containing a 64-bit unsigned integer.", - "example": "32425224034" - }, - { - "name": "expiration_timestamp_secs", - "type": "string", - "description": "A string containing a 64-bit unsigned integer returned in milliseconds.", - "example": "32425224034" - }, - { "name": "payload" }, - { "name": "signature" } - ] - } - }, - { "status": "201", "description": "" } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.transactions.submitTransaction({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nbody = []\n\nresult = aptos_api.transactions.submit_transaction(\n api_key=api_key,\n body=body,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getTransactionByHash": { - "apiHost": "https://mainnet-aptos-api.moralis.io", - "testHost": "https://testnet-aptos-api.moralis.io", - "summary": "Get transaction by hash", - "description": "Get transaction by transaction hash.", - "method": "GET", - "path": "/transactions/by_hash/:txn_hash", - "pathParams": [ - { - "name": "txn_hash", - "description": "Hash of transaction to retrieve", - "required": true, - "type": "string" - } - ], - "queryParams": [], - "responses": [ - { - "status": "200", - "description": "", - "body": { - "type": "oneOf", - "options": [ - { - "type": "object", - "fields": [ - { - "name": "hash", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + ], + "responses": [ + { + "status": "200", "description": "", - "required": true - }, - { - "name": "sender", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "sequence_number", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "max_gas_amount", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "gas_unit_price", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "expiration_timestamp_secs", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer returned in milliseconds.", - "required": true - }, - { - "name": "payload", - "type": "oneOf", - "options": [ - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "function", - "type": "string", - "description": "Entry function id is string representation of a entry function defined on-chain.", - "required": true - }, - { - "name": "type_arguments", - "description": "Type arguments of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "arguments", - "description": "Arguments of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "Type of payload", - "required": true - }, - { - "name": "code", - "type": "object", - "description": "Move script bytecode", - "required": true - }, - { - "name": "type_arguments", - "description": "Type arguments of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "arguments", - "description": "Arguments of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "modules", - "description": "", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] - } - ], - "required": true - }, - { - "name": "signature", - "type": "oneOf", - "options": [ - { + "body": { "type": "object", "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "signature", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", - "required": true - }, - { - "name": "public_key", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - } + { + "name": "cursor", + "type": "string", + "description": "The cursor to use for the next page of results. (Cursor is null on last page)", + "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4" + }, + { + "name": "hasNextPage", + "type": "boolean", + "description": "Indicates if there is a next page of results", + "example": true + }, + { + "name": "result", + "type": "object", + "description": "The collections for the given creator", + "example": [], + "fields": [ + { + "name": "collection_data_id_hash", + "type": "string", + "description": "The identifier of the collection", + "example": "6993fb8b5688d392a2d94127b9926519d6327e69f2bcf3dc0c5df2c060aec97d" + }, + { + "name": "collection_name", + "type": "string", + "description": "The name of the collection", + "example": "Topaz Troopers" + }, + { + "name": "creator_address", + "type": "string", + "description": "The address of the creator of the collection", + "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" + }, + { + "name": "description", + "type": "string", + "description": "The description of the collection", + "example": "A badge which proves you are an OG #TopazTrooper." + }, + { + "name": "description_mutable", + "type": "boolean", + "description": "Whether the description can be changed", + "example": "false" + }, + { + "name": "last_transaction_timestamp", + "type": "string", + "description": "The timestamp of the last transaction returned in milliseconds", + "example": "2022-09-17T22:03:32.000000Z" + }, + { + "name": "last_transaction_version", + "type": "string", + "description": "The version of the last transaction", + "example": "210373856" + }, + { + "name": "maximum", + "type": "string", + "description": "The maximum number of tokens that can be minted", + "example": "18446744073709551615" + }, + { + "name": "maximum_mutable", + "type": "boolean", + "description": "Whether the maximum number of tokens can be changed", + "example": "false" + }, + { + "name": "metadata_uri", + "type": "string", + "description": "The URI of the image of the collection", + "example": "https://static-cdn.risewallet.io/nft/aptos-monkeys/1572.jpeg" + }, + { + "name": "supply", + "type": "string", + "description": "The number of tokens minted", + "example": "32976" + }, + { + "name": "table_handle", + "type": "string", + "description": "The address of the table that stores the tokens", + "example": "0x293d59ded27fc85fef070b026834d2be7e7ced76c3c32ecbcd4f44b461518c30" + }, + { + "name": "uri_mutable", + "type": "boolean", + "description": "Whether the URI of the image can be changed", + "example": "false" + } + ] + } ] - }, - { + } + }, + { + "status": "400", + "description": "", + "body": { "type": "object", "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "public_keys", - "description": "The public keys for the Ed25519 signature", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "signatures", - "description": "Signature associated with the public keys in the same order", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "threshold", - "type": "number", - "description": "The number of signatures required for a successful transaction", - "required": true - }, - { - "name": "bitmap", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - } + { + "name": "statusCode", + "type": "string", + "description": "The status code", + "example": "400" + }, + { + "name": "message", + "type": "array", + "description": "List of things to correct", + "example": [ + "creator_address must be 66 characters" + ], + "field": { "type": "string" } + }, + { + "name": "error", + "type": "string", + "description": "Type of error", + "example": "Bad Request" + } ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "sender", - "type": "oneOf", - "options": [ - { - "type": "object", - "description": "A single Ed25519 signature", - "fields": [ - { - "name": "type", + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.collections.getNFTCollections({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.collections.get_nft_collections(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getNFTCollectionsByIds": { + "apiHost": "https://mainnet-aptos-api.moralis.io", + "testHost": "https://testnet-aptos-api.moralis.io", + "summary": "Get NFT collections by collection ID hashes", + "description": "Get one or many NFT Collections by collection ID hash.", + "method": "GET", + "path": "/collections/ids", + "pathParams": [], + "queryParams": [ + { + "name": "ids", + "description": "The identifiers of the collections to get", + "required": true, + "type": "array", + "field": { + "type": "string", + "example": "7ac8cecb76edbbd5da40d719bbb9795fc5744e4098ee0ce1be4bb86c90f42301" + } + } + ], + "responses": [ + { + "status": "200", + "description": "", + "body": { + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "collection_data_id_hash", "type": "string", - "description": "", + "example": "6993fb8b5688d392a2d94127b9926519d6327e69f2bcf3dc0c5df2c060aec97d", + "description": "The identifier of the collection", + "maxLength": 64, + "minLength": 64, + "nullable": false, "required": true - }, - { - "name": "signature", + }, + { + "name": "collection_name", "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", + "example": "Topaz Troopers", + "description": "The name of the collection", + "maxLength": 128, + "minLength": 1, + "nullable": false, "required": true - }, - { - "name": "public_key", + }, + { + "name": "creator_address", "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac", + "description": "The address of the creator of the collection", + "maxLength": 66, + "minLength": 66, + "nullable": false, "required": true - } - ] - }, - { - "type": "object", - "description": "A Ed25519 multi-sig signature", - "fields": [ - { - "name": "type", + }, + { + "name": "description", "type": "string", - "description": "", - "required": true - }, - { - "name": "public_keys", - "description": "The public keys for the Ed25519 signature", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "signatures", - "description": "Signature associated with the public keys in the same order", - "type": "array", - "field": { "type": "string" }, + "example": "A badge which proves you are an OG #TopazTrooper.", + "description": "The description of the collection", + "nullable": false, "required": true - }, - { - "name": "threshold", - "type": "number", - "description": "The number of signatures required for a successful transaction", + }, + { + "name": "description_mutable", + "type": "boolean", + "example": "false", + "description": "Whether the description can be changed", + "nullable": false, "required": true - }, - { - "name": "bitmap", + }, + { + "name": "last_transaction_timestamp", "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "nullable": false, + "example": "2022-09-17T22:03:32.000000Z", + "description": "The timestamp of the last transaction returned in milliseconds", "required": true - } - ] - } - ], - "required": true - }, - { - "name": "secondary_signer_addresses", - "description": "The other involved parties addresses", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "secondary_signers", - "type": "oneOf", - "options": [ - { - "type": "object", - "description": "A single Ed25519 signature", - "fields": [ - { - "name": "type", + }, + { + "name": "last_transaction_version", "type": "string", - "description": "", + "example": "210373856", + "description": "The version of the last transaction", + "nullable": false, "required": true - }, - { - "name": "signature", + }, + { + "name": "maximum", "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", + "example": "18446744073709551615", + "description": "The maximum number of tokens that can be minted", + "nullable": false, "required": true - }, - { - "name": "public_key", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + }, + { + "name": "maximum_mutable", + "type": "boolean", + "example": "false", + "description": "Whether the maximum number of tokens can be changed", + "nullable": false, "required": true - } - ] - }, - { - "type": "object", - "description": "A Ed25519 multi-sig signature", - "fields": [ - { - "name": "type", + }, + { + "name": "metadata_uri", "type": "string", - "description": "", - "required": true - }, - { - "name": "public_keys", - "description": "The public keys for the Ed25519 signature", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "signatures", - "description": "Signature associated with the public keys in the same order", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "threshold", - "type": "number", - "description": "The number of signatures required for a successful transaction", + "example": "https://static-cdn.risewallet.io/nft/aptos-monkeys/1572.jpeg", + "description": "The URI of the image of the collection", + "nullable": false, "required": true - }, - { - "name": "bitmap", + }, + { + "name": "supply", "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - } - ] - } - ], - "required": true - } - ] - } - ], - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "", - "description": "user_transaction", - "required": true - }, - { - "name": "version", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "hash", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "", - "required": true - }, - { - "name": "state_change_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "event_root_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "state_checkpoint_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "gas_used", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "success", - "type": "boolean", - "example": true, - "description": "Whether the transaction was successful", - "required": true - }, - { - "name": "vm_status", - "type": "string", - "example": "", - "description": "The VM status of the transaction, can tell useful information in a failure", - "required": true - }, - { - "name": "accumulator_root_hash", - "type": "string", - "example": "", + "example": "32976", + "description": "The number of tokens minted", + "nullable": false, + "required": true + }, + { + "name": "table_handle", + "type": "string", + "nullable": false, + "example": "0x293d59ded27fc85fef070b026834d2be7e7ced76c3c32ecbcd4f44b461518c30", + "description": "The address of the table that stores the tokens", + "required": true + }, + { + "name": "uri_mutable", + "type": "boolean", + "example": "false", + "description": "Whether the URI of the image can be changed", + "nullable": false, + "required": true + } + ] + } + } + }, + { + "status": "400", "description": "", - "required": true - }, - { - "name": "changes", - "type": "array", - "required": true, - "field": { - "type": "oneOf", - "options": [ - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, + "body": { + "type": "object", + "fields": [ { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true + "name": "statusCode", + "type": "string", + "description": "The status code", + "example": "400" }, { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true + "name": "message", + "type": "array", + "description": "List of things to correct", + "example": [ + "creator_address must be 66 characters" + ], + "field": { "type": "string" } }, { - "name": "module", - "type": "object", - "example": "0x1::aptos_coin", - "description": "Move module id is a string representation of Move module", - "required": true + "name": "error", + "type": "string", + "description": "Type of error", + "example": "Bad Request" } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.collections.getNFTCollectionsByIds({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.collections.get_nft_collections_by_ids(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getNFTCollectionsByCreator": { + "apiHost": "https://mainnet-aptos-api.moralis.io", + "testHost": "https://testnet-aptos-api.moralis.io", + "summary": "Get NFT Collections by creator", + "description": "Get NFT Collections created by one or many creator addresses.", + "method": "GET", + "path": "/collections/creators", + "pathParams": [], + "queryParams": [ + { + "name": "limit", + "description": "The number of results to return", + "required": true, + "type": "number", + "example": 5 + }, + { + "name": "offset", + "description": "The number of results to skip", + "required": false, + "type": "number" + }, + { + "name": "cursor", + "description": "The cursor to use for getting the next page", + "required": false, + "type": "string" + }, + { + "name": "creator_address", + "description": "The address of the creator", + "required": true, + "type": "string", + "example": "0xf932dcb9835e681b21d2f411ef99f4f5e577e6ac299eebee2272a39fb348f702" + } + ], + "responses": [ + { + "status": "200", + "description": "", + "body": { + "type": "object", + "fields": [ { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true + "name": "cursor", + "type": "string", + "description": "The cursor to use for the next page of results. (Cursor is null on last page)", + "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4" }, { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true + "name": "hasNextPage", + "type": "boolean", + "description": "Indicates if there is a next page of results", + "example": true }, { - "name": "resource", - "type": "object", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type).", - "required": true + "name": "result", + "type": "object", + "description": "The collections for the given creator", + "example": [], + "fields": [ + { + "name": "collection_data_id_hash", + "type": "string", + "description": "The identifier of the collection", + "example": "6993fb8b5688d392a2d94127b9926519d6327e69f2bcf3dc0c5df2c060aec97d" + }, + { + "name": "collection_name", + "type": "string", + "description": "The name of the collection", + "example": "Topaz Troopers" + }, + { + "name": "creator_address", + "type": "string", + "description": "The address of the creator of the collection", + "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" + }, + { + "name": "description", + "type": "string", + "description": "The description of the collection", + "example": "A badge which proves you are an OG #TopazTrooper." + }, + { + "name": "description_mutable", + "type": "boolean", + "description": "Whether the description can be changed", + "example": "false" + }, + { + "name": "last_transaction_timestamp", + "type": "string", + "description": "The timestamp of the last transaction returned in milliseconds", + "example": "2022-09-17T22:03:32.000000Z" + }, + { + "name": "last_transaction_version", + "type": "string", + "description": "The version of the last transaction", + "example": "210373856" + }, + { + "name": "maximum", + "type": "string", + "description": "The maximum number of tokens that can be minted", + "example": "18446744073709551615" + }, + { + "name": "maximum_mutable", + "type": "boolean", + "description": "Whether the maximum number of tokens can be changed", + "example": "false" + }, + { + "name": "metadata_uri", + "type": "string", + "description": "The URI of the image of the collection", + "example": "https://static-cdn.risewallet.io/nft/aptos-monkeys/1572.jpeg" + }, + { + "name": "supply", + "type": "string", + "description": "The number of tokens minted", + "example": "32976" + }, + { + "name": "table_handle", + "type": "string", + "description": "The address of the table that stores the tokens", + "example": "0x293d59ded27fc85fef070b026834d2be7e7ced76c3c32ecbcd4f44b461518c30" + }, + { + "name": "uri_mutable", + "type": "boolean", + "description": "Whether the URI of the image can be changed", + "example": "false" + } + ] } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, + ] + } + }, + { + "status": "400", + "description": "", + "body": { + "type": "object", + "fields": [ { - "name": "handle", - "type": "object", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true + "name": "statusCode", + "type": "string", + "description": "The status code", + "example": "400" }, { - "name": "key", - "type": "object", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true + "name": "message", + "type": "array", + "description": "List of things to correct", + "example": [ + "creator_address must be 66 characters" + ], + "field": { "type": "string" } }, { - "name": "data", - "example": {}, - "description": "Deleted table data", - "type": "object", - "fields": [ - { - "name": "key", - "type": "string", - "example": "", - "description": "Deleted key", - "required": true - }, - { - "name": "key_type", - "type": "string", - "example": "", - "description": "Deleted key type", - "required": true - } - ], - "required": true + "name": "error", + "type": "string", + "description": "Type of error", + "example": "Bad Request" } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "" - }, + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.collections.getNFTCollectionsByCreator({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.collections.get_nft_collections_by_creator(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getNFTOwnersByTokens": { + "apiHost": "https://mainnet-aptos-api.moralis.io", + "testHost": "https://testnet-aptos-api.moralis.io", + "summary": "Get NFT owners by token(s)", + "description": "Get owners for one or many NFTs by token ID hash. Learn more about token ID hashes [here](/web3-data-api/aptos/token-id-hashes).", + "method": "GET", + "path": "/nfts/owners", + "pathParams": [], + "queryParams": [ + { + "name": "limit", + "description": "The number of results to return", + "required": true, + "type": "number", + "example": 5 + }, + { + "name": "offset", + "description": "The number of results to skip", + "required": false, + "type": "number" + }, + { + "name": "cursor", + "description": "The cursor to use for getting the next page", + "required": false, + "type": "string" + }, + { + "name": "token_ids", + "description": "The identifiers of the tokens to get owners for", + "required": true, + "type": "array", + "field": { + "type": "string", + "example": "9a47523002a8940afaae60cb01d13ccea0408b17e958ebf1940a9f687785d6da" + } + } + ], + "responses": [ + { + "status": "200", + "description": "", + "body": { + "type": "object", + "fields": [ { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address." + "name": "cursor", + "type": "string", + "description": "The cursor to use for the next page of results. (Cursor is null on last page)", + "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4" }, { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash" + "name": "hasNextPage", + "type": "boolean", + "description": "Indicates if there is a next page of results", + "example": true }, { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "bytecode", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." - }, - { - "name": "abi", - "example": {}, - "description": "", - "type": "object", - "fields": [ + "name": "result", + "type": "object", + "description": "The owners for the given tokens", + "example": [], + "fields": [ { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true + "name": "amount", + "type": "string", + "description": "The number of tokens that belonging to the owner", + "example": "2" }, { - "name": "name", - "type": "string", - "example": "", - "description": "", - "required": true + "name": "collection_data_id_hash", + "type": "string", + "description": "The identifier of the collection", + "example": "6993fb8b5688d392a2d94127b9926519d6327e69f2bcf3dc0c5df2c060aec97d" }, { - "name": "friends", - "example": [], - "description": "Friends of the module", - "type": "array", - "field": { "type": "string" }, - "required": true + "name": "collection_name", + "type": "string", + "description": "The name of the collection", + "example": "Topaz Troopers" }, { - "name": "exposed_functions", - "example": [], - "description": "Public functions of the module", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "", - "description": "Name of the function", - "required": true - }, - { - "name": "visibility", - "type": "string", - "example": "private", - "description": "Move function visibility", - "required": true - }, - { - "name": "is_entry", - "type": "boolean", - "example": true, - "description": "Whether the function can be called as an entry function directly in a transaction", - "required": true - }, - { - "name": "generic_type_params", - "example": [], - "description": "Generic type params associated with the Move function", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] - }, - "required": true - }, - { - "name": "params", - "example": [], - "description": "Parameters associated with the move function", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "return", - "example": "", - "description": "Return type of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] - }, - "required": true + "name": "creator_address", + "type": "string", + "description": "The address of the creator of the collection", + "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" }, { - "name": "structs", - "example": [], - "description": "Structs of the module", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "", - "description": "Name of the struct", - "required": true - }, - { - "name": "is_native", - "type": "boolean", - "example": true, - "description": "Whether the struct is a native struct of Move", - "required": true - }, - { - "name": "abilities", - "example": [], - "description": "Abilities associated with the struct", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "generic_type_params", - "example": [], - "description": "Generic types associated with the struct", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { "type": "string" } - } - ] - }, - "required": true - }, - { - "name": "fields", - "example": [], - "description": "Fields associated with the struct", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "sender", - "description": "Name of the field", - "required": true - }, - { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", - "required": true - } - ] - }, - "required": true - } - ] - }, - "required": true - } - ] - } - ] - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type).", - "required": true - }, - { - "name": "data", - "type": "object", - "example": "", - "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", - "required": true - } - ], - "required": true + "name": "last_transaction_timestamp", + "type": "string", + "description": "The timestamp of the last transaction returned in milliseconds", + "example": "2022-09-17T22:03:32.000000Z" + }, + { + "name": "last_transaction_version", + "type": "string", + "description": "The version of the last transaction", + "example": "210373856" + }, + { + "name": "name", + "type": "string", + "description": "The name of the token", + "example": "Topaz Troopers 123" + }, + { + "name": "owner_address", + "type": "string", + "description": "The address of the owner of the token", + "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" + }, + { + "name": "property_version", + "type": "string", + "description": "The property version of the token", + "example": "1" + }, + { + "name": "table_type", + "type": "string", + "description": "The data structure of the token", + "example": "0x3::token::TokenStore" + }, + { + "name": "token_data_id_hash", + "type": "string", + "description": "The identifier of the token", + "example": "1824178d98256f40046db3db8cf462f1c0a8e0d37304218044f11e69761c88e1" + }, + { + "name": "token_properties", + "type": "json", + "description": "The properties of the token", + "example": "{\"point\": \"0x30\", \"author\": \"0x33454e4a4f59204c616273\"}" + } + ] } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "handle", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, + ] + } + }, + { + "status": "400", + "description": "", + "body": { + "type": "object", + "fields": [ { - "name": "key", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true + "name": "statusCode", + "type": "string", + "description": "The status code", + "example": "400" }, { - "name": "value", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true + "name": "message", + "type": "array", + "description": "List of things to correct", + "example": [ + "creator_address must be 66 characters" + ], + "field": { "type": "string" } }, { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "key", - "type": "string", - "example": "", - "description": "Key of table in JSON", - "required": true - }, - { - "name": "key_type", - "type": "string", - "example": "", - "description": "Type of key", - "required": true - }, - { - "name": "value", - "type": "string", - "example": "", - "description": "Value of table in JSON", - "required": true - }, - { - "name": "value_type", - "type": "string", - "example": "", - "description": "Type of value", - "required": true - } - ], - "required": true + "name": "error", + "type": "string", + "description": "Type of error", + "example": "Bad Request" } - ] - } - ] + ] } - }, - { - "name": "sender", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "sequence_number", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "max_gas_amount", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "gas_unit_price", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "expiration_timestamp_secs", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer returned in milliseconds.", - "required": true - }, - { - "name": "payload", - "type": "oneOf", + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.nfts.getNFTOwnersByTokens({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.nfts.get_nft_owners_by_tokens(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getNFTOwnersByCollection": { + "apiHost": "https://mainnet-aptos-api.moralis.io", + "testHost": "https://testnet-aptos-api.moralis.io", + "summary": "Get NFT transfers by collection", + "description": "Get NFT transfers for a given collection ID hash.", + "method": "GET", + "path": "/nfts/collections/:collection_data_id_hash/owners", + "pathParams": [ + { + "name": "collection_data_id_hash", + "description": "The id of the token", "required": true, - "options": [ - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "function", - "type": "string", - "description": "Entry function id is string representation of a entry function defined on-chain.", - "required": true - }, - { - "name": "type_arguments", - "description": "Type arguments of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "arguments", - "description": "Arguments of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "Type of payload", - "required": true - }, - { - "name": "code", - "type": "object", - "description": "Move script bytecode", - "required": true - }, - { - "name": "type_arguments", - "description": "Type arguments of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "arguments", - "description": "Arguments of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "modules", - "description": "", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] - } - ] - }, - { - "name": "signature", - "type": "oneOf", + "type": "string", + "example": "7ac8cecb76edbbd5da40d719bbb9795fc5744e4098ee0ce1be4bb86c90f42301" + } + ], + "queryParams": [ + { + "name": "limit", + "description": "The number of results to return", "required": true, - "options": [ - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "signature", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", - "required": true - }, - { - "name": "public_key", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "public_keys", - "description": "The public keys for the Ed25519 signature", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "signatures", - "description": "Signature associated with the public keys in the same order", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "threshold", - "type": "number", - "description": "The number of signatures required for a successful transaction", - "required": true - }, - { - "name": "bitmap", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - } - ] - }, - { + "type": "number", + "example": 5 + }, + { + "name": "offset", + "description": "The number of results to skip", + "required": false, + "type": "number" + }, + { + "name": "cursor", + "description": "The cursor to use for getting the next page", + "required": false, + "type": "string" + }, + { + "name": "wallet_blacklist", + "description": "The addresses of the wallets to blacklist", + "required": false, + "type": "array", + "field": { "type": "string" } + }, + { + "name": "wallet_whitelist", + "description": "The addresses of the wallets to whitelist", + "required": false, + "type": "array", + "field": { "type": "string" } + } + ], + "responses": [ + { + "status": "200", + "description": "", + "body": { "type": "object", "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "sender", - "type": "oneOf", - "options": [ - { - "type": "object", - "description": "A single Ed25519 signature", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "signature", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", - "required": true - }, - { - "name": "public_key", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - } - ] - }, - { - "type": "object", - "description": "A Ed25519 multi-sig signature", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "public_keys", - "description": "The public keys for the Ed25519 signature", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "signatures", - "description": "Signature associated with the public keys in the same order", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "threshold", - "type": "number", - "description": "The number of signatures required for a successful transaction", - "required": true - }, - { - "name": "bitmap", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - } - ] - } - ], - "required": true - }, - { - "name": "secondary_signer_addresses", - "description": "The other involved parties addresses", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "secondary_signers", - "type": "oneOf", - "options": [ - { - "type": "object", - "description": "A single Ed25519 signature", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "signature", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", - "required": true - }, - { - "name": "public_key", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - } - ] - }, - { + { + "name": "cursor", + "type": "string", + "required": true, + "description": "The cursor to use for the next page of results. (Cursor is null on last page)", + "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4" + }, + { + "name": "hasNextPage", + "type": "boolean", + "required": true, + "description": "Indicates if there is a next page of results", + "example": true + }, + { + "name": "result", "type": "object", - "description": "A Ed25519 multi-sig signature", + "required": true, + "description": "The owners for the given collection", + "example": [], "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "public_keys", - "description": "The public keys for the Ed25519 signature", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "signatures", - "description": "Signature associated with the public keys in the same order", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "threshold", - "type": "number", - "description": "The number of signatures required for a successful transaction", - "required": true - }, - { - "name": "bitmap", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - } + { + "name": "amount", + "type": "string", + "description": "The number of tokens that belonging to the owner", + "example": "2" + }, + { + "name": "collection_data_id_hash", + "type": "string", + "description": "The identifier of the collection", + "example": "6993fb8b5688d392a2d94127b9926519d6327e69f2bcf3dc0c5df2c060aec97d" + }, + { + "name": "collection_name", + "type": "string", + "description": "The name of the collection", + "example": "Topaz Troopers" + }, + { + "name": "creator_address", + "type": "string", + "description": "The address of the creator of the collection", + "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" + }, + { + "name": "last_transaction_timestamp", + "type": "string", + "description": "The timestamp of the last transaction returned in milliseconds", + "example": "2022-09-17T22:03:32.000000Z" + }, + { + "name": "last_transaction_version", + "type": "string", + "description": "The version of the last transaction", + "example": "210373856" + }, + { + "name": "name", + "type": "string", + "description": "The name of the token", + "example": "Topaz Troopers 123" + }, + { + "name": "owner_address", + "type": "string", + "description": "The address of the owner of the token", + "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" + }, + { + "name": "property_version", + "type": "string", + "description": "The property version of the token", + "example": "1" + }, + { + "name": "table_type", + "type": "string", + "description": "The data structure of the token", + "example": "0x3::token::TokenStore" + }, + { + "name": "token_data_id_hash", + "type": "string", + "description": "The identifier of the token", + "example": "1824178d98256f40046db3db8cf462f1c0a8e0d37304218044f11e69761c88e1" + }, + { + "name": "token_properties", + "type": "json", + "description": "The properties of the token", + "example": "{\"point\": \"0x30\", \"author\": \"0x33454e4a4f59204c616273\"}" + } ] - } - ], - "required": true - } + } ] - } - ] - }, - { - "name": "events", - "example": "", - "description": "Events generated by the transaction", - "type": "array", - "required": true, - "field": { - "type": "object", - "fields": [ - { - "name": "guid", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "creation_number", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", - "required": true - }, - { - "name": "account_address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.\nThis is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.", - "required": true + } + }, + { + "status": "400", + "description": "", + "body": { + "type": "object", + "fields": [ + { + "name": "statusCode", + "type": "string", + "description": "The status code", + "example": "400" + }, + { + "name": "message", + "type": "array", + "description": "List of things to correct", + "example": [ + "creator_address must be 66 characters" + ], + "field": { "type": "string" } + }, + { + "name": "error", + "type": "string", + "description": "Type of error", + "example": "Bad Request" } - ] - }, - { - "name": "sequence_number", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer." - }, - { - "name": "type", - "type": "string", - "example": "0x1::account::Account", - "description": "String representation of an on-chain Move type tag that is exposed in transaction payload." - }, - { - "name": "data", - "type": "string", - "example": {}, - "description": "The JSON representation of the event" - } - ], - "required": ["guid", "sequence_number", "type", "data"] + ] } - }, - { - "name": "timestamp", - "type": "string", - "example": "32425224034", + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.nfts.getNFTOwnersByCollection({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.nfts.get_nft_owners_by_collection(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getNFTOwnersOfCollection": { + "apiHost": "https://mainnet-aptos-api.moralis.io", + "testHost": "https://testnet-aptos-api.moralis.io", + "summary": "Get NFT owners of collection", + "description": "Get owners of a given NFT collection.", + "method": "GET", + "path": "/nfts/collections/:collection_data_id_hash/owners/list", + "pathParams": [ + { + "name": "collection_data_id_hash", + "description": "The id of the token", "required": true, - "description": "The timestamp of the block returned in milliseconds" - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "genesis_transaction", - "description": "", - "required": true - }, - { - "name": "version", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "hash", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "", - "required": true - }, - { - "name": "state_change_hash", "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "event_root_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "state_checkpoint_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "gas_used", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "success", - "type": "boolean", - "example": true, - "description": "Whether the transaction was successful", - "required": true - }, - { - "name": "vm_status", - "type": "string", - "example": "", - "description": "The VM status of the transaction, can tell useful information in a failure", - "required": true - }, - { - "name": "accumulator_root_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "changes", - "type": "array", + "example": "7ac8cecb76edbbd5da40d719bbb9795fc5744e4098ee0ce1be4bb86c90f42301" + } + ], + "queryParams": [ + { + "name": "limit", + "description": "The number of results to return", "required": true, - "field": { - "type": "oneOf", - "options": [ - { - "type": "object", - "fields": [ + "type": "number", + "example": 5 + }, + { + "name": "offset", + "description": "The number of results to skip", + "required": false, + "type": "number" + }, + { + "name": "cursor", + "description": "The cursor to use for getting the next page", + "required": false, + "type": "string" + } + ], + "responses": [ + { + "status": "200", + "description": "", + "body": { + "type": "object", + "fields": [ + { + "name": "cursor", + "type": "string", + "required": true, + "description": "The cursor to use for the next page of results. (Cursor is null on last page)", + "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4" + }, { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true + "name": "hasNextPage", + "type": "boolean", + "required": true, + "description": "Indicates if there is a next page of results", + "example": true }, { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true + "name": "result", + "type": "array", + "required": true, + "description": "The owner addresses for the given collection", + "example": [], + "field": { "type": "string" } + } + ] + } + }, + { + "status": "400", + "description": "", + "body": { + "type": "object", + "fields": [ + { + "name": "statusCode", + "type": "string", + "description": "The status code", + "example": "400" }, { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true + "name": "message", + "type": "array", + "description": "List of things to correct", + "example": [ + "creator_address must be 66 characters" + ], + "field": { "type": "string" } }, { - "name": "module", - "type": "object", - "example": "0x1::aptos_coin", - "description": "Move module id is a string representation of Move module", - "required": true + "name": "error", + "type": "string", + "description": "Type of error", + "example": "Bad Request" } - ] + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.nfts.getNFTOwnersOfCollection({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.nfts.get_nft_owners_of_collection(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getNFTTransfersByIds": { + "apiHost": "https://mainnet-aptos-api.moralis.io", + "testHost": "https://testnet-aptos-api.moralis.io", + "summary": "Get NFT transfers by token(s)", + "description": "Get NFT transfers for one or many NFT token ID hashes. Learn more about token ID hashes [here](/web3-data-api/aptos/token-id-hashes).", + "method": "GET", + "path": "/nfts/transfers", + "pathParams": [], + "queryParams": [ + { + "name": "limit", + "description": "The number of tokens to return", + "required": true, + "type": "number", + "example": 5 + }, + { + "name": "offset", + "description": "The number of results to skip", + "required": false, + "type": "number" + }, + { + "name": "cursor", + "description": "The cursor to use for getting the next page", + "required": false, + "type": "string" + }, + { + "name": "wallet_blacklist", + "description": "The addresses of the wallets to blacklist", + "required": false, + "type": "array", + "field": { "type": "string" } + }, + { + "name": "wallet_whitelist", + "description": "The addresses of the wallets to whitelist", + "required": false, + "type": "array", + "field": { "type": "string" } + }, + { + "name": "token_ids", + "description": "The identifiers of the tokens to get", + "required": true, + "type": "array", + "field": { + "type": "string", + "example": "9a47523002a8940afaae60cb01d13ccea0408b17e958ebf1940a9f687785d6da" + } + } + ], + "responses": [ + { + "status": "200", + "description": "", + "body": { + "cursor": { + "type": "string", + "nullable": true, + "required": true, + "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4", + "description": "The cursor to use for the next page of results. (Cursor is null on last page)" }, - { - "type": "object", - "fields": [ + "hasNextPage": { + "type": "boolean", + "example": true, + "description": "Indicates if there is a next page of results", + "nullable": false, + "required": true + }, + "result": { + "description": "The collections for the given creators", + "example": [], + "nullable": false, + "maxItems": 100, + "minItems": 0, + "required": true, + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "coin_amount", + "type": "string", + "nullable": false, + "example": "2", + "description": "The number of tokens transferred", + "required": true + }, + { + "name": "coin_type", + "type": "string", + "nullable": false, + "example": null, + "description": "The type of tokens transferred", + "required": true + }, + { + "name": "collection_data_id_hash", + "type": "string", + "example": "6993fb8b5688d392a2d94127b9926519d6327e69f2bcf3dc0c5df2c060aec97d", + "description": "The identifier of the collection", + "maxLength": 64, + "minLength": 64, + "nullable": false, + "required": true + }, + { + "name": "collection_name", + "type": "string", + "example": "Topaz Troopers", + "description": "The name of the collection", + "maxLength": 128, + "minLength": 1, + "nullable": false, + "required": true + }, + { + "name": "creator_address", + "type": "string", + "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac", + "description": "The address of the creator of the collection", + "maxLength": 66, + "minLength": 66, + "nullable": false, + "required": true + }, + { + "name": "event_account_address", + "type": "string", + "example": "0xa748de66f1eea7d32399b59027ab0b3786295313e2c3a1608b5d51e759aee6dd", + "description": "The account address of the transfer", + "nullable": false, + "required": true + }, + { + "name": "event_creation_number", + "type": "string", + "example": "2", + "description": "The creation number of the event", + "nullable": false, + "required": true + }, + { + "name": "event_sequence_number", + "type": "string", + "example": "2", + "description": "The sequence number of the event", + "nullable": false, + "required": true + }, + { + "name": "from_address", + "type": "string", + "nullable": false, + "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac", + "description": "The address sending the transfer", + "maxLength": 66, + "minLength": 66, + "required": true + }, + { + "name": "name", + "type": "string", + "example": "Topaz Troopers 123", + "description": "The name of the token", + "maxLength": 128, + "minLength": 1, + "nullable": false, + "required": true + }, + { + "name": "property_version", + "type": "string", + "example": "1", + "description": "The property version of the token", + "nullable": false, + "required": true + }, + { + "name": "to_address", + "type": "string", + "nullable": false, + "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac", + "description": "The address recieving the transfer", + "maxLength": 66, + "minLength": 66, + "required": true + }, + { + "name": "token_amount", + "type": "string", + "example": "2", + "description": "The number of tokens transferred", + "nullable": false, + "required": true + }, + { + "name": "token_data_id_hash", + "type": "string", + "example": "1824178d98256f40046db3db8cf462f1c0a8e0d37304218044f11e69761c88e1", + "description": "The identifier of the token", + "maxLength": 64, + "minLength": 64, + "nullable": false, + "required": true + }, + { + "name": "transaction_timestamp", + "type": "string", + "nullable": false, + "example": "2022-09-17T22:03:32.000000Z", + "description": "The timestamp of the transfer returned in milliseconds", + "required": true + }, + { + "name": "transaction_version", + "type": "string", + "example": "210373856", + "description": "The version of the transaction that the transfer is a part of", + "nullable": false, + "required": true + }, + { + "name": "transfer_type", + "type": "string", + "example": "0x3::token::DepositEvent", + "description": "The type of transfer", + "nullable": false, + "required": true + } + ] + } + } + } + }, + { + "status": "400", + "description": "", + "body": { + "type": "object", + "fields": [ + { + "name": "statusCode", + "type": "string", + "description": "The status code", + "example": "400" + }, { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true + "name": "message", + "type": "array", + "description": "List of things to correct", + "example": [ + "creator_address must be 66 characters" + ], + "field": { "type": "string" } }, { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true + "name": "error", + "type": "string", + "description": "Type of error", + "example": "Bad Request" + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.nfts.getNFTTransfersByIds({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.nfts.get_nft_transfers_by_ids(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getNFTTransfersByCollection": { + "apiHost": "https://mainnet-aptos-api.moralis.io", + "testHost": "https://testnet-aptos-api.moralis.io", + "summary": "Get NFT transfers by collection", + "description": "Get NFT transfers for a given collection.", + "method": "GET", + "path": "/nfts/transfers/collections/:collection_data_id_hash", + "pathParams": [ + { + "name": "collection_data_id_hash", + "description": "The collection data id hash of the token", + "required": true, + "type": "string", + "example": "7ac8cecb76edbbd5da40d719bbb9795fc5744e4098ee0ce1be4bb86c90f42301" + } + ], + "queryParams": [ + { + "name": "limit", + "description": "The number of results to return", + "required": true, + "type": "number", + "example": 5 + }, + { + "name": "offset", + "description": "The number of results to skip", + "required": false, + "type": "number" + }, + { + "name": "cursor", + "description": "The cursor to use for getting the next page", + "required": false, + "type": "string" + }, + { + "name": "wallet_whitelist", + "description": "The addresses of the wallets to whitelist", + "required": false, + "type": "array", + "field": { "type": "string" } + }, + { + "name": "wallet_blacklist", + "description": "The addresses of the wallets to blacklist", + "required": false, + "type": "array", + "field": { "type": "string" } + } + ], + "responses": [ + { + "status": "200", + "description": "", + "body": { + "type": "object", + "fields": [ + { + "name": "cursor", + "type": "string", + "description": "The cursor to use for the next page of results. (Cursor is null on last page)", + "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4" }, { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true + "name": "hasNextPage", + "type": "boolean", + "description": "Indicates if there is a next page of results", + "example": true }, { - "name": "resource", - "type": "object", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type).", - "required": true + "name": "result", + "type": "object", + "description": "The collections for the given creators", + "example": [], + "fields": [ + { + "name": "coin_amount", + "type": "string", + "description": "The number of tokens transferred", + "example": "2" + }, + { + "name": "coin_type", + "type": "string", + "description": "The type of tokens transferred", + "example": null + }, + { + "name": "collection_data_id_hash", + "type": "string", + "description": "The identifier of the collection", + "example": "6993fb8b5688d392a2d94127b9926519d6327e69f2bcf3dc0c5df2c060aec97d" + }, + { + "name": "collection_name", + "type": "string", + "description": "The name of the collection", + "example": "Topaz Troopers" + }, + { + "name": "creator_address", + "type": "string", + "description": "The address of the creator of the collection", + "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" + }, + { + "name": "event_account_address", + "type": "string", + "description": "The account address of the transfer", + "example": "0xa748de66f1eea7d32399b59027ab0b3786295313e2c3a1608b5d51e759aee6dd" + }, + { + "name": "event_creation_number", + "type": "string", + "description": "The creation number of the event", + "example": "2" + }, + { + "name": "event_sequence_number", + "type": "string", + "description": "The sequence number of the event", + "example": "2" + }, + { + "name": "from_address", + "type": "string", + "description": "The address sending the transfer", + "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" + }, + { + "name": "name", + "type": "string", + "description": "The name of the token", + "example": "Topaz Troopers 123" + }, + { + "name": "property_version", + "type": "string", + "description": "The property version of the token", + "example": "1" + }, + { + "name": "to_address", + "type": "string", + "description": "The address recieving the transfer", + "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" + }, + { + "name": "token_amount", + "type": "string", + "description": "The number of tokens transferred", + "example": "2" + }, + { + "name": "token_data_id_hash", + "type": "string", + "description": "The identifier of the token", + "example": "1824178d98256f40046db3db8cf462f1c0a8e0d37304218044f11e69761c88e1" + }, + { + "name": "transaction_timestamp", + "type": "string", + "description": "The timestamp of the transfer returned in milliseconds", + "example": "2022-09-17T22:03:32.000000Z" + }, + { + "name": "transaction_version", + "type": "string", + "description": "The version of the transaction that the transfer is a part of", + "example": "210373856" + }, + { + "name": "transfer_type", + "type": "string", + "description": "The type of transfer", + "example": "0x3::token::DepositEvent" + } + ] } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, + ] + } + }, + { + "status": "400", + "description": "", + "body": { + "type": "object", + "fields": [ { - "name": "handle", - "type": "object", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true + "name": "statusCode", + "type": "string", + "description": "The status code", + "example": "400" }, { - "name": "key", - "type": "object", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true + "name": "message", + "type": "array", + "description": "List of things to correct", + "example": [ + "creator_address must be 66 characters" + ], + "field": { "type": "string" } }, { - "name": "data", - "example": {}, - "description": "Deleted table data", - "type": "object", - "fields": [ - { - "name": "key", - "type": "string", - "example": "", - "description": "Deleted key", - "required": true - }, - { - "name": "key_type", - "type": "string", - "example": "", - "description": "Deleted key type", - "required": true - } - ], - "required": true + "name": "error", + "type": "string", + "description": "Type of error", + "example": "Bad Request" } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "" - }, + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.nfts.getNFTTransfersByCollection({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.nfts.get_nft_transfers_by_collection(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getNFTTransfersByCreators": { + "apiHost": "https://mainnet-aptos-api.moralis.io", + "testHost": "https://testnet-aptos-api.moralis.io", + "summary": "Get NFT Transfers by creators", + "description": "Get NFT transfers for NFTs created by one or many specific creator addresses.", + "method": "GET", + "path": "/nfts/transfers/creators", + "pathParams": [], + "queryParams": [ + { + "name": "limit", + "description": "The number of results to return", + "required": true, + "type": "number", + "example": 5 + }, + { + "name": "offset", + "description": "The number of results to skip", + "required": false, + "type": "number" + }, + { + "name": "cursor", + "description": "The cursor to use for getting the next page", + "required": false, + "type": "string" + }, + { + "name": "creator_addresses", + "description": "The addresses of the creators", + "required": true, + "type": "array", + "field": { + "type": "string", + "example": "0xf932dcb9835e681b21d2f411ef99f4f5e577e6ac299eebee2272a39fb348f702" + } + }, + { + "name": "collection_blacklist", + "description": "The ids of the collections to whitelist", + "required": false, + "type": "array", + "field": { "type": "string" } + }, + { + "name": "collection_whitelist", + "description": "The ids of the collections to whitelist", + "required": false, + "type": "array", + "field": { "type": "string" } + } + ], + "responses": [ + { + "status": "200", + "description": "", + "body": { + "type": "object", + "fields": [ { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address." + "name": "cursor", + "type": "string", + "description": "The cursor to use for the next page of results. (Cursor is null on last page)", + "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4" }, { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash" + "name": "hasNextPage", + "type": "boolean", + "description": "Indicates if there is a next page of results", + "example": true }, { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "bytecode", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." - }, - { - "name": "abi", - "example": {}, - "description": "", - "type": "object", - "fields": [ + "name": "result", + "type": "object", + "description": "The collections for the given creators", + "example": [], + "fields": [ { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true + "name": "coin_amount", + "type": "string", + "description": "The number of tokens transferred", + "example": "2" }, { - "name": "name", - "type": "string", - "example": "", - "description": "", - "required": true + "name": "coin_type", + "type": "string", + "description": "The type of tokens transferred", + "example": null }, { - "name": "friends", - "example": [], - "description": "Friends of the module", - "type": "array", - "field": { "type": "string" }, - "required": true + "name": "collection_data_id_hash", + "type": "string", + "description": "The identifier of the collection", + "example": "6993fb8b5688d392a2d94127b9926519d6327e69f2bcf3dc0c5df2c060aec97d" }, { - "name": "exposed_functions", - "example": [], - "description": "Public functions of the module", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "", - "description": "Name of the function", - "required": true - }, - { - "name": "visibility", - "type": "string", - "example": "private", - "description": "Move function visibility", - "required": true - }, - { - "name": "is_entry", - "type": "boolean", - "example": true, - "description": "Whether the function can be called as an entry function directly in a transaction", - "required": true - }, - { - "name": "generic_type_params", - "example": [], - "description": "Generic type params associated with the Move function", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] - }, - "required": true - }, - { - "name": "params", - "example": [], - "description": "Parameters associated with the move function", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "return", - "example": "", - "description": "Return type of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] - }, - "required": true + "name": "collection_name", + "type": "string", + "description": "The name of the collection", + "example": "Topaz Troopers" }, { - "name": "structs", - "example": [], - "description": "Structs of the module", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "", - "description": "Name of the struct", - "required": true - }, - { - "name": "is_native", - "type": "boolean", - "example": true, - "description": "Whether the struct is a native struct of Move", - "required": true - }, - { - "name": "abilities", - "example": [], - "description": "Abilities associated with the struct", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "generic_type_params", - "example": [], - "description": "Generic types associated with the struct", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { "type": "string" } - } - ] - }, - "required": true - }, - { - "name": "fields", - "example": [], - "description": "Fields associated with the struct", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "sender", - "description": "Name of the field", - "required": true - }, - { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", - "required": true - } - ] - }, - "required": true - } - ] - }, - "required": true + "name": "creator_address", + "type": "string", + "description": "The address of the creator of the collection", + "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" + }, + { + "name": "event_account_address", + "type": "string", + "description": "The account address of the transfer", + "example": "0xa748de66f1eea7d32399b59027ab0b3786295313e2c3a1608b5d51e759aee6dd" + }, + { + "name": "event_creation_number", + "type": "string", + "description": "The creation number of the event", + "example": "2" + }, + { + "name": "event_sequence_number", + "type": "string", + "description": "The sequence number of the event", + "example": "2" + }, + { + "name": "from_address", + "type": "string", + "description": "The address sending the transfer", + "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" + }, + { + "name": "name", + "type": "string", + "description": "The name of the token", + "example": "Topaz Troopers 123" + }, + { + "name": "property_version", + "type": "string", + "description": "The property version of the token", + "example": "1" + }, + { + "name": "to_address", + "type": "string", + "description": "The address recieving the transfer", + "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" + }, + { + "name": "token_amount", + "type": "string", + "description": "The number of tokens transferred", + "example": "2" + }, + { + "name": "token_data_id_hash", + "type": "string", + "description": "The identifier of the token", + "example": "1824178d98256f40046db3db8cf462f1c0a8e0d37304218044f11e69761c88e1" + }, + { + "name": "transaction_timestamp", + "type": "string", + "description": "The timestamp of the transfer returned in milliseconds", + "example": "2022-09-17T22:03:32.000000Z" + }, + { + "name": "transaction_version", + "type": "string", + "description": "The version of the transaction that the transfer is a part of", + "example": "210373856" + }, + { + "name": "transfer_type", + "type": "string", + "description": "The type of transfer", + "example": "0x3::token::DepositEvent" } - ] - } - ] - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type).", - "required": true - }, - { - "name": "data", - "type": "object", - "example": "", - "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", - "required": true - } - ], - "required": true + ] } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "handle", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, + ] + } + }, + { + "status": "400", + "description": "", + "body": { + "type": "object", + "fields": [ { - "name": "key", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true + "name": "statusCode", + "type": "string", + "description": "The status code", + "example": "400" }, { - "name": "value", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true + "name": "message", + "type": "array", + "description": "List of things to correct", + "example": [ + "creator_address must be 66 characters" + ], + "field": { "type": "string" } }, { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "key", - "type": "string", - "example": "", - "description": "Key of table in JSON", - "required": true - }, - { - "name": "key_type", - "type": "string", - "example": "", - "description": "Type of key", - "required": true - }, - { - "name": "value", - "type": "string", - "example": "", - "description": "Value of table in JSON", - "required": true - }, - { - "name": "value_type", - "type": "string", - "example": "", - "description": "Type of value", - "required": true - } - ], - "required": true + "name": "error", + "type": "string", + "description": "Type of error", + "example": "Bad Request" } - ] - } - ] + ] } - }, - { - "name": "payload", + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.nfts.getNFTTransfersByCreators({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.nfts.get_nft_transfers_by_creators(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getNFTTransfersByWallets": { + "apiHost": "https://mainnet-aptos-api.moralis.io", + "testHost": "https://testnet-aptos-api.moralis.io", + "summary": "Get NFT transfers by wallet(s)", + "description": "Get NFT transfers from one or many wallet addresses.", + "method": "GET", + "path": "/nfts/transfers/wallets", + "pathParams": [], + "queryParams": [ + { + "name": "limit", + "description": "The number of tokens to return", "required": true, - "description": "A writeset payload, used only for genesis", - "type": "object", - "fields": [ - { - "name": "type", + "type": "number", + "example": 5 + }, + { + "name": "offset", + "description": "The number of results to skip", + "required": false, + "type": "number" + }, + { + "name": "cursor", + "description": "The cursor to use for getting the next page", + "required": false, + "type": "string" + }, + { + "name": "wallet_addresses", + "description": "The addresses of the wallets to get transfers for", + "required": true, + "type": "array", + "field": { "type": "string", - "description": "", - "required": true - }, - { - "name": "write_set", - "description": "The associated writeset with a payload", - "required": true, - "type": "oneOf", - "options": [ - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "execute_as", + "example": "0x274c398a921b8e2ba345feac3039e1c8b196a7eb1395cdd3584af3a85eb9ec50" + } + }, + { + "name": "collection_blacklist", + "description": "The ids of the collections to whitelist", + "required": false, + "type": "array", + "field": { "type": "string" } + }, + { + "name": "collection_whitelist", + "description": "The ids of the collections to whitelist", + "required": false, + "type": "array", + "field": { "type": "string" } + } + ], + "responses": [ + { + "status": "200", + "description": "", + "body": { + "type": "object", + "fields": [ + { + "name": "cursor", "type": "string", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "script", - "description": "Payload which runs a script that can run multiple functions", - "required": true, + "description": "The cursor to use for the next page of results. (Cursor is null on last page)", + "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4" + }, + { + "name": "hasNextPage", + "type": "boolean", + "description": "Indicates if there is a next page of results", + "example": true + }, + { + "name": "result", "type": "object", + "description": "The collections for the given creators", + "example": [], "fields": [ - { - "name": "type", - "type": "string", - "description": "Type of payload", - "required": true - }, - { - "name": "code", - "type": "object", - "description": "Move script bytecode", - "required": true - }, - { - "name": "type_arguments", - "description": "Type arguments of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "arguments", - "description": "Arguments of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "changes", - "description": "", - "types": "oneOf", - "required": true, - "options": [ - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "module", - "type": "object", - "example": "0x1::aptos_coin", - "description": "Move module id is a string representation of Move module", - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", + { + "name": "coin_amount", "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "resource", - "type": "object", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type).", - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", + "description": "The number of tokens transferred", + "example": "2" + }, + { + "name": "coin_type", "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "state_key_hash", + "description": "The type of tokens transferred", + "example": null + }, + { + "name": "collection_data_id_hash", "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "handle", - "type": "object", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "key", - "type": "object", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "data", - "example": {}, - "description": "Deleted table data", - "type": "object", - "fields": [ - { - "name": "key", - "type": "string", - "example": "", - "description": "Deleted key", - "required": true - }, - { - "name": "key_type", - "type": "string", - "example": "", - "description": "Deleted key type", - "required": true - } - ], - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", + "description": "The identifier of the collection", + "example": "6993fb8b5688d392a2d94127b9926519d6327e69f2bcf3dc0c5df2c060aec97d" + }, + { + "name": "collection_name", "type": "string", - "example": "delete_module", - "description": "" - }, - { - "name": "address", + "description": "The name of the collection", + "example": "Topaz Troopers" + }, + { + "name": "creator_address", "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address." - }, - { - "name": "state_key_hash", + "description": "The address of the creator of the collection", + "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" + }, + { + "name": "event_account_address", "type": "string", - "example": "", - "description": "State key hash" - }, - { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "bytecode", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." - }, - { - "name": "abi", - "example": {}, - "description": "", - "type": "object", - "fields": [ - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "name", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "friends", - "example": [], - "description": "Friends of the module", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "exposed_functions", - "example": [], - "description": "Public functions of the module", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "", - "description": "Name of the function", - "required": true - }, - { - "name": "visibility", - "type": "string", - "example": "private", - "description": "Move function visibility", - "required": true - }, - { - "name": "is_entry", - "type": "boolean", - "example": true, - "description": "Whether the function can be called as an entry function directly in a transaction", - "required": true - }, - { - "name": "generic_type_params", - "example": [], - "description": "Generic type params associated with the Move function", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { - "type": "string" - }, - "required": true - } - ] - }, - "required": true - }, - { - "name": "params", - "example": [], - "description": "Parameters associated with the move function", - "type": "array", - "field": { - "type": "string" - }, - "required": true - }, - { - "name": "return", - "example": "", - "description": "Return type of the function", - "type": "array", - "field": { - "type": "string" - }, - "required": true - } - ] - }, - "required": true - }, - { - "name": "structs", - "example": [], - "description": "Structs of the module", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "", - "description": "Name of the struct", - "required": true - }, - { - "name": "is_native", - "type": "boolean", - "example": true, - "description": "Whether the struct is a native struct of Move", - "required": true - }, - { - "name": "abilities", - "example": [], - "description": "Abilities associated with the struct", - "type": "array", - "field": { - "type": "string" - }, - "required": true - }, - { - "name": "generic_type_params", - "example": [], - "description": "Generic types associated with the struct", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { - "type": "string" - } - } - ] - }, - "required": true - }, - { - "name": "fields", - "example": [], - "description": "Fields associated with the struct", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "sender", - "description": "Name of the field", - "required": true - }, - { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", - "required": true - } - ] - }, - "required": true - } - ] - }, - "required": true - } - ] - } - ] - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", + "description": "The account address of the transfer", + "example": "0xa748de66f1eea7d32399b59027ab0b3786295313e2c3a1608b5d51e759aee6dd" + }, + { + "name": "event_creation_number", "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", + "description": "The creation number of the event", + "example": "2" + }, + { + "name": "event_sequence_number", "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", + "description": "The sequence number of the event", + "example": "2" + }, + { + "name": "from_address", "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type).", - "required": true - }, - { - "name": "data", - "type": "object", - "example": "", - "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", - "required": true - } - ], - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", + "description": "The address sending the transfer", + "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" + }, + { + "name": "name", "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "state_key_hash", + "description": "The name of the token", + "example": "Topaz Troopers 123" + }, + { + "name": "property_version", "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "handle", + "description": "The property version of the token", + "example": "1" + }, + { + "name": "to_address", "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "key", + "description": "The address recieving the transfer", + "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" + }, + { + "name": "token_amount", "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "value", + "description": "The number of tokens transferred", + "example": "2" + }, + { + "name": "token_data_id_hash", "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "key", - "type": "string", - "example": "", - "description": "Key of table in JSON", - "required": true - }, - { - "name": "key_type", - "type": "string", - "example": "", - "description": "Type of key", - "required": true - }, - { - "name": "value", - "type": "string", - "example": "", - "description": "Value of table in JSON", - "required": true - }, - { - "name": "value_type", - "type": "string", - "example": "", - "description": "Type of value", - "required": true - } - ], - "required": true - } - ] - } - ] - }, - { - "name": "events", - "description": "Events emitted during genesis", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "guid", - "example": "", - "description": "", - "type": "object", - "required": true, - "fields": [ - { - "name": "creation_number", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", - "required": true - }, - { - "name": "account_address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.\nThis is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.", - "required": true - } - ] + "description": "The identifier of the token", + "example": "1824178d98256f40046db3db8cf462f1c0a8e0d37304218044f11e69761c88e1" }, { - "name": "sequence_number", - "type": "string", - "example": "32425224034", - "required": true, - "description": "A string containing a 64-bit unsigned integer." + "name": "transaction_timestamp", + "type": "string", + "description": "The timestamp of the transfer returned in milliseconds", + "example": "2022-09-17T22:03:32.000000Z" }, { - "name": "type", - "type": "string", - "example": "0x1::account::Account", - "required": true, - "description": "String representation of an on-chain Move type tag that is exposed in transaction payload." + "name": "transaction_version", + "type": "string", + "description": "The version of the transaction that the transfer is a part of", + "example": "210373856" }, { - "name": "data", - "type": "string", - "example": {}, - "required": true, - "description": "The JSON representation of the event" + "name": "transfer_type", + "type": "string", + "description": "The type of transfer", + "example": "0x3::token::DepositEvent" } - ] - }, - "required": true - } - ] - } + ] + } ] - } - ] - }, - { - "name": "events", - "example": "", + } + }, + { + "status": "400", + "description": "", + "body": { + "type": "object", + "fields": [ + { + "name": "statusCode", + "type": "string", + "description": "The status code", + "example": "400" + }, + { + "name": "message", + "type": "array", + "description": "List of things to correct", + "example": [ + "creator_address must be 66 characters" + ], + "field": { "type": "string" } + }, + { + "name": "error", + "type": "string", + "description": "Type of error", + "example": "Bad Request" + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.nfts.getNFTTransfersByWallets({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.nfts.get_nft_transfers_by_wallets(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getCoinInfoByCoinTypeHashes": { + "apiHost": "https://mainnet-aptos-api.moralis.io", + "testHost": "https://testnet-aptos-api.moralis.io", + "summary": "Get Coins by coin type hash", + "description": "Get one or many Coins by coin type hash.", + "method": "GET", + "path": "/coins", + "pathParams": [], + "queryParams": [ + { + "name": "coin_type_hashes", + "description": "The coin type hashes to fetch info about", "required": true, - "description": "Events generated by the transaction", "type": "array", "field": { - "type": "object", - "fields": [ - { - "name": "guid", - "example": "", - "description": "", - "type": "object", - "required": true, - "fields": [ - { - "name": "creation_number", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", - "required": true - }, - { - "name": "account_address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.\nThis is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.", - "required": true - } - ] - }, - { - "name": "sequence_number", - "type": "string", - "example": "32425224034", - "required": true, - "description": "A string containing a 64-bit unsigned integer." - }, - { - "name": "type", - "type": "string", - "example": "0x1::account::Account", - "required": true, - "description": "String representation of an on-chain Move type tag that is exposed in transaction payload." - }, - { - "name": "data", - "type": "string", - "example": {}, - "required": true, - "description": "The JSON representation of the event" - } - ] + "type": "string", + "example": "91ceb1308a98389691e05158b07ed5f079ab78461a6bb8d5a4054b1bb5cb8bb6" } - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "block_metadata_transaction", - "description": "", - "required": true - }, - { - "name": "version", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "hash", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "", - "required": true - }, - { - "name": "state_change_hash", - "type": "string", - "example": "", + } + ], + "responses": [ + { + "status": "200", "description": "", - "required": true - }, - { - "name": "event_root_hash", - "type": "string", - "example": "", + "body": { + "type": "object", + "fields": [ + { + "name": "coin_type", + "type": "string", + "example": "T0xa911c7236486be921f6cc9227b09afe4a4ad14d291ba1bb8a9b7c4d628759de::gegg::GEGG", + "description": "The definition of the coin structure (identifier)", + "maxLength": 5000, + "minLength": 1, + "nullable": false, + "required": true + }, + { + "name": "coin_type_hash", + "type": "string", + "example": "6993fb8b5688d392a2d94127b9926519d6327e69f2bcf3dc0c5df2c060aec97d", + "description": "The hash of the coin_type (identifier) and a known fixed length", + "maxLength": 64, + "minLength": 64, + "nullable": false, + "required": true + }, + { + "name": "creator_address", + "type": "string", + "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac", + "description": "The address of the creator of the coin", + "maxLength": 66, + "minLength": 66, + "nullable": false, + "required": true + }, + { + "name": "decimals", + "type": "number", + "example": 8, + "description": "The number of decimals of the coin", + "nullable": false, + "required": true + }, + { + "name": "name", + "type": "string", + "example": "GEGG Coin", + "description": "The name of the Coin", + "maxLength": 32, + "minLength": 1, + "nullable": false, + "required": true + }, + { + "name": "supply_aggregator_table_handle", + "type": "string", + "nullable": false, + "example": "0x3::token::TokenStore", + "description": "The data structure of the token", + "required": true + }, + { + "name": "supply_aggregator_table_key", + "type": "string", + "nullable": false, + "example": "0x3::token::TokenStore", + "description": "The data structure of the token", + "required": true + }, + { + "name": "symbol", + "type": "string", + "example": "GEGG", + "description": "The symbol of the coin", + "maxLength": 10, + "minLength": 1, + "nullable": false, + "required": true + }, + { + "name": "transaction_created_timestamp", + "type": "string", + "nullable": false, + "example": "2022-09-17T22:03:32.000000Z", + "description": "The timestamp of the transaction of when the coin was created returned in milliseconds", + "required": true + }, + { + "name": "transaction_version_created", + "type": "string", + "example": "210373856", + "description": "The version of the transaction where the coin was created", + "nullable": false, + "required": true + } + ] + } + }, + { + "status": "400", "description": "", - "required": true - }, - { - "name": "state_checkpoint_hash", - "type": "string", - "example": "", + "body": { + "type": "object", + "fields": [ + { + "name": "statusCode", + "type": "string", + "description": "The status code", + "example": "400" + }, + { + "name": "message", + "type": "array", + "description": "List of things to correct", + "example": [ + "creator_address must be 66 characters" + ], + "field": { "type": "string" } + }, + { + "name": "error", + "type": "string", + "description": "Type of error", + "example": "Bad Request" + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.coins.getCoinInfoByCoinTypeHashes({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.coins.get_coin_info_by_coin_type_hashes(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getLatestCoins": { + "apiHost": "https://mainnet-aptos-api.moralis.io", + "testHost": "https://testnet-aptos-api.moralis.io", + "summary": "Get latest deployed coins", + "description": "Get the latest deployed Coins.", + "method": "GET", + "path": "/coins/latest", + "pathParams": [], + "queryParams": [ + { + "name": "limit", + "description": "The number of results to return", + "required": true, + "type": "number", + "example": 5 + }, + { + "name": "offset", + "description": "The number of results to skip", + "required": false, + "type": "number" + }, + { + "name": "cursor", + "description": "The cursor to use for getting the next page", + "required": false, + "type": "string" + } + ], + "responses": [ + { + "status": "200", "description": "", - "required": true - }, - { - "name": "gas_used", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "success", - "type": "boolean", - "example": true, - "description": "Whether the transaction was successful", - "required": true - }, - { - "name": "vm_status", - "type": "string", - "example": "", - "description": "The VM status of the transaction, can tell useful information in a failure", - "required": true - }, - { - "name": "accumulator_root_hash", - "type": "string", - "example": "", + "body": { + "type": "object", + "fields": [ + { + "name": "cursor", + "type": "string", + "description": "The cursor to use for the next page of results. (Cursor is null on last page)", + "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4" + }, + { + "name": "hasNextPage", + "type": "boolean", + "description": "Indicates if there is a next page of results", + "example": true + }, + { + "name": "result", + "type": "object", + "description": "The coins matching the query", + "example": [], + "fields": [ + { + "name": "coin_type", + "type": "string", + "description": "The definition of the coin structure (identifier)", + "example": "T0xa911c7236486be921f6cc9227b09afe4a4ad14d291ba1bb8a9b7c4d628759de::gegg::GEGG" + }, + { + "name": "coin_type_hash", + "type": "string", + "description": "The hash of the coin_type (identifier) and a known fixed length", + "example": "6993fb8b5688d392a2d94127b9926519d6327e69f2bcf3dc0c5df2c060aec97d" + }, + { + "name": "creator_address", + "type": "string", + "description": "The address of the creator of the coin", + "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" + }, + { + "name": "decimals", + "type": "number", + "description": "The number of decimals of the coin", + "example": 8 + }, + { + "name": "name", + "type": "string", + "description": "The name of the Coin", + "example": "GEGG Coin" + }, + { + "name": "supply_aggregator_table_handle", + "type": "string", + "description": "The data structure of the token", + "example": "0x3::token::TokenStore" + }, + { + "name": "supply_aggregator_table_key", + "type": "string", + "description": "The data structure of the token", + "example": "0x3::token::TokenStore" + }, + { + "name": "symbol", + "type": "string", + "description": "The symbol of the coin", + "example": "GEGG" + }, + { + "name": "transaction_created_timestamp", + "type": "string", + "description": "The timestamp of the transaction of when the coin was created returned in milliseconds", + "example": "2022-09-17T22:03:32.000000Z" + }, + { + "name": "transaction_version_created", + "type": "string", + "description": "The version of the transaction where the coin was created", + "example": "210373856" + } + ] + } + ] + } + }, + { + "status": "400", "description": "", - "required": true - }, - { - "name": "changes", - "type": "array", - "field": { - "type": "oneOf", - "options": [ - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, + "body": { + "type": "object", + "fields": [ { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true + "name": "statusCode", + "type": "string", + "description": "The status code", + "example": "400" }, { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true + "name": "message", + "type": "array", + "description": "List of things to correct", + "example": [ + "creator_address must be 66 characters" + ], + "field": { "type": "string" } }, { - "name": "module", - "type": "object", - "example": "0x1::aptos_coin", - "description": "Move module id is a string representation of Move module", - "required": true + "name": "error", + "type": "string", + "description": "Type of error", + "example": "Bad Request" } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.coins.getLatestCoins({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.coins.get_latest_coins(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getCoinsByNameRange": { + "apiHost": "https://mainnet-aptos-api.moralis.io", + "testHost": "https://testnet-aptos-api.moralis.io", + "summary": "Get Coins by name", + "description": "Get Coins by searching coin name using `from_name` or `to_name`, or combine both to return coins within a range (e.g. all coins `from_name` \"A\" to `to_name` \"D\" will return all coins from A to D). Returns all coins in A-Z order if `from_name` or `to_name` is not specified.", + "method": "GET", + "path": "/coins/names", + "pathParams": [], + "queryParams": [ + { + "name": "limit", + "description": "The number of results to return", + "required": true, + "type": "number", + "example": 5 + }, + { + "name": "offset", + "description": "The number of results to skip", + "required": false, + "type": "number" + }, + { + "name": "cursor", + "description": "The cursor to use for getting the next page", + "required": false, + "type": "string" + }, + { + "name": "from_name", + "description": "The name of the coin to start from (inclusive and case sensitive)", + "required": false, + "type": "string" + }, + { + "name": "to_name", + "description": "The name of the coin to end at (inclusive and case sensitive)", + "required": false, + "type": "string" + } + ], + "responses": [ + { + "status": "200", + "description": "", + "body": { + "type": "object", + "fields": [ { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true + "name": "cursor", + "type": "string", + "description": "The cursor to use for the next page of results. (Cursor is null on last page)", + "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4" }, { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true + "name": "hasNextPage", + "type": "boolean", + "description": "Indicates if there is a next page of results", + "example": true }, { - "name": "resource", - "type": "object", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type).", - "required": true + "name": "result", + "type": "object", + "description": "The coins matching the query", + "example": [], + "fields": [ + { + "name": "coin_type", + "type": "string", + "description": "The definition of the coin structure (identifier)", + "example": "T0xa911c7236486be921f6cc9227b09afe4a4ad14d291ba1bb8a9b7c4d628759de::gegg::GEGG" + }, + { + "name": "coin_type_hash", + "type": "string", + "description": "The hash of the coin_type (identifier) and a known fixed length", + "example": "6993fb8b5688d392a2d94127b9926519d6327e69f2bcf3dc0c5df2c060aec97d" + }, + { + "name": "creator_address", + "type": "string", + "description": "The address of the creator of the coin", + "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" + }, + { + "name": "decimals", + "type": "number", + "description": "The number of decimals of the coin", + "example": 8 + }, + { + "name": "name", + "type": "string", + "description": "The name of the Coin", + "example": "GEGG Coin" + }, + { + "name": "supply_aggregator_table_handle", + "type": "string", + "description": "The data structure of the token", + "example": "0x3::token::TokenStore" + }, + { + "name": "supply_aggregator_table_key", + "type": "string", + "description": "The data structure of the token", + "example": "0x3::token::TokenStore" + }, + { + "name": "symbol", + "type": "string", + "description": "The symbol of the coin", + "example": "GEGG" + }, + { + "name": "transaction_created_timestamp", + "type": "string", + "description": "The timestamp of the transaction of when the coin was created returned in milliseconds", + "example": "2022-09-17T22:03:32.000000Z" + }, + { + "name": "transaction_version_created", + "type": "string", + "description": "The version of the transaction where the coin was created", + "example": "210373856" + } + ] } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, + ] + } + }, + { + "status": "400", + "description": "", + "body": { + "type": "object", + "fields": [ { - "name": "handle", - "type": "object", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true + "name": "statusCode", + "type": "string", + "description": "The status code", + "example": "400" }, { - "name": "key", - "type": "object", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true + "name": "message", + "type": "array", + "description": "List of things to correct", + "example": [ + "creator_address must be 66 characters" + ], + "field": { "type": "string" } }, { - "name": "data", - "example": {}, - "description": "Deleted table data", - "type": "object", - "fields": [ - { - "name": "key", - "type": "string", - "example": "", - "description": "Deleted key", - "required": true - }, - { - "name": "key_type", - "type": "string", - "example": "", - "description": "Deleted key type", - "required": true - } - ], - "required": true + "name": "error", + "type": "string", + "description": "Type of error", + "example": "Bad Request" } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "" - }, + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.coins.getCoinsByNameRange({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.coins.get_coins_by_name_range(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getCoinsBySymbolRange": { + "apiHost": "https://mainnet-aptos-api.moralis.io", + "testHost": "https://testnet-aptos-api.moralis.io", + "summary": "Get Coins by symbol", + "description": "Get Coins by searching coin symbol using `from_symbol` or `to_symbol`, or combine both to return coins within a range (e.g. all coins `from_symbol` \"A\" to `to_symbol` \"D\" will return all coins from A to D). Returns all coins in A-Z order if `from_symbol` or `to_symbol` is not specified.", + "method": "GET", + "path": "/coins/symbols", + "pathParams": [], + "queryParams": [ + { + "name": "limit", + "description": "The number of results to return", + "required": true, + "type": "number", + "example": 5 + }, + { + "name": "offset", + "description": "The number of results to skip", + "required": false, + "type": "number" + }, + { + "name": "cursor", + "description": "The cursor to use for getting the next page", + "required": false, + "type": "string" + }, + { + "name": "from_symbol", + "description": "The name of the coin to start from (inclusive and case sensitive)", + "required": false, + "type": "string" + }, + { + "name": "to_symbol", + "description": "The name of the coin to end at (inclusive and case sensitive)", + "required": false, + "type": "string" + } + ], + "responses": [ + { + "status": "200", + "description": "", + "body": { + "type": "object", + "fields": [ { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address." + "name": "cursor", + "type": "string", + "description": "The cursor to use for the next page of results. (Cursor is null on last page)", + "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4" }, { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash" + "name": "hasNextPage", + "type": "boolean", + "description": "Indicates if there is a next page of results", + "example": true }, { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "bytecode", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." - }, - { - "name": "abi", - "example": {}, - "description": "", - "type": "object", - "fields": [ + "name": "result", + "type": "object", + "description": "The coins matching the query", + "example": [], + "fields": [ { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true + "name": "coin_type", + "type": "string", + "description": "The definition of the coin structure (identifier)", + "example": "T0xa911c7236486be921f6cc9227b09afe4a4ad14d291ba1bb8a9b7c4d628759de::gegg::GEGG" }, { - "name": "name", - "type": "string", - "example": "", - "description": "", - "required": true + "name": "coin_type_hash", + "type": "string", + "description": "The hash of the coin_type (identifier) and a known fixed length", + "example": "6993fb8b5688d392a2d94127b9926519d6327e69f2bcf3dc0c5df2c060aec97d" }, { - "name": "friends", - "example": [], - "description": "Friends of the module", - "type": "array", - "field": { "type": "string" }, - "required": true + "name": "creator_address", + "type": "string", + "description": "The address of the creator of the coin", + "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" }, { - "name": "exposed_functions", - "example": [], - "description": "Public functions of the module", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "", - "description": "Name of the function", - "required": true - }, - { - "name": "visibility", - "type": "string", - "example": "private", - "description": "Move function visibility", - "required": true - }, - { - "name": "is_entry", - "type": "boolean", - "example": true, - "description": "Whether the function can be called as an entry function directly in a transaction", - "required": true - }, - { - "name": "generic_type_params", - "example": [], - "description": "Generic type params associated with the Move function", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] - }, - "required": true - }, - { - "name": "params", - "example": [], - "description": "Parameters associated with the move function", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "return", - "example": "", - "description": "Return type of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] - }, - "required": true + "name": "decimals", + "type": "number", + "description": "The number of decimals of the coin", + "example": 8 }, { - "name": "structs", - "example": [], - "description": "Structs of the module", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "", - "description": "Name of the struct", - "required": true - }, - { - "name": "is_native", - "type": "boolean", - "example": true, - "description": "Whether the struct is a native struct of Move", - "required": true - }, - { - "name": "abilities", - "example": [], - "description": "Abilities associated with the struct", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "generic_type_params", - "example": [], - "description": "Generic types associated with the struct", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { "type": "string" } - } - ] - }, - "required": true - }, - { - "name": "fields", - "example": [], - "description": "Fields associated with the struct", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "sender", - "description": "Name of the field", - "required": true - }, - { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", - "required": true - } - ] - }, - "required": true - } - ] - }, - "required": true + "name": "name", + "type": "string", + "description": "The name of the Coin", + "example": "GEGG Coin" + }, + { + "name": "supply_aggregator_table_handle", + "type": "string", + "description": "The data structure of the token", + "example": "0x3::token::TokenStore" + }, + { + "name": "supply_aggregator_table_key", + "type": "string", + "description": "The data structure of the token", + "example": "0x3::token::TokenStore" + }, + { + "name": "symbol", + "type": "string", + "description": "The symbol of the coin", + "example": "GEGG" + }, + { + "name": "transaction_created_timestamp", + "type": "string", + "description": "The timestamp of the transaction of when the coin was created returned in milliseconds", + "example": "2022-09-17T22:03:32.000000Z" + }, + { + "name": "transaction_version_created", + "type": "string", + "description": "The version of the transaction where the coin was created", + "example": "210373856" } - ] - } - ] + ] } - ] - }, - { - "type": "object", - "fields": [ + ] + } + }, + { + "status": "400", + "description": "", + "body": { + "type": "object", + "fields": [ + { + "name": "statusCode", + "type": "string", + "description": "The status code", + "example": "400" + }, { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true + "name": "message", + "type": "array", + "description": "List of things to correct", + "example": [ + "creator_address must be 66 characters" + ], + "field": { "type": "string" } }, { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true + "name": "error", + "type": "string", + "description": "Type of error", + "example": "Bad Request" + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.coins.getCoinsBySymbolRange({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.coins.get_coins_by_symbol_range(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getCoinsByCreators": { + "apiHost": "https://mainnet-aptos-api.moralis.io", + "testHost": "https://testnet-aptos-api.moralis.io", + "summary": "Get Coins by creator", + "description": "Get Coins created by one or many creator addresses.", + "method": "GET", + "path": "/coins/creators", + "pathParams": [], + "queryParams": [ + { + "name": "limit", + "description": "The number of results to return", + "required": true, + "type": "number", + "example": 5 + }, + { + "name": "offset", + "description": "The number of results to skip", + "required": false, + "type": "number" + }, + { + "name": "cursor", + "description": "The cursor to use for getting the next page", + "required": false, + "type": "string" + }, + { + "name": "creator_addresses", + "description": "The addresses of the creators", + "required": true, + "type": "array", + "field": { "type": "string" } + } + ], + "responses": [ + { + "status": "200", + "description": "", + "body": { + "type": "object", + "fields": [ + { + "name": "cursor", + "type": "string", + "description": "The cursor to use for the next page of results. (Cursor is null on last page)", + "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4" }, { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true + "name": "hasNextPage", + "type": "boolean", + "description": "Indicates if there is a next page of results", + "example": true }, { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type).", - "required": true - }, - { - "name": "data", - "type": "object", - "example": "", - "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", - "required": true - } - ], - "required": true + "name": "result", + "type": "object", + "description": "The coins created by the given creators", + "example": [], + "fields": [ + { + "name": "coin_type", + "type": "string", + "description": "The definition of the coin structure (identifier)", + "example": "T0xa911c7236486be921f6cc9227b09afe4a4ad14d291ba1bb8a9b7c4d628759de::gegg::GEGG" + }, + { + "name": "coin_type_hash", + "type": "string", + "description": "The hash of the coin_type (identifier) and a known fixed length", + "example": "6993fb8b5688d392a2d94127b9926519d6327e69f2bcf3dc0c5df2c060aec97d" + }, + { + "name": "creator_address", + "type": "string", + "description": "The address of the creator of the coin", + "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" + }, + { + "name": "decimals", + "type": "number", + "description": "The number of decimals of the coin", + "example": 8 + }, + { + "name": "name", + "type": "string", + "description": "The name of the Coin", + "example": "GEGG Coin" + }, + { + "name": "supply_aggregator_table_handle", + "type": "string", + "description": "The data structure of the token", + "example": "0x3::token::TokenStore" + }, + { + "name": "supply_aggregator_table_key", + "type": "string", + "description": "The data structure of the token", + "example": "0x3::token::TokenStore" + }, + { + "name": "symbol", + "type": "string", + "description": "The symbol of the coin", + "example": "GEGG" + }, + { + "name": "transaction_created_timestamp", + "type": "string", + "description": "The timestamp of the transaction of when the coin was created returned in milliseconds", + "example": "2022-09-17T22:03:32.000000Z" + }, + { + "name": "transaction_version_created", + "type": "string", + "description": "The version of the transaction where the coin was created", + "example": "210373856" + } + ] } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "handle", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, + ] + } + }, + { + "status": "400", + "description": "", + "body": { + "type": "object", + "fields": [ { - "name": "key", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true + "name": "statusCode", + "type": "string", + "description": "The status code", + "example": "400" }, { - "name": "value", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true + "name": "message", + "type": "array", + "description": "List of things to correct", + "example": [ + "creator_address must be 66 characters" + ], + "field": { "type": "string" } }, { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "key", - "type": "string", - "example": "", - "description": "Key of table in JSON", - "required": true - }, - { - "name": "key_type", - "type": "string", - "example": "", - "description": "Type of key", - "required": true - }, - { - "name": "value", - "type": "string", - "example": "", - "description": "Value of table in JSON", - "required": true - }, - { - "name": "value_type", - "type": "string", - "example": "", - "description": "Type of value", - "required": true - } - ], - "required": true + "name": "error", + "type": "string", + "description": "Type of error", + "example": "Bad Request" } - ] - } - ] - }, - "required": true - }, - { - "name": "id", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "epoch", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "round", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "events", - "example": [], - "description": "he events emitted at the block creation", + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.coins.getCoinsByCreators({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.coins.get_coins_by_creators(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getCoinTransfersByOwnerAddresses": { + "apiHost": "https://mainnet-aptos-api.moralis.io", + "testHost": "https://testnet-aptos-api.moralis.io", + "summary": "Get Coin transfers by wallet(s)", + "description": "", + "method": "GET", + "path": "/coins/transfers/wallets", + "pathParams": [], + "queryParams": [ + { + "name": "limit", + "description": "The number of results to return", + "required": true, + "type": "number", + "example": 5 + }, + { + "name": "offset", + "description": "The number of results to skip", + "required": false, + "type": "number" + }, + { + "name": "cursor", + "description": "The cursor to use for getting the next page", + "required": false, + "type": "string" + }, + { + "name": "owner_addresses", + "description": "The addresses of the owners to get tokens for", + "required": true, "type": "array", "field": { - "type": "object", - "fields": [ - { - "name": "guid", - "example": "", - "description": "", - "type": "object", - "required": true, - "fields": [ - { - "name": "creation_number", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", - "required": true - }, - { - "name": "account_address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.\nThis is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.", - "required": true - } - ] - }, - { - "name": "sequence_number", - "type": "string", - "example": "32425224034", - "required": true, - "description": "A string containing a 64-bit unsigned integer." - }, - { - "name": "type", - "type": "string", - "example": "0x1::account::Account", - "required": true, - "description": "String representation of an on-chain Move type tag that is exposed in transaction payload." - }, - { - "name": "data", - "type": "string", - "example": {}, - "required": true, - "description": "The JSON representation of the event" - } - ] - }, - "required": true - }, - { - "name": "previous_block_votes_bitvec", - "example": "", - "description": "Previous block votes", + "type": "string", + "example": "0x274c398a921b8e2ba345feac3039e1c8b196a7eb1395cdd3584af3a85eb9ec50" + } + }, + { + "name": "from_date", + "description": "The date from which to fetch coin transfers", + "required": false, + "type": "string" + }, + { + "name": "to_date", + "description": "The date to which to fetch coin transfers", + "required": false, + "type": "string" + }, + { + "name": "coin_type_blacklist", + "description": "The coin types of the coins to whitelist", + "required": false, "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "proposer", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account addresss", - "required": true - }, - { - "name": "failed_proposer_indices", - "example": [], - "description": "The indices of the proposers who failed to propose", - "required": true, + "field": { "type": "string" } + }, + { + "name": "coin_type_whitelist", + "description": "The coin types of the coins to whitelist", + "required": false, "type": "array", "field": { "type": "string" } - }, - { - "name": "timestamp", - "type": "string", - "example": "32425224034", - "description": "The timestamp of the block returned in milliseconds", - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "state_checkpoint_transaction", - "description": "", - "required": true - }, - { - "name": "version", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "hash", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "", - "required": true - }, - { - "name": "state_change_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "event_root_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "state_checkpoint_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "gas_used", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "success", - "type": "boolean", - "example": true, - "description": "Whether the transaction was successful", - "required": true - }, - { - "name": "vm_status", - "type": "string", - "example": "", - "description": "The VM status of the transaction, can tell useful information in a failure", - "required": true - }, - { - "name": "accumulator_root_hash", - "type": "string", - "example": "", + } + ], + "responses": [ + { + "status": "200", "description": "", - "required": true - }, - { - "name": "changes", - "type": "array", - "field": { - "type": "oneOf", - "options": [ - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, + "body": { + "type": "object", + "fields": [ { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true + "name": "cursor", + "type": "string", + "description": "The cursor to use for the next page of results. (Cursor is null on last page)", + "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4" }, { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true + "name": "hasNextPage", + "type": "boolean", + "description": "Indicates if there is a next page of results", + "example": true }, { - "name": "module", - "type": "object", - "example": "0x1::aptos_coin", - "description": "Move module id is a string representation of Move module", - "required": true + "name": "result", + "type": "object", + "description": "The coins transfers for the provided owner addresses", + "example": [], + "fields": [ + { + "name": "activity_type", + "type": "string", + "description": "The definition of the coin activity", + "example": "0x1::coin::WithdrawEvent" + }, + { + "name": "amount", + "type": "string", + "description": "The amount being transfered", + "example": "324933484" + }, + { + "name": "block_height", + "type": "string", + "description": "The blockheight that the transfer was included in", + "example": "49661526" + }, + { + "name": "coin_type", + "type": "string", + "description": "The definition of the coin structure (identifier)", + "example": "T0xa911c7236486be921f6cc9227b09afe4a4ad14d291ba1bb8a9b7c4d628759de::gegg::GEGG" + }, + { + "name": "entry_function_id_str", + "type": "string", + "description": "The function that was called to transfer the coin", + "example": "0x563e8382514ccdcc0c0a83469c9262d22d0b052316c1bd67286ba42bb11d0815::AtodexSwapPoolV1::swap_exact_coi" + }, + { + "name": "event_account_address", + "type": "string", + "description": "The address of the event account", + "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" + }, + { + "name": "event_creation_number", + "type": "string", + "description": "The event creation number", + "example": "9" + }, + { + "name": "event_sequence_number", + "type": "string", + "description": "The sequence number of the event", + "example": "59" + }, + { + "name": "is_gas_fee", + "type": "boolean", + "description": "If the transfer was a gas fee or not", + "example": false + }, + { + "name": "is_transaction_success", + "type": "boolean", + "description": "If the transfer was successful or not", + "example": true + }, + { + "name": "owner_address", + "type": "string", + "description": "The address of the owner of the coin", + "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" + }, + { + "name": "transaction_timestamp", + "type": "string", + "description": "The timestamp of the transaction of when the coin was transfered returned in milliseconds", + "example": "2022-09-17T22:03:32.000000Z" + }, + { + "name": "transaction_version", + "type": "string", + "description": "The version of the transaction where the coin was transfered", + "example": "210373856" + } + ] } - ] - }, - { - "type": "object", - "fields": [ + ] + } + }, + { + "status": "400", + "description": "", + "body": { + "type": "object", + "fields": [ { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true + "name": "statusCode", + "type": "string", + "description": "The status code", + "example": "400" + }, + { + "name": "message", + "type": "array", + "description": "List of things to correct", + "example": [ + "creator_address must be 66 characters" + ], + "field": { "type": "string" } }, { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true + "name": "error", + "type": "string", + "description": "Type of error", + "example": "Bad Request" + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.coins.getCoinTransfersByOwnerAddresses({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.coins.get_coin_transfers_by_owner_addresses(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getCoinTransfersByBlockHeights": { + "apiHost": "https://mainnet-aptos-api.moralis.io", + "testHost": "https://testnet-aptos-api.moralis.io", + "summary": "Get Coin transfers by block height(s)", + "description": "Get Coin transfers from one or many block heights.", + "method": "GET", + "path": "/coins/transfers/blocks", + "pathParams": [], + "queryParams": [ + { + "name": "limit", + "description": "The number of results to return", + "required": true, + "type": "number", + "example": 5 + }, + { + "name": "offset", + "description": "The number of results to skip", + "required": false, + "type": "number" + }, + { + "name": "cursor", + "description": "The cursor to use for getting the next page", + "required": false, + "type": "string" + }, + { + "name": "block_heights", + "description": "The coin types to fetch info about", + "required": true, + "type": "array", + "field": { "type": "string" } + } + ], + "responses": [ + { + "status": "200", + "description": "", + "body": { + "type": "object", + "fields": [ + { + "name": "cursor", + "type": "string", + "description": "The cursor to use for the next page of results. (Cursor is null on last page)", + "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4" }, { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true + "name": "hasNextPage", + "type": "boolean", + "description": "Indicates if there is a next page of results", + "example": true }, { - "name": "resource", - "type": "object", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type).", - "required": true + "name": "result", + "type": "object", + "description": "The coins transfers for the provided block heights", + "example": [], + "fields": [ + { + "name": "activity_type", + "type": "string", + "description": "The definition of the coin activity", + "example": "0x1::coin::WithdrawEvent" + }, + { + "name": "amount", + "type": "string", + "description": "The amount being transfered", + "example": "324933484" + }, + { + "name": "block_height", + "type": "string", + "description": "The blockheight that the transfer was included in", + "example": "49661526" + }, + { + "name": "coin_type", + "type": "string", + "description": "The definition of the coin structure (identifier)", + "example": "T0xa911c7236486be921f6cc9227b09afe4a4ad14d291ba1bb8a9b7c4d628759de::gegg::GEGG" + }, + { + "name": "entry_function_id_str", + "type": "string", + "description": "The function that was called to transfer the coin", + "example": "0x563e8382514ccdcc0c0a83469c9262d22d0b052316c1bd67286ba42bb11d0815::AtodexSwapPoolV1::swap_exact_coi" + }, + { + "name": "event_account_address", + "type": "string", + "description": "The address of the event account", + "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" + }, + { + "name": "event_creation_number", + "type": "string", + "description": "The event creation number", + "example": "9" + }, + { + "name": "event_sequence_number", + "type": "string", + "description": "The sequence number of the event", + "example": "59" + }, + { + "name": "is_gas_fee", + "type": "boolean", + "description": "If the transfer was a gas fee or not", + "example": false + }, + { + "name": "is_transaction_success", + "type": "boolean", + "description": "If the transfer was successful or not", + "example": true + }, + { + "name": "owner_address", + "type": "string", + "description": "The address of the owner of the coin", + "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" + }, + { + "name": "transaction_timestamp", + "type": "string", + "description": "The timestamp of the transaction of when the coin was transfered returned in milliseconds", + "example": "2022-09-17T22:03:32.000000Z" + }, + { + "name": "transaction_version", + "type": "string", + "description": "The version of the transaction where the coin was transfered", + "example": "210373856" + } + ] } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, + ] + } + }, + { + "status": "400", + "description": "", + "body": { + "type": "object", + "fields": [ { - "name": "handle", - "type": "object", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true + "name": "statusCode", + "type": "string", + "description": "The status code", + "example": "400" }, { - "name": "key", - "type": "object", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true + "name": "message", + "type": "array", + "description": "List of things to correct", + "example": [ + "creator_address must be 66 characters" + ], + "field": { "type": "string" } }, { - "name": "data", - "example": {}, - "description": "Deleted table data", - "type": "object", - "fields": [ - { - "name": "key", - "type": "string", - "example": "", - "description": "Deleted key", - "required": true - }, - { - "name": "key_type", - "type": "string", - "example": "", - "description": "Deleted key type", - "required": true - } - ], - "required": true + "name": "error", + "type": "string", + "description": "Type of error", + "example": "Bad Request" } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "" - }, + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.coins.getCoinTransfersByBlockHeights({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.coins.get_coin_transfers_by_block_heights(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getCoinTransfersByCoinType": { + "apiHost": "https://mainnet-aptos-api.moralis.io", + "testHost": "https://testnet-aptos-api.moralis.io", + "summary": "Get Coin transfers by coin type", + "description": "Get Coin transfers by a specific coin type e.g. `0x1::aptos_coin::AptosCoin`", + "method": "GET", + "path": "/coins/transfers/:coin_type", + "pathParams": [ + { + "name": "coin_type", + "description": "The coin type to fetch info about", + "required": true, + "type": "string", + "example": "0x1::aptos_coin::AptosCoin" + } + ], + "queryParams": [ + { + "name": "limit", + "description": "The number of results to return", + "required": true, + "type": "number", + "example": 5 + }, + { + "name": "offset", + "description": "The number of results to skip", + "required": false, + "type": "number" + }, + { + "name": "cursor", + "description": "The cursor to use for getting the next page", + "required": false, + "type": "string" + }, + { + "name": "from_date", + "description": "The date from which to fetch coin transfers", + "required": false, + "type": "string" + }, + { + "name": "to_date", + "description": "The date to which to fetch coin transfers", + "required": false, + "type": "string" + } + ], + "responses": [ + { + "status": "200", + "description": "", + "body": { + "type": "object", + "fields": [ { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address." + "name": "cursor", + "type": "string", + "description": "The cursor to use for the next page of results. (Cursor is null on last page)", + "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4" }, { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash" + "name": "hasNextPage", + "type": "boolean", + "description": "Indicates if there is a next page of results", + "example": true }, { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "bytecode", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." - }, - { - "name": "abi", - "example": {}, - "description": "", - "type": "object", - "fields": [ + "name": "result", + "type": "object", + "description": "The coins transfers for the provided coin type", + "example": [], + "fields": [ { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true + "name": "activity_type", + "type": "string", + "description": "The definition of the coin activity", + "example": "0x1::coin::WithdrawEvent" }, { - "name": "name", - "type": "string", - "example": "", - "description": "", - "required": true + "name": "amount", + "type": "string", + "description": "The amount being transfered", + "example": "324933484" }, { - "name": "friends", - "example": [], - "description": "Friends of the module", - "type": "array", - "field": { "type": "string" }, - "required": true + "name": "block_height", + "type": "string", + "description": "The blockheight that the transfer was included in", + "example": "49661526" }, { - "name": "exposed_functions", - "example": [], - "description": "Public functions of the module", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "", - "description": "Name of the function", - "required": true - }, - { - "name": "visibility", - "type": "string", - "example": "private", - "description": "Move function visibility", - "required": true - }, - { - "name": "is_entry", - "type": "boolean", - "example": true, - "description": "Whether the function can be called as an entry function directly in a transaction", - "required": true - }, - { - "name": "generic_type_params", - "example": [], - "description": "Generic type params associated with the Move function", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] - }, - "required": true - }, - { - "name": "params", - "example": [], - "description": "Parameters associated with the move function", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "return", - "example": "", - "description": "Return type of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] - }, - "required": true + "name": "coin_type", + "type": "string", + "description": "The definition of the coin structure (identifier)", + "example": "T0xa911c7236486be921f6cc9227b09afe4a4ad14d291ba1bb8a9b7c4d628759de::gegg::GEGG" }, { - "name": "structs", - "example": [], - "description": "Structs of the module", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "", - "description": "Name of the struct", - "required": true - }, - { - "name": "is_native", - "type": "boolean", - "example": true, - "description": "Whether the struct is a native struct of Move", - "required": true - }, - { - "name": "abilities", - "example": [], - "description": "Abilities associated with the struct", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "generic_type_params", - "example": [], - "description": "Generic types associated with the struct", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { "type": "string" } - } - ] - }, - "required": true - }, - { - "name": "fields", - "example": [], - "description": "Fields associated with the struct", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "sender", - "description": "Name of the field", - "required": true - }, - { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", - "required": true - } - ] - }, - "required": true - } - ] - }, - "required": true + "name": "entry_function_id_str", + "type": "string", + "description": "The function that was called to transfer the coin", + "example": "0x563e8382514ccdcc0c0a83469c9262d22d0b052316c1bd67286ba42bb11d0815::AtodexSwapPoolV1::swap_exact_coi" + }, + { + "name": "event_account_address", + "type": "string", + "description": "The address of the event account", + "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" + }, + { + "name": "event_creation_number", + "type": "string", + "description": "The event creation number", + "example": "9" + }, + { + "name": "event_sequence_number", + "type": "string", + "description": "The sequence number of the event", + "example": "59" + }, + { + "name": "is_gas_fee", + "type": "boolean", + "description": "If the transfer was a gas fee or not", + "example": false + }, + { + "name": "is_transaction_success", + "type": "boolean", + "description": "If the transfer was successful or not", + "example": true + }, + { + "name": "owner_address", + "type": "string", + "description": "The address of the owner of the coin", + "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" + }, + { + "name": "transaction_timestamp", + "type": "string", + "description": "The timestamp of the transaction of when the coin was transfered returned in milliseconds", + "example": "2022-09-17T22:03:32.000000Z" + }, + { + "name": "transaction_version", + "type": "string", + "description": "The version of the transaction where the coin was transfered", + "example": "210373856" } - ] - } - ] + ] } - ] - }, - { - "type": "object", - "fields": [ + ] + } + }, + { + "status": "400", + "description": "", + "body": { + "type": "object", + "fields": [ + { + "name": "statusCode", + "type": "string", + "description": "The status code", + "example": "400" + }, { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true + "name": "message", + "type": "array", + "description": "List of things to correct", + "example": [ + "creator_address must be 66 characters" + ], + "field": { "type": "string" } }, { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true + "name": "error", + "type": "string", + "description": "Type of error", + "example": "Bad Request" + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.coins.getCoinTransfersByCoinType({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.coins.get_coin_transfers_by_coin_type(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getTopHoldersByCoin": { + "apiHost": "https://mainnet-aptos-api.moralis.io", + "summary": "Get Coin top holders", + "description": "Get the top holders of a coin by coin type hash.", + "method": "GET", + "path": "/coins/owners/:coin_type_hash/top-holders", + "pathParams": [ + { + "name": "coin_type_hash", + "description": "The coin type hash to fetch info about", + "required": true, + "type": "string", + "example": "91ceb1308a98389691e05158b07ed5f079ab78461a6bb8d5a4054b1bb5cb8bb6" + } + ], + "queryParams": [ + { + "name": "limit", + "description": "The number of results to return", + "required": true, + "type": "number", + "example": 5 + }, + { + "name": "offset", + "description": "The number of results to skip", + "required": false, + "type": "number" + }, + { + "name": "cursor", + "description": "The cursor to use for getting the next page", + "required": false, + "type": "string" + }, + { + "name": "min_amount", + "description": "The minimum amount of coins required for a wallet to be included in the results", + "required": false, + "type": "number" + }, + { + "name": "min_version", + "description": "The minimum version on when the balance was last updated", + "required": false, + "type": "number" + }, + { + "name": "wallet_blacklist", + "description": "The addresses of the wallets to blacklist", + "required": false, + "type": "array", + "field": { "type": "string" } + }, + { + "name": "wallet_whitelist", + "description": "The addresses of the wallets to whitelist", + "required": false, + "type": "array", + "field": { "type": "string" } + } + ], + "responses": [ + { + "status": "200", + "description": "", + "body": { + "type": "object", + "fields": [ + { + "name": "cursor", + "type": "string", + "description": "The cursor to use for the next page of results. (Cursor is null on last page)", + "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4" }, { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true + "name": "hasNextPage", + "type": "boolean", + "description": "Indicates if there is a next page of results", + "example": true }, { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type).", - "required": true - }, - { - "name": "data", - "type": "object", - "example": "", - "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", - "required": true - } - ], - "required": true + "name": "result", + "type": "object", + "description": "The top holders of the given coin", + "example": [], + "fields": [ + { + "name": "amount", + "type": "string", + "description": "The amount being transfered", + "example": "324933484" + }, + { + "name": "coin_type", + "type": "string", + "description": "The definition of the coin structure (identifier)", + "example": "T0xa911c7236486be921f6cc9227b09afe4a4ad14d291ba1bb8a9b7c4d628759de::gegg::GEGG" + }, + { + "name": "coin_type_hash", + "type": "string", + "description": "The hash of the coin_type (identifier) and a known fixed length", + "example": "6993fb8b5688d392a2d94127b9926519d6327e69f2bcf3dc0c5df2c060aec97d" + }, + { + "name": "last_transaction_timestamp", + "type": "string", + "description": "The timestamp of the last update to the balance returned in milliseconds", + "example": "2022-09-17T22:03:32.000000Z" + }, + { + "name": "last_transaction_version", + "type": "string", + "description": "The version of the transaction where the balance was last s", + "example": "210373856" + }, + { + "name": "owner_address", + "type": "string", + "description": "The address of the owner of the coin", + "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" + } + ] } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "handle", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, + ] + } + }, + { + "status": "400", + "description": "", + "body": { + "type": "object", + "fields": [ { - "name": "key", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true + "name": "statusCode", + "type": "string", + "description": "The status code", + "example": "400" }, { - "name": "value", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true + "name": "message", + "type": "array", + "description": "List of things to correct", + "example": [ + "creator_address must be 66 characters" + ], + "field": { "type": "string" } }, { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "key", - "type": "string", - "example": "", - "description": "Key of table in JSON", - "required": true - }, - { - "name": "key_type", - "type": "string", - "example": "", - "description": "Type of key", - "required": true - }, - { - "name": "value", - "type": "string", - "example": "", - "description": "Value of table in JSON", - "required": true - }, - { - "name": "value_type", - "type": "string", - "example": "", - "description": "Type of value", - "required": true - } - ], - "required": true + "name": "error", + "type": "string", + "description": "Type of error", + "example": "Bad Request" } - ] - } - ] - }, - "required": true - }, - { - "name": "timestamp", - "type": "string", - "example": "32425224034", - "description": "The timestamp of the block returned in milliseconds", - "required": true - } - ] - } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.coins.getTopHoldersByCoin({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.coins.get_top_holders_by_coin(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.transactions.getTransactionByHash({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" }, - { - "language": "python", - "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.transactions.get_transaction_by_hash(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getTransactionByVersion": { - "apiHost": "https://mainnet-aptos-api.moralis.io", - "testHost": "https://testnet-aptos-api.moralis.io", - "summary": "Get transaction by version", - "description": "Get transaction by transaction version.", - "method": "GET", - "path": "/transactions/by_version/:txn_version", - "pathParams": [ - { - "name": "txn_version", - "description": "Version of transaction to retrieve", - "required": true, - "type": "string" - } - ], - "queryParams": [], - "responses": [ - { - "status": "200", - "description": "", - "body": { - "type": "oneOf", - "options": [ - { - "type": "object", - "fields": [ - { - "name": "hash", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "getCoinBalancesByWallets": { + "apiHost": "https://mainnet-aptos-api.moralis.io", + "testHost": "https://testnet-aptos-api.moralis.io", + "summary": "Get Coin balances by wallet(s)", + "description": "Get Coin balances for one or many wallet addresses.", + "method": "GET", + "path": "/wallets/coins", + "pathParams": [], + "queryParams": [ + { + "name": "limit", + "description": "The number of results to return", + "required": true, + "type": "number", + "example": 5 + }, + { + "name": "offset", + "description": "The number of results to skip", + "required": false, + "type": "number" + }, + { + "name": "cursor", + "description": "The cursor to use for getting the next page", + "required": false, + "type": "string" + }, + { + "name": "owner_addresses", + "description": "The addresses of the owners to get coin balances for", + "required": true, + "type": "array", + "field": { + "type": "string", + "example": "0x274c398a921b8e2ba345feac3039e1c8b196a7eb1395cdd3584af3a85eb9ec50" + } + }, + { + "name": "coin_type_hash_blacklist", + "description": "The coin type hashes of the coins to whitelist", + "required": false, + "type": "array", + "field": { "type": "string" } + }, + { + "name": "coin_type_hash_whitelist", + "description": "The coin type hashes of the coins to whitelist", + "required": false, + "type": "array", + "field": { "type": "string" } + } + ], + "responses": [ + { + "status": "200", "description": "", - "required": true - }, - { - "name": "sender", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "sequence_number", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "max_gas_amount", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "gas_unit_price", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "expiration_timestamp_secs", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer returned in milliseconds.", - "required": true - }, - { - "name": "payload", - "type": "oneOf", - "options": [ - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "function", - "type": "string", - "description": "Entry function id is string representation of a entry function defined on-chain.", - "required": true - }, - { - "name": "type_arguments", - "description": "Type arguments of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "arguments", - "description": "Arguments of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "Type of payload", - "required": true - }, - { - "name": "code", - "type": "object", - "description": "Move script bytecode", - "required": true - }, - { - "name": "type_arguments", - "description": "Type arguments of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "arguments", - "description": "Arguments of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "modules", - "description": "", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] - } - ], - "required": true - }, - { - "name": "signature", - "type": "oneOf", - "options": [ - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "signature", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", - "required": true - }, - { - "name": "public_key", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "public_keys", - "description": "The public keys for the Ed25519 signature", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "signatures", - "description": "Signature associated with the public keys in the same order", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "threshold", - "type": "number", - "description": "The number of signatures required for a successful transaction", - "required": true - }, - { - "name": "bitmap", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - } - ] - }, - { + "body": { "type": "object", "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "sender", - "type": "oneOf", - "options": [ - { - "type": "object", - "description": "A single Ed25519 signature", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "signature", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", - "required": true - }, - { - "name": "public_key", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - } - ] - }, - { - "type": "object", - "description": "A Ed25519 multi-sig signature", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "public_keys", - "description": "The public keys for the Ed25519 signature", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "signatures", - "description": "Signature associated with the public keys in the same order", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "threshold", - "type": "number", - "description": "The number of signatures required for a successful transaction", - "required": true - }, - { - "name": "bitmap", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - } - ] - } - ], - "required": true - }, - { - "name": "secondary_signer_addresses", - "description": "The other involved parties addresses", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "secondary_signers", - "type": "oneOf", - "options": [ - { - "type": "object", - "description": "A single Ed25519 signature", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "signature", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", - "required": true - }, - { - "name": "public_key", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - } - ] - }, - { - "type": "object", - "description": "A Ed25519 multi-sig signature", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "public_keys", - "description": "The public keys for the Ed25519 signature", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "signatures", - "description": "Signature associated with the public keys in the same order", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "threshold", - "type": "number", - "description": "The number of signatures required for a successful transaction", - "required": true - }, - { - "name": "bitmap", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - } - ] - } - ], - "required": true - } - ] - } - ], - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "", - "description": "user_transaction", - "required": true - }, - { - "name": "version", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "hash", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "", - "required": true - }, - { - "name": "state_change_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "event_root_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "state_checkpoint_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "gas_used", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "success", - "type": "boolean", - "example": true, - "description": "Whether the transaction was successful", - "required": true - }, - { - "name": "vm_status", - "type": "string", - "example": "", - "description": "The VM status of the transaction, can tell useful information in a failure", - "required": true - }, - { - "name": "accumulator_root_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "changes", - "type": "array", - "required": true, - "field": { - "type": "oneOf", - "options": [ - { - "type": "object", - "fields": [ { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true + "name": "cursor", + "type": "string", + "description": "The cursor to use for the next page of results. (Cursor is null on last page)", + "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4" + }, + { + "name": "hasNextPage", + "type": "boolean", + "description": "Indicates if there is a next page of results", + "example": true }, { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true + "name": "result", + "type": "object", + "description": "The coins balances for the provided wallets", + "example": [], + "fields": [ + { + "name": "amount", + "type": "string", + "description": "The amount being transfered", + "example": "324933484" + }, + { + "name": "coin_type", + "type": "string", + "description": "The definition of the coin structure (identifier)", + "example": "T0xa911c7236486be921f6cc9227b09afe4a4ad14d291ba1bb8a9b7c4d628759de::gegg::GEGG" + }, + { + "name": "coin_type_hash", + "type": "string", + "description": "The hash of the coin_type (identifier) and a known fixed length", + "example": "6993fb8b5688d392a2d94127b9926519d6327e69f2bcf3dc0c5df2c060aec97d" + }, + { + "name": "last_transaction_timestamp", + "type": "string", + "description": "The timestamp of the last update to the balance returned in milliseconds", + "example": "2022-09-17T22:03:32.000000Z" + }, + { + "name": "last_transaction_version", + "type": "string", + "description": "The version of the transaction where the balance was last s", + "example": "210373856" + }, + { + "name": "owner_address", + "type": "string", + "description": "The address of the owner of the coin", + "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" + } + ] + } + ] + } + }, + { + "status": "400", + "description": "", + "body": { + "type": "object", + "fields": [ + { + "name": "statusCode", + "type": "string", + "description": "The status code", + "example": "400" }, { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true + "name": "message", + "type": "array", + "description": "List of things to correct", + "example": [ + "creator_address must be 66 characters" + ], + "field": { "type": "string" } }, { - "name": "module", - "type": "object", - "example": "0x1::aptos_coin", - "description": "Move module id is a string representation of Move module", - "required": true + "name": "error", + "type": "string", + "description": "Type of error", + "example": "Bad Request" } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.wallets.getCoinBalancesByWallets({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.wallets.get_coin_balances_by_wallets(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getHistoricalCoinBalancesByWallets": { + "apiHost": "https://mainnet-aptos-api.moralis.io", + "testHost": "https://testnet-aptos-api.moralis.io", + "summary": "Get historical Coin balances by wallet(s)", + "description": "Get historical Coin balances for one or many wallet addresses. Filter by coin type hashes to retrieve specific balances.", + "method": "GET", + "path": "/wallets/coins/history", + "pathParams": [], + "queryParams": [ + { + "name": "limit", + "description": "The number of results to return", + "required": true, + "type": "number", + "example": 5 + }, + { + "name": "offset", + "description": "The number of results to skip", + "required": false, + "type": "number" + }, + { + "name": "cursor", + "description": "The cursor to use for getting the next page", + "required": false, + "type": "string" + }, + { + "name": "owner_addresses", + "description": "The addresses of the owner addresses to get historical balances for", + "required": true, + "type": "array", + "field": { + "type": "string", + "example": "0x274c398a921b8e2ba345feac3039e1c8b196a7eb1395cdd3584af3a85eb9ec50" + } + }, + { + "name": "coin_type_hash_blacklist", + "description": "The coin type hash of the coins to whitelist", + "required": false, + "type": "array", + "field": { "type": "string" } + }, + { + "name": "coin_type_hash_whitelist", + "description": "The coin type hash of the coins to whitelist", + "required": false, + "type": "array", + "field": { "type": "string" } + } + ], + "responses": [ + { + "status": "200", + "description": "", + "body": { + "type": "object", + "fields": [ { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true + "name": "cursor", + "type": "string", + "description": "The cursor to use for the next page of results. (Cursor is null on last page)", + "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4" }, { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true + "name": "hasNextPage", + "type": "boolean", + "description": "Indicates if there is a next page of results", + "example": true }, { - "name": "resource", - "type": "object", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type).", - "required": true + "name": "result", + "type": "object", + "description": "The coins balances for the provided wallets", + "example": [], + "fields": [ + { + "name": "amount", + "type": "string", + "description": "The amount being transfered", + "example": "324933484" + }, + { + "name": "coin_type", + "type": "string", + "description": "The definition of the coin structure (identifier)", + "example": "T0xa911c7236486be921f6cc9227b09afe4a4ad14d291ba1bb8a9b7c4d628759de::gegg::GEGG" + }, + { + "name": "coin_type_hash", + "type": "string", + "description": "The hash of the coin_type (identifier) and a known fixed length", + "example": "6993fb8b5688d392a2d94127b9926519d6327e69f2bcf3dc0c5df2c060aec97d" + }, + { + "name": "transaction_timestamp", + "type": "string", + "description": "The timestamp of the updated balance returned in milliseconds", + "example": "2022-09-17T22:03:32.000000Z" + }, + { + "name": "transaction_version", + "type": "string", + "description": "The version of the transaction where the balacne was updated", + "example": "210373856" + }, + { + "name": "owner_address", + "type": "string", + "description": "The address of the owner of the coin", + "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" + } + ] } - ] - }, - { - "type": "object", - "fields": [ + ] + } + }, + { + "status": "400", + "description": "", + "body": { + "type": "object", + "fields": [ { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true + "name": "statusCode", + "type": "string", + "description": "The status code", + "example": "400" }, { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true + "name": "message", + "type": "array", + "description": "List of things to correct", + "example": [ + "creator_address must be 66 characters" + ], + "field": { "type": "string" } }, { - "name": "handle", - "type": "object", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true + "name": "error", + "type": "string", + "description": "Type of error", + "example": "Bad Request" + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.wallets.getHistoricalCoinBalancesByWallets({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.wallets.get_historical_coin_balances_by_wallets(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getCoinTransfersByWalletAddresses": { + "apiHost": "https://mainnet-aptos-api.moralis.io", + "testHost": "https://testnet-aptos-api.moralis.io", + "summary": "Get Coin transfers by wallet(s)", + "description": "", + "method": "GET", + "path": "/wallets/coins/transfers", + "pathParams": [], + "queryParams": [ + { + "name": "limit", + "description": "The number of results to return", + "required": true, + "type": "number", + "example": 5 + }, + { + "name": "offset", + "description": "The number of results to skip", + "required": false, + "type": "number" + }, + { + "name": "cursor", + "description": "The cursor to use for getting the next page", + "required": false, + "type": "string" + }, + { + "name": "owner_addresses", + "description": "The addresses of the owners to get tokens for", + "required": true, + "type": "array", + "field": { "type": "string" } + }, + { + "name": "from_date", + "description": "The date from which to fetch coin transfers", + "required": false, + "type": "string" + }, + { + "name": "to_date", + "description": "The date to which to fetch coin transfers", + "required": false, + "type": "string" + }, + { + "name": "coin_type_blacklist", + "description": "The coin types of the coins to whitelist", + "required": false, + "type": "array", + "field": { "type": "string" } + }, + { + "name": "coin_type_whitelist", + "description": "The coin types of the coins to whitelist", + "required": false, + "type": "array", + "field": { "type": "string" } + } + ], + "responses": [ + { + "status": "200", + "description": "", + "body": { + "type": "object", + "fields": [ + { + "name": "cursor", + "type": "string", + "description": "The cursor to use for the next page of results. (Cursor is null on last page)", + "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4" }, { - "name": "key", - "type": "object", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true + "name": "hasNextPage", + "type": "boolean", + "description": "Indicates if there is a next page of results", + "example": true }, { - "name": "data", - "example": {}, - "description": "Deleted table data", - "type": "object", - "fields": [ - { - "name": "key", - "type": "string", - "example": "", - "description": "Deleted key", - "required": true - }, - { - "name": "key_type", - "type": "string", - "example": "", - "description": "Deleted key type", - "required": true - } - ], - "required": true + "name": "result", + "type": "object", + "description": "The coins transfers for the provided owner addresses", + "example": [], + "fields": [ + { + "name": "activity_type", + "type": "string", + "description": "The definition of the coin activity", + "example": "0x1::coin::WithdrawEvent" + }, + { + "name": "amount", + "type": "string", + "description": "The amount being transfered", + "example": "324933484" + }, + { + "name": "block_height", + "type": "string", + "description": "The blockheight that the transfer was included in", + "example": "49661526" + }, + { + "name": "coin_type", + "type": "string", + "description": "The definition of the coin structure (identifier)", + "example": "T0xa911c7236486be921f6cc9227b09afe4a4ad14d291ba1bb8a9b7c4d628759de::gegg::GEGG" + }, + { + "name": "entry_function_id_str", + "type": "string", + "description": "The function that was called to transfer the coin", + "example": "0x563e8382514ccdcc0c0a83469c9262d22d0b052316c1bd67286ba42bb11d0815::AtodexSwapPoolV1::swap_exact_coi" + }, + { + "name": "event_account_address", + "type": "string", + "description": "The address of the event account", + "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" + }, + { + "name": "event_creation_number", + "type": "string", + "description": "The event creation number", + "example": "9" + }, + { + "name": "event_sequence_number", + "type": "string", + "description": "The sequence number of the event", + "example": "59" + }, + { + "name": "is_gas_fee", + "type": "boolean", + "description": "If the transfer was a gas fee or not", + "example": false + }, + { + "name": "is_transaction_success", + "type": "boolean", + "description": "If the transfer was successful or not", + "example": true + }, + { + "name": "owner_address", + "type": "string", + "description": "The address of the owner of the coin", + "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" + }, + { + "name": "transaction_timestamp", + "type": "string", + "description": "The timestamp of the transaction of when the coin was transfered returned in milliseconds", + "example": "2022-09-17T22:03:32.000000Z" + }, + { + "name": "transaction_version", + "type": "string", + "description": "The version of the transaction where the coin was transfered", + "example": "210373856" + } + ] } - ] - }, - { - "type": "object", - "fields": [ + ] + } + }, + { + "status": "400", + "description": "", + "body": { + "type": "object", + "fields": [ + { + "name": "statusCode", + "type": "string", + "description": "The status code", + "example": "400" + }, { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "" + "name": "message", + "type": "array", + "description": "List of things to correct", + "example": [ + "creator_address must be 66 characters" + ], + "field": { "type": "string" } }, { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address." + "name": "error", + "type": "string", + "description": "Type of error", + "example": "Bad Request" + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.wallets.getCoinTransfersByWalletAddresses({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.wallets.get_coin_transfers_by_wallet_addresses(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getNFTByOwners": { + "apiHost": "https://mainnet-aptos-api.moralis.io", + "testHost": "https://testnet-aptos-api.moralis.io", + "summary": "Get NFTs by wallet(s)", + "description": "Get NFTs belonging to one or many wallets.", + "method": "GET", + "path": "/wallets/nfts", + "pathParams": [], + "queryParams": [ + { + "name": "limit", + "description": "The number of results to return", + "required": true, + "type": "number", + "example": 5 + }, + { + "name": "offset", + "description": "The number of results to skip", + "required": false, + "type": "number" + }, + { + "name": "cursor", + "description": "The cursor to use for getting the next page", + "required": false, + "type": "string" + }, + { + "name": "owner_addresses", + "description": "The addresses of the owners to get tokens for", + "required": true, + "type": "array", + "field": { + "type": "string", + "example": "0x274c398a921b8e2ba345feac3039e1c8b196a7eb1395cdd3584af3a85eb9ec50" + } + }, + { + "name": "collection_blacklist", + "description": "The collection data id hashes of the collections to whitelist", + "required": false, + "type": "array", + "field": { "type": "string" } + }, + { + "name": "collection_whitelist", + "description": "The collection data id hashes of the collections to whitelist", + "required": false, + "type": "array", + "field": { "type": "string" } + } + ], + "responses": [ + { + "status": "200", + "description": "", + "body": { + "type": "object", + "fields": [ + { + "name": "cursor", + "type": "string", + "description": "The cursor to use for the next page of results. (Cursor is null on last page)", + "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4" }, { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash" + "name": "hasNextPage", + "type": "boolean", + "description": "Indicates if there is a next page of results", + "example": true }, { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "bytecode", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." - }, - { - "name": "abi", - "example": {}, - "description": "", - "type": "object", - "fields": [ + "name": "result", + "type": "object", + "description": "The tokens for the given owners", + "example": [], + "fields": [ { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true + "name": "amount", + "type": "string", + "description": "The number of tokens that belonging to the owner", + "example": "2" }, { - "name": "name", - "type": "string", - "example": "", - "description": "", - "required": true + "name": "collection_data_id_hash", + "type": "string", + "description": "The identifier of the collection", + "example": "6993fb8b5688d392a2d94127b9926519d6327e69f2bcf3dc0c5df2c060aec97d" }, { - "name": "friends", - "example": [], - "description": "Friends of the module", - "type": "array", - "field": { "type": "string" }, - "required": true + "name": "collection_name", + "type": "string", + "description": "The name of the collection", + "example": "Topaz Troopers" }, { - "name": "exposed_functions", - "example": [], - "description": "Public functions of the module", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "", - "description": "Name of the function", - "required": true - }, - { - "name": "visibility", - "type": "string", - "example": "private", - "description": "Move function visibility", - "required": true - }, - { - "name": "is_entry", - "type": "boolean", - "example": true, - "description": "Whether the function can be called as an entry function directly in a transaction", - "required": true - }, - { - "name": "generic_type_params", - "example": [], - "description": "Generic type params associated with the Move function", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] - }, - "required": true - }, - { - "name": "params", - "example": [], - "description": "Parameters associated with the move function", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "return", - "example": "", - "description": "Return type of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] - }, - "required": true + "name": "creator_address", + "type": "string", + "description": "The address of the creator of the collection", + "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" }, { - "name": "structs", - "example": [], - "description": "Structs of the module", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "", - "description": "Name of the struct", - "required": true - }, - { - "name": "is_native", - "type": "boolean", - "example": true, - "description": "Whether the struct is a native struct of Move", - "required": true - }, - { - "name": "abilities", - "example": [], - "description": "Abilities associated with the struct", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "generic_type_params", - "example": [], - "description": "Generic types associated with the struct", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { "type": "string" } - } - ] - }, - "required": true - }, - { - "name": "fields", - "example": [], - "description": "Fields associated with the struct", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "sender", - "description": "Name of the field", - "required": true - }, - { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", - "required": true - } - ] - }, - "required": true - } - ] - }, - "required": true + "name": "last_transaction_timestamp", + "type": "string", + "description": "The timestamp of the last transaction returned in milliseconds", + "example": "2022-09-17T22:03:32.000000Z" + }, + { + "name": "last_transaction_version", + "type": "string", + "description": "The version of the last transaction", + "example": "210373856" + }, + { + "name": "name", + "type": "string", + "description": "The name of the token", + "example": "Topaz Troopers 123" + }, + { + "name": "owner_address", + "type": "string", + "description": "The address of the owner of the token", + "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" + }, + { + "name": "property_version", + "type": "string", + "description": "The property version of the token", + "example": "1" + }, + { + "name": "table_type", + "type": "string", + "description": "The data structure of the token", + "example": "0x3::token::TokenStore" + }, + { + "name": "token_data_id_hash", + "type": "string", + "description": "The identifier of the token", + "example": "1824178d98256f40046db3db8cf462f1c0a8e0d37304218044f11e69761c88e1" + }, + { + "name": "token_properties", + "type": "json", + "description": "The properties of the token", + "example": "{\"point\": \"0x30\", \"author\": \"0x33454e4a4f59204c616273\"}" } - ] - } - ] + ] } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, + ] + } + }, + { + "status": "400", + "description": "", + "body": { + "type": "object", + "fields": [ { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true + "name": "statusCode", + "type": "string", + "description": "The status code", + "example": "400" }, { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true + "name": "message", + "type": "array", + "description": "List of things to correct", + "example": [ + "creator_address must be 66 characters" + ], + "field": { "type": "string" } }, { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type).", - "required": true - }, - { - "name": "data", - "type": "object", - "example": "", - "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", - "required": true - } - ], - "required": true + "name": "error", + "type": "string", + "description": "Type of error", + "example": "Bad Request" } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "handle", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.wallets.getNFTByOwners({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.wallets.get_nft_by_owners(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getWalletsNFTTransfers": { + "apiHost": "https://mainnet-aptos-api.moralis.io", + "testHost": "https://testnet-aptos-api.moralis.io", + "summary": "Get NFT transfers by wallet(s)", + "description": "Get NFT transfers from one or many wallet addresses.", + "method": "GET", + "path": "/wallets/nfts/transfers", + "pathParams": [], + "queryParams": [ + { + "name": "limit", + "description": "The number of tokens to return", + "required": true, + "type": "number", + "example": 5 + }, + { + "name": "offset", + "description": "The number of results to skip", + "required": false, + "type": "number" + }, + { + "name": "cursor", + "description": "The cursor to use for getting the next page", + "required": false, + "type": "string" + }, + { + "name": "wallet_addresses", + "description": "The addresses of the wallets to get transfers for", + "required": true, + "type": "array", + "field": { + "type": "string", + "example": "0x274c398a921b8e2ba345feac3039e1c8b196a7eb1395cdd3584af3a85eb9ec50" + } + }, + { + "name": "collection_blacklist", + "description": "The ids of the collections to whitelist", + "required": false, + "type": "array", + "field": { "type": "string" } + }, + { + "name": "collection_whitelist", + "description": "The ids of the collections to whitelist", + "required": false, + "type": "array", + "field": { "type": "string" } + } + ], + "responses": [ + { + "status": "200", + "description": "", + "body": { + "type": "object", + "fields": [ { - "name": "key", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true + "name": "cursor", + "type": "string", + "description": "The cursor to use for the next page of results. (Cursor is null on last page)", + "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4" }, { - "name": "value", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true + "name": "hasNextPage", + "type": "boolean", + "description": "Indicates if there is a next page of results", + "example": true }, { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "key", - "type": "string", - "example": "", - "description": "Key of table in JSON", - "required": true - }, - { - "name": "key_type", - "type": "string", - "example": "", - "description": "Type of key", - "required": true - }, - { - "name": "value", - "type": "string", - "example": "", - "description": "Value of table in JSON", - "required": true - }, - { - "name": "value_type", - "type": "string", - "example": "", - "description": "Type of value", - "required": true - } - ], - "required": true + "name": "result", + "type": "object", + "description": "The collections for the given creators", + "example": [], + "fields": [ + { + "name": "coin_amount", + "type": "string", + "description": "The number of tokens transferred", + "example": "2" + }, + { + "name": "coin_type", + "type": "string", + "description": "The type of tokens transferred", + "example": null + }, + { + "name": "collection_data_id_hash", + "type": "string", + "description": "The identifier of the collection", + "example": "6993fb8b5688d392a2d94127b9926519d6327e69f2bcf3dc0c5df2c060aec97d" + }, + { + "name": "collection_name", + "type": "string", + "description": "The name of the collection", + "example": "Topaz Troopers" + }, + { + "name": "creator_address", + "type": "string", + "description": "The address of the creator of the collection", + "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" + }, + { + "name": "event_account_address", + "type": "string", + "description": "The account address of the transfer", + "example": "0xa748de66f1eea7d32399b59027ab0b3786295313e2c3a1608b5d51e759aee6dd" + }, + { + "name": "event_creation_number", + "type": "string", + "description": "The creation number of the event", + "example": "2" + }, + { + "name": "event_sequence_number", + "type": "string", + "description": "The sequence number of the event", + "example": "2" + }, + { + "name": "from_address", + "type": "string", + "description": "The address sending the transfer", + "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" + }, + { + "name": "name", + "type": "string", + "description": "The name of the token", + "example": "Topaz Troopers 123" + }, + { + "name": "property_version", + "type": "string", + "description": "The property version of the token", + "example": "1" + }, + { + "name": "to_address", + "type": "string", + "description": "The address recieving the transfer", + "example": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac" + }, + { + "name": "token_amount", + "type": "string", + "description": "The number of tokens transferred", + "example": "2" + }, + { + "name": "token_data_id_hash", + "type": "string", + "description": "The identifier of the token", + "example": "1824178d98256f40046db3db8cf462f1c0a8e0d37304218044f11e69761c88e1" + }, + { + "name": "transaction_timestamp", + "type": "string", + "description": "The timestamp of the transfer returned in milliseconds", + "example": "2022-09-17T22:03:32.000000Z" + }, + { + "name": "transaction_version", + "type": "string", + "description": "The version of the transaction that the transfer is a part of", + "example": "210373856" + }, + { + "name": "transfer_type", + "type": "string", + "description": "The type of transfer", + "example": "0x3::token::DepositEvent" + } + ] } - ] - } - ] - } - }, - { - "name": "sender", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "sequence_number", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "max_gas_amount", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "gas_unit_price", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "expiration_timestamp_secs", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "payload", - "type": "oneOf", - "required": true, - "options": [ - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "function", - "type": "string", - "description": "Entry function id is string representation of a entry function defined on-chain.", - "required": true - }, - { - "name": "type_arguments", - "description": "Type arguments of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "arguments", - "description": "Arguments of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "Type of payload", - "required": true - }, - { - "name": "code", - "type": "object", - "description": "Move script bytecode", - "required": true - }, - { - "name": "type_arguments", - "description": "Type arguments of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "arguments", - "description": "Arguments of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - } ] - }, - { + } + }, + { + "status": "400", + "description": "", + "body": { "type": "object", "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "modules", - "description": "", - "type": "array", - "field": { "type": "string" }, - "required": true - } + { + "name": "statusCode", + "type": "string", + "description": "The status code", + "example": "400" + }, + { + "name": "message", + "type": "array", + "description": "List of things to correct", + "example": [ + "creator_address must be 66 characters" + ], + "field": { "type": "string" } + }, + { + "name": "error", + "type": "string", + "description": "Type of error", + "example": "Bad Request" + } ] - } - ] - }, - { - "name": "signature", - "type": "oneOf", + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.wallets.getWalletsNFTTransfers({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.wallets.get_wallets_nft_transfers(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getAccount": { + "apiHost": "https://mainnet-aptos-api.moralis.io", + "testHost": "https://testnet-aptos-api.moralis.io", + "summary": "Get account", + "description": "Get account information for a given address.", + "method": "GET", + "path": "/accounts/:address", + "pathParams": [ + { + "name": "address", + "description": "Address of account with or without a 0x prefix", "required": true, - "options": [ - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "signature", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", - "required": true - }, - { - "name": "public_key", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - } - ] - }, - { + "type": "string" + } + ], + "queryParams": [ + { + "name": "ledger_version", + "description": "Ledger version to get state of account.\nIf not provided, it will be the latest version", + "required": false, + "type": "string" + } + ], + "responses": [ + { + "status": "200", + "description": "", + "body": { "type": "object", "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "public_keys", - "description": "The public keys for the Ed25519 signature", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "signatures", - "description": "Signature associated with the public keys in the same order", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "threshold", - "type": "number", - "description": "The number of signatures required for a successful transaction", - "required": true - }, - { - "name": "bitmap", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - } + { + "name": "sequence_number", + "type": "string", + "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", + "example": "32425224034" + }, + { + "name": "authentication_key", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.\nUnlike the Address type, HexEncodedBytes will not trim any zeros.", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1" + } ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "sender", - "type": "oneOf", - "options": [ - { - "type": "object", - "description": "A single Ed25519 signature", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "signature", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", - "required": true - }, - { - "name": "public_key", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - } - ] - }, - { - "type": "object", - "description": "A Ed25519 multi-sig signature", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "public_keys", - "description": "The public keys for the Ed25519 signature", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "signatures", - "description": "Signature associated with the public keys in the same order", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "threshold", - "type": "number", - "description": "The number of signatures required for a successful transaction", - "required": true - }, - { - "name": "bitmap", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - } - ] - } - ], - "required": true - }, - { - "name": "secondary_signer_addresses", - "description": "The other involved parties addresses", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "secondary_signers", - "type": "oneOf", - "options": [ - { - "type": "object", - "description": "A single Ed25519 signature", - "fields": [ - { + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.accounts.getAccount({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.accounts.get_account(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getAccountResources": { + "apiHost": "https://mainnet-aptos-api.moralis.io", + "testHost": "https://testnet-aptos-api.moralis.io", + "summary": "Get account resources", + "description": "Get account resources for a given address.", + "method": "GET", + "path": "/accounts/:address/resources", + "pathParams": [ + { + "name": "address", + "description": "Address of account with or without a 0x prefix", + "required": true, + "type": "string" + } + ], + "queryParams": [ + { + "name": "ledger_version", + "description": "Ledger version to get state of account.\nIf not provided, it will be the latest version", + "required": false, + "type": "string" + }, + { + "name": "limit", + "description": "Max number of account resources to retrieve.\nIf not provided, defaults to default page size.", + "required": false, + "type": "number", + "example": 5 + }, + { + "name": "start", + "description": "Cursor specifying where to start for pagination\nThis cursor cannot be derived manually client-side. Instead, you must call this endpoint once without this query parameter specified, and then use the cursor returned in the X-Aptos-Cursor header in the response.", + "required": false, + "type": "string" + } + ], + "responses": [ + { + "status": "200", + "description": "", + "body": { + "type": "array", + "field": { + "type": "object", + "example": { + "type": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "data": { + "authentication_key": "0x0000000000000000000000000000000000000000000000000000000000000001", + "coin_register_events": { + "counter": "0", + "guid": { + "id": { + "addr": "0x1", + "creation_num": "0" + } + } + }, + "self_address": "0x1", + "sequence_number": "0" + } + }, + "fields": [ + { "name": "type", "type": "string", - "description": "", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type). This exists so you can specify MoveStructTags as path / query parameters", "required": true - }, - { - "name": "signature", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", + }, + { + "name": "data", + "type": "json", + "example": { + "authentication_key": "0x0000000000000000000000000000000000000000000000000000000000000001", + "coin_register_events": { + "counter": "0", + "guid": { + "id": { + "addr": "0x1", + "creation_num": "0" + } + } + }, + "self_address": "0x1", + "sequence_number": "0" + }, + "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", "required": true - }, - { - "name": "public_key", + } + ] + } + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.accounts.getAccountResources({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.accounts.get_account_resources(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getAccountModules": { + "apiHost": "https://mainnet-aptos-api.moralis.io", + "testHost": "https://testnet-aptos-api.moralis.io", + "summary": "Get account modules", + "description": "Get account modules for a given address.", + "method": "GET", + "path": "/accounts/:address/modules", + "pathParams": [ + { + "name": "address", + "description": "Address of account with or without a 0x prefix", + "required": true, + "type": "string" + } + ], + "queryParams": [ + { + "name": "ledger_version", + "description": "Ledger version to get state of account.\nIf not provided, it will be the latest version", + "required": false, + "type": "string" + }, + { + "name": "limit", + "description": "Max number of account resources to retrieve.\nIf not provided, defaults to default page size.", + "required": false, + "type": "number", + "example": 5 + }, + { + "name": "start", + "description": "Cursor specifying where to start for pagination\nThis cursor cannot be derived manually client-side. Instead, you must call this endpoint once without this query parameter specified, and then use the cursor returned in the X-Aptos-Cursor header in the response.", + "required": false, + "type": "string" + } + ], + "responses": [ + { + "status": "200", + "description": "", + "body": { + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "bytecode", "type": "string", "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", "required": true - } - ] - }, - { - "type": "object", - "description": "A Ed25519 multi-sig signature", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "public_keys", - "description": "The public keys for the Ed25519 signature", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "signatures", - "description": "Signature associated with the public keys in the same order", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "threshold", - "type": "number", - "description": "The number of signatures required for a successful transaction", - "required": true - }, - { - "name": "bitmap", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + }, + { + "name": "abi", + "example": { + "address": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 ", + "name": "string", + "friends": ["0x1::aptos_coin"], + "exposed_functions": [ + { + "name": "string", + "visibility": "private", + "is_entry": true, + "generic_type_params": [ + { + "constraints": [ + "string" + ] + } + ], + "params": ["string"], + "return": ["string"] + } + ], + "structs": [ + { + "name": "string", + "is_native": true, + "abilities": ["string"], + "generic_type_params": [ + { + "constraints": [ + "string" + ] + } + ], + "fields": [ + { + "name": "string", + "type": "string" + } + ] + } + ] + }, + "description": "A Move module", + "type": "object", + "fields": [ + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "name", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "friends", + "example": [], + "description": "Friends of the module", + "type": "array", + "field": { "type": "string" }, + "required": true + }, + { + "name": "exposed_functions", + "example": [], + "description": "Public functions of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the function", + "required": true + }, + { + "name": "visibility", + "type": "string", + "example": "private", + "description": "Move function visibility", + "required": true + }, + { + "name": "is_entry", + "type": "boolean", + "example": true, + "description": "Whether the function can be called as an entry function directly in a transaction", + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic type params associated with the Move function", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "params", + "example": [], + "description": "Parameters associated with the move function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "return", + "example": "", + "description": "Return type of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "structs", + "example": [], + "description": "Structs of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the struct", + "required": true + }, + { + "name": "is_native", + "type": "boolean", + "example": true, + "description": "Whether the struct is a native struct of Move", + "required": true + }, + { + "name": "abilities", + "example": [], + "description": "Abilities associated with the struct", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic types associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "fields", + "example": [], + "description": "Fields associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "sender", + "description": "Name of the field", + "required": true + }, + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", + "required": true + } + ] + }, + "required": true + } + ] + }, + "required": true + } + ], "required": true - } - ] - } - ], - "required": true - } - ] - } - ] - }, - { - "name": "events", - "example": "", - "description": "Events generated by the transaction", - "type": "array", - "required": true, - "field": { - "type": "object", - "fields": [ - { - "name": "guid", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "creation_number", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", - "required": true - }, - { - "name": "account_address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.\nThis is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.", - "required": true - } - ] - }, - { - "name": "sequence_number", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer." - }, - { - "name": "type", - "type": "string", - "example": "0x1::account::Account", - "description": "String representation of an on-chain Move type tag that is exposed in transaction payload." - }, - { - "name": "data", - "type": "string", - "example": {}, - "description": "The JSON representation of the event" + } + ] } - ], - "required": ["guid", "sequence_number", "type", "data"] } - }, - { - "name": "timestamp", - "type": "string", - "example": "32425224034", + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.accounts.getAccountModules({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.accounts.get_account_modules(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getAccountResource": { + "apiHost": "https://mainnet-aptos-api.moralis.io", + "testHost": "https://testnet-aptos-api.moralis.io", + "summary": "Get account resource", + "description": "Get a specific account resource type for a given address.", + "method": "GET", + "path": "/accounts/:address/resource/:resource_type", + "pathParams": [ + { + "name": "address", + "description": "Address of account with or without a 0x prefix", "required": true, - "description": "The timestamp of the block returned in milliseconds" - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "genesis_transaction", - "description": "", - "required": true - }, - { - "name": "version", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "hash", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "", - "required": true - }, - { - "name": "state_change_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "event_root_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "state_checkpoint_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "gas_used", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "success", - "type": "boolean", - "example": true, - "description": "Whether the transaction was successful", - "required": true - }, - { - "name": "vm_status", - "type": "string", - "example": "", - "description": "The VM status of the transaction, can tell useful information in a failure", - "required": true - }, - { - "name": "accumulator_root_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "changes", - "type": "array", + "type": "string" + }, + { + "name": "resource_type", + "description": "Name of struct to retrieve e.g. 0x1::account::Account", "required": true, - "field": { - "type": "oneOf", - "options": [ - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "module", - "type": "object", - "example": "0x1::aptos_coin", - "description": "Move module id is a string representation of Move module", - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "resource", - "type": "object", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type).", - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "handle", - "type": "object", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, + "type": "string" + } + ], + "queryParams": [ + { + "name": "ledger_version", + "description": "Ledger version to get state of account.\nIf not provided, it will be the latest version", + "required": false, + "type": "string" + } + ], + "responses": [ + { + "status": "200", + "description": "", + "body": { + "type": "object", + "fields": [ { - "name": "key", - "type": "object", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true + "name": "type", + "type": "string", + "description": "String representation of a MoveStructTag (on-chain Move struct type). This exists so you can specify MoveStructTags as path / query parameters", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>" }, { - "name": "data", - "example": {}, - "description": "Deleted table data", - "type": "object", - "fields": [ - { - "name": "key", - "type": "string", - "example": "", - "description": "Deleted key", - "required": true - }, - { - "name": "key_type", - "type": "string", - "example": "", - "description": "Deleted key type", - "required": true + "name": "data", + "type": "json", + "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", + "example": { + "authentication_key": "0x0000000000000000000000000000000000000000000000000000000000000001", + "coin_register_events": { + "counter": "0", + "guid": { + "id": { + "addr": "0x1", + "creation_num": "0" + } + } + }, + "self_address": "0x1", + "sequence_number": "0" } - ], - "required": true } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "" - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address." - }, + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.accounts.getAccountResource({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.accounts.get_account_resource(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getAccountModule": { + "apiHost": "https://mainnet-aptos-api.moralis.io", + "testHost": "https://testnet-aptos-api.moralis.io", + "summary": "Get account module", + "description": "Get a specific account module for a given address.", + "method": "GET", + "path": "/accounts/:address/resource/:module_name", + "pathParams": [ + { + "name": "address", + "description": "Address of account with or without a 0x prefix", + "required": true, + "type": "string" + }, + { + "name": "module_name", + "description": "Name of module to retrieve", + "required": true, + "type": "string" + } + ], + "queryParams": [ + { + "name": "ledger_version", + "description": "Ledger version to get state of account.\nIf not provided, it will be the latest version", + "required": false, + "type": "string" + } + ], + "responses": [ + { + "status": "200", + "description": "", + "body": { + "type": "object", + "fields": [ { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash" + "name": "bytecode", + "type": "string", + "description": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "example": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." }, { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ + "name": "abi", + "description": "A Move module", + "example": { + "address": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 ", + "name": "string", + "friends": ["0x1::aptos_coin"], + "exposed_functions": [ + { + "name": "string", + "visibility": "private", + "is_entry": true, + "generic_type_params": [ + { "constraints": ["string"] } + ], + "params": ["string"], + "return": ["string"] + } + ], + "structs": [ + { + "name": "string", + "is_native": true, + "abilities": ["string"], + "generic_type_params": [ + { "constraints": ["string"] } + ], + "fields": [ + { + "name": "string", + "type": "string" + } + ] + } + ] + } + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.accounts.getAccountModule({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.accounts.get_account_module(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getEventsByCreationNumber": { + "apiHost": "https://mainnet-aptos-api.moralis.io", + "testHost": "https://testnet-aptos-api.moralis.io", + "summary": "Get events by creation number", + "description": "Get events by creation number for a given address.", + "method": "GET", + "path": "/accounts/:address/events/:creation_number", + "pathParams": [ + { + "name": "address", + "description": "Address of account with or without a 0x prefix", + "required": true, + "type": "string" + }, + { + "name": "creation_number", + "description": "Creation number corresponding to the event stream originating from the given account.", + "required": true, + "type": "string" + } + ], + "queryParams": [ + { + "name": "limit", + "description": "Max number of account resources to retrieve.\nIf not provided, defaults to default page size.", + "required": false, + "type": "number", + "example": 5 + }, + { + "name": "start", + "description": "Starting sequence number of events.\nIf unspecified, by default will retrieve the most recent events", + "required": false, + "type": "string" + } + ], + "responses": [ + { + "status": "200", + "description": "", + "body": { + "type": "array", + "field": { + "type": "object", + "fields": [ { - "name": "bytecode", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." + "name": "version", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", + "required": true }, { - "name": "abi", - "example": {}, - "description": "", - "type": "object", - "fields": [ - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "name", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "friends", - "example": [], - "description": "Friends of the module", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "exposed_functions", - "example": [], - "description": "Public functions of the module", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", + "name": "guid", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "creation_number", "type": "string", - "example": "", - "description": "Name of the function", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", "required": true - }, - { - "name": "visibility", + }, + { + "name": "account_address", "type": "string", - "example": "private", - "description": "Move function visibility", - "required": true - }, - { - "name": "is_entry", - "type": "boolean", - "example": true, - "description": "Whether the function can be called as an entry function directly in a transaction", - "required": true - }, - { - "name": "generic_type_params", - "example": [], - "description": "Generic type params associated with the Move function", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] - }, - "required": true - }, - { - "name": "params", - "example": [], - "description": "Parameters associated with the move function", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "return", - "example": "", - "description": "Return type of the function", - "type": "array", - "field": { "type": "string" }, + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.\nThis is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.", "required": true - } - ] - }, - "required": true - }, - { - "name": "structs", - "example": [], - "description": "Structs of the module", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", + } + ], + "required": true + }, + { + "name": "sequence_number", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", + "required": true + }, + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", + "required": true + }, + { + "name": "data", + "type": "object", + "example": {}, + "description": "The JSON representation of the event", + "required": true + } + ] + } + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.accounts.getEventsByCreationNumber({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.accounts.get_events_by_creation_number(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getEventsByEventHandle": { + "apiHost": "https://mainnet-aptos-api.moralis.io", + "testHost": "https://testnet-aptos-api.moralis.io", + "summary": "Get events by event handle", + "description": "Get events by event handle for a given address.", + "method": "GET", + "path": "/accounts/:address/events/:event_handle/:field_name", + "pathParams": [ + { + "name": "address", + "description": "Hex-encoded 32 byte Aptos account, with or without a 0x prefix, for which events are queried. This refers to the account that events were emitted to, not the account hosting the move module that emits that event type.", + "required": true, + "type": "string" + }, + { + "name": "event_handle", + "description": "Name of struct to lookup event handle.", + "required": true, + "type": "string" + }, + { + "name": "field_name", + "description": "Name of field to lookup event handle.", + "required": true, + "type": "string" + } + ], + "queryParams": [ + { + "name": "limit", + "description": "Max number of account resources to retrieve.\nIf not provided, defaults to default page size.", + "required": false, + "type": "number", + "example": 5 + }, + { + "name": "start", + "description": "Starting sequence number of events.\nIf unspecified, by default will retrieve the most recent events", + "required": false, + "type": "string" + } + ], + "responses": [ + { + "status": "200", + "description": "", + "body": { + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "version", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", + "required": true + }, + { + "name": "guid", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "creation_number", "type": "string", - "example": "", - "description": "Name of the struct", - "required": true - }, - { - "name": "is_native", - "type": "boolean", - "example": true, - "description": "Whether the struct is a native struct of Move", - "required": true - }, - { - "name": "abilities", - "example": [], - "description": "Abilities associated with the struct", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "generic_type_params", - "example": [], - "description": "Generic types associated with the struct", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { "type": "string" } - } - ] - }, + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", "required": true - }, - { - "name": "fields", - "example": [], - "description": "Fields associated with the struct", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "sender", - "description": "Name of the field", - "required": true - }, - { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", - "required": true - } - ] - }, + }, + { + "name": "account_address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.\nThis is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.", "required": true - } - ] - }, - "required": true - } - ] + } + ], + "required": true + }, + { + "name": "sequence_number", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", + "required": true + }, + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", + "required": true + }, + { + "name": "data", + "type": "object", + "example": {}, + "description": "The JSON representation of the event", + "required": true } - ] - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, + ] + } + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.accounts.getEventsByEventHandle({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.accounts.get_events_by_event_handle(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getTransactions": { + "apiHost": "https://mainnet-aptos-api.moralis.io", + "testHost": "https://testnet-aptos-api.moralis.io", + "summary": "Get transactions", + "description": "Get latest transactions or from a specific account sequence number.", + "method": "GET", + "path": "/transactions", + "pathParams": [], + "queryParams": [ + { + "name": "limit", + "description": "Max number of transactions to retrieve.\nIf not provided, defaults to default page size", + "required": false, + "type": "number" + }, + { + "name": "start", + "description": "Account sequence number to start list of transactions.\nIf not provided, defaults to showing the latest transactions", + "required": false, + "type": "string" + } + ], + "responses": [{ "status": "200", "description": "" }], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.transactions.getTransactions({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.transactions.get_transactions(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "submitTransaction": { + "apiHost": "https://mainnet-aptos-api.moralis.io", + "testHost": "https://testnet-aptos-api.moralis.io", + "summary": "Submit transaction", + "description": "Submit a transaction to the Aptos Network.", + "method": "POST", + "path": "/transactions", + "pathParams": [], + "queryParams": [], + "bodyParam": { + "required": true, + "type": "object", + "fields": [ + { + "name": "sender", + "type": "string", + "description": "A hex encoded 32 byte Aptos account address." + }, + { + "name": "sequence_number", + "type": "string", + "description": "A string containing a 64-bit unsigned integer." + }, + { + "name": "max_gas_amount", + "type": "string", + "description": "A string containing a 64-bit unsigned integer." + }, + { + "name": "gas_unit_price", + "type": "string", + "description": "A string containing a 64-bit unsigned integer." + }, + { + "name": "expiration_timestamp_secs", + "type": "string", + "description": "A string containing a 64-bit unsigned integer returned in milliseconds." + }, + { + "name": "payload", + "type": "json", + "description": "An enum of the possible transaction payloads" + }, + { "name": "signature", "description": "", "type": "json" } + ] + }, + "responses": [ + { + "status": "200", + "description": "", + "body": { + "type": "object", + "fields": [ { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true + "name": "hash", + "type": "string", + "description": "", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1" }, { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type).", - "required": true - }, - { - "name": "data", - "type": "object", - "example": "", - "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", - "required": true - } - ], - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true + "name": "sender", + "type": "string", + "description": "A hex encoded 32 byte Aptos account address.", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1" }, { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true + "name": "sequence_number", + "type": "string", + "description": "A string containing a 64-bit unsigned integer.", + "example": "32425224034" }, { - "name": "handle", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true + "name": "max_gas_amount", + "type": "string", + "description": "A string containing a 64-bit unsigned integer.", + "example": "32425224034" }, { - "name": "key", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true + "name": "gas_unit_price", + "type": "string", + "description": "A string containing a 64-bit unsigned integer.", + "example": "32425224034" }, { - "name": "value", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true + "name": "expiration_timestamp_secs", + "type": "string", + "description": "A string containing a 64-bit unsigned integer returned in milliseconds.", + "example": "32425224034" }, - { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "key", - "type": "string", - "example": "", - "description": "Key of table in JSON", - "required": true - }, - { - "name": "key_type", - "type": "string", - "example": "", - "description": "Type of key", - "required": true - }, - { - "name": "value", - "type": "string", - "example": "", - "description": "Value of table in JSON", - "required": true - }, - { - "name": "value_type", - "type": "string", - "example": "", - "description": "Type of value", - "required": true - } - ], - "required": true - } - ] - } - ] + { "name": "payload" }, + { "name": "signature" } + ] } - }, - { - "name": "payload", + }, + { "status": "201", "description": "" } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.transactions.submitTransaction({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nbody = []\n\nresult = aptos_api.transactions.submit_transaction(\n api_key=api_key,\n body=body,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getTransactionByHash": { + "apiHost": "https://mainnet-aptos-api.moralis.io", + "testHost": "https://testnet-aptos-api.moralis.io", + "summary": "Get transaction by hash", + "description": "Get transaction by transaction hash.", + "method": "GET", + "path": "/transactions/by_hash/:txn_hash", + "pathParams": [ + { + "name": "txn_hash", + "description": "Hash of transaction to retrieve", "required": true, - "description": "A writeset payload, used only for genesis", - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "write_set", - "description": "The associated writeset with a payload", - "required": true, + "type": "string" + } + ], + "queryParams": [], + "responses": [ + { + "status": "200", + "description": "", + "body": { "type": "oneOf", "options": [ - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "execute_as", - "type": "string", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "script", - "description": "Payload which runs a script that can run multiple functions", - "required": true, + { + "type": "object", + "fields": [ + { + "name": "hash", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "", + "required": true + }, + { + "name": "sender", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "sequence_number", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, + { + "name": "max_gas_amount", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, + { + "name": "gas_unit_price", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, + { + "name": "expiration_timestamp_secs", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer returned in milliseconds.", + "required": true + }, + { + "name": "payload", + "type": "oneOf", + "options": [ + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "function", + "type": "string", + "description": "Entry function id is string representation of a entry function defined on-chain.", + "required": true + }, + { + "name": "type_arguments", + "description": "Type arguments of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "arguments", + "description": "Arguments of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "Type of payload", + "required": true + }, + { + "name": "code", + "type": "object", + "description": "Move script bytecode", + "required": true + }, + { + "name": "type_arguments", + "description": "Type arguments of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "arguments", + "description": "Arguments of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "modules", + "description": "", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + } + ], + "required": true + }, + { + "name": "signature", + "type": "oneOf", + "options": [ + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "signature", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", + "required": true + }, + { + "name": "public_key", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "public_keys", + "description": "The public keys for the Ed25519 signature", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "signatures", + "description": "Signature associated with the public keys in the same order", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "threshold", + "type": "number", + "description": "The number of signatures required for a successful transaction", + "required": true + }, + { + "name": "bitmap", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "sender", + "type": "oneOf", + "options": [ + { + "type": "object", + "description": "A single Ed25519 signature", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "signature", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", + "required": true + }, + { + "name": "public_key", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + }, + { + "type": "object", + "description": "A Ed25519 multi-sig signature", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "public_keys", + "description": "The public keys for the Ed25519 signature", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "signatures", + "description": "Signature associated with the public keys in the same order", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "threshold", + "type": "number", + "description": "The number of signatures required for a successful transaction", + "required": true + }, + { + "name": "bitmap", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + } + ], + "required": true + }, + { + "name": "secondary_signer_addresses", + "description": "The other involved parties addresses", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "secondary_signers", + "type": "oneOf", + "options": [ + { + "type": "object", + "description": "A single Ed25519 signature", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "signature", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", + "required": true + }, + { + "name": "public_key", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + }, + { + "type": "object", + "description": "A Ed25519 multi-sig signature", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "public_keys", + "description": "The public keys for the Ed25519 signature", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "signatures", + "description": "Signature associated with the public keys in the same order", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "threshold", + "type": "number", + "description": "The number of signatures required for a successful transaction", + "required": true + }, + { + "name": "bitmap", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + } + ], + "required": true + } + ] + } + ], + "required": true + } + ] + }, + { "type": "object", "fields": [ - { - "name": "type", - "type": "string", - "description": "Type of payload", - "required": true - }, - { - "name": "code", - "type": "object", - "description": "Move script bytecode", - "required": true - }, - { - "name": "type_arguments", - "description": "Type arguments of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "arguments", - "description": "Arguments of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "changes", - "description": "", - "types": "oneOf", - "required": true, - "options": [ - { - "type": "object", - "fields": [ - { + { "name": "type", "type": "string", - "example": "delete_module", - "description": "", + "example": "", + "description": "user_transaction", "required": true - }, - { - "name": "address", + }, + { + "name": "version", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, + { + "name": "hash", "type": "string", "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", + "description": "", "required": true - }, - { - "name": "state_key_hash", + }, + { + "name": "state_change_hash", "type": "string", "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "module", - "type": "object", - "example": "0x1::aptos_coin", - "description": "Move module id is a string representation of Move module", + "description": "", "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", + }, + { + "name": "event_root_hash", "type": "string", - "example": "delete_module", + "example": "", "description": "", "required": true - }, - { - "name": "address", + }, + { + "name": "state_checkpoint_hash", "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", + "example": "", + "description": "", "required": true - }, - { - "name": "state_key_hash", + }, + { + "name": "gas_used", "type": "string", - "example": "", - "description": "State key hash", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", "required": true - }, - { - "name": "resource", - "type": "object", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type).", + }, + { + "name": "success", + "type": "boolean", + "example": true, + "description": "Whether the transaction was successful", "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", + }, + { + "name": "vm_status", "type": "string", - "example": "delete_module", - "description": "", + "example": "", + "description": "The VM status of the transaction, can tell useful information in a failure", "required": true - }, - { - "name": "state_key_hash", + }, + { + "name": "accumulator_root_hash", "type": "string", "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "handle", - "type": "object", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "description": "", "required": true - }, - { - "name": "key", - "type": "object", + }, + { + "name": "changes", + "type": "array", + "required": true, + "field": { + "type": "oneOf", + "options": [ + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "module", + "type": "object", + "example": "0x1::aptos_coin", + "description": "Move module id is a string representation of Move module", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "resource", + "type": "object", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "handle", + "type": "object", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "key", + "type": "object", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "data", + "example": {}, + "description": "Deleted table data", + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "example": "", + "description": "Deleted key", + "required": true + }, + { + "name": "key_type", + "type": "string", + "example": "", + "description": "Deleted key type", + "required": true + } + ], + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "" + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address." + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash" + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "bytecode", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." + }, + { + "name": "abi", + "example": {}, + "description": "", + "type": "object", + "fields": [ + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "name", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "friends", + "example": [], + "description": "Friends of the module", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "exposed_functions", + "example": [], + "description": "Public functions of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the function", + "required": true + }, + { + "name": "visibility", + "type": "string", + "example": "private", + "description": "Move function visibility", + "required": true + }, + { + "name": "is_entry", + "type": "boolean", + "example": true, + "description": "Whether the function can be called as an entry function directly in a transaction", + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic type params associated with the Move function", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "params", + "example": [], + "description": "Parameters associated with the move function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "return", + "example": "", + "description": "Return type of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "structs", + "example": [], + "description": "Structs of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the struct", + "required": true + }, + { + "name": "is_native", + "type": "boolean", + "example": true, + "description": "Whether the struct is a native struct of Move", + "required": true + }, + { + "name": "abilities", + "example": [], + "description": "Abilities associated with the struct", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic types associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + } + } + ] + }, + "required": true + }, + { + "name": "fields", + "example": [], + "description": "Fields associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "sender", + "description": "Name of the field", + "required": true + }, + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", + "required": true + } + ] + }, + "required": true + } + ] + }, + "required": true + } + ] + } + ] + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "required": true + }, + { + "name": "data", + "type": "object", + "example": "", + "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", + "required": true + } + ], + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "handle", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "key", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "value", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "example": "", + "description": "Key of table in JSON", + "required": true + }, + { + "name": "key_type", + "type": "string", + "example": "", + "description": "Type of key", + "required": true + }, + { + "name": "value", + "type": "string", + "example": "", + "description": "Value of table in JSON", + "required": true + }, + { + "name": "value_type", + "type": "string", + "example": "", + "description": "Type of value", + "required": true + } + ], + "required": true + } + ] + } + ] + } + }, + { + "name": "sender", + "type": "string", "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "description": "A hex encoded 32 byte Aptos account address.", "required": true - }, - { - "name": "data", - "example": {}, - "description": "Deleted table data", - "type": "object", - "fields": [ - { - "name": "key", - "type": "string", - "example": "", - "description": "Deleted key", - "required": true - }, - { - "name": "key_type", - "type": "string", - "example": "", - "description": "Deleted key type", - "required": true - } - ], + }, + { + "name": "sequence_number", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", + }, + { + "name": "max_gas_amount", "type": "string", - "example": "delete_module", - "description": "" - }, - { - "name": "address", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, + { + "name": "gas_unit_price", "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address." - }, - { - "name": "state_key_hash", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, + { + "name": "expiration_timestamp_secs", "type": "string", - "example": "", - "description": "State key hash" - }, - { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "bytecode", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." - }, - { - "name": "abi", - "example": {}, - "description": "", - "type": "object", - "fields": [ - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "name", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "friends", - "example": [], - "description": "Friends of the module", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "exposed_functions", - "example": [], - "description": "Public functions of the module", - "type": "array", - "field": { - "type": "object", - "fields": [ + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer returned in milliseconds.", + "required": true + }, + { + "name": "payload", + "type": "oneOf", + "required": true, + "options": [ + { + "type": "object", + "fields": [ { - "name": "name", - "type": "string", - "example": "", - "description": "Name of the function", - "required": true + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "function", + "type": "string", + "description": "Entry function id is string representation of a entry function defined on-chain.", + "required": true }, { - "name": "visibility", - "type": "string", - "example": "private", - "description": "Move function visibility", - "required": true + "name": "type_arguments", + "description": "Type arguments of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true }, { - "name": "is_entry", - "type": "boolean", - "example": true, - "description": "Whether the function can be called as an entry function directly in a transaction", - "required": true + "name": "arguments", + "description": "Arguments of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "Type of payload", + "required": true }, { - "name": "generic_type_params", - "example": [], - "description": "Generic type params associated with the Move function", - "type": "array", - "field": { + "name": "code", "type": "object", - "fields": [ - { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { - "type": "string" - }, - "required": true - } - ] - }, - "required": true + "description": "Move script bytecode", + "required": true }, { - "name": "params", - "example": [], - "description": "Parameters associated with the move function", - "type": "array", - "field": { - "type": "string" - }, - "required": true + "name": "type_arguments", + "description": "Type arguments of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true }, { - "name": "return", - "example": "", - "description": "Return type of the function", - "type": "array", - "field": { - "type": "string" - }, - "required": true + "name": "arguments", + "description": "Arguments of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true } - ] - }, - "required": true - }, - { - "name": "structs", - "example": [], - "description": "Structs of the module", - "type": "array", - "field": { - "type": "object", - "fields": [ + ] + }, + { + "type": "object", + "fields": [ { - "name": "name", - "type": "string", - "example": "", - "description": "Name of the struct", - "required": true + "name": "type", + "type": "string", + "description": "", + "required": true }, { - "name": "is_native", - "type": "boolean", - "example": true, - "description": "Whether the struct is a native struct of Move", - "required": true + "name": "modules", + "description": "", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + } + ] + }, + { + "name": "signature", + "type": "oneOf", + "required": true, + "options": [ + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true }, { - "name": "abilities", - "example": [], - "description": "Abilities associated with the struct", - "type": "array", - "field": { - "type": "string" - }, - "required": true + "name": "signature", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", + "required": true }, { - "name": "generic_type_params", - "example": [], - "description": "Generic types associated with the struct", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { - "type": "string" + "name": "public_key", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "public_keys", + "description": "The public keys for the Ed25519 signature", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "signatures", + "description": "Signature associated with the public keys in the same order", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "threshold", + "type": "number", + "description": "The number of signatures required for a successful transaction", + "required": true + }, + { + "name": "bitmap", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "sender", + "type": "oneOf", + "options": [ + { + "type": "object", + "description": "A single Ed25519 signature", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "signature", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", + "required": true + }, + { + "name": "public_key", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + }, + { + "type": "object", + "description": "A Ed25519 multi-sig signature", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "public_keys", + "description": "The public keys for the Ed25519 signature", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "signatures", + "description": "Signature associated with the public keys in the same order", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "threshold", + "type": "number", + "description": "The number of signatures required for a successful transaction", + "required": true + }, + { + "name": "bitmap", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] } - } - ] - }, - "required": true + ], + "required": true }, { - "name": "fields", - "example": [], - "description": "Fields associated with the struct", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", + "name": "secondary_signer_addresses", + "description": "The other involved parties addresses", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "secondary_signers", + "type": "oneOf", + "options": [ + { + "type": "object", + "description": "A single Ed25519 signature", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "signature", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", + "required": true + }, + { + "name": "public_key", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + }, + { + "type": "object", + "description": "A Ed25519 multi-sig signature", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "public_keys", + "description": "The public keys for the Ed25519 signature", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "signatures", + "description": "Signature associated with the public keys in the same order", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "threshold", + "type": "number", + "description": "The number of signatures required for a successful transaction", + "required": true + }, + { + "name": "bitmap", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + } + ], + "required": true + } + ] + } + ] + }, + { + "name": "events", + "example": "", + "description": "Events generated by the transaction", + "type": "array", + "required": true, + "field": { + "type": "object", + "fields": [ + { + "name": "guid", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "creation_number", "type": "string", - "example": "sender", - "description": "Name of the field", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", "required": true - }, - { - "name": "type", + }, + { + "name": "account_address", "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.\nThis is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.", "required": true - } - ] - }, - "required": true - } - ] + } + ] }, - "required": true - } + { + "name": "sequence_number", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer." + }, + { + "name": "type", + "type": "string", + "example": "0x1::account::Account", + "description": "String representation of an on-chain Move type tag that is exposed in transaction payload." + }, + { + "name": "data", + "type": "string", + "example": {}, + "description": "The JSON representation of the event" + } + ], + "required": [ + "guid", + "sequence_number", + "type", + "data" ] - } - ] - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", + } + }, + { + "name": "timestamp", "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type).", - "required": true - }, - { - "name": "data", - "type": "object", - "example": "", - "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", - "required": true - } - ], - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { + "example": "32425224034", + "required": true, + "description": "The timestamp of the block returned in milliseconds" + } + ] + }, + { + "type": "object", + "fields": [ + { "name": "type", "type": "string", - "example": "delete_module", + "example": "genesis_transaction", "description": "", "required": true - }, - { - "name": "state_key_hash", + }, + { + "name": "version", "type": "string", - "example": "", - "description": "State key hash", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", "required": true - }, - { - "name": "handle", + }, + { + "name": "hash", "type": "string", "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "description": "", "required": true - }, - { - "name": "key", + }, + { + "name": "state_change_hash", "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "example": "", + "description": "", "required": true - }, - { - "name": "value", + }, + { + "name": "event_root_hash", "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "data", "example": "", "description": "", - "type": "object", - "fields": [ - { - "name": "key", - "type": "string", - "example": "", - "description": "Key of table in JSON", - "required": true - }, - { - "name": "key_type", - "type": "string", - "example": "", - "description": "Type of key", - "required": true - }, - { - "name": "value", - "type": "string", - "example": "", - "description": "Value of table in JSON", - "required": true - }, - { - "name": "value_type", - "type": "string", - "example": "", - "description": "Type of value", - "required": true - } - ], "required": true - } - ] - } - ] - }, - { - "name": "events", - "description": "Events emitted during genesis", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "guid", - "example": "", - "description": "", - "type": "object", - "required": true, - "fields": [ - { - "name": "creation_number", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", - "required": true - }, - { - "name": "account_address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.\nThis is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.", - "required": true - } - ] }, { - "name": "sequence_number", - "type": "string", - "example": "32425224034", - "required": true, - "description": "A string containing a 64-bit unsigned integer." + "name": "state_checkpoint_hash", + "type": "string", + "example": "", + "description": "", + "required": true }, { - "name": "type", - "type": "string", - "example": "0x1::account::Account", - "required": true, - "description": "String representation of an on-chain Move type tag that is exposed in transaction payload." + "name": "gas_used", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true }, { - "name": "data", - "type": "string", - "example": {}, - "required": true, - "description": "The JSON representation of the event" - } - ] - }, - "required": true - } - ] - } - ] - } - ] - }, - { - "name": "events", - "example": "", - "required": true, - "description": "Events generated by the transaction", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "guid", - "example": "", - "description": "", - "type": "object", - "required": true, - "fields": [ - { - "name": "creation_number", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", - "required": true - }, - { - "name": "account_address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.\nThis is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.", - "required": true - } - ] - }, - { - "name": "sequence_number", - "type": "string", - "example": "32425224034", - "required": true, - "description": "A string containing a 64-bit unsigned integer." - }, - { - "name": "type", - "type": "string", - "example": "0x1::account::Account", - "required": true, - "description": "String representation of an on-chain Move type tag that is exposed in transaction payload." - }, - { - "name": "data", - "type": "string", - "example": {}, - "required": true, - "description": "The JSON representation of the event" - } - ] - } - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "block_metadata_transaction", - "description": "", - "required": true - }, - { - "name": "version", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "hash", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "", - "required": true - }, - { - "name": "state_change_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "event_root_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "state_checkpoint_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "gas_used", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "success", - "type": "boolean", - "example": true, - "description": "Whether the transaction was successful", - "required": true - }, - { - "name": "vm_status", - "type": "string", - "example": "", - "description": "The VM status of the transaction, can tell useful information in a failure", - "required": true - }, - { - "name": "accumulator_root_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "changes", - "type": "array", - "field": { - "type": "oneOf", - "options": [ - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "module", - "type": "object", - "example": "0x1::aptos_coin", - "description": "Move module id is a string representation of Move module", - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "resource", - "type": "object", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type).", - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "handle", - "type": "object", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "key", - "type": "object", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "data", - "example": {}, - "description": "Deleted table data", - "type": "object", - "fields": [ - { - "name": "key", - "type": "string", - "example": "", - "description": "Deleted key", - "required": true - }, - { - "name": "key_type", - "type": "string", - "example": "", - "description": "Deleted key type", - "required": true - } - ], - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "" - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address." - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash" - }, - { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "bytecode", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." - }, - { - "name": "abi", - "example": {}, - "description": "", - "type": "object", - "fields": [ + "name": "success", + "type": "boolean", + "example": true, + "description": "Whether the transaction was successful", + "required": true + }, { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true + "name": "vm_status", + "type": "string", + "example": "", + "description": "The VM status of the transaction, can tell useful information in a failure", + "required": true }, { - "name": "name", - "type": "string", - "example": "", - "description": "", - "required": true + "name": "accumulator_root_hash", + "type": "string", + "example": "", + "description": "", + "required": true }, { - "name": "friends", - "example": [], - "description": "Friends of the module", - "type": "array", - "field": { "type": "string" }, - "required": true + "name": "changes", + "type": "array", + "required": true, + "field": { + "type": "oneOf", + "options": [ + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "module", + "type": "object", + "example": "0x1::aptos_coin", + "description": "Move module id is a string representation of Move module", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "resource", + "type": "object", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "handle", + "type": "object", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "key", + "type": "object", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "data", + "example": {}, + "description": "Deleted table data", + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "example": "", + "description": "Deleted key", + "required": true + }, + { + "name": "key_type", + "type": "string", + "example": "", + "description": "Deleted key type", + "required": true + } + ], + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "" + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address." + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash" + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "bytecode", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." + }, + { + "name": "abi", + "example": {}, + "description": "", + "type": "object", + "fields": [ + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "name", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "friends", + "example": [], + "description": "Friends of the module", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "exposed_functions", + "example": [], + "description": "Public functions of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the function", + "required": true + }, + { + "name": "visibility", + "type": "string", + "example": "private", + "description": "Move function visibility", + "required": true + }, + { + "name": "is_entry", + "type": "boolean", + "example": true, + "description": "Whether the function can be called as an entry function directly in a transaction", + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic type params associated with the Move function", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "params", + "example": [], + "description": "Parameters associated with the move function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "return", + "example": "", + "description": "Return type of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "structs", + "example": [], + "description": "Structs of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the struct", + "required": true + }, + { + "name": "is_native", + "type": "boolean", + "example": true, + "description": "Whether the struct is a native struct of Move", + "required": true + }, + { + "name": "abilities", + "example": [], + "description": "Abilities associated with the struct", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic types associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + } + } + ] + }, + "required": true + }, + { + "name": "fields", + "example": [], + "description": "Fields associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "sender", + "description": "Name of the field", + "required": true + }, + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", + "required": true + } + ] + }, + "required": true + } + ] + }, + "required": true + } + ] + } + ] + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "required": true + }, + { + "name": "data", + "type": "object", + "example": "", + "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", + "required": true + } + ], + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "handle", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "key", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "value", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "example": "", + "description": "Key of table in JSON", + "required": true + }, + { + "name": "key_type", + "type": "string", + "example": "", + "description": "Type of key", + "required": true + }, + { + "name": "value", + "type": "string", + "example": "", + "description": "Value of table in JSON", + "required": true + }, + { + "name": "value_type", + "type": "string", + "example": "", + "description": "Type of value", + "required": true + } + ], + "required": true + } + ] + } + ] + } }, { - "name": "exposed_functions", - "example": [], - "description": "Public functions of the module", - "type": "array", - "field": { + "name": "payload", + "required": true, + "description": "A writeset payload, used only for genesis", "type": "object", "fields": [ - { - "name": "name", - "type": "string", - "example": "", - "description": "Name of the function", - "required": true - }, - { - "name": "visibility", - "type": "string", - "example": "private", - "description": "Move function visibility", - "required": true - }, - { - "name": "is_entry", - "type": "boolean", - "example": true, - "description": "Whether the function can be called as an entry function directly in a transaction", - "required": true - }, - { - "name": "generic_type_params", - "example": [], - "description": "Generic type params associated with the Move function", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] + { + "name": "type", + "type": "string", + "description": "", + "required": true }, - "required": true - }, - { - "name": "params", - "example": [], - "description": "Parameters associated with the move function", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "return", - "example": "", - "description": "Return type of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - } + { + "name": "write_set", + "description": "The associated writeset with a payload", + "required": true, + "type": "oneOf", + "options": [ + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "execute_as", + "type": "string", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "script", + "description": "Payload which runs a script that can run multiple functions", + "required": true, + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "Type of payload", + "required": true + }, + { + "name": "code", + "type": "object", + "description": "Move script bytecode", + "required": true + }, + { + "name": "type_arguments", + "description": "Type arguments of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "arguments", + "description": "Arguments of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "changes", + "description": "", + "types": "oneOf", + "required": true, + "options": [ + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "module", + "type": "object", + "example": "0x1::aptos_coin", + "description": "Move module id is a string representation of Move module", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "resource", + "type": "object", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "handle", + "type": "object", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "key", + "type": "object", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "data", + "example": {}, + "description": "Deleted table data", + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "example": "", + "description": "Deleted key", + "required": true + }, + { + "name": "key_type", + "type": "string", + "example": "", + "description": "Deleted key type", + "required": true + } + ], + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "" + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address." + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash" + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "bytecode", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." + }, + { + "name": "abi", + "example": {}, + "description": "", + "type": "object", + "fields": [ + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "name", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "friends", + "example": [], + "description": "Friends of the module", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "exposed_functions", + "example": [], + "description": "Public functions of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the function", + "required": true + }, + { + "name": "visibility", + "type": "string", + "example": "private", + "description": "Move function visibility", + "required": true + }, + { + "name": "is_entry", + "type": "boolean", + "example": true, + "description": "Whether the function can be called as an entry function directly in a transaction", + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic type params associated with the Move function", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "params", + "example": [], + "description": "Parameters associated with the move function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "return", + "example": "", + "description": "Return type of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "structs", + "example": [], + "description": "Structs of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the struct", + "required": true + }, + { + "name": "is_native", + "type": "boolean", + "example": true, + "description": "Whether the struct is a native struct of Move", + "required": true + }, + { + "name": "abilities", + "example": [], + "description": "Abilities associated with the struct", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic types associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + } + } + ] + }, + "required": true + }, + { + "name": "fields", + "example": [], + "description": "Fields associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "sender", + "description": "Name of the field", + "required": true + }, + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", + "required": true + } + ] + }, + "required": true + } + ] + }, + "required": true + } + ] + } + ] + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "required": true + }, + { + "name": "data", + "type": "object", + "example": "", + "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", + "required": true + } + ], + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "handle", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "key", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "value", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "example": "", + "description": "Key of table in JSON", + "required": true + }, + { + "name": "key_type", + "type": "string", + "example": "", + "description": "Type of key", + "required": true + }, + { + "name": "value", + "type": "string", + "example": "", + "description": "Value of table in JSON", + "required": true + }, + { + "name": "value_type", + "type": "string", + "example": "", + "description": "Type of value", + "required": true + } + ], + "required": true + } + ] + } + ] + }, + { + "name": "events", + "description": "Events emitted during genesis", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "guid", + "example": "", + "description": "", + "type": "object", + "required": true, + "fields": [ + { + "name": "creation_number", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", + "required": true + }, + { + "name": "account_address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.\nThis is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.", + "required": true + } + ] + }, + { + "name": "sequence_number", + "type": "string", + "example": "32425224034", + "required": true, + "description": "A string containing a 64-bit unsigned integer." + }, + { + "name": "type", + "type": "string", + "example": "0x1::account::Account", + "required": true, + "description": "String representation of an on-chain Move type tag that is exposed in transaction payload." + }, + { + "name": "data", + "type": "string", + "example": {}, + "required": true, + "description": "The JSON representation of the event" + } + ] + }, + "required": true + } + ] + } + ] + } ] - }, - "required": true }, { - "name": "structs", - "example": [], - "description": "Structs of the module", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "", - "description": "Name of the struct", - "required": true - }, - { - "name": "is_native", - "type": "boolean", - "example": true, - "description": "Whether the struct is a native struct of Move", - "required": true - }, - { - "name": "abilities", - "example": [], - "description": "Abilities associated with the struct", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "generic_type_params", - "example": [], - "description": "Generic types associated with the struct", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { "type": "string" } - } - ] - }, - "required": true - }, - { - "name": "fields", - "example": [], - "description": "Fields associated with the struct", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "sender", - "description": "Name of the field", - "required": true - }, + "name": "events", + "example": "", + "required": true, + "description": "Events generated by the transaction", + "type": "array", + "field": { + "type": "object", + "fields": [ { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", - "required": true - } - ] - }, - "required": true - } - ] - }, - "required": true - } - ] - } - ] - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type).", - "required": true - }, - { - "name": "data", - "type": "object", - "example": "", - "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", - "required": true - } - ], - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "handle", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "key", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "value", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "key", - "type": "string", - "example": "", - "description": "Key of table in JSON", - "required": true - }, - { - "name": "key_type", - "type": "string", - "example": "", - "description": "Type of key", - "required": true - }, - { - "name": "value", - "type": "string", - "example": "", - "description": "Value of table in JSON", - "required": true - }, - { - "name": "value_type", - "type": "string", - "example": "", - "description": "Type of value", - "required": true - } - ], - "required": true - } - ] - } - ] - }, - "required": true - }, - { - "name": "id", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "epoch", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "round", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "events", - "example": [], - "description": "he events emitted at the block creation", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "guid", - "example": "", - "description": "", - "type": "object", - "required": true, - "fields": [ - { - "name": "creation_number", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", - "required": true - }, - { - "name": "account_address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.\nThis is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.", - "required": true - } - ] - }, - { - "name": "sequence_number", - "type": "string", - "example": "32425224034", - "required": true, - "description": "A string containing a 64-bit unsigned integer." - }, - { - "name": "type", - "type": "string", - "example": "0x1::account::Account", - "required": true, - "description": "String representation of an on-chain Move type tag that is exposed in transaction payload." - }, - { - "name": "data", - "type": "string", - "example": {}, - "required": true, - "description": "The JSON representation of the event" - } - ] - }, - "required": true - }, - { - "name": "previous_block_votes_bitvec", - "example": "", - "description": "Previous block votes", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "proposer", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account addresss", - "required": true - }, - { - "name": "failed_proposer_indices", - "example": [], - "description": "The indices of the proposers who failed to propose", - "required": true, - "type": "array", - "field": { "type": "string" } - }, - { - "name": "timestamp", - "type": "string", - "example": "32425224034", - "description": "The timestamp of the block returned in milliseconds", - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "state_checkpoint_transaction", - "description": "", - "required": true - }, - { - "name": "version", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "hash", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "", - "required": true - }, - { - "name": "state_change_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "event_root_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "state_checkpoint_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "gas_used", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "success", - "type": "boolean", - "example": true, - "description": "Whether the transaction was successful", - "required": true - }, - { - "name": "vm_status", - "type": "string", - "example": "", - "description": "The VM status of the transaction, can tell useful information in a failure", - "required": true - }, - { - "name": "accumulator_root_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "changes", - "type": "array", - "field": { - "type": "oneOf", - "options": [ - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "module", - "type": "object", - "example": "0x1::aptos_coin", - "description": "Move module id is a string representation of Move module", - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "resource", - "type": "object", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type).", - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "handle", - "type": "object", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "key", - "type": "object", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "data", - "example": {}, - "description": "Deleted table data", - "type": "object", - "fields": [ - { - "name": "key", - "type": "string", - "example": "", - "description": "Deleted key", - "required": true - }, - { - "name": "key_type", - "type": "string", - "example": "", - "description": "Deleted key type", - "required": true - } - ], - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "" - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address." - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash" + "name": "guid", + "example": "", + "description": "", + "type": "object", + "required": true, + "fields": [ + { + "name": "creation_number", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", + "required": true + }, + { + "name": "account_address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.\nThis is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.", + "required": true + } + ] + }, + { + "name": "sequence_number", + "type": "string", + "example": "32425224034", + "required": true, + "description": "A string containing a 64-bit unsigned integer." + }, + { + "name": "type", + "type": "string", + "example": "0x1::account::Account", + "required": true, + "description": "String representation of an on-chain Move type tag that is exposed in transaction payload." + }, + { + "name": "data", + "type": "string", + "example": {}, + "required": true, + "description": "The JSON representation of the event" + } + ] + } + } + ] }, { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "bytecode", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." - }, - { - "name": "abi", - "example": {}, - "description": "", - "type": "object", - "fields": [ + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "block_metadata_transaction", + "description": "", + "required": true + }, { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true + "name": "version", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true }, { - "name": "name", - "type": "string", - "example": "", - "description": "", - "required": true + "name": "hash", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "", + "required": true }, { - "name": "friends", - "example": [], - "description": "Friends of the module", - "type": "array", - "field": { "type": "string" }, - "required": true + "name": "state_change_hash", + "type": "string", + "example": "", + "description": "", + "required": true }, { - "name": "exposed_functions", - "example": [], - "description": "Public functions of the module", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "", - "description": "Name of the function", - "required": true - }, - { - "name": "visibility", - "type": "string", - "example": "private", - "description": "Move function visibility", - "required": true - }, - { - "name": "is_entry", - "type": "boolean", - "example": true, - "description": "Whether the function can be called as an entry function directly in a transaction", - "required": true - }, - { - "name": "generic_type_params", - "example": [], - "description": "Generic type params associated with the Move function", - "type": "array", - "field": { - "type": "object", - "fields": [ + "name": "event_root_hash", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "state_checkpoint_hash", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "gas_used", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, + { + "name": "success", + "type": "boolean", + "example": true, + "description": "Whether the transaction was successful", + "required": true + }, + { + "name": "vm_status", + "type": "string", + "example": "", + "description": "The VM status of the transaction, can tell useful information in a failure", + "required": true + }, + { + "name": "accumulator_root_hash", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "changes", + "type": "array", + "field": { + "type": "oneOf", + "options": [ + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "module", + "type": "object", + "example": "0x1::aptos_coin", + "description": "Move module id is a string representation of Move module", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "resource", + "type": "object", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "handle", + "type": "object", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "key", + "type": "object", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "data", + "example": {}, + "description": "Deleted table data", + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "example": "", + "description": "Deleted key", + "required": true + }, + { + "name": "key_type", + "type": "string", + "example": "", + "description": "Deleted key type", + "required": true + } + ], + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "" + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address." + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash" + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "bytecode", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." + }, + { + "name": "abi", + "example": {}, + "description": "", + "type": "object", + "fields": [ + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "name", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "friends", + "example": [], + "description": "Friends of the module", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "exposed_functions", + "example": [], + "description": "Public functions of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the function", + "required": true + }, + { + "name": "visibility", + "type": "string", + "example": "private", + "description": "Move function visibility", + "required": true + }, + { + "name": "is_entry", + "type": "boolean", + "example": true, + "description": "Whether the function can be called as an entry function directly in a transaction", + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic type params associated with the Move function", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "params", + "example": [], + "description": "Parameters associated with the move function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "return", + "example": "", + "description": "Return type of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "structs", + "example": [], + "description": "Structs of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the struct", + "required": true + }, + { + "name": "is_native", + "type": "boolean", + "example": true, + "description": "Whether the struct is a native struct of Move", + "required": true + }, + { + "name": "abilities", + "example": [], + "description": "Abilities associated with the struct", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic types associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + } + } + ] + }, + "required": true + }, + { + "name": "fields", + "example": [], + "description": "Fields associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "sender", + "description": "Name of the field", + "required": true + }, + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", + "required": true + } + ] + }, + "required": true + } + ] + }, + "required": true + } + ] + } + ] + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "required": true + }, + { + "name": "data", + "type": "object", + "example": "", + "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", + "required": true + } + ], + "required": true + } + ] + }, { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { "type": "string" }, - "required": true + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "handle", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "key", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "value", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "example": "", + "description": "Key of table in JSON", + "required": true + }, + { + "name": "key_type", + "type": "string", + "example": "", + "description": "Type of key", + "required": true + }, + { + "name": "value", + "type": "string", + "example": "", + "description": "Value of table in JSON", + "required": true + }, + { + "name": "value_type", + "type": "string", + "example": "", + "description": "Type of value", + "required": true + } + ], + "required": true + } + ] } - ] - }, - "required": true - }, - { - "name": "params", - "example": [], - "description": "Parameters associated with the move function", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "return", - "example": "", - "description": "Return type of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] - }, - "required": true + ] + }, + "required": true + }, + { + "name": "id", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "epoch", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, + { + "name": "round", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true }, { - "name": "structs", - "example": [], - "description": "Structs of the module", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "", - "description": "Name of the struct", - "required": true - }, - { - "name": "is_native", - "type": "boolean", - "example": true, - "description": "Whether the struct is a native struct of Move", - "required": true - }, - { - "name": "abilities", - "example": [], - "description": "Abilities associated with the struct", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "generic_type_params", - "example": [], - "description": "Generic types associated with the struct", - "type": "array", - "field": { - "type": "object", - "fields": [ + "name": "events", + "example": [], + "description": "he events emitted at the block creation", + "type": "array", + "field": { + "type": "object", + "fields": [ { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { "type": "string" } - } - ] - }, - "required": true - }, - { - "name": "fields", - "example": [], - "description": "Fields associated with the struct", - "type": "array", - "field": { - "type": "object", - "fields": [ + "name": "guid", + "example": "", + "description": "", + "type": "object", + "required": true, + "fields": [ + { + "name": "creation_number", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", + "required": true + }, + { + "name": "account_address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.\nThis is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.", + "required": true + } + ] + }, + { + "name": "sequence_number", + "type": "string", + "example": "32425224034", + "required": true, + "description": "A string containing a 64-bit unsigned integer." + }, { - "name": "name", - "type": "string", - "example": "sender", - "description": "Name of the field", - "required": true + "name": "type", + "type": "string", + "example": "0x1::account::Account", + "required": true, + "description": "String representation of an on-chain Move type tag that is exposed in transaction payload." }, { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", - "required": true + "name": "data", + "type": "string", + "example": {}, + "required": true, + "description": "The JSON representation of the event" } - ] - }, - "required": true - } - ] - }, - "required": true - } - ] - } - ] - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type).", - "required": true - }, - { - "name": "data", - "type": "object", - "example": "", - "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", - "required": true - } - ], - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "handle", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "key", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "value", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "key", - "type": "string", - "example": "", - "description": "Key of table in JSON", - "required": true - }, - { - "name": "key_type", - "type": "string", - "example": "", - "description": "Type of key", - "required": true - }, - { - "name": "value", - "type": "string", - "example": "", - "description": "Value of table in JSON", - "required": true - }, - { - "name": "value_type", - "type": "string", - "example": "", - "description": "Type of value", - "required": true - } - ], - "required": true - } - ] - } - ] - }, - "required": true - }, - { - "name": "timestamp", - "type": "string", - "example": "32425224034", - "description": "The timestamp of the block returned in milliseconds", - "required": true - } - ] - } - ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.transactions.getTransactionByVersion({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.transactions.get_transaction_by_version(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getAccountTransactions": { - "apiHost": "https://mainnet-aptos-api.moralis.io", - "testHost": "https://testnet-aptos-api.moralis.io", - "summary": "Get account transactions", - "description": "Get all transactions for a given address.", - "method": "GET", - "path": "/accounts/:address/transactions", - "pathParams": [ - { - "name": "address", - "description": "Address of account with or without a 0x prefix", - "required": true, - "type": "string" - } - ], - "queryParams": [ - { - "name": "limit", - "description": "Max number of transactions to retrieve.\nIf not provided, defaults to default page size", - "required": false, - "type": "number", - "example": 5 - }, - { - "name": "start", - "description": "Account sequence number to start list of transactions.\nIf not provided, defaults to showing the latest transactions", - "required": false, - "type": "string" - } - ], - "responses": [ - { - "status": "200", - "description": "", - "body": { - "type": "array", - "field": { - "type": "oneOf", - "options": [ - { - "type": "object", - "fields": [ - { - "name": "hash", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "", - "required": true - }, - { - "name": "sender", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "sequence_number", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "max_gas_amount", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "gas_unit_price", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "expiration_timestamp_secs", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer returned in milliseconds.", - "required": true - }, - { - "name": "payload", - "type": "oneOf", - "options": [ - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "function", - "type": "string", - "description": "Entry function id is string representation of a entry function defined on-chain.", - "required": true - }, - { - "name": "type_arguments", - "description": "Type arguments of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "arguments", - "description": "Arguments of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "Type of payload", - "required": true - }, - { - "name": "code", - "type": "object", - "description": "Move script bytecode", - "required": true - }, - { - "name": "type_arguments", - "description": "Type arguments of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "arguments", - "description": "Arguments of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "modules", - "description": "", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] - } - ], - "required": true - }, - { - "name": "signature", - "type": "oneOf", - "options": [ - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "signature", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", - "required": true - }, - { - "name": "public_key", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "public_keys", - "description": "The public keys for the Ed25519 signature", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "signatures", - "description": "Signature associated with the public keys in the same order", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "threshold", - "type": "number", - "description": "The number of signatures required for a successful transaction", - "required": true - }, - { - "name": "bitmap", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "sender", - "type": "oneOf", - "options": [ - { - "type": "object", - "description": "A single Ed25519 signature", - "fields": [ + ] + }, + "required": true + }, + { + "name": "previous_block_votes_bitvec", + "example": "", + "description": "Previous block votes", + "type": "array", + "field": { "type": "string" }, + "required": true + }, { - "name": "type", - "type": "string", - "description": "", - "required": true + "name": "proposer", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account addresss", + "required": true }, { - "name": "signature", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", - "required": true + "name": "failed_proposer_indices", + "example": [], + "description": "The indices of the proposers who failed to propose", + "required": true, + "type": "array", + "field": { "type": "string" } }, { - "name": "public_key", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true + "name": "timestamp", + "type": "string", + "example": "32425224034", + "description": "The timestamp of the block returned in milliseconds", + "required": true } - ] - }, - { - "type": "object", - "description": "A Ed25519 multi-sig signature", - "fields": [ + ] + }, + { + "type": "object", + "fields": [ { - "name": "type", - "type": "string", - "description": "", - "required": true + "name": "type", + "type": "string", + "example": "state_checkpoint_transaction", + "description": "", + "required": true }, { - "name": "public_keys", - "description": "The public keys for the Ed25519 signature", - "type": "array", - "field": { "type": "string" }, - "required": true + "name": "version", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true }, { - "name": "signatures", - "description": "Signature associated with the public keys in the same order", - "type": "array", - "field": { "type": "string" }, - "required": true + "name": "hash", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "", + "required": true }, { - "name": "threshold", - "type": "number", - "description": "The number of signatures required for a successful transaction", - "required": true + "name": "state_change_hash", + "type": "string", + "example": "", + "description": "", + "required": true }, { - "name": "bitmap", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - } - ] - } - ], - "required": true - }, - { - "name": "secondary_signer_addresses", - "description": "The other involved parties addresses", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "secondary_signers", - "type": "oneOf", - "options": [ - { - "type": "object", - "description": "A single Ed25519 signature", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true + "name": "event_root_hash", + "type": "string", + "example": "", + "description": "", + "required": true }, { - "name": "signature", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", - "required": true + "name": "state_checkpoint_hash", + "type": "string", + "example": "", + "description": "", + "required": true }, { - "name": "public_key", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - } - ] - }, - { - "type": "object", - "description": "A Ed25519 multi-sig signature", - "fields": [ + "name": "gas_used", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, { - "name": "type", - "type": "string", - "description": "", - "required": true + "name": "success", + "type": "boolean", + "example": true, + "description": "Whether the transaction was successful", + "required": true }, { - "name": "public_keys", - "description": "The public keys for the Ed25519 signature", - "type": "array", - "field": { "type": "string" }, - "required": true + "name": "vm_status", + "type": "string", + "example": "", + "description": "The VM status of the transaction, can tell useful information in a failure", + "required": true }, { - "name": "signatures", - "description": "Signature associated with the public keys in the same order", - "type": "array", - "field": { "type": "string" }, - "required": true + "name": "accumulator_root_hash", + "type": "string", + "example": "", + "description": "", + "required": true }, { - "name": "threshold", - "type": "number", - "description": "The number of signatures required for a successful transaction", - "required": true + "name": "changes", + "type": "array", + "field": { + "type": "oneOf", + "options": [ + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "module", + "type": "object", + "example": "0x1::aptos_coin", + "description": "Move module id is a string representation of Move module", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "resource", + "type": "object", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "handle", + "type": "object", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "key", + "type": "object", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "data", + "example": {}, + "description": "Deleted table data", + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "example": "", + "description": "Deleted key", + "required": true + }, + { + "name": "key_type", + "type": "string", + "example": "", + "description": "Deleted key type", + "required": true + } + ], + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "" + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address." + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash" + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "bytecode", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." + }, + { + "name": "abi", + "example": {}, + "description": "", + "type": "object", + "fields": [ + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "name", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "friends", + "example": [], + "description": "Friends of the module", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "exposed_functions", + "example": [], + "description": "Public functions of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the function", + "required": true + }, + { + "name": "visibility", + "type": "string", + "example": "private", + "description": "Move function visibility", + "required": true + }, + { + "name": "is_entry", + "type": "boolean", + "example": true, + "description": "Whether the function can be called as an entry function directly in a transaction", + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic type params associated with the Move function", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "params", + "example": [], + "description": "Parameters associated with the move function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "return", + "example": "", + "description": "Return type of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "structs", + "example": [], + "description": "Structs of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the struct", + "required": true + }, + { + "name": "is_native", + "type": "boolean", + "example": true, + "description": "Whether the struct is a native struct of Move", + "required": true + }, + { + "name": "abilities", + "example": [], + "description": "Abilities associated with the struct", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic types associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + } + } + ] + }, + "required": true + }, + { + "name": "fields", + "example": [], + "description": "Fields associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "sender", + "description": "Name of the field", + "required": true + }, + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", + "required": true + } + ] + }, + "required": true + } + ] + }, + "required": true + } + ] + } + ] + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "required": true + }, + { + "name": "data", + "type": "object", + "example": "", + "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", + "required": true + } + ], + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "handle", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "key", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "value", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "example": "", + "description": "Key of table in JSON", + "required": true + }, + { + "name": "key_type", + "type": "string", + "example": "", + "description": "Type of key", + "required": true + }, + { + "name": "value", + "type": "string", + "example": "", + "description": "Value of table in JSON", + "required": true + }, + { + "name": "value_type", + "type": "string", + "example": "", + "description": "Type of value", + "required": true + } + ], + "required": true + } + ] + } + ] + }, + "required": true }, { - "name": "bitmap", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true + "name": "timestamp", + "type": "string", + "example": "32425224034", + "description": "The timestamp of the block returned in milliseconds", + "required": true } - ] - } - ], - "required": true + ] } - ] - } - ], - "required": true + ] } - ] + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.transactions.getTransactionByHash({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" }, { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "", - "description": "user_transaction", - "required": true - }, - { - "name": "version", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "hash", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "", - "required": true - }, - { - "name": "state_change_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "event_root_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "state_checkpoint_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "gas_used", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "success", - "type": "boolean", - "example": true, - "description": "Whether the transaction was successful", - "required": true - }, - { - "name": "vm_status", - "type": "string", - "example": "", - "description": "The VM status of the transaction, can tell useful information in a failure", - "required": true - }, - { - "name": "accumulator_root_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "changes", - "type": "array", - "required": true, - "field": { + "language": "python", + "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.transactions.get_transaction_by_hash(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getTransactionByVersion": { + "apiHost": "https://mainnet-aptos-api.moralis.io", + "testHost": "https://testnet-aptos-api.moralis.io", + "summary": "Get transaction by version", + "description": "Get transaction by transaction version.", + "method": "GET", + "path": "/transactions/by_version/:txn_version", + "pathParams": [ + { + "name": "txn_version", + "description": "Version of transaction to retrieve", + "required": true, + "type": "string" + } + ], + "queryParams": [], + "responses": [ + { + "status": "200", + "description": "", + "body": { "type": "oneOf", "options": [ - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "module", - "type": "object", - "example": "0x1::aptos_coin", - "description": "Move module id is a string representation of Move module", - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "resource", - "type": "object", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type).", - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "handle", - "type": "object", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "key", - "type": "object", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "data", - "example": {}, - "description": "Deleted table data", - "type": "object", - "fields": [ - { - "name": "key", - "type": "string", - "example": "", - "description": "Deleted key", - "required": true - }, - { - "name": "key_type", - "type": "string", - "example": "", - "description": "Deleted key type", - "required": true - } - ], - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "" - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address." - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash" - }, - { - "name": "data", - "example": "", - "description": "", + { "type": "object", "fields": [ - { - "name": "bytecode", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." - }, - { - "name": "abi", - "example": {}, - "description": "", - "type": "object", - "fields": [ - { - "name": "address", + { + "name": "hash", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "", + "required": true + }, + { + "name": "sender", "type": "string", "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", "description": "A hex encoded 32 byte Aptos account address.", "required": true - }, - { - "name": "name", + }, + { + "name": "sequence_number", "type": "string", - "example": "", - "description": "", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, + { + "name": "max_gas_amount", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, + { + "name": "gas_unit_price", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", "required": true - }, - { - "name": "friends", - "example": [], - "description": "Friends of the module", - "type": "array", - "field": { "type": "string" }, + }, + { + "name": "expiration_timestamp_secs", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer returned in milliseconds.", "required": true - }, - { - "name": "exposed_functions", - "example": [], - "description": "Public functions of the module", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "", - "description": "Name of the function", - "required": true - }, - { - "name": "visibility", - "type": "string", - "example": "private", - "description": "Move function visibility", - "required": true - }, - { - "name": "is_entry", - "type": "boolean", - "example": true, - "description": "Whether the function can be called as an entry function directly in a transaction", - "required": true - }, + }, + { + "name": "payload", + "type": "oneOf", + "options": [ { - "name": "generic_type_params", - "example": [], - "description": "Generic type params associated with the Move function", - "type": "array", - "field": { "type": "object", "fields": [ - { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { - "type": "string" + { + "name": "type", + "type": "string", + "description": "", + "required": true }, - "required": true - } + { + "name": "function", + "type": "string", + "description": "Entry function id is string representation of a entry function defined on-chain.", + "required": true + }, + { + "name": "type_arguments", + "description": "Type arguments of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "arguments", + "description": "Arguments of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } ] - }, - "required": true }, { - "name": "params", - "example": [], - "description": "Parameters associated with the move function", - "type": "array", - "field": { "type": "string" }, - "required": true + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "Type of payload", + "required": true + }, + { + "name": "code", + "type": "object", + "description": "Move script bytecode", + "required": true + }, + { + "name": "type_arguments", + "description": "Type arguments of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "arguments", + "description": "Arguments of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] }, { - "name": "return", - "example": "", - "description": "Return type of the function", - "type": "array", - "field": { "type": "string" }, - "required": true + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "modules", + "description": "", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] } - ] - }, + ], "required": true - }, - { - "name": "structs", - "example": [], - "description": "Structs of the module", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "", - "description": "Name of the struct", - "required": true - }, - { - "name": "is_native", - "type": "boolean", - "example": true, - "description": "Whether the struct is a native struct of Move", - "required": true - }, - { - "name": "abilities", - "example": [], - "description": "Abilities associated with the struct", - "type": "array", - "field": { "type": "string" }, - "required": true - }, + }, + { + "name": "signature", + "type": "oneOf", + "options": [ { - "name": "generic_type_params", - "example": [], - "description": "Generic types associated with the struct", - "type": "array", - "field": { "type": "object", "fields": [ - { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { - "type": "string" + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "signature", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", + "required": true + }, + { + "name": "public_key", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true } - } ] - }, - "required": true }, { - "name": "fields", - "example": [], - "description": "Fields associated with the struct", - "type": "array", - "field": { "type": "object", "fields": [ - { - "name": "name", - "type": "string", - "example": "sender", - "description": "Name of the field", - "required": true - }, - { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", - "required": true - } - ] - }, - "required": true - } - ] - }, - "required": true - } - ] - } - ] - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type).", - "required": true - }, - { - "name": "data", - "type": "object", - "example": "", - "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", - "required": true - } - ], - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "handle", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "key", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "value", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "key", - "type": "string", - "example": "", - "description": "Key of table in JSON", - "required": true - }, - { - "name": "key_type", - "type": "string", - "example": "", - "description": "Type of key", - "required": true - }, - { - "name": "value", - "type": "string", - "example": "", - "description": "Value of table in JSON", - "required": true - }, - { - "name": "value_type", - "type": "string", - "example": "", - "description": "Type of value", - "required": true - } - ], - "required": true - } - ] - } - ] - } - }, - { - "name": "sender", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "sequence_number", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "max_gas_amount", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "gas_unit_price", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "expiration_timestamp_secs", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer returned in milliseconds.", - "required": true - }, - { - "name": "payload", - "type": "oneOf", - "required": true, - "options": [ - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "function", - "type": "string", - "description": "Entry function id is string representation of a entry function defined on-chain.", - "required": true - }, - { - "name": "type_arguments", - "description": "Type arguments of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "arguments", - "description": "Arguments of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "Type of payload", - "required": true - }, - { - "name": "code", - "type": "object", - "description": "Move script bytecode", - "required": true - }, - { - "name": "type_arguments", - "description": "Type arguments of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "arguments", - "description": "Arguments of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "modules", - "description": "", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] - } - ] - }, - { - "name": "signature", - "type": "oneOf", - "required": true, - "options": [ - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "signature", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", - "required": true - }, - { - "name": "public_key", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "public_keys", - "description": "The public keys for the Ed25519 signature", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "signatures", - "description": "Signature associated with the public keys in the same order", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "threshold", - "type": "number", - "description": "The number of signatures required for a successful transaction", - "required": true - }, - { - "name": "bitmap", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "public_keys", + "description": "The public keys for the Ed25519 signature", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "signatures", + "description": "Signature associated with the public keys in the same order", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "threshold", + "type": "number", + "description": "The number of signatures required for a successful transaction", + "required": true + }, + { + "name": "bitmap", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "sender", + "type": "oneOf", + "options": [ + { + "type": "object", + "description": "A single Ed25519 signature", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "signature", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", + "required": true + }, + { + "name": "public_key", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + }, + { + "type": "object", + "description": "A Ed25519 multi-sig signature", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "public_keys", + "description": "The public keys for the Ed25519 signature", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "signatures", + "description": "Signature associated with the public keys in the same order", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "threshold", + "type": "number", + "description": "The number of signatures required for a successful transaction", + "required": true + }, + { + "name": "bitmap", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + } + ], + "required": true + }, + { + "name": "secondary_signer_addresses", + "description": "The other involved parties addresses", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "secondary_signers", + "type": "oneOf", + "options": [ + { + "type": "object", + "description": "A single Ed25519 signature", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "signature", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", + "required": true + }, + { + "name": "public_key", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + }, + { + "type": "object", + "description": "A Ed25519 multi-sig signature", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "public_keys", + "description": "The public keys for the Ed25519 signature", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "signatures", + "description": "Signature associated with the public keys in the same order", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "threshold", + "type": "number", + "description": "The number of signatures required for a successful transaction", + "required": true + }, + { + "name": "bitmap", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + } + ], + "required": true + } + ] + } + ], + "required": true + } + ] }, { - "name": "sender", - "type": "oneOf", - "options": [ - { - "type": "object", - "description": "A single Ed25519 signature", - "fields": [ + "type": "object", + "fields": [ { - "name": "type", - "type": "string", - "description": "", - "required": true + "name": "type", + "type": "string", + "example": "", + "description": "user_transaction", + "required": true }, { - "name": "signature", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", - "required": true + "name": "version", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true }, { - "name": "public_key", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - } - ] - }, - { - "type": "object", - "description": "A Ed25519 multi-sig signature", - "fields": [ + "name": "hash", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "", + "required": true + }, { - "name": "type", - "type": "string", - "description": "", - "required": true + "name": "state_change_hash", + "type": "string", + "example": "", + "description": "", + "required": true }, { - "name": "public_keys", - "description": "The public keys for the Ed25519 signature", - "type": "array", - "field": { "type": "string" }, - "required": true + "name": "event_root_hash", + "type": "string", + "example": "", + "description": "", + "required": true }, { - "name": "signatures", - "description": "Signature associated with the public keys in the same order", - "type": "array", - "field": { "type": "string" }, - "required": true + "name": "state_checkpoint_hash", + "type": "string", + "example": "", + "description": "", + "required": true }, { - "name": "threshold", - "type": "number", - "description": "The number of signatures required for a successful transaction", - "required": true + "name": "gas_used", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true }, { - "name": "bitmap", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - } - ] - } - ], - "required": true - }, - { - "name": "secondary_signer_addresses", - "description": "The other involved parties addresses", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "secondary_signers", - "type": "oneOf", - "options": [ - { - "type": "object", - "description": "A single Ed25519 signature", - "fields": [ + "name": "success", + "type": "boolean", + "example": true, + "description": "Whether the transaction was successful", + "required": true + }, { - "name": "type", - "type": "string", - "description": "", - "required": true + "name": "vm_status", + "type": "string", + "example": "", + "description": "The VM status of the transaction, can tell useful information in a failure", + "required": true }, { - "name": "signature", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", - "required": true + "name": "accumulator_root_hash", + "type": "string", + "example": "", + "description": "", + "required": true }, { - "name": "public_key", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - } - ] - }, - { - "type": "object", - "description": "A Ed25519 multi-sig signature", - "fields": [ + "name": "changes", + "type": "array", + "required": true, + "field": { + "type": "oneOf", + "options": [ + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "module", + "type": "object", + "example": "0x1::aptos_coin", + "description": "Move module id is a string representation of Move module", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "resource", + "type": "object", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "handle", + "type": "object", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "key", + "type": "object", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "data", + "example": {}, + "description": "Deleted table data", + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "example": "", + "description": "Deleted key", + "required": true + }, + { + "name": "key_type", + "type": "string", + "example": "", + "description": "Deleted key type", + "required": true + } + ], + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "" + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address." + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash" + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "bytecode", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." + }, + { + "name": "abi", + "example": {}, + "description": "", + "type": "object", + "fields": [ + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "name", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "friends", + "example": [], + "description": "Friends of the module", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "exposed_functions", + "example": [], + "description": "Public functions of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the function", + "required": true + }, + { + "name": "visibility", + "type": "string", + "example": "private", + "description": "Move function visibility", + "required": true + }, + { + "name": "is_entry", + "type": "boolean", + "example": true, + "description": "Whether the function can be called as an entry function directly in a transaction", + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic type params associated with the Move function", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "params", + "example": [], + "description": "Parameters associated with the move function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "return", + "example": "", + "description": "Return type of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "structs", + "example": [], + "description": "Structs of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the struct", + "required": true + }, + { + "name": "is_native", + "type": "boolean", + "example": true, + "description": "Whether the struct is a native struct of Move", + "required": true + }, + { + "name": "abilities", + "example": [], + "description": "Abilities associated with the struct", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic types associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + } + } + ] + }, + "required": true + }, + { + "name": "fields", + "example": [], + "description": "Fields associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "sender", + "description": "Name of the field", + "required": true + }, + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", + "required": true + } + ] + }, + "required": true + } + ] + }, + "required": true + } + ] + } + ] + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "required": true + }, + { + "name": "data", + "type": "object", + "example": "", + "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", + "required": true + } + ], + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "handle", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "key", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "value", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "example": "", + "description": "Key of table in JSON", + "required": true + }, + { + "name": "key_type", + "type": "string", + "example": "", + "description": "Type of key", + "required": true + }, + { + "name": "value", + "type": "string", + "example": "", + "description": "Value of table in JSON", + "required": true + }, + { + "name": "value_type", + "type": "string", + "example": "", + "description": "Type of value", + "required": true + } + ], + "required": true + } + ] + } + ] + } + }, + { + "name": "sender", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "sequence_number", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, { - "name": "type", - "type": "string", - "description": "", - "required": true + "name": "max_gas_amount", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true }, { - "name": "public_keys", - "description": "The public keys for the Ed25519 signature", - "type": "array", - "field": { "type": "string" }, - "required": true + "name": "gas_unit_price", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true }, { - "name": "signatures", - "description": "Signature associated with the public keys in the same order", - "type": "array", - "field": { "type": "string" }, - "required": true + "name": "expiration_timestamp_secs", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true }, { - "name": "threshold", - "type": "number", - "description": "The number of signatures required for a successful transaction", - "required": true + "name": "payload", + "type": "oneOf", + "required": true, + "options": [ + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "function", + "type": "string", + "description": "Entry function id is string representation of a entry function defined on-chain.", + "required": true + }, + { + "name": "type_arguments", + "description": "Type arguments of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "arguments", + "description": "Arguments of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "Type of payload", + "required": true + }, + { + "name": "code", + "type": "object", + "description": "Move script bytecode", + "required": true + }, + { + "name": "type_arguments", + "description": "Type arguments of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "arguments", + "description": "Arguments of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "modules", + "description": "", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + } + ] }, { - "name": "bitmap", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - } - ] - } - ], - "required": true - } - ] - } - ] - }, - { - "name": "events", - "example": "", - "description": "Events generated by the transaction", - "type": "array", - "required": true, - "field": { - "type": "object", - "fields": [ - { - "name": "guid", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "creation_number", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", - "required": true - }, - { - "name": "account_address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.\nThis is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.", - "required": true - } - ] - }, - { - "name": "sequence_number", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer." - }, - { - "name": "type", - "type": "string", - "example": "0x1::account::Account", - "description": "String representation of an on-chain Move type tag that is exposed in transaction payload." - }, - { - "name": "data", - "type": "string", - "example": {}, - "description": "The JSON representation of the event" - } - ], - "required": ["guid", "sequence_number", "type", "data"] - } - }, - { - "name": "timestamp", - "type": "string", - "example": "32425224034", - "required": true, - "description": "The timestamp of the block returned in milliseconds" - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "genesis_transaction", - "description": "", - "required": true - }, - { - "name": "version", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "hash", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "", - "required": true - }, - { - "name": "state_change_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "event_root_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "state_checkpoint_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "gas_used", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "success", - "type": "boolean", - "example": true, - "description": "Whether the transaction was successful", - "required": true - }, - { - "name": "vm_status", - "type": "string", - "example": "", - "description": "The VM status of the transaction, can tell useful information in a failure", - "required": true - }, - { - "name": "accumulator_root_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "changes", - "type": "array", - "required": true, - "field": { - "type": "oneOf", - "options": [ - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "module", - "type": "object", - "example": "0x1::aptos_coin", - "description": "Move module id is a string representation of Move module", - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "resource", - "type": "object", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type).", - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "handle", - "type": "object", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "key", - "type": "object", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "data", - "example": {}, - "description": "Deleted table data", - "type": "object", - "fields": [ - { - "name": "key", - "type": "string", - "example": "", - "description": "Deleted key", - "required": true - }, - { - "name": "key_type", - "type": "string", - "example": "", - "description": "Deleted key type", - "required": true - } - ], - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "" - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address." - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash" - }, - { - "name": "data", - "example": "", - "description": "", + "name": "signature", + "type": "oneOf", + "required": true, + "options": [ + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "signature", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", + "required": true + }, + { + "name": "public_key", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "public_keys", + "description": "The public keys for the Ed25519 signature", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "signatures", + "description": "Signature associated with the public keys in the same order", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "threshold", + "type": "number", + "description": "The number of signatures required for a successful transaction", + "required": true + }, + { + "name": "bitmap", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "sender", + "type": "oneOf", + "options": [ + { + "type": "object", + "description": "A single Ed25519 signature", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "signature", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", + "required": true + }, + { + "name": "public_key", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + }, + { + "type": "object", + "description": "A Ed25519 multi-sig signature", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "public_keys", + "description": "The public keys for the Ed25519 signature", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "signatures", + "description": "Signature associated with the public keys in the same order", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "threshold", + "type": "number", + "description": "The number of signatures required for a successful transaction", + "required": true + }, + { + "name": "bitmap", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + } + ], + "required": true + }, + { + "name": "secondary_signer_addresses", + "description": "The other involved parties addresses", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "secondary_signers", + "type": "oneOf", + "options": [ + { + "type": "object", + "description": "A single Ed25519 signature", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "signature", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", + "required": true + }, + { + "name": "public_key", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + }, + { + "type": "object", + "description": "A Ed25519 multi-sig signature", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "public_keys", + "description": "The public keys for the Ed25519 signature", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "signatures", + "description": "Signature associated with the public keys in the same order", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "threshold", + "type": "number", + "description": "The number of signatures required for a successful transaction", + "required": true + }, + { + "name": "bitmap", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + } + ], + "required": true + } + ] + } + ] + }, + { + "name": "events", + "example": "", + "description": "Events generated by the transaction", + "type": "array", + "required": true, + "field": { + "type": "object", + "fields": [ + { + "name": "guid", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "creation_number", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", + "required": true + }, + { + "name": "account_address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.\nThis is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.", + "required": true + } + ] + }, + { + "name": "sequence_number", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer." + }, + { + "name": "type", + "type": "string", + "example": "0x1::account::Account", + "description": "String representation of an on-chain Move type tag that is exposed in transaction payload." + }, + { + "name": "data", + "type": "string", + "example": {}, + "description": "The JSON representation of the event" + } + ], + "required": [ + "guid", + "sequence_number", + "type", + "data" + ] + } + }, + { + "name": "timestamp", + "type": "string", + "example": "32425224034", + "required": true, + "description": "The timestamp of the block returned in milliseconds" + } + ] + }, + { "type": "object", "fields": [ - { - "name": "bytecode", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." - }, - { - "name": "abi", - "example": {}, - "description": "", - "type": "object", - "fields": [ - { - "name": "address", + { + "name": "type", + "type": "string", + "example": "genesis_transaction", + "description": "", + "required": true + }, + { + "name": "version", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, + { + "name": "hash", "type": "string", "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", + "description": "", "required": true - }, - { - "name": "name", + }, + { + "name": "state_change_hash", "type": "string", "example": "", "description": "", "required": true - }, - { - "name": "friends", - "example": [], - "description": "Friends of the module", - "type": "array", - "field": { "type": "string" }, + }, + { + "name": "event_root_hash", + "type": "string", + "example": "", + "description": "", "required": true - }, - { - "name": "exposed_functions", - "example": [], - "description": "Public functions of the module", + }, + { + "name": "state_checkpoint_hash", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "gas_used", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, + { + "name": "success", + "type": "boolean", + "example": true, + "description": "Whether the transaction was successful", + "required": true + }, + { + "name": "vm_status", + "type": "string", + "example": "", + "description": "The VM status of the transaction, can tell useful information in a failure", + "required": true + }, + { + "name": "accumulator_root_hash", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "changes", "type": "array", + "required": true, "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "", - "description": "Name of the function", - "required": true - }, - { - "name": "visibility", - "type": "string", - "example": "private", - "description": "Move function visibility", - "required": true - }, + "type": "oneOf", + "options": [ + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "module", + "type": "object", + "example": "0x1::aptos_coin", + "description": "Move module id is a string representation of Move module", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "resource", + "type": "object", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "handle", + "type": "object", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "key", + "type": "object", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "data", + "example": {}, + "description": "Deleted table data", + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "example": "", + "description": "Deleted key", + "required": true + }, + { + "name": "key_type", + "type": "string", + "example": "", + "description": "Deleted key type", + "required": true + } + ], + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "" + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address." + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash" + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "bytecode", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." + }, + { + "name": "abi", + "example": {}, + "description": "", + "type": "object", + "fields": [ + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "name", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "friends", + "example": [], + "description": "Friends of the module", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "exposed_functions", + "example": [], + "description": "Public functions of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the function", + "required": true + }, + { + "name": "visibility", + "type": "string", + "example": "private", + "description": "Move function visibility", + "required": true + }, + { + "name": "is_entry", + "type": "boolean", + "example": true, + "description": "Whether the function can be called as an entry function directly in a transaction", + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic type params associated with the Move function", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "params", + "example": [], + "description": "Parameters associated with the move function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "return", + "example": "", + "description": "Return type of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "structs", + "example": [], + "description": "Structs of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the struct", + "required": true + }, + { + "name": "is_native", + "type": "boolean", + "example": true, + "description": "Whether the struct is a native struct of Move", + "required": true + }, + { + "name": "abilities", + "example": [], + "description": "Abilities associated with the struct", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic types associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + } + } + ] + }, + "required": true + }, + { + "name": "fields", + "example": [], + "description": "Fields associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "sender", + "description": "Name of the field", + "required": true + }, + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", + "required": true + } + ] + }, + "required": true + } + ] + }, + "required": true + } + ] + } + ] + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "required": true + }, + { + "name": "data", + "type": "object", + "example": "", + "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", + "required": true + } + ], + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "handle", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "key", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "value", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "example": "", + "description": "Key of table in JSON", + "required": true + }, + { + "name": "key_type", + "type": "string", + "example": "", + "description": "Type of key", + "required": true + }, + { + "name": "value", + "type": "string", + "example": "", + "description": "Value of table in JSON", + "required": true + }, + { + "name": "value_type", + "type": "string", + "example": "", + "description": "Type of value", + "required": true + } + ], + "required": true + } + ] + } + ] + } + }, + { + "name": "payload", + "required": true, + "description": "A writeset payload, used only for genesis", + "type": "object", + "fields": [ { - "name": "is_entry", - "type": "boolean", - "example": true, - "description": "Whether the function can be called as an entry function directly in a transaction", - "required": true + "name": "type", + "type": "string", + "description": "", + "required": true }, { - "name": "generic_type_params", - "example": [], - "description": "Generic type params associated with the Move function", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { - "type": "string" + "name": "write_set", + "description": "The associated writeset with a payload", + "required": true, + "type": "oneOf", + "options": [ + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "execute_as", + "type": "string", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "script", + "description": "Payload which runs a script that can run multiple functions", + "required": true, + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "Type of payload", + "required": true + }, + { + "name": "code", + "type": "object", + "description": "Move script bytecode", + "required": true + }, + { + "name": "type_arguments", + "description": "Type arguments of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "arguments", + "description": "Arguments of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + } + ] }, - "required": true - } + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "changes", + "description": "", + "types": "oneOf", + "required": true, + "options": [ + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "module", + "type": "object", + "example": "0x1::aptos_coin", + "description": "Move module id is a string representation of Move module", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "resource", + "type": "object", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "handle", + "type": "object", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "key", + "type": "object", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "data", + "example": {}, + "description": "Deleted table data", + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "example": "", + "description": "Deleted key", + "required": true + }, + { + "name": "key_type", + "type": "string", + "example": "", + "description": "Deleted key type", + "required": true + } + ], + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "" + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address." + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash" + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "bytecode", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." + }, + { + "name": "abi", + "example": {}, + "description": "", + "type": "object", + "fields": [ + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "name", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "friends", + "example": [], + "description": "Friends of the module", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "exposed_functions", + "example": [], + "description": "Public functions of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the function", + "required": true + }, + { + "name": "visibility", + "type": "string", + "example": "private", + "description": "Move function visibility", + "required": true + }, + { + "name": "is_entry", + "type": "boolean", + "example": true, + "description": "Whether the function can be called as an entry function directly in a transaction", + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic type params associated with the Move function", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "params", + "example": [], + "description": "Parameters associated with the move function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "return", + "example": "", + "description": "Return type of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "structs", + "example": [], + "description": "Structs of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the struct", + "required": true + }, + { + "name": "is_native", + "type": "boolean", + "example": true, + "description": "Whether the struct is a native struct of Move", + "required": true + }, + { + "name": "abilities", + "example": [], + "description": "Abilities associated with the struct", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic types associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + } + } + ] + }, + "required": true + }, + { + "name": "fields", + "example": [], + "description": "Fields associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "sender", + "description": "Name of the field", + "required": true + }, + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", + "required": true + } + ] + }, + "required": true + } + ] + }, + "required": true + } + ] + } + ] + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "required": true + }, + { + "name": "data", + "type": "object", + "example": "", + "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", + "required": true + } + ], + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "handle", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "key", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "value", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "example": "", + "description": "Key of table in JSON", + "required": true + }, + { + "name": "key_type", + "type": "string", + "example": "", + "description": "Type of key", + "required": true + }, + { + "name": "value", + "type": "string", + "example": "", + "description": "Value of table in JSON", + "required": true + }, + { + "name": "value_type", + "type": "string", + "example": "", + "description": "Type of value", + "required": true + } + ], + "required": true + } + ] + } + ] + }, + { + "name": "events", + "description": "Events emitted during genesis", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "guid", + "example": "", + "description": "", + "type": "object", + "required": true, + "fields": [ + { + "name": "creation_number", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", + "required": true + }, + { + "name": "account_address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.\nThis is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.", + "required": true + } + ] + }, + { + "name": "sequence_number", + "type": "string", + "example": "32425224034", + "required": true, + "description": "A string containing a 64-bit unsigned integer." + }, + { + "name": "type", + "type": "string", + "example": "0x1::account::Account", + "required": true, + "description": "String representation of an on-chain Move type tag that is exposed in transaction payload." + }, + { + "name": "data", + "type": "string", + "example": {}, + "required": true, + "description": "The JSON representation of the event" + } + ] + }, + "required": true + } + ] + } ] - }, - "required": true - }, - { - "name": "params", - "example": [], - "description": "Parameters associated with the move function", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "return", - "example": "", - "description": "Return type of the function", - "type": "array", - "field": { "type": "string" }, - "required": true } - ] - }, - "required": true - }, - { - "name": "structs", - "example": [], - "description": "Structs of the module", + ] + }, + { + "name": "events", + "example": "", + "required": true, + "description": "Events generated by the transaction", "type": "array", "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "", - "description": "Name of the struct", - "required": true - }, - { - "name": "is_native", - "type": "boolean", - "example": true, - "description": "Whether the struct is a native struct of Move", - "required": true - }, - { - "name": "abilities", - "example": [], - "description": "Abilities associated with the struct", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "generic_type_params", - "example": [], - "description": "Generic types associated with the struct", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { - "type": "string" - } - } - ] - }, - "required": true - }, - { - "name": "fields", - "example": [], - "description": "Fields associated with the struct", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", + "type": "object", + "fields": [ + { + "name": "guid", + "example": "", + "description": "", + "type": "object", + "required": true, + "fields": [ + { + "name": "creation_number", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", + "required": true + }, + { + "name": "account_address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.\nThis is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.", + "required": true + } + ] + }, + { + "name": "sequence_number", "type": "string", - "example": "sender", - "description": "Name of the field", - "required": true - }, - { + "example": "32425224034", + "required": true, + "description": "A string containing a 64-bit unsigned integer." + }, + { "name": "type", "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", - "required": true - } - ] - }, - "required": true - } - ] - }, - "required": true - } - ] - } + "example": "0x1::account::Account", + "required": true, + "description": "String representation of an on-chain Move type tag that is exposed in transaction payload." + }, + { + "name": "data", + "type": "string", + "example": {}, + "required": true, + "description": "The JSON representation of the event" + } + ] + } + } ] - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type).", - "required": true - }, - { - "name": "data", - "type": "object", - "example": "", - "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", - "required": true - } - ], - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "handle", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "key", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "value", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "data", - "example": "", - "description": "", + }, + { "type": "object", "fields": [ - { - "name": "key", - "type": "string", - "example": "", - "description": "Key of table in JSON", - "required": true - }, - { - "name": "key_type", - "type": "string", - "example": "", - "description": "Type of key", - "required": true - }, - { - "name": "value", - "type": "string", - "example": "", - "description": "Value of table in JSON", - "required": true - }, - { - "name": "value_type", - "type": "string", - "example": "", - "description": "Type of value", - "required": true - } - ], - "required": true - } - ] - } - ] - } - }, - { - "name": "payload", - "required": true, - "description": "A writeset payload, used only for genesis", - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "write_set", - "description": "The associated writeset with a payload", - "required": true, - "type": "oneOf", - "options": [ - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "execute_as", - "type": "string", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "script", - "description": "Payload which runs a script that can run multiple functions", - "required": true, - "type": "object", - "fields": [ { - "name": "type", - "type": "string", - "description": "Type of payload", - "required": true + "name": "type", + "type": "string", + "example": "block_metadata_transaction", + "description": "", + "required": true }, { - "name": "code", - "type": "object", - "description": "Move script bytecode", - "required": true + "name": "version", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true }, { - "name": "type_arguments", - "description": "Type arguments of the function", - "type": "array", - "field": { "type": "string" }, - "required": true + "name": "hash", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "", + "required": true }, { - "name": "arguments", - "description": "Arguments of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "changes", - "description": "", - "types": "oneOf", - "required": true, - "options": [ + "name": "state_change_hash", + "type": "string", + "example": "", + "description": "", + "required": true + }, { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "module", - "type": "object", - "example": "0x1::aptos_coin", - "description": "Move module id is a string representation of Move module", - "required": true - } - ] + "name": "event_root_hash", + "type": "string", + "example": "", + "description": "", + "required": true }, { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "resource", - "type": "object", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type).", - "required": true - } - ] + "name": "state_checkpoint_hash", + "type": "string", + "example": "", + "description": "", + "required": true }, { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "handle", - "type": "object", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "key", - "type": "object", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "data", - "example": {}, - "description": "Deleted table data", - "type": "object", - "fields": [ - { - "name": "key", - "type": "string", - "example": "", - "description": "Deleted key", - "required": true - }, - { - "name": "key_type", - "type": "string", - "example": "", - "description": "Deleted key type", - "required": true - } - ], - "required": true - } - ] + "name": "gas_used", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true }, { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "" - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address." - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash" - }, - { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "bytecode", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." - }, - { - "name": "abi", - "example": {}, - "description": "", - "type": "object", - "fields": [ + "name": "success", + "type": "boolean", + "example": true, + "description": "Whether the transaction was successful", + "required": true + }, + { + "name": "vm_status", + "type": "string", + "example": "", + "description": "The VM status of the transaction, can tell useful information in a failure", + "required": true + }, + { + "name": "accumulator_root_hash", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "changes", + "type": "array", + "field": { + "type": "oneOf", + "options": [ { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "module", + "type": "object", + "example": "0x1::aptos_coin", + "description": "Move module id is a string representation of Move module", + "required": true + } + ] }, { - "name": "name", - "type": "string", - "example": "", - "description": "", - "required": true + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "resource", + "type": "object", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "required": true + } + ] }, { - "name": "friends", - "example": [], - "description": "Friends of the module", - "type": "array", - "field": { "type": "string" }, - "required": true + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "handle", + "type": "object", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "key", + "type": "object", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "data", + "example": {}, + "description": "Deleted table data", + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "example": "", + "description": "Deleted key", + "required": true + }, + { + "name": "key_type", + "type": "string", + "example": "", + "description": "Deleted key type", + "required": true + } + ], + "required": true + } + ] }, { - "name": "exposed_functions", - "example": [], - "description": "Public functions of the module", - "type": "array", - "field": { "type": "object", "fields": [ - { - "name": "name", - "type": "string", - "example": "", - "description": "Name of the function", - "required": true - }, - { - "name": "visibility", - "type": "string", - "example": "private", - "description": "Move function visibility", - "required": true - }, - { - "name": "is_entry", - "type": "boolean", - "example": true, - "description": "Whether the function can be called as an entry function directly in a transaction", - "required": true - }, - { - "name": "generic_type_params", - "example": [], - "description": "Generic type params associated with the Move function", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { - "type": "string" - }, - "required": true - } - ] + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "" }, - "required": true - }, - { - "name": "params", - "example": [], - "description": "Parameters associated with the move function", - "type": "array", - "field": { - "type": "string" + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address." }, - "required": true - }, - { - "name": "return", - "example": "", - "description": "Return type of the function", - "type": "array", - "field": { - "type": "string" + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash" }, - "required": true - } + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "bytecode", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." + }, + { + "name": "abi", + "example": {}, + "description": "", + "type": "object", + "fields": [ + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "name", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "friends", + "example": [], + "description": "Friends of the module", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "exposed_functions", + "example": [], + "description": "Public functions of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the function", + "required": true + }, + { + "name": "visibility", + "type": "string", + "example": "private", + "description": "Move function visibility", + "required": true + }, + { + "name": "is_entry", + "type": "boolean", + "example": true, + "description": "Whether the function can be called as an entry function directly in a transaction", + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic type params associated with the Move function", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "params", + "example": [], + "description": "Parameters associated with the move function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "return", + "example": "", + "description": "Return type of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "structs", + "example": [], + "description": "Structs of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the struct", + "required": true + }, + { + "name": "is_native", + "type": "boolean", + "example": true, + "description": "Whether the struct is a native struct of Move", + "required": true + }, + { + "name": "abilities", + "example": [], + "description": "Abilities associated with the struct", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic types associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + } + } + ] + }, + "required": true + }, + { + "name": "fields", + "example": [], + "description": "Fields associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "sender", + "description": "Name of the field", + "required": true + }, + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", + "required": true + } + ] + }, + "required": true + } + ] + }, + "required": true + } + ] + } + ] + } ] - }, - "required": true }, { - "name": "structs", - "example": [], - "description": "Structs of the module", - "type": "array", - "field": { "type": "object", "fields": [ - { - "name": "name", - "type": "string", - "example": "", - "description": "Name of the struct", - "required": true - }, - { - "name": "is_native", - "type": "boolean", - "example": true, - "description": "Whether the struct is a native struct of Move", - "required": true - }, - { - "name": "abilities", - "example": [], - "description": "Abilities associated with the struct", - "type": "array", - "field": { - "type": "string" + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true }, - "required": true - }, - { - "name": "generic_type_params", - "example": [], - "description": "Generic types associated with the struct", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { - "type": "string" - } - } - ] + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true }, - "required": true - }, - { - "name": "fields", - "example": [], - "description": "Fields associated with the struct", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "sender", - "description": "Name of the field", - "required": true - }, - { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", - "required": true - } - ] + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true }, - "required": true - } + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "required": true + }, + { + "name": "data", + "type": "object", + "example": "", + "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", + "required": true + } + ], + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "handle", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "key", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "value", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "example": "", + "description": "Key of table in JSON", + "required": true + }, + { + "name": "key_type", + "type": "string", + "example": "", + "description": "Type of key", + "required": true + }, + { + "name": "value", + "type": "string", + "example": "", + "description": "Value of table in JSON", + "required": true + }, + { + "name": "value_type", + "type": "string", + "example": "", + "description": "Type of value", + "required": true + } + ], + "required": true + } ] - }, - "required": true } - ] - } - ] - } - ] + ] + }, + "required": true }, { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type).", - "required": true - }, - { - "name": "data", - "type": "object", - "example": "", - "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", - "required": true - } - ], - "required": true - } - ] + "name": "id", + "type": "string", + "example": "", + "description": "", + "required": true }, { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "handle", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "key", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "value", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true + "name": "epoch", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, + { + "name": "round", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, + { + "name": "events", + "example": [], + "description": "he events emitted at the block creation", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "guid", + "example": "", + "description": "", + "type": "object", + "required": true, + "fields": [ + { + "name": "creation_number", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", + "required": true + }, + { + "name": "account_address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.\nThis is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.", + "required": true + } + ] + }, + { + "name": "sequence_number", + "type": "string", + "example": "32425224034", + "required": true, + "description": "A string containing a 64-bit unsigned integer." + }, + { + "name": "type", + "type": "string", + "example": "0x1::account::Account", + "required": true, + "description": "String representation of an on-chain Move type tag that is exposed in transaction payload." + }, + { + "name": "data", + "type": "string", + "example": {}, + "required": true, + "description": "The JSON representation of the event" + } + ] }, - { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "key", - "type": "string", - "example": "", - "description": "Key of table in JSON", - "required": true - }, - { - "name": "key_type", - "type": "string", - "example": "", - "description": "Type of key", - "required": true - }, - { - "name": "value", - "type": "string", - "example": "", - "description": "Value of table in JSON", - "required": true - }, - { - "name": "value_type", - "type": "string", - "example": "", - "description": "Type of value", - "required": true - } - ], - "required": true - } - ] - } - ] - }, - { - "name": "events", - "description": "Events emitted during genesis", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "guid", + "required": true + }, + { + "name": "previous_block_votes_bitvec", "example": "", - "description": "", - "type": "object", + "description": "Previous block votes", + "type": "array", + "field": { "type": "string" }, + "required": true + }, + { + "name": "proposer", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account addresss", + "required": true + }, + { + "name": "failed_proposer_indices", + "example": [], + "description": "The indices of the proposers who failed to propose", "required": true, - "fields": [ - { - "name": "creation_number", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", - "required": true - }, - { - "name": "account_address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.\nThis is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.", - "required": true - } - ] - }, - { - "name": "sequence_number", + "type": "array", + "field": { "type": "string" } + }, + { + "name": "timestamp", "type": "string", "example": "32425224034", - "required": true, - "description": "A string containing a 64-bit unsigned integer." - }, - { + "description": "The timestamp of the block returned in milliseconds", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { "name": "type", "type": "string", - "example": "0x1::account::Account", - "required": true, - "description": "String representation of an on-chain Move type tag that is exposed in transaction payload." - }, - { - "name": "data", + "example": "state_checkpoint_transaction", + "description": "", + "required": true + }, + { + "name": "version", "type": "string", - "example": {}, - "required": true, - "description": "The JSON representation of the event" - } - ] - }, - "required": true - } - ] - } - ] - } - ] - }, - { - "name": "events", - "example": "", - "required": true, - "description": "Events generated by the transaction", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "guid", - "example": "", - "description": "", - "type": "object", - "required": true, - "fields": [ - { - "name": "creation_number", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", - "required": true - }, - { - "name": "account_address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.\nThis is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.", - "required": true - } - ] - }, - { - "name": "sequence_number", - "type": "string", - "example": "32425224034", - "required": true, - "description": "A string containing a 64-bit unsigned integer." - }, - { - "name": "type", - "type": "string", - "example": "0x1::account::Account", - "required": true, - "description": "String representation of an on-chain Move type tag that is exposed in transaction payload." - }, - { - "name": "data", - "type": "string", - "example": {}, - "required": true, - "description": "The JSON representation of the event" - } - ] - } - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "block_metadata_transaction", - "description": "", - "required": true - }, - { - "name": "version", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "hash", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "", - "required": true - }, - { - "name": "state_change_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "event_root_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "state_checkpoint_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "gas_used", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "success", - "type": "boolean", - "example": true, - "description": "Whether the transaction was successful", - "required": true - }, - { - "name": "vm_status", - "type": "string", - "example": "", - "description": "The VM status of the transaction, can tell useful information in a failure", - "required": true - }, - { - "name": "accumulator_root_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "changes", - "type": "array", - "field": { - "type": "oneOf", - "options": [ - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "module", - "type": "object", - "example": "0x1::aptos_coin", - "description": "Move module id is a string representation of Move module", - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "resource", - "type": "object", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type).", - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "handle", - "type": "object", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "key", - "type": "object", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "data", - "example": {}, - "description": "Deleted table data", - "type": "object", - "fields": [ - { - "name": "key", - "type": "string", - "example": "", - "description": "Deleted key", - "required": true - }, - { - "name": "key_type", - "type": "string", - "example": "", - "description": "Deleted key type", - "required": true - } - ], - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "" - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address." - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash" - }, - { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "bytecode", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." - }, - { - "name": "abi", - "example": {}, - "description": "", - "type": "object", - "fields": [ - { - "name": "address", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, + { + "name": "hash", "type": "string", "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", + "description": "", "required": true - }, - { - "name": "name", + }, + { + "name": "state_change_hash", "type": "string", "example": "", "description": "", "required": true - }, - { - "name": "friends", - "example": [], - "description": "Friends of the module", - "type": "array", - "field": { "type": "string" }, + }, + { + "name": "event_root_hash", + "type": "string", + "example": "", + "description": "", "required": true - }, - { - "name": "exposed_functions", - "example": [], - "description": "Public functions of the module", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "", - "description": "Name of the function", - "required": true - }, - { - "name": "visibility", - "type": "string", - "example": "private", - "description": "Move function visibility", - "required": true - }, - { - "name": "is_entry", - "type": "boolean", - "example": true, - "description": "Whether the function can be called as an entry function directly in a transaction", - "required": true - }, - { - "name": "generic_type_params", - "example": [], - "description": "Generic type params associated with the Move function", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { - "type": "string" - }, - "required": true - } - ] - }, - "required": true - }, - { - "name": "params", - "example": [], - "description": "Parameters associated with the move function", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "return", - "example": "", - "description": "Return type of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] - }, + }, + { + "name": "state_checkpoint_hash", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "gas_used", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, + { + "name": "success", + "type": "boolean", + "example": true, + "description": "Whether the transaction was successful", + "required": true + }, + { + "name": "vm_status", + "type": "string", + "example": "", + "description": "The VM status of the transaction, can tell useful information in a failure", + "required": true + }, + { + "name": "accumulator_root_hash", + "type": "string", + "example": "", + "description": "", "required": true - }, - { - "name": "structs", - "example": [], - "description": "Structs of the module", + }, + { + "name": "changes", "type": "array", "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "", - "description": "Name of the struct", - "required": true - }, - { - "name": "is_native", - "type": "boolean", - "example": true, - "description": "Whether the struct is a native struct of Move", - "required": true - }, - { - "name": "abilities", - "example": [], - "description": "Abilities associated with the struct", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "generic_type_params", - "example": [], - "description": "Generic types associated with the struct", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { - "type": "string" - } - } - ] - }, - "required": true - }, - { - "name": "fields", - "example": [], - "description": "Fields associated with the struct", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "sender", - "description": "Name of the field", - "required": true - }, - { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", - "required": true - } - ] - }, - "required": true - } - ] - }, - "required": true - } - ] - } - ] - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type).", - "required": true - }, - { - "name": "data", - "type": "object", - "example": "", - "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", - "required": true - } - ], - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "handle", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "key", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "value", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "key", - "type": "string", - "example": "", - "description": "Key of table in JSON", - "required": true - }, - { - "name": "key_type", - "type": "string", - "example": "", - "description": "Type of key", - "required": true - }, - { - "name": "value", - "type": "string", - "example": "", - "description": "Value of table in JSON", - "required": true - }, - { - "name": "value_type", - "type": "string", - "example": "", - "description": "Type of value", - "required": true - } - ], - "required": true - } - ] - } - ] - }, - "required": true - }, - { - "name": "id", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "epoch", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "round", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "events", - "example": [], - "description": "he events emitted at the block creation", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "guid", - "example": "", - "description": "", - "type": "object", - "required": true, - "fields": [ - { - "name": "creation_number", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", - "required": true - }, - { - "name": "account_address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.\nThis is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.", - "required": true - } - ] - }, - { - "name": "sequence_number", - "type": "string", - "example": "32425224034", - "required": true, - "description": "A string containing a 64-bit unsigned integer." - }, - { - "name": "type", - "type": "string", - "example": "0x1::account::Account", - "required": true, - "description": "String representation of an on-chain Move type tag that is exposed in transaction payload." - }, - { - "name": "data", - "type": "string", - "example": {}, - "required": true, - "description": "The JSON representation of the event" - } + "type": "oneOf", + "options": [ + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "module", + "type": "object", + "example": "0x1::aptos_coin", + "description": "Move module id is a string representation of Move module", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "resource", + "type": "object", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "handle", + "type": "object", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "key", + "type": "object", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "data", + "example": {}, + "description": "Deleted table data", + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "example": "", + "description": "Deleted key", + "required": true + }, + { + "name": "key_type", + "type": "string", + "example": "", + "description": "Deleted key type", + "required": true + } + ], + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "" + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address." + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash" + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "bytecode", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." + }, + { + "name": "abi", + "example": {}, + "description": "", + "type": "object", + "fields": [ + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "name", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "friends", + "example": [], + "description": "Friends of the module", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "exposed_functions", + "example": [], + "description": "Public functions of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the function", + "required": true + }, + { + "name": "visibility", + "type": "string", + "example": "private", + "description": "Move function visibility", + "required": true + }, + { + "name": "is_entry", + "type": "boolean", + "example": true, + "description": "Whether the function can be called as an entry function directly in a transaction", + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic type params associated with the Move function", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "params", + "example": [], + "description": "Parameters associated with the move function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "return", + "example": "", + "description": "Return type of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "structs", + "example": [], + "description": "Structs of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the struct", + "required": true + }, + { + "name": "is_native", + "type": "boolean", + "example": true, + "description": "Whether the struct is a native struct of Move", + "required": true + }, + { + "name": "abilities", + "example": [], + "description": "Abilities associated with the struct", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic types associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + } + } + ] + }, + "required": true + }, + { + "name": "fields", + "example": [], + "description": "Fields associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "sender", + "description": "Name of the field", + "required": true + }, + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", + "required": true + } + ] + }, + "required": true + } + ] + }, + "required": true + } + ] + } + ] + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "required": true + }, + { + "name": "data", + "type": "object", + "example": "", + "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", + "required": true + } + ], + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "handle", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "key", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "value", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "example": "", + "description": "Key of table in JSON", + "required": true + }, + { + "name": "key_type", + "type": "string", + "example": "", + "description": "Type of key", + "required": true + }, + { + "name": "value", + "type": "string", + "example": "", + "description": "Value of table in JSON", + "required": true + }, + { + "name": "value_type", + "type": "string", + "example": "", + "description": "Type of value", + "required": true + } + ], + "required": true + } + ] + } + ] + }, + "required": true + }, + { + "name": "timestamp", + "type": "string", + "example": "32425224034", + "description": "The timestamp of the block returned in milliseconds", + "required": true + } + ] + } ] - }, - "required": true - }, - { - "name": "previous_block_votes_bitvec", - "example": "", - "description": "Previous block votes", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "proposer", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account addresss", - "required": true - }, - { - "name": "failed_proposer_indices", - "example": [], - "description": "The indices of the proposers who failed to propose", - "required": true, - "type": "array", - "field": { "type": "string" } - }, - { - "name": "timestamp", - "type": "string", - "example": "32425224034", - "description": "The timestamp of the block returned in milliseconds", - "required": true } - ] + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.transactions.getTransactionByVersion({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" }, { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "state_checkpoint_transaction", - "description": "", - "required": true - }, - { - "name": "version", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "hash", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "", - "required": true - }, - { - "name": "state_change_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "event_root_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "state_checkpoint_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "gas_used", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "success", - "type": "boolean", - "example": true, - "description": "Whether the transaction was successful", - "required": true - }, - { - "name": "vm_status", - "type": "string", - "example": "", - "description": "The VM status of the transaction, can tell useful information in a failure", - "required": true - }, - { - "name": "accumulator_root_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "changes", - "type": "array", - "field": { - "type": "oneOf", - "options": [ - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "module", - "type": "object", - "example": "0x1::aptos_coin", - "description": "Move module id is a string representation of Move module", - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "resource", - "type": "object", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type).", - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "handle", - "type": "object", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "key", - "type": "object", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "data", - "example": {}, - "description": "Deleted table data", - "type": "object", - "fields": [ - { - "name": "key", - "type": "string", - "example": "", - "description": "Deleted key", - "required": true - }, - { - "name": "key_type", - "type": "string", - "example": "", - "description": "Deleted key type", - "required": true - } - ], - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "" - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address." - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash" - }, - { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "bytecode", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." - }, - { - "name": "abi", - "example": {}, - "description": "", + "language": "python", + "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.transactions.get_transaction_by_version(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getAccountTransactions": { + "apiHost": "https://mainnet-aptos-api.moralis.io", + "testHost": "https://testnet-aptos-api.moralis.io", + "summary": "Get account transactions", + "description": "Get all transactions for a given address.", + "method": "GET", + "path": "/accounts/:address/transactions", + "pathParams": [ + { + "name": "address", + "description": "Address of account with or without a 0x prefix", + "required": true, + "type": "string" + } + ], + "queryParams": [ + { + "name": "limit", + "description": "Max number of transactions to retrieve.\nIf not provided, defaults to default page size", + "required": false, + "type": "number", + "example": 5 + }, + { + "name": "start", + "description": "Account sequence number to start list of transactions.\nIf not provided, defaults to showing the latest transactions", + "required": false, + "type": "string" + } + ], + "responses": [ + { + "status": "200", + "description": "", + "body": { + "type": "array", + "field": { + "type": "oneOf", + "options": [ + { + "type": "object", + "fields": [ + { + "name": "hash", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "", + "required": true + }, + { + "name": "sender", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "sequence_number", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, + { + "name": "max_gas_amount", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, + { + "name": "gas_unit_price", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, + { + "name": "expiration_timestamp_secs", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer returned in milliseconds.", + "required": true + }, + { + "name": "payload", + "type": "oneOf", + "options": [ + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "function", + "type": "string", + "description": "Entry function id is string representation of a entry function defined on-chain.", + "required": true + }, + { + "name": "type_arguments", + "description": "Type arguments of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "arguments", + "description": "Arguments of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "Type of payload", + "required": true + }, + { + "name": "code", + "type": "object", + "description": "Move script bytecode", + "required": true + }, + { + "name": "type_arguments", + "description": "Type arguments of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "arguments", + "description": "Arguments of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "modules", + "description": "", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + } + ], + "required": true + }, + { + "name": "signature", + "type": "oneOf", + "options": [ + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "signature", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", + "required": true + }, + { + "name": "public_key", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "public_keys", + "description": "The public keys for the Ed25519 signature", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "signatures", + "description": "Signature associated with the public keys in the same order", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "threshold", + "type": "number", + "description": "The number of signatures required for a successful transaction", + "required": true + }, + { + "name": "bitmap", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "sender", + "type": "oneOf", + "options": [ + { + "type": "object", + "description": "A single Ed25519 signature", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "signature", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", + "required": true + }, + { + "name": "public_key", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + }, + { + "type": "object", + "description": "A Ed25519 multi-sig signature", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "public_keys", + "description": "The public keys for the Ed25519 signature", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "signatures", + "description": "Signature associated with the public keys in the same order", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "threshold", + "type": "number", + "description": "The number of signatures required for a successful transaction", + "required": true + }, + { + "name": "bitmap", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + } + ], + "required": true + }, + { + "name": "secondary_signer_addresses", + "description": "The other involved parties addresses", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "secondary_signers", + "type": "oneOf", + "options": [ + { + "type": "object", + "description": "A single Ed25519 signature", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "signature", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", + "required": true + }, + { + "name": "public_key", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + }, + { + "type": "object", + "description": "A Ed25519 multi-sig signature", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "public_keys", + "description": "The public keys for the Ed25519 signature", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "signatures", + "description": "Signature associated with the public keys in the same order", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "threshold", + "type": "number", + "description": "The number of signatures required for a successful transaction", + "required": true + }, + { + "name": "bitmap", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + } + ], + "required": true + } + ] + } + ], + "required": true + } + ] + }, + { "type": "object", "fields": [ - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "name", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "friends", - "example": [], - "description": "Friends of the module", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "exposed_functions", - "example": [], - "description": "Public functions of the module", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "", - "description": "Name of the function", - "required": true - }, - { - "name": "visibility", - "type": "string", - "example": "private", - "description": "Move function visibility", - "required": true - }, - { - "name": "is_entry", - "type": "boolean", - "example": true, - "description": "Whether the function can be called as an entry function directly in a transaction", - "required": true - }, - { - "name": "generic_type_params", - "example": [], - "description": "Generic type params associated with the Move function", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { - "type": "string" - }, - "required": true - } - ] - }, - "required": true - }, - { - "name": "params", - "example": [], - "description": "Parameters associated with the move function", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "return", - "example": "", - "description": "Return type of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] + { + "name": "type", + "type": "string", + "example": "", + "description": "user_transaction", + "required": true }, - "required": true - }, - { - "name": "structs", - "example": [], - "description": "Structs of the module", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "", - "description": "Name of the struct", - "required": true - }, - { - "name": "is_native", - "type": "boolean", - "example": true, - "description": "Whether the struct is a native struct of Move", - "required": true - }, - { - "name": "abilities", - "example": [], - "description": "Abilities associated with the struct", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "generic_type_params", - "example": [], - "description": "Generic types associated with the struct", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { - "type": "string" + { + "name": "version", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, + { + "name": "hash", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "", + "required": true + }, + { + "name": "state_change_hash", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "event_root_hash", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "state_checkpoint_hash", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "gas_used", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, + { + "name": "success", + "type": "boolean", + "example": true, + "description": "Whether the transaction was successful", + "required": true + }, + { + "name": "vm_status", + "type": "string", + "example": "", + "description": "The VM status of the transaction, can tell useful information in a failure", + "required": true + }, + { + "name": "accumulator_root_hash", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "changes", + "type": "array", + "required": true, + "field": { + "type": "oneOf", + "options": [ + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "module", + "type": "object", + "example": "0x1::aptos_coin", + "description": "Move module id is a string representation of Move module", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "resource", + "type": "object", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "handle", + "type": "object", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "key", + "type": "object", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "data", + "example": {}, + "description": "Deleted table data", + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "example": "", + "description": "Deleted key", + "required": true + }, + { + "name": "key_type", + "type": "string", + "example": "", + "description": "Deleted key type", + "required": true + } + ], + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "" + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address." + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash" + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "bytecode", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." + }, + { + "name": "abi", + "example": {}, + "description": "", + "type": "object", + "fields": [ + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "name", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "friends", + "example": [], + "description": "Friends of the module", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "exposed_functions", + "example": [], + "description": "Public functions of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the function", + "required": true + }, + { + "name": "visibility", + "type": "string", + "example": "private", + "description": "Move function visibility", + "required": true + }, + { + "name": "is_entry", + "type": "boolean", + "example": true, + "description": "Whether the function can be called as an entry function directly in a transaction", + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic type params associated with the Move function", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "params", + "example": [], + "description": "Parameters associated with the move function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "return", + "example": "", + "description": "Return type of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "structs", + "example": [], + "description": "Structs of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the struct", + "required": true + }, + { + "name": "is_native", + "type": "boolean", + "example": true, + "description": "Whether the struct is a native struct of Move", + "required": true + }, + { + "name": "abilities", + "example": [], + "description": "Abilities associated with the struct", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic types associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + } + } + ] + }, + "required": true + }, + { + "name": "fields", + "example": [], + "description": "Fields associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "sender", + "description": "Name of the field", + "required": true + }, + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", + "required": true + } + ] + }, + "required": true + } + ] + }, + "required": true + } + ] + } + ] + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "required": true + }, + { + "name": "data", + "type": "object", + "example": "", + "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", + "required": true + } + ], + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "handle", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "key", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "value", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "example": "", + "description": "Key of table in JSON", + "required": true + }, + { + "name": "key_type", + "type": "string", + "example": "", + "description": "Type of key", + "required": true + }, + { + "name": "value", + "type": "string", + "example": "", + "description": "Value of table in JSON", + "required": true + }, + { + "name": "value_type", + "type": "string", + "example": "", + "description": "Type of value", + "required": true + } + ], + "required": true + } + ] } - } - ] - }, - "required": true - }, - { - "name": "fields", - "example": [], - "description": "Fields associated with the struct", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "sender", - "description": "Name of the field", - "required": true - }, - { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", - "required": true - } ] - }, - "required": true } - ] }, - "required": true - } - ] - } - ] - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type).", - "required": true - }, - { - "name": "data", - "type": "object", - "example": "", - "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", - "required": true - } - ], - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "handle", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "key", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "value", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "key", - "type": "string", - "example": "", - "description": "Key of table in JSON", - "required": true - }, - { - "name": "key_type", - "type": "string", - "example": "", - "description": "Type of key", - "required": true - }, - { - "name": "value", - "type": "string", - "example": "", - "description": "Value of table in JSON", - "required": true - }, - { - "name": "value_type", - "type": "string", - "example": "", - "description": "Type of value", - "required": true - } - ], - "required": true - } - ] - } - ] - }, - "required": true - }, - { - "name": "timestamp", - "type": "string", - "example": "32425224034", - "description": "The timestamp of the block returned in milliseconds", - "required": true - } - ] - } - ] - } - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.transactions.getAccountTransactions({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.transactions.get_account_transactions(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "submitBatchTransactions": { - "apiHost": "https://mainnet-aptos-api.moralis.io", - "testHost": "https://testnet-aptos-api.moralis.io", - "summary": "Submit batch transactions", - "description": "Submit batch transactions to the Aptos Network.", - "method": "POST", - "path": "/transactions/batch", - "pathParams": [], - "queryParams": [], - "bodyParam": { - "required": true, - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "sender", - "type": "string", - "description": "A hex encoded 32 byte Aptos account address." - }, - { - "name": "sequence_number", - "type": "string", - "description": "A string containing a 64-bit unsigned integer." - }, - { - "name": "max_gas_amount", - "type": "string", - "description": "A string containing a 64-bit unsigned integer." - }, - { - "name": "gas_unit_price", - "type": "string", - "description": "A string containing a 64-bit unsigned integer." - }, - { - "name": "expiration_timestamp_secs", - "type": "string", - "description": "A string containing a 64-bit unsigned integer returned in milliseconds." - }, - { - "name": "payload", - "description": "An enum of the possible transaction payloads" - }, - { "name": "signature", "description": "" } - ] - } - }, - "responses": [ - { - "status": "200", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "transaction_failures", - "type": "array", - "description": "Summary of the failed transactions", - "example": [], - "field": { "type": "string" } - } - ] - } - }, - { "status": "201", "description": "" } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.transactions.submitBatchTransactions({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nbody = []\n\nresult = aptos_api.transactions.submit_batch_transactions(\n api_key=api_key,\n body=body,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "simulateTransaction": { - "apiHost": "https://mainnet-aptos-api.moralis.io", - "testHost": "https://testnet-aptos-api.moralis.io", - "summary": "Simulate transaction", - "description": "Simulate a transaction.", - "method": "POST", - "path": "/transactions/simulate", - "pathParams": [], - "queryParams": [], - "bodyParam": { - "required": true, - "type": "object", - "fields": [ - { - "name": "sender", - "type": "string", - "description": "A hex encoded 32 byte Aptos account address." - }, - { - "name": "sequence_number", - "type": "string", - "description": "A string containing a 64-bit unsigned integer." - }, - { - "name": "max_gas_amount", - "type": "string", - "description": "A string containing a 64-bit unsigned integer." - }, - { - "name": "gas_unit_price", - "type": "string", - "description": "A string containing a 64-bit unsigned integer." - }, - { - "name": "expiration_timestamp_secs", - "type": "string", - "description": "A string containing a 64-bit unsigned integer returned in milliseconds." - }, - { - "name": "payload", - "type": "json", - "description": "An enum of the possible transaction payloads" - }, - { "name": "signature", "description": "", "type": "json" } - ] - }, - "responses": [ - { "status": "200", "description": "" }, - { "status": "201", "description": "" } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.transactions.simulateTransaction({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nbody = []\n\nresult = aptos_api.transactions.simulate_transaction(\n api_key=api_key,\n body=body,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "encodeSubmission": { - "apiHost": "https://mainnet-aptos-api.moralis.io", - "testHost": "https://testnet-aptos-api.moralis.io", - "summary": "Encode submission", - "description": "Encode a submission.", - "method": "POST", - "path": "/transactions/encode_submission", - "pathParams": [], - "queryParams": [], - "bodyParam": { - "required": true, - "type": "object", - "fields": [ - { - "name": "sender", - "type": "string", - "description": "A hex encoded 32 byte Aptos account address." - }, - { - "name": "sequence_number", - "type": "string", - "description": "A string containing a 64-bit unsigned integer." - }, - { - "name": "max_gas_amount", - "type": "string", - "description": "A string containing a 64-bit unsigned integer." - }, - { - "name": "gas_unit_price", - "type": "string", - "description": "A string containing a 64-bit unsigned integer." - }, - { - "name": "expiration_timestamp_secs", - "type": "string", - "description": "A string containing a 64-bit unsigned integer returned in milliseconds." - }, - { - "name": "payload", - "type": "json", - "description": "An enum of the possible transaction payloads" - }, - { - "name": "secondary_signers", - "type": "array", - "description": "Secondary signer accounts of the request for Multi-agent", - "field": { "type": "string" } - } - ] - }, - "responses": [ - { "status": "200", "description": "" }, - { "status": "201", "description": "" } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.transactions.encodeSubmission({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nbody = []\n\nresult = aptos_api.transactions.encode_submission(\n api_key=api_key,\n body=body,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "estimateGasPrice": { - "apiHost": "https://mainnet-aptos-api.moralis.io", - "testHost": "https://testnet-aptos-api.moralis.io", - "summary": "Estimate gas price", - "description": "Estimate gas price based on current network load.", - "method": "GET", - "path": "/transactions/estimate_gas_price", - "pathParams": [], - "queryParams": [], - "responses": [ - { - "status": "200", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "deprioritized_gas_estimate", - "type": "number", - "description": "The deprioritized estimate for the gas unit price", - "example": 0 - }, - { - "name": "gas_estimate", - "type": "number", - "description": "The current estimate for the gas unit price", - "example": 0 - }, - { - "name": "prioritized_gas_estimate", - "type": "number", - "description": "The prioritized estimate for the gas unit price", - "example": 0 - } - ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.transactions.estimateGasPrice({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nresult = aptos_api.transactions.estimate_gas_price(\n api_key=api_key,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getBlockByHeight": { - "apiHost": "https://mainnet-aptos-api.moralis.io", - "testHost": "https://testnet-aptos-api.moralis.io", - "summary": "Get block by height", - "description": "Get block by specific block height.", - "method": "GET", - "path": "/blocks/:block_height", - "pathParams": [ - { - "name": "block_height", - "description": "Block height to lookup. Starts at 0", - "required": true, - "type": "number" - } - ], - "queryParams": [ - { - "name": "with_transactions", - "description": "If set to true, include all transactions in the block", - "required": false, - "type": "boolean" - } - ], - "responses": [ - { - "status": "200", - "description": "Returns block by height", - "body": { - "type": "object", - "fields": [ - { - "name": "block_height", - "type": "string", - "description": "A string containing a 64-bit unsigned integer.", - "example": "32425224034" - }, - { - "name": "block_hash", - "type": "string", - "description": "", - "example": "32425224034" - }, - { - "name": "block_timestamp", - "type": "string", - "description": "A string containing a 64-bit unsigned integer returned in milliseconds.", - "example": "32425224034" - }, - { - "name": "first_version", - "type": "string", - "description": "A string containing a 64-bit unsigned integer.", - "example": "32425224034" - }, - { - "name": "last_version", - "type": "string", - "description": "A string containing a 64-bit unsigned integer.", - "example": "32425224034" - }, - { - "name": "transactions", - "type": "array", - "description": "List of transactions", - "field": { - "type": "oneOf", - "options": [ - { - "type": "object", - "fields": [ - { - "name": "hash", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "", - "required": true - }, - { - "name": "sender", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "sequence_number", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "max_gas_amount", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "gas_unit_price", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "expiration_timestamp_secs", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer returned in milliseconds.", - "required": true - }, - { - "name": "payload", - "type": "oneOf", - "options": [ - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "function", - "type": "string", - "description": "Entry function id is string representation of a entry function defined on-chain.", - "required": true - }, - { - "name": "type_arguments", - "description": "Type arguments of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "arguments", - "description": "Arguments of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "Type of payload", - "required": true - }, - { - "name": "code", - "type": "object", - "description": "Move script bytecode", - "required": true - }, - { - "name": "type_arguments", - "description": "Type arguments of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "arguments", - "description": "Arguments of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "modules", - "description": "", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] - } - ], - "required": true - }, - { - "name": "signature", - "type": "oneOf", - "options": [ - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "signature", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", - "required": true - }, - { - "name": "public_key", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "public_keys", - "description": "The public keys for the Ed25519 signature", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "signatures", - "description": "Signature associated with the public keys in the same order", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "threshold", - "type": "number", - "description": "The number of signatures required for a successful transaction", - "required": true - }, - { - "name": "bitmap", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true + { + "name": "sender", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "sequence_number", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, + { + "name": "max_gas_amount", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, + { + "name": "gas_unit_price", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, + { + "name": "expiration_timestamp_secs", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer returned in milliseconds.", + "required": true + }, + { + "name": "payload", + "type": "oneOf", + "required": true, + "options": [ + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "function", + "type": "string", + "description": "Entry function id is string representation of a entry function defined on-chain.", + "required": true + }, + { + "name": "type_arguments", + "description": "Type arguments of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "arguments", + "description": "Arguments of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "Type of payload", + "required": true + }, + { + "name": "code", + "type": "object", + "description": "Move script bytecode", + "required": true + }, + { + "name": "type_arguments", + "description": "Type arguments of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "arguments", + "description": "Arguments of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "modules", + "description": "", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + } + ] + }, + { + "name": "signature", + "type": "oneOf", + "required": true, + "options": [ + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "signature", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", + "required": true + }, + { + "name": "public_key", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "public_keys", + "description": "The public keys for the Ed25519 signature", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "signatures", + "description": "Signature associated with the public keys in the same order", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "threshold", + "type": "number", + "description": "The number of signatures required for a successful transaction", + "required": true + }, + { + "name": "bitmap", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "sender", + "type": "oneOf", + "options": [ + { + "type": "object", + "description": "A single Ed25519 signature", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "signature", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", + "required": true + }, + { + "name": "public_key", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + }, + { + "type": "object", + "description": "A Ed25519 multi-sig signature", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "public_keys", + "description": "The public keys for the Ed25519 signature", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "signatures", + "description": "Signature associated with the public keys in the same order", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "threshold", + "type": "number", + "description": "The number of signatures required for a successful transaction", + "required": true + }, + { + "name": "bitmap", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + } + ], + "required": true + }, + { + "name": "secondary_signer_addresses", + "description": "The other involved parties addresses", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "secondary_signers", + "type": "oneOf", + "options": [ + { + "type": "object", + "description": "A single Ed25519 signature", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "signature", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", + "required": true + }, + { + "name": "public_key", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + }, + { + "type": "object", + "description": "A Ed25519 multi-sig signature", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "public_keys", + "description": "The public keys for the Ed25519 signature", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "signatures", + "description": "Signature associated with the public keys in the same order", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "threshold", + "type": "number", + "description": "The number of signatures required for a successful transaction", + "required": true + }, + { + "name": "bitmap", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + } + ], + "required": true + } + ] + } + ] + }, + { + "name": "events", + "example": "", + "description": "Events generated by the transaction", + "type": "array", + "required": true, + "field": { + "type": "object", + "fields": [ + { + "name": "guid", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "creation_number", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", + "required": true + }, + { + "name": "account_address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.\nThis is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.", + "required": true + } + ] + }, + { + "name": "sequence_number", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer." + }, + { + "name": "type", + "type": "string", + "example": "0x1::account::Account", + "description": "String representation of an on-chain Move type tag that is exposed in transaction payload." + }, + { + "name": "data", + "type": "string", + "example": {}, + "description": "The JSON representation of the event" + } + ], + "required": [ + "guid", + "sequence_number", + "type", + "data" + ] + } + }, + { + "name": "timestamp", + "type": "string", + "example": "32425224034", + "required": true, + "description": "The timestamp of the block returned in milliseconds" + } + ] }, { - "name": "sender", - "type": "oneOf", - "options": [ - { - "type": "object", - "description": "A single Ed25519 signature", - "fields": [ + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "genesis_transaction", + "description": "", + "required": true + }, { - "name": "type", - "type": "string", - "description": "", - "required": true + "name": "version", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true }, { - "name": "signature", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", - "required": true + "name": "hash", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "", + "required": true }, { - "name": "public_key", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - } - ] - }, - { - "type": "object", - "description": "A Ed25519 multi-sig signature", - "fields": [ + "name": "state_change_hash", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "event_root_hash", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "state_checkpoint_hash", + "type": "string", + "example": "", + "description": "", + "required": true + }, { - "name": "type", - "type": "string", - "description": "", - "required": true + "name": "gas_used", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, + { + "name": "success", + "type": "boolean", + "example": true, + "description": "Whether the transaction was successful", + "required": true }, { - "name": "public_keys", - "description": "The public keys for the Ed25519 signature", - "type": "array", - "field": { "type": "string" }, - "required": true + "name": "vm_status", + "type": "string", + "example": "", + "description": "The VM status of the transaction, can tell useful information in a failure", + "required": true + }, + { + "name": "accumulator_root_hash", + "type": "string", + "example": "", + "description": "", + "required": true }, { - "name": "signatures", - "description": "Signature associated with the public keys in the same order", - "type": "array", - "field": { "type": "string" }, - "required": true + "name": "changes", + "type": "array", + "required": true, + "field": { + "type": "oneOf", + "options": [ + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "module", + "type": "object", + "example": "0x1::aptos_coin", + "description": "Move module id is a string representation of Move module", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "resource", + "type": "object", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "handle", + "type": "object", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "key", + "type": "object", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "data", + "example": {}, + "description": "Deleted table data", + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "example": "", + "description": "Deleted key", + "required": true + }, + { + "name": "key_type", + "type": "string", + "example": "", + "description": "Deleted key type", + "required": true + } + ], + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "" + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address." + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash" + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "bytecode", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." + }, + { + "name": "abi", + "example": {}, + "description": "", + "type": "object", + "fields": [ + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "name", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "friends", + "example": [], + "description": "Friends of the module", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "exposed_functions", + "example": [], + "description": "Public functions of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the function", + "required": true + }, + { + "name": "visibility", + "type": "string", + "example": "private", + "description": "Move function visibility", + "required": true + }, + { + "name": "is_entry", + "type": "boolean", + "example": true, + "description": "Whether the function can be called as an entry function directly in a transaction", + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic type params associated with the Move function", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "params", + "example": [], + "description": "Parameters associated with the move function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "return", + "example": "", + "description": "Return type of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "structs", + "example": [], + "description": "Structs of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the struct", + "required": true + }, + { + "name": "is_native", + "type": "boolean", + "example": true, + "description": "Whether the struct is a native struct of Move", + "required": true + }, + { + "name": "abilities", + "example": [], + "description": "Abilities associated with the struct", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic types associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + } + } + ] + }, + "required": true + }, + { + "name": "fields", + "example": [], + "description": "Fields associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "sender", + "description": "Name of the field", + "required": true + }, + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", + "required": true + } + ] + }, + "required": true + } + ] + }, + "required": true + } + ] + } + ] + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "required": true + }, + { + "name": "data", + "type": "object", + "example": "", + "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", + "required": true + } + ], + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "handle", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "key", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "value", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "example": "", + "description": "Key of table in JSON", + "required": true + }, + { + "name": "key_type", + "type": "string", + "example": "", + "description": "Type of key", + "required": true + }, + { + "name": "value", + "type": "string", + "example": "", + "description": "Value of table in JSON", + "required": true + }, + { + "name": "value_type", + "type": "string", + "example": "", + "description": "Type of value", + "required": true + } + ], + "required": true + } + ] + } + ] + } }, { - "name": "threshold", - "type": "number", - "description": "The number of signatures required for a successful transaction", - "required": true + "name": "payload", + "required": true, + "description": "A writeset payload, used only for genesis", + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "write_set", + "description": "The associated writeset with a payload", + "required": true, + "type": "oneOf", + "options": [ + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "execute_as", + "type": "string", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "script", + "description": "Payload which runs a script that can run multiple functions", + "required": true, + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "Type of payload", + "required": true + }, + { + "name": "code", + "type": "object", + "description": "Move script bytecode", + "required": true + }, + { + "name": "type_arguments", + "description": "Type arguments of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "arguments", + "description": "Arguments of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "changes", + "description": "", + "types": "oneOf", + "required": true, + "options": [ + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "module", + "type": "object", + "example": "0x1::aptos_coin", + "description": "Move module id is a string representation of Move module", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "resource", + "type": "object", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "handle", + "type": "object", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "key", + "type": "object", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "data", + "example": {}, + "description": "Deleted table data", + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "example": "", + "description": "Deleted key", + "required": true + }, + { + "name": "key_type", + "type": "string", + "example": "", + "description": "Deleted key type", + "required": true + } + ], + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "" + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address." + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash" + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "bytecode", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." + }, + { + "name": "abi", + "example": {}, + "description": "", + "type": "object", + "fields": [ + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "name", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "friends", + "example": [], + "description": "Friends of the module", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "exposed_functions", + "example": [], + "description": "Public functions of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the function", + "required": true + }, + { + "name": "visibility", + "type": "string", + "example": "private", + "description": "Move function visibility", + "required": true + }, + { + "name": "is_entry", + "type": "boolean", + "example": true, + "description": "Whether the function can be called as an entry function directly in a transaction", + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic type params associated with the Move function", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "params", + "example": [], + "description": "Parameters associated with the move function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "return", + "example": "", + "description": "Return type of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "structs", + "example": [], + "description": "Structs of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the struct", + "required": true + }, + { + "name": "is_native", + "type": "boolean", + "example": true, + "description": "Whether the struct is a native struct of Move", + "required": true + }, + { + "name": "abilities", + "example": [], + "description": "Abilities associated with the struct", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic types associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + } + } + ] + }, + "required": true + }, + { + "name": "fields", + "example": [], + "description": "Fields associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "sender", + "description": "Name of the field", + "required": true + }, + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", + "required": true + } + ] + }, + "required": true + } + ] + }, + "required": true + } + ] + } + ] + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "required": true + }, + { + "name": "data", + "type": "object", + "example": "", + "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", + "required": true + } + ], + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "handle", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "key", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "value", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "example": "", + "description": "Key of table in JSON", + "required": true + }, + { + "name": "key_type", + "type": "string", + "example": "", + "description": "Type of key", + "required": true + }, + { + "name": "value", + "type": "string", + "example": "", + "description": "Value of table in JSON", + "required": true + }, + { + "name": "value_type", + "type": "string", + "example": "", + "description": "Type of value", + "required": true + } + ], + "required": true + } + ] + } + ] + }, + { + "name": "events", + "description": "Events emitted during genesis", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "guid", + "example": "", + "description": "", + "type": "object", + "required": true, + "fields": [ + { + "name": "creation_number", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", + "required": true + }, + { + "name": "account_address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.\nThis is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.", + "required": true + } + ] + }, + { + "name": "sequence_number", + "type": "string", + "example": "32425224034", + "required": true, + "description": "A string containing a 64-bit unsigned integer." + }, + { + "name": "type", + "type": "string", + "example": "0x1::account::Account", + "required": true, + "description": "String representation of an on-chain Move type tag that is exposed in transaction payload." + }, + { + "name": "data", + "type": "string", + "example": {}, + "required": true, + "description": "The JSON representation of the event" + } + ] + }, + "required": true + } + ] + } + ] + } + ] }, { - "name": "bitmap", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true + "name": "events", + "example": "", + "required": true, + "description": "Events generated by the transaction", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "guid", + "example": "", + "description": "", + "type": "object", + "required": true, + "fields": [ + { + "name": "creation_number", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", + "required": true + }, + { + "name": "account_address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.\nThis is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.", + "required": true + } + ] + }, + { + "name": "sequence_number", + "type": "string", + "example": "32425224034", + "required": true, + "description": "A string containing a 64-bit unsigned integer." + }, + { + "name": "type", + "type": "string", + "example": "0x1::account::Account", + "required": true, + "description": "String representation of an on-chain Move type tag that is exposed in transaction payload." + }, + { + "name": "data", + "type": "string", + "example": {}, + "required": true, + "description": "The JSON representation of the event" + } + ] + } } - ] - } - ], - "required": true - }, - { - "name": "secondary_signer_addresses", - "description": "The other involved parties addresses", - "type": "array", - "field": { "type": "string" }, - "required": true + ] }, { - "name": "secondary_signers", - "type": "oneOf", - "options": [ - { - "type": "object", - "description": "A single Ed25519 signature", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "signature", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", - "required": true - }, - { - "name": "public_key", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - } - ] - }, - { - "type": "object", - "description": "A Ed25519 multi-sig signature", - "fields": [ + "type": "object", + "fields": [ { - "name": "type", - "type": "string", - "description": "", - "required": true + "name": "type", + "type": "string", + "example": "block_metadata_transaction", + "description": "", + "required": true }, { - "name": "public_keys", - "description": "The public keys for the Ed25519 signature", - "type": "array", - "field": { "type": "string" }, - "required": true + "name": "version", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true }, { - "name": "signatures", - "description": "Signature associated with the public keys in the same order", - "type": "array", - "field": { "type": "string" }, - "required": true + "name": "hash", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "", + "required": true }, { - "name": "threshold", - "type": "number", - "description": "The number of signatures required for a successful transaction", - "required": true + "name": "state_change_hash", + "type": "string", + "example": "", + "description": "", + "required": true }, { - "name": "bitmap", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - } - ] - } - ], - "required": true - } - ] - } - ], - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "", - "description": "user_transaction", - "required": true - }, - { - "name": "version", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "hash", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "", - "required": true - }, - { - "name": "state_change_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "event_root_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "state_checkpoint_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "gas_used", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "success", - "type": "boolean", - "example": true, - "description": "Whether the transaction was successful", - "required": true - }, - { - "name": "vm_status", - "type": "string", - "example": "", - "description": "The VM status of the transaction, can tell useful information in a failure", - "required": true - }, - { - "name": "accumulator_root_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "changes", - "type": "array", - "required": true, - "field": { - "type": "oneOf", - "options": [ - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "module", - "type": "object", - "example": "0x1::aptos_coin", - "description": "Move module id is a string representation of Move module", - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "resource", - "type": "object", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type).", - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "handle", - "type": "object", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "key", - "type": "object", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "data", - "example": {}, - "description": "Deleted table data", - "type": "object", - "fields": [ - { - "name": "key", - "type": "string", - "example": "", - "description": "Deleted key", - "required": true - }, - { - "name": "key_type", - "type": "string", - "example": "", - "description": "Deleted key type", - "required": true - } - ], - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "" - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address." - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash" - }, - { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "bytecode", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." - }, - { - "name": "abi", - "example": {}, - "description": "", - "type": "object", - "fields": [ - { - "name": "address", + "name": "event_root_hash", "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", + "example": "", + "description": "", "required": true - }, - { - "name": "name", + }, + { + "name": "state_checkpoint_hash", "type": "string", "example": "", "description": "", "required": true - }, - { - "name": "friends", - "example": [], - "description": "Friends of the module", - "type": "array", - "field": { "type": "string" }, + }, + { + "name": "gas_used", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", "required": true - }, - { - "name": "exposed_functions", - "example": [], - "description": "Public functions of the module", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "", - "description": "Name of the function", - "required": true - }, - { - "name": "visibility", - "type": "string", - "example": "private", - "description": "Move function visibility", - "required": true - }, - { - "name": "is_entry", - "type": "boolean", - "example": true, - "description": "Whether the function can be called as an entry function directly in a transaction", - "required": true - }, - { - "name": "generic_type_params", - "example": [], - "description": "Generic type params associated with the Move function", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { - "type": "string" - }, - "required": true - } - ] - }, - "required": true - }, - { - "name": "params", - "example": [], - "description": "Parameters associated with the move function", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "return", - "example": "", - "description": "Return type of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] - }, + }, + { + "name": "success", + "type": "boolean", + "example": true, + "description": "Whether the transaction was successful", + "required": true + }, + { + "name": "vm_status", + "type": "string", + "example": "", + "description": "The VM status of the transaction, can tell useful information in a failure", "required": true - }, - { - "name": "structs", - "example": [], - "description": "Structs of the module", + }, + { + "name": "accumulator_root_hash", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "changes", "type": "array", "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "", - "description": "Name of the struct", - "required": true - }, - { - "name": "is_native", - "type": "boolean", - "example": true, - "description": "Whether the struct is a native struct of Move", - "required": true - }, - { - "name": "abilities", - "example": [], - "description": "Abilities associated with the struct", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "generic_type_params", - "example": [], - "description": "Generic types associated with the struct", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { - "type": "string" - } - } - ] - }, - "required": true - }, - { - "name": "fields", - "example": [], - "description": "Fields associated with the struct", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "sender", - "description": "Name of the field", - "required": true - }, - { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", - "required": true - } - ] - }, - "required": true - } - ] - }, - "required": true - } - ] - } - ] - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type).", - "required": true - }, - { - "name": "data", - "type": "object", - "example": "", - "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", - "required": true - } - ], - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "handle", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "key", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "value", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "key", - "type": "string", - "example": "", - "description": "Key of table in JSON", - "required": true - }, - { - "name": "key_type", - "type": "string", - "example": "", - "description": "Type of key", - "required": true - }, - { - "name": "value", - "type": "string", - "example": "", - "description": "Value of table in JSON", - "required": true - }, - { - "name": "value_type", - "type": "string", - "example": "", - "description": "Type of value", - "required": true - } - ], - "required": true - } - ] - } - ] - } - }, - { - "name": "sender", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "sequence_number", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "max_gas_amount", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "gas_unit_price", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "expiration_timestamp_secs", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer returned in milliseconds.", - "required": true - }, - { - "name": "payload", - "type": "oneOf", - "required": true, - "options": [ - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "function", - "type": "string", - "description": "Entry function id is string representation of a entry function defined on-chain.", - "required": true - }, - { - "name": "type_arguments", - "description": "Type arguments of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "arguments", - "description": "Arguments of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "Type of payload", - "required": true - }, - { - "name": "code", - "type": "object", - "description": "Move script bytecode", - "required": true - }, - { - "name": "type_arguments", - "description": "Type arguments of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "arguments", - "description": "Arguments of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "modules", - "description": "", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] - } - ] - }, - { - "name": "signature", - "type": "oneOf", - "required": true, - "options": [ - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "signature", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", - "required": true - }, - { - "name": "public_key", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "public_keys", - "description": "The public keys for the Ed25519 signature", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "signatures", - "description": "Signature associated with the public keys in the same order", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "threshold", - "type": "number", - "description": "The number of signatures required for a successful transaction", - "required": true - }, - { - "name": "bitmap", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "sender", - "type": "oneOf", - "options": [ - { - "type": "object", - "description": "A single Ed25519 signature", - "fields": [ + "type": "oneOf", + "options": [ + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "module", + "type": "object", + "example": "0x1::aptos_coin", + "description": "Move module id is a string representation of Move module", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "resource", + "type": "object", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "handle", + "type": "object", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "key", + "type": "object", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "data", + "example": {}, + "description": "Deleted table data", + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "example": "", + "description": "Deleted key", + "required": true + }, + { + "name": "key_type", + "type": "string", + "example": "", + "description": "Deleted key type", + "required": true + } + ], + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "" + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address." + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash" + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "bytecode", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." + }, + { + "name": "abi", + "example": {}, + "description": "", + "type": "object", + "fields": [ + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "name", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "friends", + "example": [], + "description": "Friends of the module", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "exposed_functions", + "example": [], + "description": "Public functions of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the function", + "required": true + }, + { + "name": "visibility", + "type": "string", + "example": "private", + "description": "Move function visibility", + "required": true + }, + { + "name": "is_entry", + "type": "boolean", + "example": true, + "description": "Whether the function can be called as an entry function directly in a transaction", + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic type params associated with the Move function", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "params", + "example": [], + "description": "Parameters associated with the move function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "return", + "example": "", + "description": "Return type of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "structs", + "example": [], + "description": "Structs of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the struct", + "required": true + }, + { + "name": "is_native", + "type": "boolean", + "example": true, + "description": "Whether the struct is a native struct of Move", + "required": true + }, + { + "name": "abilities", + "example": [], + "description": "Abilities associated with the struct", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic types associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + } + } + ] + }, + "required": true + }, + { + "name": "fields", + "example": [], + "description": "Fields associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "sender", + "description": "Name of the field", + "required": true + }, + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", + "required": true + } + ] + }, + "required": true + } + ] + }, + "required": true + } + ] + } + ] + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "required": true + }, + { + "name": "data", + "type": "object", + "example": "", + "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", + "required": true + } + ], + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "handle", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "key", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "value", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "example": "", + "description": "Key of table in JSON", + "required": true + }, + { + "name": "key_type", + "type": "string", + "example": "", + "description": "Type of key", + "required": true + }, + { + "name": "value", + "type": "string", + "example": "", + "description": "Value of table in JSON", + "required": true + }, + { + "name": "value_type", + "type": "string", + "example": "", + "description": "Type of value", + "required": true + } + ], + "required": true + } + ] + } + ] + }, + "required": true + }, { - "name": "type", - "type": "string", - "description": "", - "required": true + "name": "id", + "type": "string", + "example": "", + "description": "", + "required": true }, { - "name": "signature", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", - "required": true + "name": "epoch", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true }, { - "name": "public_key", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - } - ] - }, - { - "type": "object", - "description": "A Ed25519 multi-sig signature", - "fields": [ + "name": "round", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, { - "name": "type", - "type": "string", - "description": "", - "required": true + "name": "events", + "example": [], + "description": "he events emitted at the block creation", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "guid", + "example": "", + "description": "", + "type": "object", + "required": true, + "fields": [ + { + "name": "creation_number", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", + "required": true + }, + { + "name": "account_address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.\nThis is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.", + "required": true + } + ] + }, + { + "name": "sequence_number", + "type": "string", + "example": "32425224034", + "required": true, + "description": "A string containing a 64-bit unsigned integer." + }, + { + "name": "type", + "type": "string", + "example": "0x1::account::Account", + "required": true, + "description": "String representation of an on-chain Move type tag that is exposed in transaction payload." + }, + { + "name": "data", + "type": "string", + "example": {}, + "required": true, + "description": "The JSON representation of the event" + } + ] + }, + "required": true }, { - "name": "public_keys", - "description": "The public keys for the Ed25519 signature", - "type": "array", - "field": { "type": "string" }, - "required": true + "name": "previous_block_votes_bitvec", + "example": "", + "description": "Previous block votes", + "type": "array", + "field": { "type": "string" }, + "required": true }, { - "name": "signatures", - "description": "Signature associated with the public keys in the same order", - "type": "array", - "field": { "type": "string" }, - "required": true + "name": "proposer", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account addresss", + "required": true }, { - "name": "threshold", - "type": "number", - "description": "The number of signatures required for a successful transaction", - "required": true + "name": "failed_proposer_indices", + "example": [], + "description": "The indices of the proposers who failed to propose", + "required": true, + "type": "array", + "field": { "type": "string" } }, { - "name": "bitmap", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true + "name": "timestamp", + "type": "string", + "example": "32425224034", + "description": "The timestamp of the block returned in milliseconds", + "required": true } - ] - } - ], - "required": true - }, - { - "name": "secondary_signer_addresses", - "description": "The other involved parties addresses", - "type": "array", - "field": { "type": "string" }, - "required": true + ] }, { - "name": "secondary_signers", - "type": "oneOf", - "options": [ - { - "type": "object", - "description": "A single Ed25519 signature", - "fields": [ + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "state_checkpoint_transaction", + "description": "", + "required": true + }, { - "name": "type", - "type": "string", - "description": "", - "required": true + "name": "version", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true }, { - "name": "signature", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", - "required": true + "name": "hash", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "", + "required": true }, { - "name": "public_key", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - } - ] - }, - { - "type": "object", - "description": "A Ed25519 multi-sig signature", - "fields": [ + "name": "state_change_hash", + "type": "string", + "example": "", + "description": "", + "required": true + }, { - "name": "type", - "type": "string", - "description": "", - "required": true + "name": "event_root_hash", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "state_checkpoint_hash", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "gas_used", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, + { + "name": "success", + "type": "boolean", + "example": true, + "description": "Whether the transaction was successful", + "required": true }, { - "name": "public_keys", - "description": "The public keys for the Ed25519 signature", - "type": "array", - "field": { "type": "string" }, - "required": true + "name": "vm_status", + "type": "string", + "example": "", + "description": "The VM status of the transaction, can tell useful information in a failure", + "required": true }, { - "name": "signatures", - "description": "Signature associated with the public keys in the same order", - "type": "array", - "field": { "type": "string" }, - "required": true + "name": "accumulator_root_hash", + "type": "string", + "example": "", + "description": "", + "required": true }, { - "name": "threshold", - "type": "number", - "description": "The number of signatures required for a successful transaction", - "required": true + "name": "changes", + "type": "array", + "field": { + "type": "oneOf", + "options": [ + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "module", + "type": "object", + "example": "0x1::aptos_coin", + "description": "Move module id is a string representation of Move module", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "resource", + "type": "object", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "handle", + "type": "object", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "key", + "type": "object", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "data", + "example": {}, + "description": "Deleted table data", + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "example": "", + "description": "Deleted key", + "required": true + }, + { + "name": "key_type", + "type": "string", + "example": "", + "description": "Deleted key type", + "required": true + } + ], + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "" + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address." + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash" + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "bytecode", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." + }, + { + "name": "abi", + "example": {}, + "description": "", + "type": "object", + "fields": [ + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "name", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "friends", + "example": [], + "description": "Friends of the module", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "exposed_functions", + "example": [], + "description": "Public functions of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the function", + "required": true + }, + { + "name": "visibility", + "type": "string", + "example": "private", + "description": "Move function visibility", + "required": true + }, + { + "name": "is_entry", + "type": "boolean", + "example": true, + "description": "Whether the function can be called as an entry function directly in a transaction", + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic type params associated with the Move function", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "params", + "example": [], + "description": "Parameters associated with the move function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "return", + "example": "", + "description": "Return type of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "structs", + "example": [], + "description": "Structs of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the struct", + "required": true + }, + { + "name": "is_native", + "type": "boolean", + "example": true, + "description": "Whether the struct is a native struct of Move", + "required": true + }, + { + "name": "abilities", + "example": [], + "description": "Abilities associated with the struct", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic types associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + } + } + ] + }, + "required": true + }, + { + "name": "fields", + "example": [], + "description": "Fields associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "sender", + "description": "Name of the field", + "required": true + }, + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", + "required": true + } + ] + }, + "required": true + } + ] + }, + "required": true + } + ] + } + ] + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "required": true + }, + { + "name": "data", + "type": "object", + "example": "", + "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", + "required": true + } + ], + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "handle", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "key", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "value", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "example": "", + "description": "Key of table in JSON", + "required": true + }, + { + "name": "key_type", + "type": "string", + "example": "", + "description": "Type of key", + "required": true + }, + { + "name": "value", + "type": "string", + "example": "", + "description": "Value of table in JSON", + "required": true + }, + { + "name": "value_type", + "type": "string", + "example": "", + "description": "Type of value", + "required": true + } + ], + "required": true + } + ] + } + ] + }, + "required": true }, { - "name": "bitmap", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true + "name": "timestamp", + "type": "string", + "example": "32425224034", + "description": "The timestamp of the block returned in milliseconds", + "required": true } - ] - } - ], - "required": true + ] } - ] - } - ] - }, - { - "name": "events", - "example": "", - "description": "Events generated by the transaction", - "type": "array", - "required": true, - "field": { - "type": "object", - "fields": [ - { - "name": "guid", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "creation_number", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", - "required": true - }, - { - "name": "account_address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.\nThis is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.", - "required": true - } - ] - }, - { - "name": "sequence_number", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer." - }, - { - "name": "type", - "type": "string", - "example": "0x1::account::Account", - "description": "String representation of an on-chain Move type tag that is exposed in transaction payload." - }, - { - "name": "data", - "type": "string", - "example": {}, - "description": "The JSON representation of the event" - } - ], - "required": [ - "guid", - "sequence_number", - "type", - "data" ] - } - }, - { - "name": "timestamp", - "type": "string", - "example": "32425224034", - "required": true, - "description": "The timestamp of the block returned in milliseconds" } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "genesis_transaction", - "description": "", - "required": true - }, - { - "name": "version", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "hash", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "", - "required": true - }, - { - "name": "state_change_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.transactions.getAccountTransactions({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.transactions.get_account_transactions(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "submitBatchTransactions": { + "apiHost": "https://mainnet-aptos-api.moralis.io", + "testHost": "https://testnet-aptos-api.moralis.io", + "summary": "Submit batch transactions", + "description": "Submit batch transactions to the Aptos Network.", + "method": "POST", + "path": "/transactions/batch", + "pathParams": [], + "queryParams": [], + "bodyParam": { + "required": true, + "type": "array", + "field": { + "type": "object", + "fields": [ { - "name": "event_root_hash", - "type": "string", - "example": "", - "description": "", - "required": true + "name": "sender", + "type": "string", + "description": "A hex encoded 32 byte Aptos account address." }, { - "name": "state_checkpoint_hash", - "type": "string", - "example": "", - "description": "", - "required": true + "name": "sequence_number", + "type": "string", + "description": "A string containing a 64-bit unsigned integer." }, { - "name": "gas_used", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true + "name": "max_gas_amount", + "type": "string", + "description": "A string containing a 64-bit unsigned integer." }, { - "name": "success", - "type": "boolean", - "example": true, - "description": "Whether the transaction was successful", - "required": true + "name": "gas_unit_price", + "type": "string", + "description": "A string containing a 64-bit unsigned integer." }, { - "name": "vm_status", - "type": "string", - "example": "", - "description": "The VM status of the transaction, can tell useful information in a failure", - "required": true + "name": "expiration_timestamp_secs", + "type": "string", + "description": "A string containing a 64-bit unsigned integer returned in milliseconds." }, { - "name": "accumulator_root_hash", - "type": "string", - "example": "", - "description": "", - "required": true + "name": "payload", + "description": "An enum of the possible transaction payloads" }, - { - "name": "changes", - "type": "array", - "required": true, - "field": { - "type": "oneOf", - "options": [ - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "module", - "type": "object", - "example": "0x1::aptos_coin", - "description": "Move module id is a string representation of Move module", - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "resource", - "type": "object", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type).", - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "handle", - "type": "object", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "key", - "type": "object", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "data", - "example": {}, - "description": "Deleted table data", - "type": "object", - "fields": [ - { - "name": "key", - "type": "string", - "example": "", - "description": "Deleted key", - "required": true - }, - { - "name": "key_type", - "type": "string", - "example": "", - "description": "Deleted key type", - "required": true - } - ], - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "" - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address." - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash" - }, - { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "bytecode", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." - }, - { - "name": "abi", - "example": {}, - "description": "", - "type": "object", - "fields": [ - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "name", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "friends", - "example": [], - "description": "Friends of the module", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "exposed_functions", - "example": [], - "description": "Public functions of the module", - "type": "array", - "field": { - "type": "object", - "fields": [ + { "name": "signature", "description": "" } + ] + } + }, + "responses": [ + { + "status": "200", + "description": "", + "body": { + "type": "object", + "fields": [ + { + "name": "transaction_failures", + "type": "array", + "description": "Summary of the failed transactions", + "example": [], + "field": { "type": "string" } + } + ] + } + }, + { "status": "201", "description": "" } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.transactions.submitBatchTransactions({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nbody = []\n\nresult = aptos_api.transactions.submit_batch_transactions(\n api_key=api_key,\n body=body,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "simulateTransaction": { + "apiHost": "https://mainnet-aptos-api.moralis.io", + "testHost": "https://testnet-aptos-api.moralis.io", + "summary": "Simulate transaction", + "description": "Simulate a transaction.", + "method": "POST", + "path": "/transactions/simulate", + "pathParams": [], + "queryParams": [], + "bodyParam": { + "required": true, + "type": "object", + "fields": [ + { + "name": "sender", + "type": "string", + "description": "A hex encoded 32 byte Aptos account address." + }, + { + "name": "sequence_number", + "type": "string", + "description": "A string containing a 64-bit unsigned integer." + }, + { + "name": "max_gas_amount", + "type": "string", + "description": "A string containing a 64-bit unsigned integer." + }, + { + "name": "gas_unit_price", + "type": "string", + "description": "A string containing a 64-bit unsigned integer." + }, + { + "name": "expiration_timestamp_secs", + "type": "string", + "description": "A string containing a 64-bit unsigned integer returned in milliseconds." + }, + { + "name": "payload", + "type": "json", + "description": "An enum of the possible transaction payloads" + }, + { "name": "signature", "description": "", "type": "json" } + ] + }, + "responses": [ + { "status": "200", "description": "" }, + { "status": "201", "description": "" } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.transactions.simulateTransaction({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nbody = []\n\nresult = aptos_api.transactions.simulate_transaction(\n api_key=api_key,\n body=body,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "encodeSubmission": { + "apiHost": "https://mainnet-aptos-api.moralis.io", + "testHost": "https://testnet-aptos-api.moralis.io", + "summary": "Encode submission", + "description": "Encode a submission.", + "method": "POST", + "path": "/transactions/encode_submission", + "pathParams": [], + "queryParams": [], + "bodyParam": { + "required": true, + "type": "object", + "fields": [ + { + "name": "sender", + "type": "string", + "description": "A hex encoded 32 byte Aptos account address." + }, + { + "name": "sequence_number", + "type": "string", + "description": "A string containing a 64-bit unsigned integer." + }, + { + "name": "max_gas_amount", + "type": "string", + "description": "A string containing a 64-bit unsigned integer." + }, + { + "name": "gas_unit_price", + "type": "string", + "description": "A string containing a 64-bit unsigned integer." + }, + { + "name": "expiration_timestamp_secs", + "type": "string", + "description": "A string containing a 64-bit unsigned integer returned in milliseconds." + }, + { + "name": "payload", + "type": "json", + "description": "An enum of the possible transaction payloads" + }, + { + "name": "secondary_signers", + "type": "array", + "description": "Secondary signer accounts of the request for Multi-agent", + "field": { "type": "string" } + } + ] + }, + "responses": [ + { "status": "200", "description": "" }, + { "status": "201", "description": "" } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.transactions.encodeSubmission({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nbody = []\n\nresult = aptos_api.transactions.encode_submission(\n api_key=api_key,\n body=body,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "estimateGasPrice": { + "apiHost": "https://mainnet-aptos-api.moralis.io", + "testHost": "https://testnet-aptos-api.moralis.io", + "summary": "Estimate gas price", + "description": "Estimate gas price based on current network load.", + "method": "GET", + "path": "/transactions/estimate_gas_price", + "pathParams": [], + "queryParams": [], + "responses": [ + { + "status": "200", + "description": "", + "body": { + "type": "object", + "fields": [ + { + "name": "deprioritized_gas_estimate", + "type": "number", + "description": "The deprioritized estimate for the gas unit price", + "example": 0 + }, + { + "name": "gas_estimate", + "type": "number", + "description": "The current estimate for the gas unit price", + "example": 0 + }, + { + "name": "prioritized_gas_estimate", + "type": "number", + "description": "The prioritized estimate for the gas unit price", + "example": 0 + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.transactions.estimateGasPrice({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nresult = aptos_api.transactions.estimate_gas_price(\n api_key=api_key,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getBlockByHeight": { + "apiHost": "https://mainnet-aptos-api.moralis.io", + "testHost": "https://testnet-aptos-api.moralis.io", + "summary": "Get block by height", + "description": "Get block by specific block height.", + "method": "GET", + "path": "/blocks/:block_height", + "pathParams": [ + { + "name": "block_height", + "description": "Block height to lookup. Starts at 0", + "required": true, + "type": "number" + } + ], + "queryParams": [ + { + "name": "with_transactions", + "description": "If set to true, include all transactions in the block", + "required": false, + "type": "boolean" + } + ], + "responses": [ + { + "status": "200", + "description": "Returns block by height", + "body": { + "type": "object", + "fields": [ + { + "name": "block_height", + "type": "string", + "description": "A string containing a 64-bit unsigned integer.", + "example": "32425224034" + }, + { + "name": "block_hash", + "type": "string", + "description": "", + "example": "32425224034" + }, + { + "name": "block_timestamp", + "type": "string", + "description": "A string containing a 64-bit unsigned integer returned in milliseconds.", + "example": "32425224034" + }, + { + "name": "first_version", + "type": "string", + "description": "A string containing a 64-bit unsigned integer.", + "example": "32425224034" + }, + { + "name": "last_version", + "type": "string", + "description": "A string containing a 64-bit unsigned integer.", + "example": "32425224034" + }, + { + "name": "transactions", + "type": "array", + "description": "List of transactions", + "field": { + "type": "oneOf", + "options": [ + { + "type": "object", + "fields": [ { - "name": "name", - "type": "string", - "example": "", - "description": "Name of the function", - "required": true + "name": "hash", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "", + "required": true }, { - "name": "visibility", - "type": "string", - "example": "private", - "description": "Move function visibility", - "required": true + "name": "sender", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true }, { - "name": "is_entry", - "type": "boolean", - "example": true, - "description": "Whether the function can be called as an entry function directly in a transaction", - "required": true + "name": "sequence_number", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true }, { - "name": "generic_type_params", - "example": [], - "description": "Generic type params associated with the Move function", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { - "type": "string" + "name": "max_gas_amount", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, + { + "name": "gas_unit_price", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, + { + "name": "expiration_timestamp_secs", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer returned in milliseconds.", + "required": true + }, + { + "name": "payload", + "type": "oneOf", + "options": [ + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "function", + "type": "string", + "description": "Entry function id is string representation of a entry function defined on-chain.", + "required": true + }, + { + "name": "type_arguments", + "description": "Type arguments of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "arguments", + "description": "Arguments of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] }, - "required": true - } + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "Type of payload", + "required": true + }, + { + "name": "code", + "type": "object", + "description": "Move script bytecode", + "required": true + }, + { + "name": "type_arguments", + "description": "Type arguments of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "arguments", + "description": "Arguments of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "modules", + "description": "", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + } + ], + "required": true + }, + { + "name": "signature", + "type": "oneOf", + "options": [ + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "signature", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", + "required": true + }, + { + "name": "public_key", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "public_keys", + "description": "The public keys for the Ed25519 signature", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "signatures", + "description": "Signature associated with the public keys in the same order", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "threshold", + "type": "number", + "description": "The number of signatures required for a successful transaction", + "required": true + }, + { + "name": "bitmap", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "sender", + "type": "oneOf", + "options": [ + { + "type": "object", + "description": "A single Ed25519 signature", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "signature", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", + "required": true + }, + { + "name": "public_key", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + }, + { + "type": "object", + "description": "A Ed25519 multi-sig signature", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "public_keys", + "description": "The public keys for the Ed25519 signature", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "signatures", + "description": "Signature associated with the public keys in the same order", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "threshold", + "type": "number", + "description": "The number of signatures required for a successful transaction", + "required": true + }, + { + "name": "bitmap", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + } + ], + "required": true + }, + { + "name": "secondary_signer_addresses", + "description": "The other involved parties addresses", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "secondary_signers", + "type": "oneOf", + "options": [ + { + "type": "object", + "description": "A single Ed25519 signature", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "signature", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", + "required": true + }, + { + "name": "public_key", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + }, + { + "type": "object", + "description": "A Ed25519 multi-sig signature", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "public_keys", + "description": "The public keys for the Ed25519 signature", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "signatures", + "description": "Signature associated with the public keys in the same order", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "threshold", + "type": "number", + "description": "The number of signatures required for a successful transaction", + "required": true + }, + { + "name": "bitmap", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + } + ], + "required": true + } + ] + } + ], + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "", + "description": "user_transaction", + "required": true + }, + { + "name": "version", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, + { + "name": "hash", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "", + "required": true + }, + { + "name": "state_change_hash", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "event_root_hash", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "state_checkpoint_hash", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "gas_used", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, + { + "name": "success", + "type": "boolean", + "example": true, + "description": "Whether the transaction was successful", + "required": true + }, + { + "name": "vm_status", + "type": "string", + "example": "", + "description": "The VM status of the transaction, can tell useful information in a failure", + "required": true + }, + { + "name": "accumulator_root_hash", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "changes", + "type": "array", + "required": true, + "field": { + "type": "oneOf", + "options": [ + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "module", + "type": "object", + "example": "0x1::aptos_coin", + "description": "Move module id is a string representation of Move module", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "resource", + "type": "object", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "handle", + "type": "object", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "key", + "type": "object", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "data", + "example": {}, + "description": "Deleted table data", + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "example": "", + "description": "Deleted key", + "required": true + }, + { + "name": "key_type", + "type": "string", + "example": "", + "description": "Deleted key type", + "required": true + } + ], + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "" + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address." + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash" + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "bytecode", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." + }, + { + "name": "abi", + "example": {}, + "description": "", + "type": "object", + "fields": [ + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "name", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "friends", + "example": [], + "description": "Friends of the module", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "exposed_functions", + "example": [], + "description": "Public functions of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the function", + "required": true + }, + { + "name": "visibility", + "type": "string", + "example": "private", + "description": "Move function visibility", + "required": true + }, + { + "name": "is_entry", + "type": "boolean", + "example": true, + "description": "Whether the function can be called as an entry function directly in a transaction", + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic type params associated with the Move function", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "params", + "example": [], + "description": "Parameters associated with the move function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "return", + "example": "", + "description": "Return type of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "structs", + "example": [], + "description": "Structs of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the struct", + "required": true + }, + { + "name": "is_native", + "type": "boolean", + "example": true, + "description": "Whether the struct is a native struct of Move", + "required": true + }, + { + "name": "abilities", + "example": [], + "description": "Abilities associated with the struct", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic types associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + } + } + ] + }, + "required": true + }, + { + "name": "fields", + "example": [], + "description": "Fields associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "sender", + "description": "Name of the field", + "required": true + }, + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", + "required": true + } + ] + }, + "required": true + } + ] + }, + "required": true + } + ] + } + ] + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "required": true + }, + { + "name": "data", + "type": "object", + "example": "", + "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", + "required": true + } + ], + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "handle", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "key", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "value", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "example": "", + "description": "Key of table in JSON", + "required": true + }, + { + "name": "key_type", + "type": "string", + "example": "", + "description": "Type of key", + "required": true + }, + { + "name": "value", + "type": "string", + "example": "", + "description": "Value of table in JSON", + "required": true + }, + { + "name": "value_type", + "type": "string", + "example": "", + "description": "Type of value", + "required": true + } + ], + "required": true + } + ] + } + ] + } + }, + { + "name": "sender", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "sequence_number", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, + { + "name": "max_gas_amount", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, + { + "name": "gas_unit_price", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, + { + "name": "expiration_timestamp_secs", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer returned in milliseconds.", + "required": true + }, + { + "name": "payload", + "type": "oneOf", + "required": true, + "options": [ + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "function", + "type": "string", + "description": "Entry function id is string representation of a entry function defined on-chain.", + "required": true + }, + { + "name": "type_arguments", + "description": "Type arguments of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "arguments", + "description": "Arguments of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "Type of payload", + "required": true + }, + { + "name": "code", + "type": "object", + "description": "Move script bytecode", + "required": true + }, + { + "name": "type_arguments", + "description": "Type arguments of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "arguments", + "description": "Arguments of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "modules", + "description": "", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + } + ] + }, + { + "name": "signature", + "type": "oneOf", + "required": true, + "options": [ + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "signature", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", + "required": true + }, + { + "name": "public_key", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "public_keys", + "description": "The public keys for the Ed25519 signature", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "signatures", + "description": "Signature associated with the public keys in the same order", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "threshold", + "type": "number", + "description": "The number of signatures required for a successful transaction", + "required": true + }, + { + "name": "bitmap", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "sender", + "type": "oneOf", + "options": [ + { + "type": "object", + "description": "A single Ed25519 signature", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "signature", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", + "required": true + }, + { + "name": "public_key", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + }, + { + "type": "object", + "description": "A Ed25519 multi-sig signature", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "public_keys", + "description": "The public keys for the Ed25519 signature", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "signatures", + "description": "Signature associated with the public keys in the same order", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "threshold", + "type": "number", + "description": "The number of signatures required for a successful transaction", + "required": true + }, + { + "name": "bitmap", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + } + ], + "required": true + }, + { + "name": "secondary_signer_addresses", + "description": "The other involved parties addresses", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "secondary_signers", + "type": "oneOf", + "options": [ + { + "type": "object", + "description": "A single Ed25519 signature", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "signature", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", + "required": true + }, + { + "name": "public_key", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + }, + { + "type": "object", + "description": "A Ed25519 multi-sig signature", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "public_keys", + "description": "The public keys for the Ed25519 signature", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "signatures", + "description": "Signature associated with the public keys in the same order", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "threshold", + "type": "number", + "description": "The number of signatures required for a successful transaction", + "required": true + }, + { + "name": "bitmap", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + } + ], + "required": true + } + ] + } ] - }, - "required": true }, { - "name": "params", - "example": [], - "description": "Parameters associated with the move function", - "type": "array", - "field": { "type": "string" }, - "required": true + "name": "events", + "example": "", + "description": "Events generated by the transaction", + "type": "array", + "required": true, + "field": { + "type": "object", + "fields": [ + { + "name": "guid", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "creation_number", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", + "required": true + }, + { + "name": "account_address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.\nThis is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.", + "required": true + } + ] + }, + { + "name": "sequence_number", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer." + }, + { + "name": "type", + "type": "string", + "example": "0x1::account::Account", + "description": "String representation of an on-chain Move type tag that is exposed in transaction payload." + }, + { + "name": "data", + "type": "string", + "example": {}, + "description": "The JSON representation of the event" + } + ], + "required": [ + "guid", + "sequence_number", + "type", + "data" + ] + } }, { - "name": "return", - "example": "", - "description": "Return type of the function", - "type": "array", - "field": { "type": "string" }, - "required": true + "name": "timestamp", + "type": "string", + "example": "32425224034", + "required": true, + "description": "The timestamp of the block returned in milliseconds" } - ] - }, - "required": true - }, - { - "name": "structs", - "example": [], - "description": "Structs of the module", - "type": "array", - "field": { - "type": "object", - "fields": [ + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "genesis_transaction", + "description": "", + "required": true + }, { - "name": "name", - "type": "string", - "example": "", - "description": "Name of the struct", - "required": true + "name": "version", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true }, { - "name": "is_native", - "type": "boolean", - "example": true, - "description": "Whether the struct is a native struct of Move", - "required": true + "name": "hash", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "", + "required": true }, { - "name": "abilities", - "example": [], - "description": "Abilities associated with the struct", - "type": "array", - "field": { "type": "string" }, - "required": true + "name": "state_change_hash", + "type": "string", + "example": "", + "description": "", + "required": true }, { - "name": "generic_type_params", - "example": [], - "description": "Generic types associated with the struct", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { - "type": "string" - } - } - ] - }, - "required": true + "name": "event_root_hash", + "type": "string", + "example": "", + "description": "", + "required": true }, { - "name": "fields", - "example": [], - "description": "Fields associated with the struct", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "sender", - "description": "Name of the field", - "required": true - }, - { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", - "required": true - } - ] - }, - "required": true - } - ] - }, - "required": true - } - ] - } - ] - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type).", - "required": true - }, - { - "name": "data", - "type": "object", - "example": "", - "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", - "required": true - } - ], - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "handle", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "key", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "value", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "key", - "type": "string", - "example": "", - "description": "Key of table in JSON", - "required": true - }, - { - "name": "key_type", - "type": "string", - "example": "", - "description": "Type of key", - "required": true - }, - { - "name": "value", - "type": "string", - "example": "", - "description": "Value of table in JSON", - "required": true - }, - { - "name": "value_type", - "type": "string", - "example": "", - "description": "Type of value", - "required": true - } - ], - "required": true - } - ] - } - ] - } - }, - { - "name": "payload", - "required": true, - "description": "A writeset payload, used only for genesis", - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "write_set", - "description": "The associated writeset with a payload", - "required": true, - "type": "oneOf", - "options": [ - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "execute_as", - "type": "string", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "script", - "description": "Payload which runs a script that can run multiple functions", - "required": true, - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "Type of payload", - "required": true - }, - { - "name": "code", - "type": "object", - "description": "Move script bytecode", - "required": true - }, - { - "name": "type_arguments", - "description": "Type arguments of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "arguments", - "description": "Arguments of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "changes", - "description": "", - "types": "oneOf", - "required": true, - "options": [ - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "module", - "type": "object", - "example": "0x1::aptos_coin", - "description": "Move module id is a string representation of Move module", - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "resource", - "type": "object", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type).", - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "handle", - "type": "object", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "key", - "type": "object", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "data", - "example": {}, - "description": "Deleted table data", - "type": "object", - "fields": [ + "name": "state_checkpoint_hash", + "type": "string", + "example": "", + "description": "", + "required": true + }, { - "name": "key", - "type": "string", - "example": "", - "description": "Deleted key", - "required": true + "name": "gas_used", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true }, { - "name": "key_type", - "type": "string", - "example": "", - "description": "Deleted key type", - "required": true - } - ], - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "" - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address." - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash" - }, - { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ + "name": "success", + "type": "boolean", + "example": true, + "description": "Whether the transaction was successful", + "required": true + }, { - "name": "bytecode", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." + "name": "vm_status", + "type": "string", + "example": "", + "description": "The VM status of the transaction, can tell useful information in a failure", + "required": true }, { - "name": "abi", - "example": {}, - "description": "", - "type": "object", - "fields": [ - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "name", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "friends", - "example": [], - "description": "Friends of the module", - "type": "array", - "field": { - "type": "string" - }, - "required": true - }, - { - "name": "exposed_functions", - "example": [], - "description": "Public functions of the module", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "", - "description": "Name of the function", - "required": true - }, - { - "name": "visibility", - "type": "string", - "example": "private", - "description": "Move function visibility", - "required": true - }, - { - "name": "is_entry", - "type": "boolean", - "example": true, - "description": "Whether the function can be called as an entry function directly in a transaction", - "required": true - }, - { - "name": "generic_type_params", - "example": [], - "description": "Generic type params associated with the Move function", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { - "type": "string" - }, - "required": true - } - ] + "name": "accumulator_root_hash", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "changes", + "type": "array", + "required": true, + "field": { + "type": "oneOf", + "options": [ + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "module", + "type": "object", + "example": "0x1::aptos_coin", + "description": "Move module id is a string representation of Move module", + "required": true + } + ] }, - "required": true - }, - { - "name": "params", - "example": [], - "description": "Parameters associated with the move function", - "type": "array", - "field": { - "type": "string" + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "resource", + "type": "object", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "required": true + } + ] }, - "required": true - }, - { - "name": "return", - "example": "", - "description": "Return type of the function", - "type": "array", - "field": { - "type": "string" + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "handle", + "type": "object", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "key", + "type": "object", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "data", + "example": {}, + "description": "Deleted table data", + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "example": "", + "description": "Deleted key", + "required": true + }, + { + "name": "key_type", + "type": "string", + "example": "", + "description": "Deleted key type", + "required": true + } + ], + "required": true + } + ] }, - "required": true - } - ] - }, - "required": true - }, - { - "name": "structs", - "example": [], - "description": "Structs of the module", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "", - "description": "Name of the struct", - "required": true - }, - { - "name": "is_native", - "type": "boolean", - "example": true, - "description": "Whether the struct is a native struct of Move", - "required": true - }, - { - "name": "abilities", - "example": [], - "description": "Abilities associated with the struct", - "type": "array", - "field": { - "type": "string" + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "" + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address." + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash" + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "bytecode", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." + }, + { + "name": "abi", + "example": {}, + "description": "", + "type": "object", + "fields": [ + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "name", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "friends", + "example": [], + "description": "Friends of the module", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "exposed_functions", + "example": [], + "description": "Public functions of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the function", + "required": true + }, + { + "name": "visibility", + "type": "string", + "example": "private", + "description": "Move function visibility", + "required": true + }, + { + "name": "is_entry", + "type": "boolean", + "example": true, + "description": "Whether the function can be called as an entry function directly in a transaction", + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic type params associated with the Move function", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "params", + "example": [], + "description": "Parameters associated with the move function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "return", + "example": "", + "description": "Return type of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "structs", + "example": [], + "description": "Structs of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the struct", + "required": true + }, + { + "name": "is_native", + "type": "boolean", + "example": true, + "description": "Whether the struct is a native struct of Move", + "required": true + }, + { + "name": "abilities", + "example": [], + "description": "Abilities associated with the struct", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic types associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + } + } + ] + }, + "required": true + }, + { + "name": "fields", + "example": [], + "description": "Fields associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "sender", + "description": "Name of the field", + "required": true + }, + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", + "required": true + } + ] + }, + "required": true + } + ] + }, + "required": true + } + ] + } + ] + } + ] }, - "required": true - }, - { - "name": "generic_type_params", - "example": [], - "description": "Generic types associated with the struct", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { - "type": "string" - } - } - ] + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "required": true + }, + { + "name": "data", + "type": "object", + "example": "", + "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", + "required": true + } + ], + "required": true + } + ] }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "handle", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "key", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "value", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "example": "", + "description": "Key of table in JSON", + "required": true + }, + { + "name": "key_type", + "type": "string", + "example": "", + "description": "Type of key", + "required": true + }, + { + "name": "value", + "type": "string", + "example": "", + "description": "Value of table in JSON", + "required": true + }, + { + "name": "value_type", + "type": "string", + "example": "", + "description": "Type of value", + "required": true + } + ], + "required": true + } + ] + } + ] + } + }, + { + "name": "payload", + "required": true, + "description": "A writeset payload, used only for genesis", + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", "required": true - }, - { - "name": "fields", - "example": [], - "description": "Fields associated with the struct", - "type": "array", - "field": { - "type": "object", - "fields": [ + }, + { + "name": "write_set", + "description": "The associated writeset with a payload", + "required": true, + "type": "oneOf", + "options": [ { - "name": "name", - "type": "string", - "example": "sender", - "description": "Name of the field", - "required": true + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "execute_as", + "type": "string", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "script", + "description": "Payload which runs a script that can run multiple functions", + "required": true, + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "Type of payload", + "required": true + }, + { + "name": "code", + "type": "object", + "description": "Move script bytecode", + "required": true + }, + { + "name": "type_arguments", + "description": "Type arguments of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "arguments", + "description": "Arguments of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + } + ] }, { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", - "required": true + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "changes", + "description": "", + "types": "oneOf", + "required": true, + "options": [ + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "module", + "type": "object", + "example": "0x1::aptos_coin", + "description": "Move module id is a string representation of Move module", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "resource", + "type": "object", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "handle", + "type": "object", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "key", + "type": "object", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "data", + "example": {}, + "description": "Deleted table data", + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "example": "", + "description": "Deleted key", + "required": true + }, + { + "name": "key_type", + "type": "string", + "example": "", + "description": "Deleted key type", + "required": true + } + ], + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "" + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address." + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash" + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "bytecode", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." + }, + { + "name": "abi", + "example": {}, + "description": "", + "type": "object", + "fields": [ + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "name", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "friends", + "example": [], + "description": "Friends of the module", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "exposed_functions", + "example": [], + "description": "Public functions of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the function", + "required": true + }, + { + "name": "visibility", + "type": "string", + "example": "private", + "description": "Move function visibility", + "required": true + }, + { + "name": "is_entry", + "type": "boolean", + "example": true, + "description": "Whether the function can be called as an entry function directly in a transaction", + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic type params associated with the Move function", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "params", + "example": [], + "description": "Parameters associated with the move function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "return", + "example": "", + "description": "Return type of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "structs", + "example": [], + "description": "Structs of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the struct", + "required": true + }, + { + "name": "is_native", + "type": "boolean", + "example": true, + "description": "Whether the struct is a native struct of Move", + "required": true + }, + { + "name": "abilities", + "example": [], + "description": "Abilities associated with the struct", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic types associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + } + } + ] + }, + "required": true + }, + { + "name": "fields", + "example": [], + "description": "Fields associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "sender", + "description": "Name of the field", + "required": true + }, + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", + "required": true + } + ] + }, + "required": true + } + ] + }, + "required": true + } + ] + } + ] + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "required": true + }, + { + "name": "data", + "type": "object", + "example": "", + "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", + "required": true + } + ], + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "handle", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "key", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "value", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "example": "", + "description": "Key of table in JSON", + "required": true + }, + { + "name": "key_type", + "type": "string", + "example": "", + "description": "Type of key", + "required": true + }, + { + "name": "value", + "type": "string", + "example": "", + "description": "Value of table in JSON", + "required": true + }, + { + "name": "value_type", + "type": "string", + "example": "", + "description": "Type of value", + "required": true + } + ], + "required": true + } + ] + } + ] + }, + { + "name": "events", + "description": "Events emitted during genesis", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "guid", + "example": "", + "description": "", + "type": "object", + "required": true, + "fields": [ + { + "name": "creation_number", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", + "required": true + }, + { + "name": "account_address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.\nThis is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.", + "required": true + } + ] + }, + { + "name": "sequence_number", + "type": "string", + "example": "32425224034", + "required": true, + "description": "A string containing a 64-bit unsigned integer." + }, + { + "name": "type", + "type": "string", + "example": "0x1::account::Account", + "required": true, + "description": "String representation of an on-chain Move type tag that is exposed in transaction payload." + }, + { + "name": "data", + "type": "string", + "example": {}, + "required": true, + "description": "The JSON representation of the event" + } + ] + }, + "required": true + } + ] } - ] + ] + } + ] + }, + { + "name": "events", + "example": "", + "required": true, + "description": "Events generated by the transaction", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "guid", + "example": "", + "description": "", + "type": "object", + "required": true, + "fields": [ + { + "name": "creation_number", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", + "required": true + }, + { + "name": "account_address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.\nThis is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.", + "required": true + } + ] }, - "required": true - } + { + "name": "sequence_number", + "type": "string", + "example": "32425224034", + "required": true, + "description": "A string containing a 64-bit unsigned integer." + }, + { + "name": "type", + "type": "string", + "example": "0x1::account::Account", + "required": true, + "description": "String representation of an on-chain Move type tag that is exposed in transaction payload." + }, + { + "name": "data", + "type": "string", + "example": {}, + "required": true, + "description": "The JSON representation of the event" + } ] - }, - "required": true } - ] } - ] - } - ] + ] }, { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ + "type": "object", + "fields": [ { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type).", - "required": true + "name": "type", + "type": "string", + "example": "block_metadata_transaction", + "description": "", + "required": true }, { - "name": "data", - "type": "object", - "example": "", - "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", - "required": true - } - ], - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "handle", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "key", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "value", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ + "name": "version", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, { - "name": "key", - "type": "string", - "example": "", - "description": "Key of table in JSON", - "required": true + "name": "hash", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "", + "required": true }, { - "name": "key_type", - "type": "string", - "example": "", - "description": "Type of key", - "required": true + "name": "state_change_hash", + "type": "string", + "example": "", + "description": "", + "required": true }, { - "name": "value", - "type": "string", - "example": "", - "description": "Value of table in JSON", - "required": true + "name": "event_root_hash", + "type": "string", + "example": "", + "description": "", + "required": true }, { - "name": "value_type", - "type": "string", - "example": "", - "description": "Type of value", - "required": true - } - ], - "required": true - } - ] - } - ] - }, - { - "name": "events", - "description": "Events emitted during genesis", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "guid", - "example": "", - "description": "", - "type": "object", - "required": true, - "fields": [ - { - "name": "creation_number", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", - "required": true - }, - { - "name": "account_address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.\nThis is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.", - "required": true - } - ] - }, - { - "name": "sequence_number", - "type": "string", - "example": "32425224034", - "required": true, - "description": "A string containing a 64-bit unsigned integer." - }, - { - "name": "type", - "type": "string", - "example": "0x1::account::Account", - "required": true, - "description": "String representation of an on-chain Move type tag that is exposed in transaction payload." - }, - { - "name": "data", - "type": "string", - "example": {}, - "required": true, - "description": "The JSON representation of the event" - } - ] - }, - "required": true - } - ] - } - ] - } - ] - }, - { - "name": "events", - "example": "", - "required": true, - "description": "Events generated by the transaction", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "guid", - "example": "", - "description": "", - "type": "object", - "required": true, - "fields": [ - { - "name": "creation_number", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", - "required": true - }, - { - "name": "account_address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.\nThis is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.", - "required": true - } - ] - }, - { - "name": "sequence_number", - "type": "string", - "example": "32425224034", - "required": true, - "description": "A string containing a 64-bit unsigned integer." - }, - { - "name": "type", - "type": "string", - "example": "0x1::account::Account", - "required": true, - "description": "String representation of an on-chain Move type tag that is exposed in transaction payload." - }, - { - "name": "data", - "type": "string", - "example": {}, - "required": true, - "description": "The JSON representation of the event" - } - ] - } - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "block_metadata_transaction", - "description": "", - "required": true - }, - { - "name": "version", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "hash", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "", - "required": true - }, - { - "name": "state_change_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "event_root_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "state_checkpoint_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "gas_used", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "success", - "type": "boolean", - "example": true, - "description": "Whether the transaction was successful", - "required": true - }, - { - "name": "vm_status", - "type": "string", - "example": "", - "description": "The VM status of the transaction, can tell useful information in a failure", - "required": true - }, - { - "name": "accumulator_root_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "changes", - "type": "array", - "field": { - "type": "oneOf", - "options": [ - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "module", - "type": "object", - "example": "0x1::aptos_coin", - "description": "Move module id is a string representation of Move module", - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "resource", - "type": "object", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type).", - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "handle", - "type": "object", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "key", - "type": "object", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "data", - "example": {}, - "description": "Deleted table data", - "type": "object", - "fields": [ - { - "name": "key", - "type": "string", - "example": "", - "description": "Deleted key", - "required": true - }, - { - "name": "key_type", - "type": "string", - "example": "", - "description": "Deleted key type", - "required": true - } - ], - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "" - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address." - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash" - }, - { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "bytecode", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." - }, - { - "name": "abi", - "example": {}, - "description": "", - "type": "object", - "fields": [ - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "name", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "friends", - "example": [], - "description": "Friends of the module", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "exposed_functions", - "example": [], - "description": "Public functions of the module", - "type": "array", - "field": { - "type": "object", - "fields": [ + "name": "state_checkpoint_hash", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "gas_used", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, + { + "name": "success", + "type": "boolean", + "example": true, + "description": "Whether the transaction was successful", + "required": true + }, + { + "name": "vm_status", + "type": "string", + "example": "", + "description": "The VM status of the transaction, can tell useful information in a failure", + "required": true + }, + { + "name": "accumulator_root_hash", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "changes", + "type": "array", + "field": { + "type": "oneOf", + "options": [ + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "module", + "type": "object", + "example": "0x1::aptos_coin", + "description": "Move module id is a string representation of Move module", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "resource", + "type": "object", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "handle", + "type": "object", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "key", + "type": "object", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "data", + "example": {}, + "description": "Deleted table data", + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "example": "", + "description": "Deleted key", + "required": true + }, + { + "name": "key_type", + "type": "string", + "example": "", + "description": "Deleted key type", + "required": true + } + ], + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "" + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address." + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash" + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "bytecode", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." + }, + { + "name": "abi", + "example": {}, + "description": "", + "type": "object", + "fields": [ + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "name", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "friends", + "example": [], + "description": "Friends of the module", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "exposed_functions", + "example": [], + "description": "Public functions of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the function", + "required": true + }, + { + "name": "visibility", + "type": "string", + "example": "private", + "description": "Move function visibility", + "required": true + }, + { + "name": "is_entry", + "type": "boolean", + "example": true, + "description": "Whether the function can be called as an entry function directly in a transaction", + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic type params associated with the Move function", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "params", + "example": [], + "description": "Parameters associated with the move function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "return", + "example": "", + "description": "Return type of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "structs", + "example": [], + "description": "Structs of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the struct", + "required": true + }, + { + "name": "is_native", + "type": "boolean", + "example": true, + "description": "Whether the struct is a native struct of Move", + "required": true + }, + { + "name": "abilities", + "example": [], + "description": "Abilities associated with the struct", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic types associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + } + } + ] + }, + "required": true + }, + { + "name": "fields", + "example": [], + "description": "Fields associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "sender", + "description": "Name of the field", + "required": true + }, + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", + "required": true + } + ] + }, + "required": true + } + ] + }, + "required": true + } + ] + } + ] + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "required": true + }, + { + "name": "data", + "type": "object", + "example": "", + "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", + "required": true + } + ], + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "handle", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "key", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "value", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "example": "", + "description": "Key of table in JSON", + "required": true + }, + { + "name": "key_type", + "type": "string", + "example": "", + "description": "Type of key", + "required": true + }, + { + "name": "value", + "type": "string", + "example": "", + "description": "Value of table in JSON", + "required": true + }, + { + "name": "value_type", + "type": "string", + "example": "", + "description": "Type of value", + "required": true + } + ], + "required": true + } + ] + } + ] + }, + "required": true + }, { - "name": "name", - "type": "string", - "example": "", - "description": "Name of the function", - "required": true + "name": "id", + "type": "string", + "example": "", + "description": "", + "required": true }, { - "name": "visibility", - "type": "string", - "example": "private", - "description": "Move function visibility", - "required": true + "name": "epoch", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true }, { - "name": "is_entry", - "type": "boolean", - "example": true, - "description": "Whether the function can be called as an entry function directly in a transaction", - "required": true + "name": "round", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true }, { - "name": "generic_type_params", - "example": [], - "description": "Generic type params associated with the Move function", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { - "type": "string" - }, - "required": true - } - ] - }, - "required": true + "name": "events", + "example": [], + "description": "he events emitted at the block creation", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "guid", + "example": "", + "description": "", + "type": "object", + "required": true, + "fields": [ + { + "name": "creation_number", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", + "required": true + }, + { + "name": "account_address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.\nThis is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.", + "required": true + } + ] + }, + { + "name": "sequence_number", + "type": "string", + "example": "32425224034", + "required": true, + "description": "A string containing a 64-bit unsigned integer." + }, + { + "name": "type", + "type": "string", + "example": "0x1::account::Account", + "required": true, + "description": "String representation of an on-chain Move type tag that is exposed in transaction payload." + }, + { + "name": "data", + "type": "string", + "example": {}, + "required": true, + "description": "The JSON representation of the event" + } + ] + }, + "required": true + }, + { + "name": "previous_block_votes_bitvec", + "example": "", + "description": "Previous block votes", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "proposer", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account addresss", + "required": true }, { - "name": "params", - "example": [], - "description": "Parameters associated with the move function", - "type": "array", - "field": { "type": "string" }, - "required": true + "name": "failed_proposer_indices", + "example": [], + "description": "The indices of the proposers who failed to propose", + "required": true, + "type": "array", + "field": { + "type": "string" + } }, { - "name": "return", - "example": "", - "description": "Return type of the function", - "type": "array", - "field": { "type": "string" }, - "required": true + "name": "timestamp", + "type": "string", + "example": "32425224034", + "description": "The timestamp of the block returned in milliseconds", + "required": true } - ] - }, - "required": true - }, - { - "name": "structs", - "example": [], - "description": "Structs of the module", - "type": "array", - "field": { - "type": "object", - "fields": [ + ] + }, + { + "type": "object", + "fields": [ { - "name": "name", - "type": "string", - "example": "", - "description": "Name of the struct", - "required": true + "name": "type", + "type": "string", + "example": "state_checkpoint_transaction", + "description": "", + "required": true }, { - "name": "is_native", - "type": "boolean", - "example": true, - "description": "Whether the struct is a native struct of Move", - "required": true + "name": "version", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true }, { - "name": "abilities", - "example": [], - "description": "Abilities associated with the struct", - "type": "array", - "field": { "type": "string" }, - "required": true + "name": "hash", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "", + "required": true }, { - "name": "generic_type_params", - "example": [], - "description": "Generic types associated with the struct", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { - "type": "string" - } - } - ] - }, - "required": true + "name": "state_change_hash", + "type": "string", + "example": "", + "description": "", + "required": true }, { - "name": "fields", - "example": [], - "description": "Fields associated with the struct", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "sender", - "description": "Name of the field", - "required": true - }, - { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", - "required": true - } - ] - }, - "required": true + "name": "event_root_hash", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "state_checkpoint_hash", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "gas_used", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, + { + "name": "success", + "type": "boolean", + "example": true, + "description": "Whether the transaction was successful", + "required": true + }, + { + "name": "vm_status", + "type": "string", + "example": "", + "description": "The VM status of the transaction, can tell useful information in a failure", + "required": true + }, + { + "name": "accumulator_root_hash", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "changes", + "type": "array", + "field": { + "type": "oneOf", + "options": [ + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "module", + "type": "object", + "example": "0x1::aptos_coin", + "description": "Move module id is a string representation of Move module", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "resource", + "type": "object", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "handle", + "type": "object", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "key", + "type": "object", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "data", + "example": {}, + "description": "Deleted table data", + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "example": "", + "description": "Deleted key", + "required": true + }, + { + "name": "key_type", + "type": "string", + "example": "", + "description": "Deleted key type", + "required": true + } + ], + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "" + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address." + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash" + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "bytecode", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." + }, + { + "name": "abi", + "example": {}, + "description": "", + "type": "object", + "fields": [ + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "name", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "friends", + "example": [], + "description": "Friends of the module", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "exposed_functions", + "example": [], + "description": "Public functions of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the function", + "required": true + }, + { + "name": "visibility", + "type": "string", + "example": "private", + "description": "Move function visibility", + "required": true + }, + { + "name": "is_entry", + "type": "boolean", + "example": true, + "description": "Whether the function can be called as an entry function directly in a transaction", + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic type params associated with the Move function", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "params", + "example": [], + "description": "Parameters associated with the move function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "return", + "example": "", + "description": "Return type of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "structs", + "example": [], + "description": "Structs of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the struct", + "required": true + }, + { + "name": "is_native", + "type": "boolean", + "example": true, + "description": "Whether the struct is a native struct of Move", + "required": true + }, + { + "name": "abilities", + "example": [], + "description": "Abilities associated with the struct", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic types associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + } + } + ] + }, + "required": true + }, + { + "name": "fields", + "example": [], + "description": "Fields associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "sender", + "description": "Name of the field", + "required": true + }, + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", + "required": true + } + ] + }, + "required": true + } + ] + }, + "required": true + } + ] + } + ] + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "required": true + }, + { + "name": "data", + "type": "object", + "example": "", + "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", + "required": true + } + ], + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "handle", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "key", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "value", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "example": "", + "description": "Key of table in JSON", + "required": true + }, + { + "name": "key_type", + "type": "string", + "example": "", + "description": "Type of key", + "required": true + }, + { + "name": "value", + "type": "string", + "example": "", + "description": "Value of table in JSON", + "required": true + }, + { + "name": "value_type", + "type": "string", + "example": "", + "description": "Type of value", + "required": true + } + ], + "required": true + } + ] + } + ] + }, + "required": true + }, + { + "name": "timestamp", + "type": "string", + "example": "32425224034", + "description": "The timestamp of the block returned in milliseconds", + "required": true } - ] - }, - "required": true - } - ] - } + ] + } ] - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type).", - "required": true - }, - { - "name": "data", - "type": "object", - "example": "", - "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", - "required": true - } - ], - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "handle", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "key", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "value", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "key", - "type": "string", - "example": "", - "description": "Key of table in JSON", - "required": true - }, - { - "name": "key_type", - "type": "string", - "example": "", - "description": "Type of key", - "required": true - }, - { - "name": "value", - "type": "string", - "example": "", - "description": "Value of table in JSON", - "required": true - }, - { - "name": "value_type", - "type": "string", - "example": "", - "description": "Type of value", - "required": true - } - ], - "required": true - } - ] - } - ] - }, - "required": true - }, - { - "name": "id", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "epoch", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "round", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "events", - "example": [], - "description": "he events emitted at the block creation", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "guid", - "example": "", - "description": "", - "type": "object", - "required": true, - "fields": [ - { - "name": "creation_number", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", - "required": true - }, - { - "name": "account_address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.\nThis is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.", - "required": true - } - ] - }, - { - "name": "sequence_number", + } + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.blocks.getBlockByHeight({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.blocks.get_block_by_height(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + }, + "getBlockByVersion": { + "apiHost": "https://mainnet-aptos-api.moralis.io", + "testHost": "https://testnet-aptos-api.moralis.io", + "summary": "Get block by version", + "description": "Get block by specific ledger version.", + "method": "GET", + "path": "/blocks/by_version/:version", + "pathParams": [ + { + "name": "version", + "description": "Ledger version to lookup block information for.", + "required": true, + "type": "number" + } + ], + "queryParams": [ + { + "name": "with_transactions", + "description": "If set to true, include all transactions in the block", + "required": false, + "type": "boolean" + } + ], + "responses": [ + { + "status": "200", + "description": "Returns block by version", + "body": { + "type": "object", + "fields": [ + { + "name": "block_height", "type": "string", - "example": "32425224034", - "required": true, - "description": "A string containing a 64-bit unsigned integer." - }, - { - "name": "type", + "description": "A string containing a 64-bit unsigned integer.", + "example": "32425224034" + }, + { + "name": "block_hash", "type": "string", - "example": "0x1::account::Account", - "required": true, - "description": "String representation of an on-chain Move type tag that is exposed in transaction payload." - }, - { - "name": "data", + "description": "", + "example": "32425224034" + }, + { + "name": "block_timestamp", "type": "string", - "example": {}, - "required": true, - "description": "The JSON representation of the event" - } - ] - }, - "required": true - }, - { - "name": "previous_block_votes_bitvec", - "example": "", - "description": "Previous block votes", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "proposer", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account addresss", - "required": true - }, - { - "name": "failed_proposer_indices", - "example": [], - "description": "The indices of the proposers who failed to propose", - "required": true, - "type": "array", - "field": { "type": "string" } - }, - { - "name": "timestamp", - "type": "string", - "example": "32425224034", - "description": "The timestamp of the block returned in milliseconds", - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "state_checkpoint_transaction", - "description": "", - "required": true - }, - { - "name": "version", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "hash", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "", - "required": true - }, - { - "name": "state_change_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "event_root_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "state_checkpoint_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "gas_used", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "success", - "type": "boolean", - "example": true, - "description": "Whether the transaction was successful", - "required": true - }, - { - "name": "vm_status", - "type": "string", - "example": "", - "description": "The VM status of the transaction, can tell useful information in a failure", - "required": true - }, - { - "name": "accumulator_root_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "changes", - "type": "array", - "field": { - "type": "oneOf", - "options": [ - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "module", - "type": "object", - "example": "0x1::aptos_coin", - "description": "Move module id is a string representation of Move module", - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "resource", - "type": "object", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type).", - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "handle", - "type": "object", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "key", - "type": "object", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "data", - "example": {}, - "description": "Deleted table data", - "type": "object", - "fields": [ - { - "name": "key", - "type": "string", - "example": "", - "description": "Deleted key", - "required": true - }, - { - "name": "key_type", - "type": "string", - "example": "", - "description": "Deleted key type", - "required": true - } - ], - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "" - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address." - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash" - }, - { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "bytecode", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." - }, - { - "name": "abi", - "example": {}, - "description": "", - "type": "object", - "fields": [ - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "name", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "friends", - "example": [], - "description": "Friends of the module", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "exposed_functions", - "example": [], - "description": "Public functions of the module", - "type": "array", - "field": { - "type": "object", - "fields": [ + "description": "A string containing a 64-bit unsigned integer returned in milliseconds.", + "example": "32425224034" + }, + { + "name": "first_version", + "type": "string", + "description": "A string containing a 64-bit unsigned integer.", + "example": "32425224034" + }, + { + "name": "last_version", + "type": "string", + "description": "A string containing a 64-bit unsigned integer.", + "example": "32425224034" + }, + { + "name": "transactions", + "type": "array", + "description": "List of transactions", + "field": { + "type": "oneOf", + "options": [ + { + "type": "object", + "fields": [ + { + "name": "hash", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "", + "required": true + }, + { + "name": "sender", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "sequence_number", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, + { + "name": "max_gas_amount", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, + { + "name": "gas_unit_price", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, + { + "name": "expiration_timestamp_secs", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer returned in milliseconds.", + "required": true + }, { - "name": "name", - "type": "string", - "example": "", - "description": "Name of the function", - "required": true + "name": "payload", + "type": "oneOf", + "options": [ + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "function", + "type": "string", + "description": "Entry function id is string representation of a entry function defined on-chain.", + "required": true + }, + { + "name": "type_arguments", + "description": "Type arguments of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "arguments", + "description": "Arguments of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "Type of payload", + "required": true + }, + { + "name": "code", + "type": "object", + "description": "Move script bytecode", + "required": true + }, + { + "name": "type_arguments", + "description": "Type arguments of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "arguments", + "description": "Arguments of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "modules", + "description": "", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + } + ], + "required": true + }, + { + "name": "signature", + "type": "oneOf", + "options": [ + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "signature", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", + "required": true + }, + { + "name": "public_key", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "public_keys", + "description": "The public keys for the Ed25519 signature", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "signatures", + "description": "Signature associated with the public keys in the same order", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "threshold", + "type": "number", + "description": "The number of signatures required for a successful transaction", + "required": true + }, + { + "name": "bitmap", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "sender", + "type": "oneOf", + "options": [ + { + "type": "object", + "description": "A single Ed25519 signature", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "signature", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", + "required": true + }, + { + "name": "public_key", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + }, + { + "type": "object", + "description": "A Ed25519 multi-sig signature", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "public_keys", + "description": "The public keys for the Ed25519 signature", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "signatures", + "description": "Signature associated with the public keys in the same order", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "threshold", + "type": "number", + "description": "The number of signatures required for a successful transaction", + "required": true + }, + { + "name": "bitmap", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + } + ], + "required": true + }, + { + "name": "secondary_signer_addresses", + "description": "The other involved parties addresses", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "secondary_signers", + "type": "oneOf", + "options": [ + { + "type": "object", + "description": "A single Ed25519 signature", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "signature", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", + "required": true + }, + { + "name": "public_key", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + }, + { + "type": "object", + "description": "A Ed25519 multi-sig signature", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "public_keys", + "description": "The public keys for the Ed25519 signature", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "signatures", + "description": "Signature associated with the public keys in the same order", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "threshold", + "type": "number", + "description": "The number of signatures required for a successful transaction", + "required": true + }, + { + "name": "bitmap", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + } + ], + "required": true + } + ] + } + ], + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "", + "description": "user_transaction", + "required": true }, { - "name": "visibility", - "type": "string", - "example": "private", - "description": "Move function visibility", - "required": true + "name": "version", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true }, { - "name": "is_entry", - "type": "boolean", - "example": true, - "description": "Whether the function can be called as an entry function directly in a transaction", - "required": true + "name": "hash", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "", + "required": true }, { - "name": "generic_type_params", - "example": [], - "description": "Generic type params associated with the Move function", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { - "type": "string" - }, - "required": true - } - ] - }, - "required": true + "name": "state_change_hash", + "type": "string", + "example": "", + "description": "", + "required": true }, { - "name": "params", - "example": [], - "description": "Parameters associated with the move function", - "type": "array", - "field": { "type": "string" }, - "required": true + "name": "event_root_hash", + "type": "string", + "example": "", + "description": "", + "required": true }, { - "name": "return", - "example": "", - "description": "Return type of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] - }, - "required": true - }, - { - "name": "structs", - "example": [], - "description": "Structs of the module", - "type": "array", - "field": { - "type": "object", - "fields": [ + "name": "state_checkpoint_hash", + "type": "string", + "example": "", + "description": "", + "required": true + }, { - "name": "name", - "type": "string", - "example": "", - "description": "Name of the struct", - "required": true + "name": "gas_used", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true }, { - "name": "is_native", - "type": "boolean", - "example": true, - "description": "Whether the struct is a native struct of Move", - "required": true + "name": "success", + "type": "boolean", + "example": true, + "description": "Whether the transaction was successful", + "required": true }, { - "name": "abilities", - "example": [], - "description": "Abilities associated with the struct", - "type": "array", - "field": { "type": "string" }, - "required": true + "name": "vm_status", + "type": "string", + "example": "", + "description": "The VM status of the transaction, can tell useful information in a failure", + "required": true }, { - "name": "generic_type_params", - "example": [], - "description": "Generic types associated with the struct", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { - "type": "string" - } - } - ] - }, - "required": true + "name": "accumulator_root_hash", + "type": "string", + "example": "", + "description": "", + "required": true }, { - "name": "fields", - "example": [], - "description": "Fields associated with the struct", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "sender", - "description": "Name of the field", - "required": true - }, - { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", - "required": true - } - ] - }, - "required": true - } - ] - }, - "required": true - } - ] - } - ] - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type).", - "required": true - }, - { - "name": "data", - "type": "object", - "example": "", - "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", - "required": true - } - ], - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "handle", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "key", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "value", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "key", - "type": "string", - "example": "", - "description": "Key of table in JSON", - "required": true - }, - { - "name": "key_type", - "type": "string", - "example": "", - "description": "Type of key", - "required": true - }, - { - "name": "value", - "type": "string", - "example": "", - "description": "Value of table in JSON", - "required": true - }, - { - "name": "value_type", - "type": "string", - "example": "", - "description": "Type of value", - "required": true - } - ], - "required": true - } - ] - } - ] - }, - "required": true - }, - { - "name": "timestamp", - "type": "string", - "example": "32425224034", - "description": "The timestamp of the block returned in milliseconds", - "required": true - } - ] - } - ] - } - } - ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.blocks.getBlockByHeight({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.blocks.get_block_by_height(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - }, - "getBlockByVersion": { - "apiHost": "https://mainnet-aptos-api.moralis.io", - "testHost": "https://testnet-aptos-api.moralis.io", - "summary": "Get block by version", - "description": "Get block by specific ledger version.", - "method": "GET", - "path": "/blocks/by_version/:version", - "pathParams": [ - { - "name": "version", - "description": "Ledger version to lookup block information for.", - "required": true, - "type": "number" - } - ], - "queryParams": [ - { - "name": "with_transactions", - "description": "If set to true, include all transactions in the block", - "required": false, - "type": "boolean" - } - ], - "responses": [ - { - "status": "200", - "description": "Returns block by version", - "body": { - "type": "object", - "fields": [ - { - "name": "block_height", - "type": "string", - "description": "A string containing a 64-bit unsigned integer.", - "example": "32425224034" - }, - { - "name": "block_hash", - "type": "string", - "description": "", - "example": "32425224034" - }, - { - "name": "block_timestamp", - "type": "string", - "description": "A string containing a 64-bit unsigned integer returned in milliseconds.", - "example": "32425224034" - }, - { - "name": "first_version", - "type": "string", - "description": "A string containing a 64-bit unsigned integer.", - "example": "32425224034" - }, - { - "name": "last_version", - "type": "string", - "description": "A string containing a 64-bit unsigned integer.", - "example": "32425224034" - }, - { - "name": "transactions", - "type": "array", - "description": "List of transactions", - "field": { - "type": "oneOf", - "options": [ - { - "type": "object", - "fields": [ - { - "name": "hash", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "", - "required": true - }, - { - "name": "sender", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "sequence_number", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "max_gas_amount", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "gas_unit_price", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "expiration_timestamp_secs", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer returned in milliseconds.", - "required": true - }, - { - "name": "payload", - "type": "oneOf", - "options": [ - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "function", - "type": "string", - "description": "Entry function id is string representation of a entry function defined on-chain.", - "required": true - }, - { - "name": "type_arguments", - "description": "Type arguments of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "arguments", - "description": "Arguments of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "Type of payload", - "required": true - }, - { - "name": "code", - "type": "object", - "description": "Move script bytecode", - "required": true - }, - { - "name": "type_arguments", - "description": "Type arguments of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "arguments", - "description": "Arguments of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "modules", - "description": "", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] - } - ], - "required": true - }, - { - "name": "signature", - "type": "oneOf", - "options": [ - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "signature", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", - "required": true - }, - { - "name": "public_key", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "public_keys", - "description": "The public keys for the Ed25519 signature", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "signatures", - "description": "Signature associated with the public keys in the same order", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "threshold", - "type": "number", - "description": "The number of signatures required for a successful transaction", - "required": true - }, - { - "name": "bitmap", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "sender", - "type": "oneOf", - "options": [ - { - "type": "object", - "description": "A single Ed25519 signature", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "signature", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", - "required": true - }, - { - "name": "public_key", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - } - ] - }, - { - "type": "object", - "description": "A Ed25519 multi-sig signature", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "public_keys", - "description": "The public keys for the Ed25519 signature", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "signatures", - "description": "Signature associated with the public keys in the same order", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "threshold", - "type": "number", - "description": "The number of signatures required for a successful transaction", - "required": true - }, - { - "name": "bitmap", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - } - ] - } - ], - "required": true - }, - { - "name": "secondary_signer_addresses", - "description": "The other involved parties addresses", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "secondary_signers", - "type": "oneOf", - "options": [ - { - "type": "object", - "description": "A single Ed25519 signature", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "signature", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", - "required": true - }, - { - "name": "public_key", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - } - ] - }, - { - "type": "object", - "description": "A Ed25519 multi-sig signature", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "public_keys", - "description": "The public keys for the Ed25519 signature", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "signatures", - "description": "Signature associated with the public keys in the same order", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "threshold", - "type": "number", - "description": "The number of signatures required for a successful transaction", - "required": true + "name": "changes", + "type": "array", + "required": true, + "field": { + "type": "oneOf", + "options": [ + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "module", + "type": "object", + "example": "0x1::aptos_coin", + "description": "Move module id is a string representation of Move module", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "resource", + "type": "object", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "handle", + "type": "object", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "key", + "type": "object", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "data", + "example": {}, + "description": "Deleted table data", + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "example": "", + "description": "Deleted key", + "required": true + }, + { + "name": "key_type", + "type": "string", + "example": "", + "description": "Deleted key type", + "required": true + } + ], + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "" + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address." + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash" + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "bytecode", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." + }, + { + "name": "abi", + "example": {}, + "description": "", + "type": "object", + "fields": [ + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "name", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "friends", + "example": [], + "description": "Friends of the module", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "exposed_functions", + "example": [], + "description": "Public functions of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the function", + "required": true + }, + { + "name": "visibility", + "type": "string", + "example": "private", + "description": "Move function visibility", + "required": true + }, + { + "name": "is_entry", + "type": "boolean", + "example": true, + "description": "Whether the function can be called as an entry function directly in a transaction", + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic type params associated with the Move function", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "params", + "example": [], + "description": "Parameters associated with the move function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "return", + "example": "", + "description": "Return type of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "structs", + "example": [], + "description": "Structs of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the struct", + "required": true + }, + { + "name": "is_native", + "type": "boolean", + "example": true, + "description": "Whether the struct is a native struct of Move", + "required": true + }, + { + "name": "abilities", + "example": [], + "description": "Abilities associated with the struct", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic types associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + } + } + ] + }, + "required": true + }, + { + "name": "fields", + "example": [], + "description": "Fields associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "sender", + "description": "Name of the field", + "required": true + }, + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", + "required": true + } + ] + }, + "required": true + } + ] + }, + "required": true + } + ] + } + ] + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "required": true + }, + { + "name": "data", + "type": "object", + "example": "", + "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", + "required": true + } + ], + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "handle", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "key", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "value", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "example": "", + "description": "Key of table in JSON", + "required": true + }, + { + "name": "key_type", + "type": "string", + "example": "", + "description": "Type of key", + "required": true + }, + { + "name": "value", + "type": "string", + "example": "", + "description": "Value of table in JSON", + "required": true + }, + { + "name": "value_type", + "type": "string", + "example": "", + "description": "Type of value", + "required": true + } + ], + "required": true + } + ] + } + ] + } + }, + { + "name": "sender", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "sequence_number", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, + { + "name": "max_gas_amount", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, + { + "name": "gas_unit_price", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, + { + "name": "expiration_timestamp_secs", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer returned in milliseconds.", + "required": true + }, + { + "name": "payload", + "type": "oneOf", + "required": true, + "options": [ + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "function", + "type": "string", + "description": "Entry function id is string representation of a entry function defined on-chain.", + "required": true + }, + { + "name": "type_arguments", + "description": "Type arguments of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "arguments", + "description": "Arguments of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "Type of payload", + "required": true + }, + { + "name": "code", + "type": "object", + "description": "Move script bytecode", + "required": true + }, + { + "name": "type_arguments", + "description": "Type arguments of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "arguments", + "description": "Arguments of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "modules", + "description": "", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + } + ] + }, + { + "name": "signature", + "type": "oneOf", + "required": true, + "options": [ + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "signature", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", + "required": true + }, + { + "name": "public_key", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "public_keys", + "description": "The public keys for the Ed25519 signature", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "signatures", + "description": "Signature associated with the public keys in the same order", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "threshold", + "type": "number", + "description": "The number of signatures required for a successful transaction", + "required": true + }, + { + "name": "bitmap", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "sender", + "type": "oneOf", + "options": [ + { + "type": "object", + "description": "A single Ed25519 signature", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "signature", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", + "required": true + }, + { + "name": "public_key", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + }, + { + "type": "object", + "description": "A Ed25519 multi-sig signature", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "public_keys", + "description": "The public keys for the Ed25519 signature", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "signatures", + "description": "Signature associated with the public keys in the same order", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "threshold", + "type": "number", + "description": "The number of signatures required for a successful transaction", + "required": true + }, + { + "name": "bitmap", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + } + ], + "required": true + }, + { + "name": "secondary_signer_addresses", + "description": "The other involved parties addresses", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "secondary_signers", + "type": "oneOf", + "options": [ + { + "type": "object", + "description": "A single Ed25519 signature", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "signature", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", + "required": true + }, + { + "name": "public_key", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + }, + { + "type": "object", + "description": "A Ed25519 multi-sig signature", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "public_keys", + "description": "The public keys for the Ed25519 signature", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "signatures", + "description": "Signature associated with the public keys in the same order", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "threshold", + "type": "number", + "description": "The number of signatures required for a successful transaction", + "required": true + }, + { + "name": "bitmap", + "type": "string", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + } + ] + } + ], + "required": true + } + ] + } + ] + }, + { + "name": "events", + "example": "", + "description": "Events generated by the transaction", + "type": "array", + "required": true, + "field": { + "type": "object", + "fields": [ + { + "name": "guid", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "creation_number", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", + "required": true + }, + { + "name": "account_address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.\nThis is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.", + "required": true + } + ] + }, + { + "name": "sequence_number", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer." + }, + { + "name": "type", + "type": "string", + "example": "0x1::account::Account", + "description": "String representation of an on-chain Move type tag that is exposed in transaction payload." + }, + { + "name": "data", + "type": "string", + "example": {}, + "description": "The JSON representation of the event" + } + ], + "required": [ + "guid", + "sequence_number", + "type", + "data" + ] + } + }, + { + "name": "timestamp", + "type": "string", + "example": "32425224034", + "required": true, + "description": "The timestamp of the block returned in milliseconds" + } + ] }, { - "name": "bitmap", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - } - ] - } - ], - "required": true - } - ] - } - ], - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "", - "description": "user_transaction", - "required": true - }, - { - "name": "version", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "hash", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "", - "required": true - }, - { - "name": "state_change_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "event_root_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "state_checkpoint_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "gas_used", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "success", - "type": "boolean", - "example": true, - "description": "Whether the transaction was successful", - "required": true - }, - { - "name": "vm_status", - "type": "string", - "example": "", - "description": "The VM status of the transaction, can tell useful information in a failure", - "required": true - }, - { - "name": "accumulator_root_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "changes", - "type": "array", - "required": true, - "field": { - "type": "oneOf", - "options": [ - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "module", - "type": "object", - "example": "0x1::aptos_coin", - "description": "Move module id is a string representation of Move module", - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "resource", - "type": "object", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type).", - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "handle", - "type": "object", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "key", - "type": "object", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "data", - "example": {}, - "description": "Deleted table data", - "type": "object", - "fields": [ - { - "name": "key", - "type": "string", - "example": "", - "description": "Deleted key", - "required": true - }, - { - "name": "key_type", - "type": "string", - "example": "", - "description": "Deleted key type", - "required": true - } - ], - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "" - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address." - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash" - }, - { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "bytecode", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." - }, - { - "name": "abi", - "example": {}, - "description": "", - "type": "object", - "fields": [ - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "name", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "friends", - "example": [], - "description": "Friends of the module", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "exposed_functions", - "example": [], - "description": "Public functions of the module", - "type": "array", - "field": { - "type": "object", - "fields": [ + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "genesis_transaction", + "description": "", + "required": true + }, + { + "name": "version", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, + { + "name": "hash", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "", + "required": true + }, + { + "name": "state_change_hash", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "event_root_hash", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "state_checkpoint_hash", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "gas_used", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, + { + "name": "success", + "type": "boolean", + "example": true, + "description": "Whether the transaction was successful", + "required": true + }, { - "name": "name", - "type": "string", - "example": "", - "description": "Name of the function", - "required": true + "name": "vm_status", + "type": "string", + "example": "", + "description": "The VM status of the transaction, can tell useful information in a failure", + "required": true }, { - "name": "visibility", - "type": "string", - "example": "private", - "description": "Move function visibility", - "required": true + "name": "accumulator_root_hash", + "type": "string", + "example": "", + "description": "", + "required": true }, { - "name": "is_entry", - "type": "boolean", - "example": true, - "description": "Whether the function can be called as an entry function directly in a transaction", - "required": true + "name": "changes", + "type": "array", + "required": true, + "field": { + "type": "oneOf", + "options": [ + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "module", + "type": "object", + "example": "0x1::aptos_coin", + "description": "Move module id is a string representation of Move module", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "resource", + "type": "object", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "handle", + "type": "object", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "key", + "type": "object", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "data", + "example": {}, + "description": "Deleted table data", + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "example": "", + "description": "Deleted key", + "required": true + }, + { + "name": "key_type", + "type": "string", + "example": "", + "description": "Deleted key type", + "required": true + } + ], + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "" + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address." + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash" + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "bytecode", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." + }, + { + "name": "abi", + "example": {}, + "description": "", + "type": "object", + "fields": [ + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "name", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "friends", + "example": [], + "description": "Friends of the module", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "exposed_functions", + "example": [], + "description": "Public functions of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the function", + "required": true + }, + { + "name": "visibility", + "type": "string", + "example": "private", + "description": "Move function visibility", + "required": true + }, + { + "name": "is_entry", + "type": "boolean", + "example": true, + "description": "Whether the function can be called as an entry function directly in a transaction", + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic type params associated with the Move function", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "params", + "example": [], + "description": "Parameters associated with the move function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "return", + "example": "", + "description": "Return type of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "structs", + "example": [], + "description": "Structs of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the struct", + "required": true + }, + { + "name": "is_native", + "type": "boolean", + "example": true, + "description": "Whether the struct is a native struct of Move", + "required": true + }, + { + "name": "abilities", + "example": [], + "description": "Abilities associated with the struct", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic types associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + } + } + ] + }, + "required": true + }, + { + "name": "fields", + "example": [], + "description": "Fields associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "sender", + "description": "Name of the field", + "required": true + }, + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", + "required": true + } + ] + }, + "required": true + } + ] + }, + "required": true + } + ] + } + ] + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "required": true + }, + { + "name": "data", + "type": "object", + "example": "", + "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", + "required": true + } + ], + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "handle", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "key", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "value", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "example": "", + "description": "Key of table in JSON", + "required": true + }, + { + "name": "key_type", + "type": "string", + "example": "", + "description": "Type of key", + "required": true + }, + { + "name": "value", + "type": "string", + "example": "", + "description": "Value of table in JSON", + "required": true + }, + { + "name": "value_type", + "type": "string", + "example": "", + "description": "Type of value", + "required": true + } + ], + "required": true + } + ] + } + ] + } }, { - "name": "generic_type_params", - "example": [], - "description": "Generic type params associated with the Move function", - "type": "array", - "field": { + "name": "payload", + "required": true, + "description": "A writeset payload, used only for genesis", "type": "object", "fields": [ - { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { - "type": "string" + { + "name": "type", + "type": "string", + "description": "", + "required": true }, - "required": true - } + { + "name": "write_set", + "description": "The associated writeset with a payload", + "required": true, + "type": "oneOf", + "options": [ + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "execute_as", + "type": "string", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "script", + "description": "Payload which runs a script that can run multiple functions", + "required": true, + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "Type of payload", + "required": true + }, + { + "name": "code", + "type": "object", + "description": "Move script bytecode", + "required": true + }, + { + "name": "type_arguments", + "description": "Type arguments of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "arguments", + "description": "Arguments of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "description": "", + "required": true + }, + { + "name": "changes", + "description": "", + "types": "oneOf", + "required": true, + "options": [ + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "module", + "type": "object", + "example": "0x1::aptos_coin", + "description": "Move module id is a string representation of Move module", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "resource", + "type": "object", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "handle", + "type": "object", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "key", + "type": "object", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "data", + "example": {}, + "description": "Deleted table data", + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "example": "", + "description": "Deleted key", + "required": true + }, + { + "name": "key_type", + "type": "string", + "example": "", + "description": "Deleted key type", + "required": true + } + ], + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "" + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address." + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash" + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "bytecode", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." + }, + { + "name": "abi", + "example": {}, + "description": "", + "type": "object", + "fields": [ + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "name", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "friends", + "example": [], + "description": "Friends of the module", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "exposed_functions", + "example": [], + "description": "Public functions of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the function", + "required": true + }, + { + "name": "visibility", + "type": "string", + "example": "private", + "description": "Move function visibility", + "required": true + }, + { + "name": "is_entry", + "type": "boolean", + "example": true, + "description": "Whether the function can be called as an entry function directly in a transaction", + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic type params associated with the Move function", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "params", + "example": [], + "description": "Parameters associated with the move function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "return", + "example": "", + "description": "Return type of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "structs", + "example": [], + "description": "Structs of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the struct", + "required": true + }, + { + "name": "is_native", + "type": "boolean", + "example": true, + "description": "Whether the struct is a native struct of Move", + "required": true + }, + { + "name": "abilities", + "example": [], + "description": "Abilities associated with the struct", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic types associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + } + } + ] + }, + "required": true + }, + { + "name": "fields", + "example": [], + "description": "Fields associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "sender", + "description": "Name of the field", + "required": true + }, + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", + "required": true + } + ] + }, + "required": true + } + ] + }, + "required": true + } + ] + } + ] + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "required": true + }, + { + "name": "data", + "type": "object", + "example": "", + "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", + "required": true + } + ], + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "handle", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "key", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "value", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "example": "", + "description": "Key of table in JSON", + "required": true + }, + { + "name": "key_type", + "type": "string", + "example": "", + "description": "Type of key", + "required": true + }, + { + "name": "value", + "type": "string", + "example": "", + "description": "Value of table in JSON", + "required": true + }, + { + "name": "value_type", + "type": "string", + "example": "", + "description": "Type of value", + "required": true + } + ], + "required": true + } + ] + } + ] + }, + { + "name": "events", + "description": "Events emitted during genesis", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "guid", + "example": "", + "description": "", + "type": "object", + "required": true, + "fields": [ + { + "name": "creation_number", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", + "required": true + }, + { + "name": "account_address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.\nThis is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.", + "required": true + } + ] + }, + { + "name": "sequence_number", + "type": "string", + "example": "32425224034", + "required": true, + "description": "A string containing a 64-bit unsigned integer." + }, + { + "name": "type", + "type": "string", + "example": "0x1::account::Account", + "required": true, + "description": "String representation of an on-chain Move type tag that is exposed in transaction payload." + }, + { + "name": "data", + "type": "string", + "example": {}, + "required": true, + "description": "The JSON representation of the event" + } + ] + }, + "required": true + } + ] + } + ] + } ] - }, - "required": true }, { - "name": "params", - "example": [], - "description": "Parameters associated with the move function", - "type": "array", - "field": { "type": "string" }, - "required": true + "name": "events", + "example": "", + "required": true, + "description": "Events generated by the transaction", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "guid", + "example": "", + "description": "", + "type": "object", + "required": true, + "fields": [ + { + "name": "creation_number", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", + "required": true + }, + { + "name": "account_address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.\nThis is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.", + "required": true + } + ] + }, + { + "name": "sequence_number", + "type": "string", + "example": "32425224034", + "required": true, + "description": "A string containing a 64-bit unsigned integer." + }, + { + "name": "type", + "type": "string", + "example": "0x1::account::Account", + "required": true, + "description": "String representation of an on-chain Move type tag that is exposed in transaction payload." + }, + { + "name": "data", + "type": "string", + "example": {}, + "required": true, + "description": "The JSON representation of the event" + } + ] + } + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "block_metadata_transaction", + "description": "", + "required": true + }, + { + "name": "version", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, + { + "name": "hash", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "", + "required": true + }, + { + "name": "state_change_hash", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "event_root_hash", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "state_checkpoint_hash", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "gas_used", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, + { + "name": "success", + "type": "boolean", + "example": true, + "description": "Whether the transaction was successful", + "required": true + }, + { + "name": "vm_status", + "type": "string", + "example": "", + "description": "The VM status of the transaction, can tell useful information in a failure", + "required": true + }, + { + "name": "accumulator_root_hash", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "changes", + "type": "array", + "field": { + "type": "oneOf", + "options": [ + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "module", + "type": "object", + "example": "0x1::aptos_coin", + "description": "Move module id is a string representation of Move module", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "resource", + "type": "object", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "handle", + "type": "object", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "key", + "type": "object", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "data", + "example": {}, + "description": "Deleted table data", + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "example": "", + "description": "Deleted key", + "required": true + }, + { + "name": "key_type", + "type": "string", + "example": "", + "description": "Deleted key type", + "required": true + } + ], + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "" + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address." + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash" + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "bytecode", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." + }, + { + "name": "abi", + "example": {}, + "description": "", + "type": "object", + "fields": [ + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "name", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "friends", + "example": [], + "description": "Friends of the module", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "exposed_functions", + "example": [], + "description": "Public functions of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the function", + "required": true + }, + { + "name": "visibility", + "type": "string", + "example": "private", + "description": "Move function visibility", + "required": true + }, + { + "name": "is_entry", + "type": "boolean", + "example": true, + "description": "Whether the function can be called as an entry function directly in a transaction", + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic type params associated with the Move function", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "params", + "example": [], + "description": "Parameters associated with the move function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "return", + "example": "", + "description": "Return type of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "structs", + "example": [], + "description": "Structs of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the struct", + "required": true + }, + { + "name": "is_native", + "type": "boolean", + "example": true, + "description": "Whether the struct is a native struct of Move", + "required": true + }, + { + "name": "abilities", + "example": [], + "description": "Abilities associated with the struct", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic types associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + } + } + ] + }, + "required": true + }, + { + "name": "fields", + "example": [], + "description": "Fields associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "sender", + "description": "Name of the field", + "required": true + }, + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", + "required": true + } + ] + }, + "required": true + } + ] + }, + "required": true + } + ] + } + ] + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "required": true + }, + { + "name": "data", + "type": "object", + "example": "", + "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", + "required": true + } + ], + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "handle", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "key", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "value", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "example": "", + "description": "Key of table in JSON", + "required": true + }, + { + "name": "key_type", + "type": "string", + "example": "", + "description": "Type of key", + "required": true + }, + { + "name": "value", + "type": "string", + "example": "", + "description": "Value of table in JSON", + "required": true + }, + { + "name": "value_type", + "type": "string", + "example": "", + "description": "Type of value", + "required": true + } + ], + "required": true + } + ] + } + ] + }, + "required": true + }, + { + "name": "id", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "epoch", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, + { + "name": "round", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, + { + "name": "events", + "example": [], + "description": "he events emitted at the block creation", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "guid", + "example": "", + "description": "", + "type": "object", + "required": true, + "fields": [ + { + "name": "creation_number", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", + "required": true + }, + { + "name": "account_address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.\nThis is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.", + "required": true + } + ] + }, + { + "name": "sequence_number", + "type": "string", + "example": "32425224034", + "required": true, + "description": "A string containing a 64-bit unsigned integer." + }, + { + "name": "type", + "type": "string", + "example": "0x1::account::Account", + "required": true, + "description": "String representation of an on-chain Move type tag that is exposed in transaction payload." + }, + { + "name": "data", + "type": "string", + "example": {}, + "required": true, + "description": "The JSON representation of the event" + } + ] + }, + "required": true + }, + { + "name": "previous_block_votes_bitvec", + "example": "", + "description": "Previous block votes", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "proposer", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account addresss", + "required": true + }, + { + "name": "failed_proposer_indices", + "example": [], + "description": "The indices of the proposers who failed to propose", + "required": true, + "type": "array", + "field": { + "type": "string" + } }, { - "name": "return", - "example": "", - "description": "Return type of the function", - "type": "array", - "field": { "type": "string" }, - "required": true + "name": "timestamp", + "type": "string", + "example": "32425224034", + "description": "The timestamp of the block returned in milliseconds", + "required": true } - ] - }, - "required": true - }, - { - "name": "structs", - "example": [], - "description": "Structs of the module", - "type": "array", - "field": { - "type": "object", - "fields": [ + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "state_checkpoint_transaction", + "description": "", + "required": true + }, { - "name": "name", - "type": "string", - "example": "", - "description": "Name of the struct", - "required": true + "name": "version", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true }, { - "name": "is_native", - "type": "boolean", - "example": true, - "description": "Whether the struct is a native struct of Move", - "required": true + "name": "hash", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "", + "required": true }, { - "name": "abilities", - "example": [], - "description": "Abilities associated with the struct", - "type": "array", - "field": { "type": "string" }, - "required": true + "name": "state_change_hash", + "type": "string", + "example": "", + "description": "", + "required": true }, { - "name": "generic_type_params", - "example": [], - "description": "Generic types associated with the struct", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { - "type": "string" - } - } - ] - }, - "required": true + "name": "event_root_hash", + "type": "string", + "example": "", + "description": "", + "required": true }, { - "name": "fields", - "example": [], - "description": "Fields associated with the struct", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "sender", - "description": "Name of the field", - "required": true - }, - { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", - "required": true - } - ] - }, - "required": true + "name": "state_checkpoint_hash", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "gas_used", + "type": "string", + "example": "32425224034", + "description": "A string containing a 64-bit unsigned integer.", + "required": true + }, + { + "name": "success", + "type": "boolean", + "example": true, + "description": "Whether the transaction was successful", + "required": true + }, + { + "name": "vm_status", + "type": "string", + "example": "", + "description": "The VM status of the transaction, can tell useful information in a failure", + "required": true + }, + { + "name": "accumulator_root_hash", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "changes", + "type": "array", + "field": { + "type": "oneOf", + "options": [ + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "module", + "type": "object", + "example": "0x1::aptos_coin", + "description": "Move module id is a string representation of Move module", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "resource", + "type": "object", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "handle", + "type": "object", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "key", + "type": "object", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "data", + "example": {}, + "description": "Deleted table data", + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "example": "", + "description": "Deleted key", + "required": true + }, + { + "name": "key_type", + "type": "string", + "example": "", + "description": "Deleted key type", + "required": true + } + ], + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "" + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address." + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash" + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "bytecode", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." + }, + { + "name": "abi", + "example": {}, + "description": "", + "type": "object", + "fields": [ + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "name", + "type": "string", + "example": "", + "description": "", + "required": true + }, + { + "name": "friends", + "example": [], + "description": "Friends of the module", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "exposed_functions", + "example": [], + "description": "Public functions of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the function", + "required": true + }, + { + "name": "visibility", + "type": "string", + "example": "private", + "description": "Move function visibility", + "required": true + }, + { + "name": "is_entry", + "type": "boolean", + "example": true, + "description": "Whether the function can be called as an entry function directly in a transaction", + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic type params associated with the Move function", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "params", + "example": [], + "description": "Parameters associated with the move function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "return", + "example": "", + "description": "Return type of the function", + "type": "array", + "field": { + "type": "string" + }, + "required": true + } + ] + }, + "required": true + }, + { + "name": "structs", + "example": [], + "description": "Structs of the module", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "", + "description": "Name of the struct", + "required": true + }, + { + "name": "is_native", + "type": "boolean", + "example": true, + "description": "Whether the struct is a native struct of Move", + "required": true + }, + { + "name": "abilities", + "example": [], + "description": "Abilities associated with the struct", + "type": "array", + "field": { + "type": "string" + }, + "required": true + }, + { + "name": "generic_type_params", + "example": [], + "description": "Generic types associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "constraints", + "example": [], + "description": "Move abilities tied to the generic type param and associated with the function that uses it", + "type": "array", + "field": { + "type": "string" + } + } + ] + }, + "required": true + }, + { + "name": "fields", + "example": [], + "description": "Fields associated with the struct", + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "name", + "type": "string", + "example": "sender", + "description": "Name of the field", + "required": true + }, + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", + "required": true + } + ] + }, + "required": true + } + ] + }, + "required": true + } + ] + } + ] + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "address", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "A hex encoded 32 byte Aptos account address.", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", + "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "required": true + }, + { + "name": "data", + "type": "object", + "example": "", + "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", + "required": true + } + ], + "required": true + } + ] + }, + { + "type": "object", + "fields": [ + { + "name": "type", + "type": "string", + "example": "delete_module", + "description": "", + "required": true + }, + { + "name": "state_key_hash", + "type": "string", + "example": "", + "description": "State key hash", + "required": true + }, + { + "name": "handle", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "key", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "value", + "type": "string", + "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", + "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "required": true + }, + { + "name": "data", + "example": "", + "description": "", + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "example": "", + "description": "Key of table in JSON", + "required": true + }, + { + "name": "key_type", + "type": "string", + "example": "", + "description": "Type of key", + "required": true + }, + { + "name": "value", + "type": "string", + "example": "", + "description": "Value of table in JSON", + "required": true + }, + { + "name": "value_type", + "type": "string", + "example": "", + "description": "Type of value", + "required": true + } + ], + "required": true + } + ] + } + ] + }, + "required": true + }, + { + "name": "timestamp", + "type": "string", + "example": "32425224034", + "description": "The timestamp of the block returned in milliseconds", + "required": true } - ] - }, - "required": true - } - ] - } + ] + } ] - } - ] - }, - { + } + } + ] + } + } + ], + "codeSamples": [ + { + "language": "node", + "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.blocks.getBlockByVersion({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", + "name": "Moralis NodeJS SDK" + }, + { + "language": "python", + "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.blocks.get_block_by_version(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", + "name": "Moralis Python SDK" + } + ] + } + }, + + "market": { + "news": { + "summary": "news", + "description": "Returns all news between 2 dates, sorted by date, oldest to newest", + "method": "GET", + "apiHost": "https://wdim.moralis.io/api/v1", + "path": "/news", + "pathParams": [], + "queryParams": [ + { + "name": "from_date", + "description": "The first date to fetch news for", + "required": false, + "type": "string" + }, + { + "name": "to_date", + "description": "The last date to fetch news for", + "required": false, + "type": "string" + }, + { + "name": "cursor", + "description": "Cursor pointing to the next page of results", + "required": false, + "type": "string" + }, + { + "name": "limit", + "description": "How many results to return in each page", + "required": false, + "type": "number", + "example": 20 + }, + { + "name": "order", + "required": false, + "type": "string", + "description": "Order the news by date", + "example": "desc_date", + "enum": ["asc_date", "desc_date"] + } + ], + "responses": [ + { + "status": "200", + "description": "", + "body": { + "type": "object", + "fields": [ + { + "name": "page_size", + "type": "string", + "description": "The size of the page being returned", + "example": "100" + }, + { + "name": "cursor", + "type": "string", + "description": "Cursor pointing to the next page of results", + "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJsaW1pdCI6IjIwIiwicGFnZSI6MiwiaW5kZXgiOjM4LCJ0b3RhbCI6ODIsImlhdCI6MTcwMDEzMzY2MiwiZXhwIjoxNzAwMTM3MjYyfQ.85l7ZTSj6xi3J5UZrhVd-gscOhV1T_hoodoue1ihUsk" + }, + { + "name": "page", + "type": "string", + "description": "Current page of results", + "example": "1" + }, + { + "name": "result", "type": "object", + "description": "Contains the result of the news query", "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "type", + { + "name": "id", + "type": "number", + "description": "Unique id of the document in the database", + "example": 1 + }, + { + "name": "token_address", "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type).", - "required": true - }, - { - "name": "data", - "type": "object", - "example": "", - "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", - "required": true - } - ], - "required": true - } + "description": "Address of the token", + "example": "0x046eee2cc3188071c02bfc1745a6b17c656e3f3d" + }, + { + "name": "token_symbol", + "type": "string", + "description": "Abbreviation of the token name", + "example": "RLB" + }, + { + "name": "token_name", + "type": "string", + "description": "Name of the token", + "example": "Rollbit Coin" + }, + { + "name": "chain", + "type": "string", + "description": "Name of the chain the token is on", + "example": "ETH" + }, + { + "name": "change_in_percent", + "type": "number", + "description": "How much the token moved in percent", + "example": 11 + }, + { + "name": "headline", + "type": "string", + "description": "A description of the news event", + "example": "On-chain volume shows heavy wallets accumulating RLB, leading to an 11% increase today." + }, + { + "name": "time_of_price_movement", + "type": "string", + "description": "When the event happened", + "example": "2023-10-13T12:00:00.000Z" + }, + { + "name": "movement", + "type": "string", + "description": "If the event was positive or negative", + "example": "Positive" + }, + { + "name": "updated_at", + "type": "string", + "description": "When the news was last updated in the database", + "example": "2021-10-11T00:00:00.000Z" + }, + { + "name": "created_at", + "type": "string", + "description": "When the news was added to the database", + "example": "2021-10-11T00:00:00.000Z" + } ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", + } + ] + } + } + ] + } + }, + "discovery": { + "getRisingLiquidityTokens": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Identifies the top tokens with rising liquidity.", + "description": "Identifies the top tokens with rising liquidity.", + "method": "GET", + "path": "/discovery/tokens/rising-liquidity", + "pathParams": [], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", + "type": "string", + "enum": [ + "eth", + "mainnet", + "0x1", + "matic", + "0x89", + "polygon", + "bsc", + "binance", + "0x38", + "fantom", + "ftm", + "0xfa", + "arbitrum", + "0xa4b1", + "optimism", + "0xa", + "pulsechain", + "0x171" + ] + }, + { + "name": "one_month_liquidity_change_usd", + "description": "The minimum one month liquidity change in usd of a token", + "required": false, + "example": 500000, + "type": "number" + }, + { + "name": "min_market_cap", + "description": "The minimum market cap in usd of a token", + "required": false, + "example": 100000000, + "type": "number" + }, + { + "name": "twitter_followers", + "description": "The minimum twitter followers of a token", + "required": false, + "example": 10000, + "type": "number" + }, + { + "name": "one_month_volume_change_usd", + "description": "The minimum one month volume change in usd of a token", + "required": false, + "example": 10000, + "type": "number" + }, + { + "name": "security_score", + "description": "The minimum security score of a token", + "required": false, + "example": 70, + "type": "number" + }, + { + "name": "one_month_price_percent_change_usd", + "description": "The minimum one month price percent change of a token", + "required": false, + "example": 0, + "type": "number" + } + ], + "responses": [ + { + "status": "200", + "description": "Returns market data for the specified token addresses, including metrics and statistics.", + "body": { + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "chain_id", "type": "string", - "example": "delete_module", - "description": "", + "example": "0x1", + "description": "The blockchain identifier the token is on", "required": true - }, - { - "name": "state_key_hash", + }, + { + "name": "token_address", "type": "string", - "example": "", - "description": "State key hash", + "example": "0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2", + "description": "The contract address of the token", "required": true - }, - { - "name": "handle", + }, + { + "name": "token_name", "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "example": "Maker", + "description": "The official name of the token", "required": true - }, - { - "name": "key", + }, + { + "name": "token_symbol", "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "example": "MKR", + "description": "The abbreviated symbol of the token", "required": true - }, - { - "name": "value", + }, + { + "name": "token_logo", "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + "example": "string", + "description": "URL to the token's logo image", "required": true - }, - { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "key", - "type": "string", - "example": "", - "description": "Key of table in JSON", - "required": true - }, - { - "name": "key_type", - "type": "string", - "example": "", - "description": "Type of key", - "required": true - }, - { - "name": "value", - "type": "string", - "example": "", - "description": "Value of table in JSON", - "required": true - }, - { - "name": "value_type", - "type": "string", - "example": "", - "description": "Type of value", - "required": true - } - ], + }, + { + "name": "price_usd", + "type": "number", + "example": 0, + "description": "Current price of the token in USD", "required": true - } - ] - } - ] - } - }, - { - "name": "sender", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "sequence_number", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "max_gas_amount", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "gas_unit_price", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "expiration_timestamp_secs", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer returned in milliseconds.", - "required": true - }, - { - "name": "payload", - "type": "oneOf", - "required": true, - "options": [ - { - "type": "object", - "fields": [ + }, { - "name": "type", - "type": "string", - "description": "", - "required": true + "name": "security_score", + "type": "number", + "example": 88, + "description": "Security score assigned to the token", + "required": true }, { - "name": "function", - "type": "string", - "description": "Entry function id is string representation of a entry function defined on-chain.", - "required": true + "name": "market_cap", + "type": "number", + "example": 1351767630.85, + "description": "Market capitalization of the token", + "required": true }, { - "name": "type_arguments", - "description": "Type arguments of the function", - "type": "array", - "field": { "type": "string" }, - "required": true + "name": "fully_diluted_valuation", + "type": "number", + "example": 1363915420.28, + "description": "Fully diluted market cap of the token", + "required": true }, { - "name": "arguments", - "description": "Arguments of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] - }, - { - "type": "object", - "fields": [ + "name": "twitter_followers", + "type": "number", + "example": 255217, + "description": "Number of followers for the token's official Twitter account", + "required": true + }, + { + "name": "holders_change", + "type": "object", + "description": "Changes in the number of token holders over various time periods", + "required": true, + "fields": [ + { + "name": "1h", + "type": "number", + "example": 14, + "description": "Change in the last hour", + "required": true + }, + { + "name": "1d", + "type": "number", + "example": 14, + "description": "Change in the last day", + "required": true + }, + { + "name": "1w", + "type": "number", + "example": 162, + "description": "Change in the last week", + "required": true + }, + { + "name": "1M", + "type": "number", + "example": 162, + "description": "Change in the last month", + "required": true + } + ] + }, + { + "name": "liquidity_change_usd", + "type": "object", + "description": "Changes in liquidity over various time periods, in USD", + "required": true, + "fields": [ + { + "name": "1h", + "type": "number", + "example": 14, + "description": "Change in liquidity in the last hour", + "required": true + }, + { + "name": "1d", + "type": "number", + "example": 14, + "description": "Change in liquidity in the last day", + "required": true + }, + { + "name": "1w", + "type": "number", + "example": 162, + "description": "Change in liquidity in the last week", + "required": true + }, + { + "name": "1M", + "type": "number", + "example": 162, + "description": "Change in liquidity in the last month", + "required": true + } + ] + }, { - "name": "type", - "type": "string", - "description": "Type of payload", - "required": true + "name": "experienced_net_buyers_change", + "type": "object", + "description": "Changes in the count of experienced net buyers over various time periods", + "required": true, + "fields": [ + { + "name": "1h", + "type": "number", + "example": 14, + "description": "Change in experienced net buyers in the last hour", + "required": true + }, + { + "name": "1d", + "type": "number", + "example": 14, + "description": "Change in experienced net buyers in the last day", + "required": true + }, + { + "name": "1w", + "type": "number", + "example": 162, + "description": "Change in experienced net buyers in the last week", + "required": true + }, + { + "name": "1M", + "type": "number", + "example": 162, + "description": "Change in experienced net buyers in the last month", + "required": true + } + ] }, { - "name": "code", - "type": "object", - "description": "Move script bytecode", - "required": true + "name": "volume_change_usd", + "type": "object", + "description": "Changes in trading volume over various time periods, in USD", + "required": true, + "fields": [ + { + "name": "1h", + "type": "number", + "example": 14, + "description": "Change in volume in the last hour", + "required": true + }, + { + "name": "1d", + "type": "number", + "example": 14, + "description": "Change in volume in the last day", + "required": true + }, + { + "name": "1w", + "type": "number", + "example": 162, + "description": "Change in volume in the last week", + "required": true + }, + { + "name": "1M", + "type": "number", + "example": 162, + "description": "Change in volume in the last month", + "required": true + } + ] }, { - "name": "type_arguments", - "description": "Type arguments of the function", - "type": "array", - "field": { "type": "string" }, - "required": true + "name": "net_volume_change_usd", + "type": "object", + "description": "Changes in net trading volume over various time periods, in USD", + "required": true, + "fields": [ + { + "name": "1h", + "type": "number", + "example": 14, + "description": "Change in net volume in the last hour", + "required": true + }, + { + "name": "1d", + "type": "number", + "example": 14, + "description": "Change in net volume in the last day", + "required": true + }, + { + "name": "1w", + "type": "number", + "example": 162, + "description": "Change in net volume in the last week", + "required": true + }, + { + "name": "1M", + "type": "number", + "example": 162, + "description": "Change in net volume in the last month", + "required": true + } + ] }, { - "name": "arguments", - "description": "Arguments of the function", - "type": "array", - "field": { "type": "string" }, - "required": true + "name": "price_percent_change_usd", + "type": "object", + "description": "Percentage changes in token price over various time periods", + "required": true, + "fields": [ + { + "name": "1h", + "type": "number", + "example": 14, + "description": "Percentage price change in the last hour", + "required": true + }, + { + "name": "1d", + "type": "number", + "example": 14, + "description": "Percentage price change in the last day", + "required": true + }, + { + "name": "1w", + "type": "number", + "example": 162, + "description": "Percentage price change in the last week", + "required": true + }, + { + "name": "1M", + "type": "number", + "example": 162, + "description": "Percentage price change in the last month", + "required": true + } + ] } - ] - }, - { - "type": "object", - "fields": [ + ] + } + } + } + ] + }, + "getBuyingPressureTokens": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Identifies the top tokens with buying pressure.", + "description": "Identifies the top tokens with buying pressure.", + "method": "GET", + "path": "/discovery/tokens/buying-pressure", + "pathParams": [], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", + "type": "string", + "enum": [ + "eth", + "mainnet", + "0x1", + "matic", + "0x89", + "polygon", + "bsc", + "binance", + "0x38", + "fantom", + "ftm", + "0xfa", + "arbitrum", + "0xa4b1", + "optimism", + "0xa", + "pulsechain", + "0x171" + ] + }, + { + "name": "one_month_net_volume_change_usd", + "description": "The minimum one month net volume change in usd of a token", + "required": false, + "example": 1000000, + "type": "number" + }, + { + "name": "min_market_cap", + "description": "The minimum market cap in usd of a token", + "required": false, + "example": 100000000, + "type": "number" + }, + { + "name": "twitter_followers", + "description": "The minimum twitter followers of a token", + "required": false, + "example": 10000, + "type": "number" + }, + { + "name": "one_month_volume_change_usd", + "description": "The minimum one month volume change in usd of a token", + "required": false, + "example": 10000, + "type": "number" + }, + { + "name": "security_score", + "description": "The minimum security score of a token", + "required": false, + "example": 70, + "type": "number" + }, + { + "name": "one_month_price_percent_change_usd", + "description": "The minimum one month price percent change of a token", + "required": false, + "example": 0, + "type": "number" + } + ], + "responses": [ + { + "status": "200", + "description": "Returns market data for the specified token addresses, including metrics and statistics.", + "body": { + "type": "array", + "field": { + "type": "object", + "fields": [ { - "name": "type", - "type": "string", - "description": "", - "required": true + "name": "chain_id", + "type": "string", + "example": "0x1", + "description": "The blockchain identifier the token is on", + "required": true }, { - "name": "modules", - "description": "", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] - } - ] - }, - { - "name": "signature", - "type": "oneOf", - "required": true, - "options": [ - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true + "name": "token_address", + "type": "string", + "example": "0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2", + "description": "The contract address of the token", + "required": true }, { - "name": "signature", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", - "required": true + "name": "token_name", + "type": "string", + "example": "Maker", + "description": "The official name of the token", + "required": true }, { - "name": "public_key", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - } - ] - }, - { - "type": "object", - "fields": [ + "name": "token_symbol", + "type": "string", + "example": "MKR", + "description": "The abbreviated symbol of the token", + "required": true + }, { - "name": "type", - "type": "string", - "description": "", - "required": true + "name": "token_logo", + "type": "string", + "example": "string", + "description": "URL to the token's logo image", + "required": true }, { - "name": "public_keys", - "description": "The public keys for the Ed25519 signature", - "type": "array", - "field": { "type": "string" }, - "required": true + "name": "price_usd", + "type": "number", + "example": 0, + "description": "Current price of the token in USD", + "required": true }, { - "name": "signatures", - "description": "Signature associated with the public keys in the same order", - "type": "array", - "field": { "type": "string" }, - "required": true + "name": "security_score", + "type": "number", + "example": 88, + "description": "Security score assigned to the token", + "required": true }, { - "name": "threshold", - "type": "number", - "description": "The number of signatures required for a successful transaction", - "required": true + "name": "market_cap", + "type": "number", + "example": 1351767630.85, + "description": "Market capitalization of the token", + "required": true }, { - "name": "bitmap", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - } - ] - }, - { - "type": "object", - "fields": [ + "name": "fully_diluted_valuation", + "type": "number", + "example": 1363915420.28, + "description": "Fully diluted market cap of the token", + "required": true + }, { - "name": "type", - "type": "string", - "description": "", - "required": true + "name": "twitter_followers", + "type": "number", + "example": 255217, + "description": "Number of followers for the token's official Twitter account", + "required": true }, { - "name": "sender", - "type": "oneOf", - "options": [ - { - "type": "object", - "description": "A single Ed25519 signature", - "fields": [ + "name": "holders_change", + "type": "object", + "description": "Changes in the number of token holders over various time periods", + "required": true, + "fields": [ { - "name": "type", - "type": "string", - "description": "", - "required": true + "name": "1h", + "type": "number", + "example": 14, + "description": "Change in the last hour", + "required": true }, { - "name": "signature", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", - "required": true + "name": "1d", + "type": "number", + "example": 14, + "description": "Change in the last day", + "required": true }, { - "name": "public_key", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - } - ] - }, - { - "type": "object", - "description": "A Ed25519 multi-sig signature", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true + "name": "1w", + "type": "number", + "example": 162, + "description": "Change in the last week", + "required": true }, { - "name": "public_keys", - "description": "The public keys for the Ed25519 signature", - "type": "array", - "field": { "type": "string" }, - "required": true + "name": "1M", + "type": "number", + "example": 162, + "description": "Change in the last month", + "required": true + } + ] + }, + { + "name": "liquidity_change_usd", + "type": "object", + "description": "Changes in liquidity over various time periods, in USD", + "required": true, + "fields": [ + { + "name": "1h", + "type": "number", + "example": 14, + "description": "Change in liquidity in the last hour", + "required": true }, { - "name": "signatures", - "description": "Signature associated with the public keys in the same order", - "type": "array", - "field": { "type": "string" }, - "required": true + "name": "1d", + "type": "number", + "example": 14, + "description": "Change in liquidity in the last day", + "required": true }, { - "name": "threshold", - "type": "number", - "description": "The number of signatures required for a successful transaction", - "required": true + "name": "1w", + "type": "number", + "example": 162, + "description": "Change in liquidity in the last week", + "required": true }, { - "name": "bitmap", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true + "name": "1M", + "type": "number", + "example": 162, + "description": "Change in liquidity in the last month", + "required": true } - ] - } - ], - "required": true + ] }, { - "name": "secondary_signer_addresses", - "description": "The other involved parties addresses", - "type": "array", - "field": { "type": "string" }, - "required": true + "name": "experienced_net_buyers_change", + "type": "object", + "description": "Changes in the count of experienced net buyers over various time periods", + "required": true, + "fields": [ + { + "name": "1h", + "type": "number", + "example": 14, + "description": "Change in experienced net buyers in the last hour", + "required": true + }, + { + "name": "1d", + "type": "number", + "example": 14, + "description": "Change in experienced net buyers in the last day", + "required": true + }, + { + "name": "1w", + "type": "number", + "example": 162, + "description": "Change in experienced net buyers in the last week", + "required": true + }, + { + "name": "1M", + "type": "number", + "example": 162, + "description": "Change in experienced net buyers in the last month", + "required": true + } + ] }, { - "name": "secondary_signers", - "type": "oneOf", - "options": [ - { - "type": "object", - "description": "A single Ed25519 signature", - "fields": [ + "name": "volume_change_usd", + "type": "object", + "description": "Changes in trading volume over various time periods, in USD", + "required": true, + "fields": [ + { + "name": "1h", + "type": "number", + "example": 14, + "description": "Change in volume in the last hour", + "required": true + }, { - "name": "type", - "type": "string", - "description": "", - "required": true + "name": "1d", + "type": "number", + "example": 14, + "description": "Change in volume in the last day", + "required": true }, { - "name": "signature", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte", - "required": true + "name": "1w", + "type": "number", + "example": 162, + "description": "Change in volume in the last week", + "required": true }, { - "name": "public_key", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true + "name": "1M", + "type": "number", + "example": 162, + "description": "Change in volume in the last month", + "required": true } - ] - }, - { - "type": "object", - "description": "A Ed25519 multi-sig signature", - "fields": [ + ] + }, + { + "name": "net_volume_change_usd", + "type": "object", + "description": "Changes in net trading volume over various time periods, in USD", + "required": true, + "fields": [ { - "name": "type", - "type": "string", - "description": "", - "required": true + "name": "1h", + "type": "number", + "example": 14, + "description": "Change in net volume in the last hour", + "required": true + }, + { + "name": "1d", + "type": "number", + "example": 14, + "description": "Change in net volume in the last day", + "required": true }, { - "name": "public_keys", - "description": "The public keys for the Ed25519 signature", - "type": "array", - "field": { "type": "string" }, - "required": true + "name": "1w", + "type": "number", + "example": 162, + "description": "Change in net volume in the last week", + "required": true + }, + { + "name": "1M", + "type": "number", + "example": 162, + "description": "Change in net volume in the last month", + "required": true + } + ] + }, + { + "name": "price_percent_change_usd", + "type": "object", + "description": "Percentage changes in token price over various time periods", + "required": true, + "fields": [ + { + "name": "1h", + "type": "number", + "example": 14, + "description": "Percentage price change in the last hour", + "required": true }, { - "name": "signatures", - "description": "Signature associated with the public keys in the same order", - "type": "array", - "field": { "type": "string" }, - "required": true + "name": "1d", + "type": "number", + "example": 14, + "description": "Percentage price change in the last day", + "required": true }, { - "name": "threshold", - "type": "number", - "description": "The number of signatures required for a successful transaction", - "required": true + "name": "1w", + "type": "number", + "example": 162, + "description": "Percentage price change in the last week", + "required": true }, { - "name": "bitmap", - "type": "string", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true + "name": "1M", + "type": "number", + "example": 162, + "description": "Percentage price change in the last month", + "required": true } - ] - } - ], - "required": true + ] } - ] - } - ] - }, - { - "name": "events", - "example": "", - "description": "Events generated by the transaction", - "type": "array", - "required": true, - "field": { - "type": "object", - "fields": [ - { - "name": "guid", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "creation_number", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", - "required": true - }, - { - "name": "account_address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.\nThis is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.", - "required": true - } - ] - }, - { - "name": "sequence_number", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer." - }, - { - "name": "type", - "type": "string", - "example": "0x1::account::Account", - "description": "String representation of an on-chain Move type tag that is exposed in transaction payload." - }, - { - "name": "data", - "type": "string", - "example": {}, - "description": "The JSON representation of the event" - } - ], - "required": [ - "guid", - "sequence_number", - "type", - "data" ] - } - }, - { - "name": "timestamp", - "type": "string", - "example": "32425224034", - "required": true, - "description": "The timestamp of the block returned in milliseconds" } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "genesis_transaction", - "description": "", - "required": true - }, - { - "name": "version", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "hash", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "", - "required": true - }, - { - "name": "state_change_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "event_root_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "state_checkpoint_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "gas_used", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "success", - "type": "boolean", - "example": true, - "description": "Whether the transaction was successful", - "required": true - }, - { - "name": "vm_status", - "type": "string", - "example": "", - "description": "The VM status of the transaction, can tell useful information in a failure", - "required": true - }, - { - "name": "accumulator_root_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "changes", - "type": "array", - "required": true, - "field": { - "type": "oneOf", - "options": [ - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", + } + } + ] + }, + "getSolidPerformersTokens": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Identifies solid-performing tokens.", + "description": "Identifies solid-performing tokens.", + "method": "GET", + "path": "/discovery/tokens/solid-performers", + "pathParams": [], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", + "type": "string", + "enum": [ + "eth", + "mainnet", + "0x1", + "matic", + "0x89", + "polygon", + "bsc", + "binance", + "0x38", + "fantom", + "ftm", + "0xfa", + "arbitrum", + "0xa4b1", + "optimism", + "0xa", + "pulsechain", + "0x171" + ] + }, + { + "name": "one_month_net_volume_change_usd", + "description": "The minimum one month net volume change in usd of a token", + "required": false, + "example": 100000, + "type": "number" + }, + { + "name": "one_week_net_volume_change_usd", + "description": "The minimum one week net volume change in usd of a token", + "required": false, + "example": 10000, + "type": "number" + }, + { + "name": "one_day_net_volume_change_usd", + "description": "The minimum one day net volume change in usd of a token", + "required": false, + "example": 0, + "type": "number" + }, + { + "name": "one_month_volume_change_usd", + "description": "The minimum one month volume change in usd of a token", + "required": false, + "example": 10000, + "type": "number" + }, + { + "name": "security_score", + "description": "The minimum security score of a token", + "required": false, + "example": 80, + "type": "number" + }, + { + "name": "one_month_price_percent_change_usd", + "description": "The minimum one month price percent change of a token", + "required": false, + "example": 0, + "type": "number" + } + ], + "responses": [ + { + "status": "200", + "description": "Returns market data for the specified token addresses, including metrics and statistics.", + "body": { + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "chain_id", "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", + "example": "0x1", + "description": "The blockchain identifier the token is on", "required": true - }, - { - "name": "state_key_hash", + }, + { + "name": "token_address", "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "module", - "type": "object", - "example": "0x1::aptos_coin", - "description": "Move module id is a string representation of Move module", + "example": "0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2", + "description": "The contract address of the token", "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", + }, + { + "name": "token_name", "type": "string", - "example": "delete_module", - "description": "", + "example": "Maker", + "description": "The official name of the token", "required": true - }, - { - "name": "address", + }, + { + "name": "token_symbol", "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", + "example": "MKR", + "description": "The abbreviated symbol of the token", "required": true - }, - { - "name": "state_key_hash", + }, + { + "name": "token_logo", "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "resource", - "type": "object", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type).", + "example": "string", + "description": "URL to the token's logo image", "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", + }, + { + "name": "price_usd", + "type": "number", + "example": 0, + "description": "Current price of the token in USD", "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", + }, + { + "name": "security_score", + "type": "number", + "example": 88, + "description": "Security score assigned to the token", "required": true - }, - { - "name": "handle", - "type": "object", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + }, + { + "name": "market_cap", + "type": "number", + "example": 1351767630.85, + "description": "Market capitalization of the token", "required": true - }, - { - "name": "key", - "type": "object", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + }, + { + "name": "fully_diluted_valuation", + "type": "number", + "example": 1363915420.28, + "description": "Fully diluted market cap of the token", "required": true - }, - { - "name": "data", - "example": {}, - "description": "Deleted table data", - "type": "object", - "fields": [ - { - "name": "key", - "type": "string", - "example": "", - "description": "Deleted key", - "required": true - }, - { - "name": "key_type", - "type": "string", - "example": "", - "description": "Deleted key type", - "required": true - } - ], + }, + { + "name": "twitter_followers", + "type": "number", + "example": 255217, + "description": "Number of followers for the token's official Twitter account", "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "" - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address." - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash" - }, - { - "name": "data", - "example": "", - "description": "", + }, + { + "name": "holders_change", "type": "object", + "description": "Changes in the number of token holders over various time periods", + "required": true, "fields": [ - { - "name": "bytecode", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." - }, - { - "name": "abi", - "example": {}, - "description": "", - "type": "object", - "fields": [ - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "name", - "type": "string", - "example": "", - "description": "", + { + "name": "1h", + "type": "number", + "example": 14, + "description": "Change in the last hour", "required": true - }, - { - "name": "friends", - "example": [], - "description": "Friends of the module", - "type": "array", - "field": { "type": "string" }, + }, + { + "name": "1d", + "type": "number", + "example": 14, + "description": "Change in the last day", "required": true - }, - { - "name": "exposed_functions", - "example": [], - "description": "Public functions of the module", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "", - "description": "Name of the function", - "required": true - }, - { - "name": "visibility", - "type": "string", - "example": "private", - "description": "Move function visibility", - "required": true - }, - { - "name": "is_entry", - "type": "boolean", - "example": true, - "description": "Whether the function can be called as an entry function directly in a transaction", - "required": true - }, - { - "name": "generic_type_params", - "example": [], - "description": "Generic type params associated with the Move function", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { - "type": "string" - }, - "required": true - } - ] - }, - "required": true - }, - { - "name": "params", - "example": [], - "description": "Parameters associated with the move function", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "return", - "example": "", - "description": "Return type of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] - }, + }, + { + "name": "1w", + "type": "number", + "example": 162, + "description": "Change in the last week", "required": true - }, - { - "name": "structs", - "example": [], - "description": "Structs of the module", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "", - "description": "Name of the struct", - "required": true - }, - { - "name": "is_native", - "type": "boolean", - "example": true, - "description": "Whether the struct is a native struct of Move", - "required": true - }, - { - "name": "abilities", - "example": [], - "description": "Abilities associated with the struct", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "generic_type_params", - "example": [], - "description": "Generic types associated with the struct", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { - "type": "string" - } - } - ] - }, - "required": true - }, - { - "name": "fields", - "example": [], - "description": "Fields associated with the struct", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "sender", - "description": "Name of the field", - "required": true - }, - { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", - "required": true - } - ] - }, - "required": true - } - ] - }, + }, + { + "name": "1M", + "type": "number", + "example": 162, + "description": "Change in the last month", "required": true - } - ] - } + } ] - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "data", - "example": "", - "description": "", + }, + { + "name": "liquidity_change_usd", "type": "object", + "description": "Changes in liquidity over various time periods, in USD", + "required": true, "fields": [ - { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type).", - "required": true - }, - { - "name": "data", - "type": "object", - "example": "", - "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", - "required": true - } - ], - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "handle", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "key", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "value", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "data", - "example": "", - "description": "", + { + "name": "1h", + "type": "number", + "example": 14, + "description": "Change in liquidity in the last hour", + "required": true + }, + { + "name": "1d", + "type": "number", + "example": 14, + "description": "Change in liquidity in the last day", + "required": true + }, + { + "name": "1w", + "type": "number", + "example": 162, + "description": "Change in liquidity in the last week", + "required": true + }, + { + "name": "1M", + "type": "number", + "example": 162, + "description": "Change in liquidity in the last month", + "required": true + } + ] + }, + { + "name": "experienced_net_buyers_change", "type": "object", + "description": "Changes in the count of experienced net buyers over various time periods", + "required": true, "fields": [ - { - "name": "key", - "type": "string", - "example": "", - "description": "Key of table in JSON", - "required": true - }, - { - "name": "key_type", - "type": "string", - "example": "", - "description": "Type of key", - "required": true - }, - { - "name": "value", - "type": "string", - "example": "", - "description": "Value of table in JSON", - "required": true - }, - { - "name": "value_type", - "type": "string", - "example": "", - "description": "Type of value", - "required": true - } - ], - "required": true - } - ] - } - ] - } - }, - { - "name": "payload", - "required": true, - "description": "A writeset payload, used only for genesis", - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "write_set", - "description": "The associated writeset with a payload", - "required": true, - "type": "oneOf", - "options": [ - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "execute_as", - "type": "string", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "script", - "description": "Payload which runs a script that can run multiple functions", - "required": true, - "type": "object", - "fields": [ { - "name": "type", - "type": "string", - "description": "Type of payload", - "required": true + "name": "1h", + "type": "number", + "example": 14, + "description": "Change in experienced net buyers in the last hour", + "required": true }, { - "name": "code", - "type": "object", - "description": "Move script bytecode", - "required": true + "name": "1d", + "type": "number", + "example": 14, + "description": "Change in experienced net buyers in the last day", + "required": true }, { - "name": "type_arguments", - "description": "Type arguments of the function", - "type": "array", - "field": { "type": "string" }, - "required": true + "name": "1w", + "type": "number", + "example": 162, + "description": "Change in experienced net buyers in the last week", + "required": true }, { - "name": "arguments", - "description": "Arguments of the function", - "type": "array", - "field": { "type": "string" }, - "required": true + "name": "1M", + "type": "number", + "example": 162, + "description": "Change in experienced net buyers in the last month", + "required": true } - ] - } - ] + ] }, { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "description": "", - "required": true - }, - { - "name": "changes", - "description": "", - "types": "oneOf", - "required": true, - "options": [ + "name": "volume_change_usd", + "type": "object", + "description": "Changes in trading volume over various time periods, in USD", + "required": true, + "fields": [ { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "module", - "type": "object", - "example": "0x1::aptos_coin", - "description": "Move module id is a string representation of Move module", - "required": true - } - ] + "name": "1h", + "type": "number", + "example": 14, + "description": "Change in volume in the last hour", + "required": true }, { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "resource", - "type": "object", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type).", - "required": true - } - ] + "name": "1d", + "type": "number", + "example": 14, + "description": "Change in volume in the last day", + "required": true }, { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "handle", - "type": "object", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "key", - "type": "object", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "data", - "example": {}, - "description": "Deleted table data", - "type": "object", - "fields": [ - { - "name": "key", - "type": "string", - "example": "", - "description": "Deleted key", - "required": true - }, - { - "name": "key_type", - "type": "string", - "example": "", - "description": "Deleted key type", - "required": true - } - ], - "required": true - } - ] + "name": "1w", + "type": "number", + "example": 162, + "description": "Change in volume in the last week", + "required": true }, { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "" - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address." - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash" - }, - { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "bytecode", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." - }, - { - "name": "abi", - "example": {}, - "description": "", - "type": "object", - "fields": [ - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "name", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "friends", - "example": [], - "description": "Friends of the module", - "type": "array", - "field": { - "type": "string" - }, - "required": true - }, - { - "name": "exposed_functions", - "example": [], - "description": "Public functions of the module", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "", - "description": "Name of the function", - "required": true - }, - { - "name": "visibility", - "type": "string", - "example": "private", - "description": "Move function visibility", - "required": true - }, - { - "name": "is_entry", - "type": "boolean", - "example": true, - "description": "Whether the function can be called as an entry function directly in a transaction", - "required": true - }, - { - "name": "generic_type_params", - "example": [], - "description": "Generic type params associated with the Move function", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { - "type": "string" - }, - "required": true - } - ] - }, - "required": true - }, - { - "name": "params", - "example": [], - "description": "Parameters associated with the move function", - "type": "array", - "field": { - "type": "string" - }, - "required": true - }, - { - "name": "return", - "example": "", - "description": "Return type of the function", - "type": "array", - "field": { - "type": "string" - }, - "required": true - } - ] - }, - "required": true - }, - { - "name": "structs", - "example": [], - "description": "Structs of the module", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "", - "description": "Name of the struct", - "required": true - }, - { - "name": "is_native", - "type": "boolean", - "example": true, - "description": "Whether the struct is a native struct of Move", - "required": true - }, - { - "name": "abilities", - "example": [], - "description": "Abilities associated with the struct", - "type": "array", - "field": { - "type": "string" - }, - "required": true - }, - { - "name": "generic_type_params", - "example": [], - "description": "Generic types associated with the struct", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { - "type": "string" - } - } - ] - }, - "required": true - }, - { - "name": "fields", - "example": [], - "description": "Fields associated with the struct", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "sender", - "description": "Name of the field", - "required": true - }, - { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", - "required": true - } - ] - }, - "required": true - } - ] - }, - "required": true - } - ] - } - ] - } - ] + "name": "1M", + "type": "number", + "example": 162, + "description": "Change in volume in the last month", + "required": true + } + ] + }, + { + "name": "net_volume_change_usd", + "type": "object", + "description": "Changes in net trading volume over various time periods, in USD", + "required": true, + "fields": [ + { + "name": "1h", + "type": "number", + "example": 14, + "description": "Change in net volume in the last hour", + "required": true }, { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type).", - "required": true - }, - { - "name": "data", - "type": "object", - "example": "", - "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", - "required": true - } - ], - "required": true - } - ] + "name": "1d", + "type": "number", + "example": 14, + "description": "Change in net volume in the last day", + "required": true }, { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "handle", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "key", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "value", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "key", - "type": "string", - "example": "", - "description": "Key of table in JSON", - "required": true - }, - { - "name": "key_type", - "type": "string", - "example": "", - "description": "Type of key", - "required": true - }, - { - "name": "value", - "type": "string", - "example": "", - "description": "Value of table in JSON", - "required": true - }, - { - "name": "value_type", - "type": "string", - "example": "", - "description": "Type of value", - "required": true - } - ], - "required": true - } - ] + "name": "1w", + "type": "number", + "example": 162, + "description": "Change in net volume in the last week", + "required": true + }, + { + "name": "1M", + "type": "number", + "example": 162, + "description": "Change in net volume in the last month", + "required": true } - ] - }, - { - "name": "events", - "description": "Events emitted during genesis", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "guid", - "example": "", - "description": "", - "type": "object", - "required": true, - "fields": [ - { - "name": "creation_number", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", - "required": true - }, - { - "name": "account_address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.\nThis is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.", - "required": true - } - ] - }, - { - "name": "sequence_number", - "type": "string", - "example": "32425224034", - "required": true, - "description": "A string containing a 64-bit unsigned integer." - }, - { - "name": "type", - "type": "string", - "example": "0x1::account::Account", - "required": true, - "description": "String representation of an on-chain Move type tag that is exposed in transaction payload." - }, - { - "name": "data", - "type": "string", - "example": {}, - "required": true, - "description": "The JSON representation of the event" - } - ] - }, - "required": true - } - ] - } - ] - } - ] - }, - { - "name": "events", - "example": "", - "required": true, - "description": "Events generated by the transaction", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "guid", - "example": "", - "description": "", - "type": "object", - "required": true, - "fields": [ - { - "name": "creation_number", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", - "required": true - }, - { - "name": "account_address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.\nThis is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.", - "required": true - } - ] - }, - { - "name": "sequence_number", - "type": "string", - "example": "32425224034", - "required": true, - "description": "A string containing a 64-bit unsigned integer." - }, - { - "name": "type", - "type": "string", - "example": "0x1::account::Account", - "required": true, - "description": "String representation of an on-chain Move type tag that is exposed in transaction payload." - }, - { - "name": "data", - "type": "string", - "example": {}, - "required": true, - "description": "The JSON representation of the event" - } + ] + }, + { + "name": "price_percent_change_usd", + "type": "object", + "description": "Percentage changes in token price over various time periods", + "required": true, + "fields": [ + { + "name": "1h", + "type": "number", + "example": 14, + "description": "Percentage price change in the last hour", + "required": true + }, + { + "name": "1d", + "type": "number", + "example": 14, + "description": "Percentage price change in the last day", + "required": true + }, + { + "name": "1w", + "type": "number", + "example": 162, + "description": "Percentage price change in the last week", + "required": true + }, + { + "name": "1M", + "type": "number", + "example": 162, + "description": "Percentage price change in the last month", + "required": true + } + ] + } ] - } } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "block_metadata_transaction", - "description": "", - "required": true - }, - { - "name": "version", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "hash", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "", - "required": true - }, - { - "name": "state_change_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "event_root_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "state_checkpoint_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "gas_used", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "success", - "type": "boolean", - "example": true, - "description": "Whether the transaction was successful", - "required": true - }, - { - "name": "vm_status", - "type": "string", - "example": "", - "description": "The VM status of the transaction, can tell useful information in a failure", - "required": true - }, - { - "name": "accumulator_root_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "changes", - "type": "array", - "field": { - "type": "oneOf", - "options": [ - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", + } + } + ] + }, + "getExperiencedBuyersTokens": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Identifies tokens that experienced buyers are purchasing.", + "description": "Identifies tokens that experienced buyers are purchasing.", + "method": "GET", + "path": "/discovery/tokens/experienced-buyers", + "pathParams": [], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", + "type": "string", + "enum": [ + "eth", + "mainnet", + "0x1", + "matic", + "0x89", + "polygon", + "bsc", + "binance", + "0x38", + "fantom", + "ftm", + "0xfa", + "arbitrum", + "0xa4b1", + "optimism", + "0xa", + "pulsechain", + "0x171" + ] + }, + { + "name": "one_week_experienced_net_buyers_change", + "description": "The minimum one week experienced buyers change of a token", + "required": false, + "example": 10, + "type": "number" + }, + { + "name": "min_market_cap", + "description": "The minimum market cap in usd of a token", + "required": false, + "example": 100000000, + "type": "number" + }, + { + "name": "twitter_followers", + "description": "The minimum twitter followers of a token", + "required": false, + "example": 10000, + "type": "number" + }, + { + "name": "one_month_volume_change_usd", + "description": "The minimum one month volume change in usd of a token", + "required": false, + "example": 10000, + "type": "number" + }, + { + "name": "security_score", + "description": "The minimum security score of a token", + "required": false, + "example": 70, + "type": "number" + }, + { + "name": "one_month_price_percent_change_usd", + "description": "The minimum one month price percent change of a token", + "required": false, + "example": 0, + "type": "number" + } + ], + "responses": [ + { + "status": "200", + "description": "Returns market data for the specified token addresses, including metrics and statistics.", + "body": { + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "chain_id", "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", + "example": "0x1", + "description": "The blockchain identifier the token is on", "required": true - }, - { - "name": "state_key_hash", + }, + { + "name": "token_address", "type": "string", - "example": "", - "description": "State key hash", + "example": "0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2", + "description": "The contract address of the token", "required": true - }, - { - "name": "module", - "type": "object", - "example": "0x1::aptos_coin", - "description": "Move module id is a string representation of Move module", - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", + }, + { + "name": "token_name", "type": "string", - "example": "delete_module", - "description": "", + "example": "Maker", + "description": "The official name of the token", "required": true - }, - { - "name": "address", + }, + { + "name": "token_symbol", "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", + "example": "MKR", + "description": "The abbreviated symbol of the token", "required": true - }, - { - "name": "state_key_hash", + }, + { + "name": "token_logo", "type": "string", - "example": "", - "description": "State key hash", + "example": "string", + "description": "URL to the token's logo image", "required": true - }, - { - "name": "resource", - "type": "object", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type).", + }, + { + "name": "price_usd", + "type": "number", + "example": 0, + "description": "Current price of the token in USD", "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", + }, + { + "name": "security_score", + "type": "number", + "example": 88, + "description": "Security score assigned to the token", "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", + }, + { + "name": "market_cap", + "type": "number", + "example": 1351767630.85, + "description": "Market capitalization of the token", "required": true - }, - { - "name": "handle", - "type": "object", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + }, + { + "name": "fully_diluted_valuation", + "type": "number", + "example": 1363915420.28, + "description": "Fully diluted market cap of the token", "required": true - }, - { - "name": "key", - "type": "object", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + }, + { + "name": "twitter_followers", + "type": "number", + "example": 255217, + "description": "Number of followers for the token's official Twitter account", "required": true - }, - { - "name": "data", - "example": {}, - "description": "Deleted table data", + }, + { + "name": "holders_change", "type": "object", + "description": "Changes in the number of token holders over various time periods", + "required": true, "fields": [ - { - "name": "key", - "type": "string", - "example": "", - "description": "Deleted key", - "required": true - }, - { - "name": "key_type", - "type": "string", - "example": "", - "description": "Deleted key type", - "required": true - } - ], - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "" - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address." - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash" - }, - { - "name": "data", - "example": "", - "description": "", + { + "name": "1h", + "type": "number", + "example": 14, + "description": "Change in the last hour", + "required": true + }, + { + "name": "1d", + "type": "number", + "example": 14, + "description": "Change in the last day", + "required": true + }, + { + "name": "1w", + "type": "number", + "example": 162, + "description": "Change in the last week", + "required": true + }, + { + "name": "1M", + "type": "number", + "example": 162, + "description": "Change in the last month", + "required": true + } + ] + }, + { + "name": "liquidity_change_usd", "type": "object", + "description": "Changes in liquidity over various time periods, in USD", + "required": true, "fields": [ - { - "name": "bytecode", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." - }, - { - "name": "abi", - "example": {}, - "description": "", - "type": "object", - "fields": [ - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", + { + "name": "1h", + "type": "number", + "example": 14, + "description": "Change in liquidity in the last hour", "required": true - }, - { - "name": "name", - "type": "string", - "example": "", - "description": "", + }, + { + "name": "1d", + "type": "number", + "example": 14, + "description": "Change in liquidity in the last day", "required": true - }, - { - "name": "friends", - "example": [], - "description": "Friends of the module", - "type": "array", - "field": { "type": "string" }, + }, + { + "name": "1w", + "type": "number", + "example": 162, + "description": "Change in liquidity in the last week", "required": true - }, - { - "name": "exposed_functions", - "example": [], - "description": "Public functions of the module", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "", - "description": "Name of the function", - "required": true - }, - { - "name": "visibility", - "type": "string", - "example": "private", - "description": "Move function visibility", - "required": true - }, - { - "name": "is_entry", - "type": "boolean", - "example": true, - "description": "Whether the function can be called as an entry function directly in a transaction", - "required": true - }, - { - "name": "generic_type_params", - "example": [], - "description": "Generic type params associated with the Move function", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { - "type": "string" - }, - "required": true - } - ] - }, - "required": true - }, - { - "name": "params", - "example": [], - "description": "Parameters associated with the move function", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "return", - "example": "", - "description": "Return type of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] - }, + }, + { + "name": "1M", + "type": "number", + "example": 162, + "description": "Change in liquidity in the last month", "required": true - }, - { - "name": "structs", - "example": [], - "description": "Structs of the module", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "", - "description": "Name of the struct", - "required": true - }, - { - "name": "is_native", - "type": "boolean", - "example": true, - "description": "Whether the struct is a native struct of Move", - "required": true - }, - { - "name": "abilities", - "example": [], - "description": "Abilities associated with the struct", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "generic_type_params", - "example": [], - "description": "Generic types associated with the struct", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { - "type": "string" - } - } - ] - }, - "required": true - }, - { - "name": "fields", - "example": [], - "description": "Fields associated with the struct", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "sender", - "description": "Name of the field", - "required": true - }, - { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", - "required": true - } - ] - }, - "required": true - } - ] - }, + } + ] + }, + { + "name": "experienced_net_buyers_change", + "type": "object", + "description": "Changes in the count of experienced net buyers over various time periods", + "required": true, + "fields": [ + { + "name": "1h", + "type": "number", + "example": 14, + "description": "Change in experienced net buyers in the last hour", "required": true - } - ] - } + }, + { + "name": "1d", + "type": "number", + "example": 14, + "description": "Change in experienced net buyers in the last day", + "required": true + }, + { + "name": "1w", + "type": "number", + "example": 162, + "description": "Change in experienced net buyers in the last week", + "required": true + }, + { + "name": "1M", + "type": "number", + "example": 162, + "description": "Change in experienced net buyers in the last month", + "required": true + } ] - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "data", - "example": "", - "description": "", + }, + { + "name": "volume_change_usd", "type": "object", + "description": "Changes in trading volume over various time periods, in USD", + "required": true, "fields": [ - { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type).", - "required": true - }, - { - "name": "data", - "type": "object", - "example": "", - "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", - "required": true - } - ], - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", - "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "handle", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "key", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "value", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "data", - "example": "", - "description": "", + { + "name": "1h", + "type": "number", + "example": 14, + "description": "Change in volume in the last hour", + "required": true + }, + { + "name": "1d", + "type": "number", + "example": 14, + "description": "Change in volume in the last day", + "required": true + }, + { + "name": "1w", + "type": "number", + "example": 162, + "description": "Change in volume in the last week", + "required": true + }, + { + "name": "1M", + "type": "number", + "example": 162, + "description": "Change in volume in the last month", + "required": true + } + ] + }, + { + "name": "net_volume_change_usd", "type": "object", + "description": "Changes in net trading volume over various time periods, in USD", + "required": true, "fields": [ - { - "name": "key", - "type": "string", - "example": "", - "description": "Key of table in JSON", - "required": true - }, - { - "name": "key_type", - "type": "string", - "example": "", - "description": "Type of key", - "required": true - }, - { - "name": "value", - "type": "string", - "example": "", - "description": "Value of table in JSON", - "required": true - }, - { - "name": "value_type", - "type": "string", - "example": "", - "description": "Type of value", - "required": true - } - ], - "required": true - } - ] - } + { + "name": "1h", + "type": "number", + "example": 14, + "description": "Change in net volume in the last hour", + "required": true + }, + { + "name": "1d", + "type": "number", + "example": 14, + "description": "Change in net volume in the last day", + "required": true + }, + { + "name": "1w", + "type": "number", + "example": 162, + "description": "Change in net volume in the last week", + "required": true + }, + { + "name": "1M", + "type": "number", + "example": 162, + "description": "Change in net volume in the last month", + "required": true + } + ] + }, + { + "name": "price_percent_change_usd", + "type": "object", + "description": "Percentage changes in token price over various time periods", + "required": true, + "fields": [ + { + "name": "1h", + "type": "number", + "example": 14, + "description": "Percentage price change in the last hour", + "required": true + }, + { + "name": "1d", + "type": "number", + "example": 14, + "description": "Percentage price change in the last day", + "required": true + }, + { + "name": "1w", + "type": "number", + "example": 162, + "description": "Percentage price change in the last week", + "required": true + }, + { + "name": "1M", + "type": "number", + "example": 162, + "description": "Percentage price change in the last month", + "required": true + } + ] + } ] - }, - "required": true - }, - { - "name": "id", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "epoch", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "round", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "events", - "example": [], - "description": "he events emitted at the block creation", - "type": "array", - "field": { + } + } + } + ] + }, + "getRiskyBetsTokens": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Identifies tokens with risky characteristics.", + "description": "Identifies tokens with risky characteristics.", + "method": "GET", + "path": "/discovery/tokens/risky-bets", + "pathParams": [], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", + "type": "string", + "enum": [ + "eth", + "mainnet", + "0x1", + "matic", + "0x89", + "polygon", + "bsc", + "binance", + "0x38", + "fantom", + "ftm", + "0xfa", + "arbitrum", + "0xa4b1", + "optimism", + "0xa", + "pulsechain", + "0x171" + ] + }, + { + "name": "max_market_cap", + "description": "The maximum market cap in usd of a token", + "required": false, + "example": 10000000, + "type": "number" + }, + { + "name": "one_week_holders_change", + "description": "The minimum one week holders change of a token", + "required": false, + "example": 25, + "type": "number" + }, + { + "name": "one_week_net_volume_change_usd", + "description": "The minimum one week net volume change in usd of a token", + "required": false, + "example": 500, + "type": "number" + }, + { + "name": "one_month_volume_change_usd", + "description": "The minimum one month volume change in usd of a token", + "required": false, + "example": 10000, + "type": "number" + }, + { + "name": "security_score", + "description": "The minimum security score of a token", + "required": false, + "example": 70, + "type": "number" + }, + { + "name": "one_month_price_percent_change_usd", + "description": "The minimum one month price percent change of a token", + "required": false, + "example": 0, + "type": "number" + } + ], + "responses": [ + { + "status": "200", + "description": "Returns market data for the specified token addresses, including metrics and statistics.", + "body": { + "type": "array", + "field": { "type": "object", "fields": [ - { - "name": "guid", - "example": "", - "description": "", - "type": "object", - "required": true, - "fields": [ - { - "name": "creation_number", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.\nWe represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.", - "required": true - }, - { - "name": "account_address", + { + "name": "chain_id", "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.\nThis is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.", + "example": "0x1", + "description": "The blockchain identifier the token is on", "required": true - } - ] - }, - { - "name": "sequence_number", - "type": "string", - "example": "32425224034", - "required": true, - "description": "A string containing a 64-bit unsigned integer." - }, - { - "name": "type", - "type": "string", - "example": "0x1::account::Account", - "required": true, - "description": "String representation of an on-chain Move type tag that is exposed in transaction payload." - }, - { - "name": "data", - "type": "string", - "example": {}, - "required": true, - "description": "The JSON representation of the event" - } - ] - }, - "required": true - }, - { - "name": "previous_block_votes_bitvec", - "example": "", - "description": "Previous block votes", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "proposer", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account addresss", - "required": true - }, - { - "name": "failed_proposer_indices", - "example": [], - "description": "The indices of the proposers who failed to propose", - "required": true, - "type": "array", - "field": { "type": "string" } - }, - { - "name": "timestamp", - "type": "string", - "example": "32425224034", - "description": "The timestamp of the block returned in milliseconds", - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "state_checkpoint_transaction", - "description": "", - "required": true - }, - { - "name": "version", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "hash", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "", - "required": true - }, - { - "name": "state_change_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "event_root_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "state_checkpoint_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "gas_used", - "type": "string", - "example": "32425224034", - "description": "A string containing a 64-bit unsigned integer.", - "required": true - }, - { - "name": "success", - "type": "boolean", - "example": true, - "description": "Whether the transaction was successful", - "required": true - }, - { - "name": "vm_status", - "type": "string", - "example": "", - "description": "The VM status of the transaction, can tell useful information in a failure", - "required": true - }, - { - "name": "accumulator_root_hash", - "type": "string", - "example": "", - "description": "", - "required": true - }, - { - "name": "changes", - "type": "array", - "field": { - "type": "oneOf", - "options": [ - { - "type": "object", - "fields": [ - { - "name": "type", + }, + { + "name": "token_address", "type": "string", - "example": "delete_module", - "description": "", + "example": "0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2", + "description": "The contract address of the token", "required": true - }, - { - "name": "address", + }, + { + "name": "token_name", "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", + "example": "Maker", + "description": "The official name of the token", "required": true - }, - { - "name": "state_key_hash", + }, + { + "name": "token_symbol", "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "module", - "type": "object", - "example": "0x1::aptos_coin", - "description": "Move module id is a string representation of Move module", + "example": "MKR", + "description": "The abbreviated symbol of the token", "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", + }, + { + "name": "token_logo", "type": "string", - "example": "delete_module", - "description": "", + "example": "string", + "description": "URL to the token's logo image", "required": true - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", + }, + { + "name": "price_usd", + "type": "number", + "example": 0, + "description": "Current price of the token in USD", "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", + }, + { + "name": "security_score", + "type": "number", + "example": 88, + "description": "Security score assigned to the token", "required": true - }, - { - "name": "resource", - "type": "object", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type).", + }, + { + "name": "market_cap", + "type": "number", + "example": 1351767630.85, + "description": "Market capitalization of the token", "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "", + }, + { + "name": "fully_diluted_valuation", + "type": "number", + "example": 1363915420.28, + "description": "Fully diluted market cap of the token", "required": true - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash", + }, + { + "name": "twitter_followers", + "type": "number", + "example": 255217, + "description": "Number of followers for the token's official Twitter account", "required": true - }, - { - "name": "handle", + }, + { + "name": "holders_change", "type": "object", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "key", + "description": "Changes in the number of token holders over various time periods", + "required": true, + "fields": [ + { + "name": "1h", + "type": "number", + "example": 14, + "description": "Change in the last hour", + "required": true + }, + { + "name": "1d", + "type": "number", + "example": 14, + "description": "Change in the last day", + "required": true + }, + { + "name": "1w", + "type": "number", + "example": 162, + "description": "Change in the last week", + "required": true + }, + { + "name": "1M", + "type": "number", + "example": 162, + "description": "Change in the last month", + "required": true + } + ] + }, + { + "name": "liquidity_change_usd", "type": "object", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", - "required": true - }, - { - "name": "data", - "example": {}, - "description": "Deleted table data", + "description": "Changes in liquidity over various time periods, in USD", + "required": true, + "fields": [ + { + "name": "1h", + "type": "number", + "example": 14, + "description": "Change in liquidity in the last hour", + "required": true + }, + { + "name": "1d", + "type": "number", + "example": 14, + "description": "Change in liquidity in the last day", + "required": true + }, + { + "name": "1w", + "type": "number", + "example": 162, + "description": "Change in liquidity in the last week", + "required": true + }, + { + "name": "1M", + "type": "number", + "example": 162, + "description": "Change in liquidity in the last month", + "required": true + } + ] + }, + { + "name": "experienced_net_buyers_change", "type": "object", + "description": "Changes in the count of experienced net buyers over various time periods", + "required": true, "fields": [ - { - "name": "key", - "type": "string", - "example": "", - "description": "Deleted key", - "required": true - }, - { - "name": "key_type", - "type": "string", - "example": "", - "description": "Deleted key type", - "required": true - } - ], - "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "delete_module", - "description": "" - }, - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address." - }, - { - "name": "state_key_hash", - "type": "string", - "example": "", - "description": "State key hash" - }, - { - "name": "data", - "example": "", - "description": "", + { + "name": "1h", + "type": "number", + "example": 14, + "description": "Change in experienced net buyers in the last hour", + "required": true + }, + { + "name": "1d", + "type": "number", + "example": 14, + "description": "Change in experienced net buyers in the last day", + "required": true + }, + { + "name": "1w", + "type": "number", + "example": 162, + "description": "Change in experienced net buyers in the last week", + "required": true + }, + { + "name": "1M", + "type": "number", + "example": 162, + "description": "Change in experienced net buyers in the last month", + "required": true + } + ] + }, + { + "name": "volume_change_usd", "type": "object", + "description": "Changes in trading volume over various time periods, in USD", + "required": true, "fields": [ - { - "name": "bytecode", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte." - }, - { - "name": "abi", - "example": {}, - "description": "", - "type": "object", - "fields": [ - { - "name": "address", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", + { + "name": "1h", + "type": "number", + "example": 14, + "description": "Change in volume in the last hour", "required": true - }, - { - "name": "name", - "type": "string", - "example": "", - "description": "", + }, + { + "name": "1d", + "type": "number", + "example": 14, + "description": "Change in volume in the last day", "required": true - }, - { - "name": "friends", - "example": [], - "description": "Friends of the module", - "type": "array", - "field": { "type": "string" }, + }, + { + "name": "1w", + "type": "number", + "example": 162, + "description": "Change in volume in the last week", "required": true - }, - { - "name": "exposed_functions", - "example": [], - "description": "Public functions of the module", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "", - "description": "Name of the function", - "required": true - }, - { - "name": "visibility", - "type": "string", - "example": "private", - "description": "Move function visibility", - "required": true - }, - { - "name": "is_entry", - "type": "boolean", - "example": true, - "description": "Whether the function can be called as an entry function directly in a transaction", - "required": true - }, - { - "name": "generic_type_params", - "example": [], - "description": "Generic type params associated with the Move function", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { - "type": "string" - }, - "required": true - } - ] - }, - "required": true - }, - { - "name": "params", - "example": [], - "description": "Parameters associated with the move function", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "return", - "example": "", - "description": "Return type of the function", - "type": "array", - "field": { "type": "string" }, - "required": true - } - ] - }, + }, + { + "name": "1M", + "type": "number", + "example": 162, + "description": "Change in volume in the last month", "required": true - }, - { - "name": "structs", - "example": [], - "description": "Structs of the module", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "", - "description": "Name of the struct", - "required": true - }, - { - "name": "is_native", - "type": "boolean", - "example": true, - "description": "Whether the struct is a native struct of Move", - "required": true - }, - { - "name": "abilities", - "example": [], - "description": "Abilities associated with the struct", - "type": "array", - "field": { "type": "string" }, - "required": true - }, - { - "name": "generic_type_params", - "example": [], - "description": "Generic types associated with the struct", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "constraints", - "example": [], - "description": "Move abilities tied to the generic type param and associated with the function that uses it", - "type": "array", - "field": { - "type": "string" - } - } - ] - }, - "required": true - }, - { - "name": "fields", - "example": [], - "description": "Fields associated with the struct", - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "name", - "type": "string", - "example": "sender", - "description": "Name of the field", - "required": true - }, - { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of an on-chain Move type tag that is exposed in transaction payload.", - "required": true - } - ] - }, - "required": true - } - ] - }, + } + ] + }, + { + "name": "net_volume_change_usd", + "type": "object", + "description": "Changes in net trading volume over various time periods, in USD", + "required": true, + "fields": [ + { + "name": "1h", + "type": "number", + "example": 14, + "description": "Change in net volume in the last hour", "required": true - } - ] - } + }, + { + "name": "1d", + "type": "number", + "example": 14, + "description": "Change in net volume in the last day", + "required": true + }, + { + "name": "1w", + "type": "number", + "example": 162, + "description": "Change in net volume in the last week", + "required": true + }, + { + "name": "1M", + "type": "number", + "example": 162, + "description": "Change in net volume in the last month", + "required": true + } ] - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", + }, + { + "name": "price_percent_change_usd", + "type": "object", + "description": "Percentage changes in token price over various time periods", + "required": true, + "fields": [ + { + "name": "1h", + "type": "number", + "example": 14, + "description": "Percentage price change in the last hour", + "required": true + }, + { + "name": "1d", + "type": "number", + "example": 14, + "description": "Percentage price change in the last day", + "required": true + }, + { + "name": "1w", + "type": "number", + "example": 162, + "description": "Percentage price change in the last week", + "required": true + }, + { + "name": "1M", + "type": "number", + "example": 162, + "description": "Percentage price change in the last month", + "required": true + } + ] + } + ] + } + } + } + ] + }, + "getBlueChipTokens": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Identifies blue-chip tokens.", + "description": "Identifies blue-chip tokens.", + "method": "GET", + "path": "/discovery/tokens/blue-chip", + "pathParams": [], + "queryParams": [ + { + "name": "chain", + "description": "The chain to query", + "required": false, + "example": "eth", + "type": "string", + "enum": [ + "eth", + "mainnet", + "0x1", + "matic", + "0x89", + "polygon", + "bsc", + "binance", + "0x38", + "fantom", + "ftm", + "0xfa", + "arbitrum", + "0xa4b1", + "optimism", + "0xa", + "pulsechain", + "0x171" + ] + }, + { + "name": "min_market_cap", + "description": "The minimum market cap in usd of a token", + "required": false, + "example": 250000000, + "type": "number" + }, + { + "name": "one_week_price_percent_change_usd", + "description": "The minimum one week price percentage change of a token", + "required": false, + "example": 2, + "type": "number" + }, + { + "name": "one_day_price_percent_change_usd", + "description": "The minimum one day price percentage change of a token", + "required": false, + "example": 2, + "type": "number" + }, + { + "name": "one_month_volume_change_usd", + "description": "The minimum one month volume change in usd of a token", + "required": false, + "example": 10000, + "type": "number" + }, + { + "name": "security_score", + "description": "The minimum security score of a token", + "required": false, + "example": 70, + "type": "number" + }, + { + "name": "one_month_price_percent_change_usd", + "description": "The minimum one month price percent change of a token", + "required": false, + "example": 0, + "type": "number" + } + ], + "responses": [ + { + "status": "200", + "description": "Returns market data for the specified token addresses, including metrics and statistics.", + "body": { + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "chain_id", "type": "string", - "example": "delete_module", - "description": "", + "example": "0x1", + "description": "The blockchain identifier the token is on", "required": true - }, - { - "name": "address", + }, + { + "name": "token_address", "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "A hex encoded 32 byte Aptos account address.", + "example": "0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2", + "description": "The contract address of the token", "required": true - }, - { - "name": "state_key_hash", + }, + { + "name": "token_name", "type": "string", - "example": "", - "description": "State key hash", - "required": true - }, - { - "name": "data", - "example": "", - "description": "", - "type": "object", - "fields": [ - { - "name": "type", - "type": "string", - "example": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>", - "description": "String representation of a MoveStructTag (on-chain Move struct type).", - "required": true - }, - { - "name": "data", - "type": "object", - "example": "", - "description": "This is a JSON representation of some data within an account resource. More specifically, it is a map of strings to arbitrary JSON values / objects, where the keys are top level fields within the given resource.", - "required": true - } - ], + "example": "Maker", + "description": "The official name of the token", "required": true - } - ] - }, - { - "type": "object", - "fields": [ - { - "name": "type", + }, + { + "name": "token_symbol", "type": "string", - "example": "delete_module", - "description": "", + "example": "MKR", + "description": "The abbreviated symbol of the token", "required": true - }, - { - "name": "state_key_hash", + }, + { + "name": "token_logo", "type": "string", - "example": "", - "description": "State key hash", + "example": "string", + "description": "URL to the token's logo image", "required": true - }, - { - "name": "handle", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + }, + { + "name": "price_usd", + "type": "number", + "example": 0, + "description": "Current price of the token in USD", "required": true - }, - { - "name": "key", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + }, + { + "name": "security_score", + "type": "number", + "example": 88, + "description": "Security score assigned to the token", "required": true - }, - { - "name": "value", - "type": "string", - "example": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1", - "description": "All bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.", + }, + { + "name": "market_cap", + "type": "number", + "example": 1351767630.85, + "description": "Market capitalization of the token", "required": true - }, - { - "name": "data", - "example": "", - "description": "", + }, + { + "name": "fully_diluted_valuation", + "type": "number", + "example": 1363915420.28, + "description": "Fully diluted market cap of the token", + "required": true + }, + { + "name": "twitter_followers", + "type": "number", + "example": 255217, + "description": "Number of followers for the token's official Twitter account", + "required": true + }, + { + "name": "holders_change", "type": "object", + "description": "Changes in the number of token holders over various time periods", + "required": true, "fields": [ - { - "name": "key", - "type": "string", - "example": "", - "description": "Key of table in JSON", - "required": true - }, - { - "name": "key_type", - "type": "string", - "example": "", - "description": "Type of key", - "required": true - }, - { - "name": "value", - "type": "string", - "example": "", - "description": "Value of table in JSON", - "required": true - }, - { - "name": "value_type", - "type": "string", - "example": "", - "description": "Type of value", - "required": true - } - ], - "required": true - } - ] - } + { + "name": "1h", + "type": "number", + "example": 14, + "description": "Change in the last hour", + "required": true + }, + { + "name": "1d", + "type": "number", + "example": 14, + "description": "Change in the last day", + "required": true + }, + { + "name": "1w", + "type": "number", + "example": 162, + "description": "Change in the last week", + "required": true + }, + { + "name": "1M", + "type": "number", + "example": 162, + "description": "Change in the last month", + "required": true + } + ] + }, + { + "name": "liquidity_change_usd", + "type": "object", + "description": "Changes in liquidity over various time periods, in USD", + "required": true, + "fields": [ + { + "name": "1h", + "type": "number", + "example": 14, + "description": "Change in liquidity in the last hour", + "required": true + }, + { + "name": "1d", + "type": "number", + "example": 14, + "description": "Change in liquidity in the last day", + "required": true + }, + { + "name": "1w", + "type": "number", + "example": 162, + "description": "Change in liquidity in the last week", + "required": true + }, + { + "name": "1M", + "type": "number", + "example": 162, + "description": "Change in liquidity in the last month", + "required": true + } + ] + }, + { + "name": "experienced_net_buyers_change", + "type": "object", + "description": "Changes in the count of experienced net buyers over various time periods", + "required": true, + "fields": [ + { + "name": "1h", + "type": "number", + "example": 14, + "description": "Change in experienced net buyers in the last hour", + "required": true + }, + { + "name": "1d", + "type": "number", + "example": 14, + "description": "Change in experienced net buyers in the last day", + "required": true + }, + { + "name": "1w", + "type": "number", + "example": 162, + "description": "Change in experienced net buyers in the last week", + "required": true + }, + { + "name": "1M", + "type": "number", + "example": 162, + "description": "Change in experienced net buyers in the last month", + "required": true + } + ] + }, + { + "name": "volume_change_usd", + "type": "object", + "description": "Changes in trading volume over various time periods, in USD", + "required": true, + "fields": [ + { + "name": "1h", + "type": "number", + "example": 14, + "description": "Change in volume in the last hour", + "required": true + }, + { + "name": "1d", + "type": "number", + "example": 14, + "description": "Change in volume in the last day", + "required": true + }, + { + "name": "1w", + "type": "number", + "example": 162, + "description": "Change in volume in the last week", + "required": true + }, + { + "name": "1M", + "type": "number", + "example": 162, + "description": "Change in volume in the last month", + "required": true + } + ] + }, + { + "name": "net_volume_change_usd", + "type": "object", + "description": "Changes in net trading volume over various time periods, in USD", + "required": true, + "fields": [ + { + "name": "1h", + "type": "number", + "example": 14, + "description": "Change in net volume in the last hour", + "required": true + }, + { + "name": "1d", + "type": "number", + "example": 14, + "description": "Change in net volume in the last day", + "required": true + }, + { + "name": "1w", + "type": "number", + "example": 162, + "description": "Change in net volume in the last week", + "required": true + }, + { + "name": "1M", + "type": "number", + "example": 162, + "description": "Change in net volume in the last month", + "required": true + } + ] + }, + { + "name": "price_percent_change_usd", + "type": "object", + "description": "Percentage changes in token price over various time periods", + "required": true, + "fields": [ + { + "name": "1h", + "type": "number", + "example": 14, + "description": "Percentage price change in the last hour", + "required": true + }, + { + "name": "1d", + "type": "number", + "example": 14, + "description": "Percentage price change in the last day", + "required": true + }, + { + "name": "1w", + "type": "number", + "example": 162, + "description": "Percentage price change in the last week", + "required": true + }, + { + "name": "1M", + "type": "number", + "example": 162, + "description": "Percentage price change in the last month", + "required": true + } + ] + } ] - }, - "required": true - }, - { - "name": "timestamp", - "type": "string", - "example": "32425224034", - "description": "The timestamp of the block returned in milliseconds", - "required": true } - ] } - ] } - } ] - } - } - ], - "codeSamples": [ - { - "language": "node", - "code": "import Moralis from 'moralis';\n\ntry {\n await Moralis.start({\n apiKey: \"YOUR_API_KEY\"\n });\n\n const response = await Moralis.AptosApi.blocks.getBlockByVersion({});\n\n console.log(response);\n} catch (e) {\n console.error(e);\n}", - "name": "Moralis NodeJS SDK" - }, - { - "language": "python", - "code": "from moralis import aptos_api\n\napi_key = \"YOUR_API_KEY\"\n\nparams = {}\n\nresult = aptos_api.blocks.get_block_by_version(\n api_key=api_key,\n params=params,\n)\n\nprint(result)", - "name": "Moralis Python SDK" - } - ] - } - }, - - "market": { - "news": { - "summary": "news", - "description": "Returns all news between 2 dates, sorted by date, oldest to newest", - "method": "GET", - "apiHost": "https://wdim.moralis.io/api/v1", - "path": "/news", - "pathParams": [], - "queryParams": [ - { - "name": "from_date", - "description": "The first date to fetch news for", - "required": false, - "type": "string" }, - { - "name": "to_date", - "description": "The last date to fetch news for", - "required": false, - "type": "string" - }, - { - "name": "cursor", - "description": "Cursor pointing to the next page of results", - "required": false, - "type": "string" - }, - { - "name": "limit", - "description": "How many results to return in each page", - "required": false, - "type": "number", - "example": 20 - }, - { - "name": "order", - "required": false, - "type": "string", - "description": "Order the news by date", - "example": "desc_date", - "enum": ["asc_date", "desc_date"] - } - ], - "responses": [ - { - "status": "200", - "description": "", - "body": { - "type": "object", - "fields": [ - { - "name": "page_size", - "type": "string", - "description": "The size of the page being returned", - "example": "100" - }, - { - "name": "cursor", - "type": "string", - "description": "Cursor pointing to the next page of results", - "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJsaW1pdCI6IjIwIiwicGFnZSI6MiwiaW5kZXgiOjM4LCJ0b3RhbCI6ODIsImlhdCI6MTcwMDEzMzY2MiwiZXhwIjoxNzAwMTM3MjYyfQ.85l7ZTSj6xi3J5UZrhVd-gscOhV1T_hoodoue1ihUsk" - }, - { - "name": "page", - "type": "string", - "description": "Current page of results", - "example": "1" - }, - { - "name": "result", - "type": "object", - "description": "Contains the result of the news query", - "fields": [ - { - "name": "id", - "type": "number", - "description": "Unique id of the document in the database", - "example": 1 - }, - { - "name": "token_address", - "type": "string", - "description": "Address of the token", - "example": "0x046eee2cc3188071c02bfc1745a6b17c656e3f3d" - }, - { - "name": "token_symbol", - "type": "string", - "description": "Abbreviation of the token name", - "example": "RLB" - }, - { - "name": "token_name", - "type": "string", - "description": "Name of the token", - "example": "Rollbit Coin" - }, - { + "getDiscoveryToken": { + "apiHost": "https://deep-index.moralis.io/api/v2.2", + "summary": "Get token details", + "description": "Get token details", + "method": "GET", + "path": "/discovery/token", + "pathParams": [], + "queryParams": [ + { "name": "chain", + "description": "The chain to query", + "required": true, + "example": "eth", "type": "string", - "description": "Name of the chain the token is on", - "example": "ETH" - }, - { - "name": "change_in_percent", - "type": "number", - "description": "How much the token moved in percent", - "example": 11 - }, - { - "name": "headline", - "type": "string", - "description": "A description of the news event", - "example": "On-chain volume shows heavy wallets accumulating RLB, leading to an 11% increase today." - }, - { - "name": "time_of_price_movement", - "type": "string", - "description": "When the event happened", - "example": "2023-10-13T12:00:00.000Z" - }, - { - "name": "movement", - "type": "string", - "description": "If the event was positive or negative", - "example": "Positive" - }, - { - "name": "updated_at", - "type": "string", - "description": "When the news was last updated in the database", - "example": "2021-10-11T00:00:00.000Z" - }, - { - "name": "created_at", - "type": "string", - "description": "When the news was added to the database", - "example": "2021-10-11T00:00:00.000Z" - } - ] - } - ] - } - } - ] - } - }, - "discovery": { - "getRisingLiquidityTokens": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Identifies the top tokens with rising liquidity.", - "description": "Identifies the top tokens with rising liquidity.", - "method": "GET", - "path": "/discovery/tokens/rising-liquidity", - "pathParams": [], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "mainnet", - "0x1", - "matic", - "0x89", - "polygon", - "bsc", - "binance", - "0x38", - "fantom", - "ftm", - "0xfa", - "arbitrum", - "0xa4b1", - "optimism", - "0xa", - "pulsechain", - "0x171" - ] - }, - { - "name": "one_month_liquidity_change_usd", - "description": "The minimum one month liquidity change in usd of a token", - "required": false, - "example": 500000, - "type": "number" - }, - { - "name": "min_market_cap", - "description": "The minimum market cap in usd of a token", - "required": false, - "example": 100000000, - "type": "number" - }, - { - "name": "twitter_followers", - "description": "The minimum twitter followers of a token", - "required": false, - "example": 10000, - "type": "number" - }, - { - "name": "one_month_volume_change_usd", - "description": "The minimum one month volume change in usd of a token", - "required": false, - "example": 10000, - "type": "number" - }, - { - "name": "security_score", - "description": "The minimum security score of a token", - "required": false, - "example": 70, - "type": "number" - }, - { - "name": "one_month_price_percent_change_usd", - "description": "The minimum one month price percent change of a token", - "required": false, - "example": 0, - "type": "number" - } - ], - "responses": [ - { - "status": "200", - "description": "Returns market data for the specified token addresses, including metrics and statistics.", - "body": { - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "chain_id", - "type": "string", - "example": "0x1", - "description": "The blockchain identifier the token is on", - "required": true - }, - { - "name": "token_address", - "type": "string", - "example": "0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2", - "description": "The contract address of the token", - "required": true - }, - { - "name": "token_name", - "type": "string", - "example": "Maker", - "description": "The official name of the token", - "required": true - }, - { - "name": "token_symbol", - "type": "string", - "example": "MKR", - "description": "The abbreviated symbol of the token", - "required": true - }, - { - "name": "token_logo", - "type": "string", - "example": "string", - "description": "URL to the token's logo image", - "required": true - }, - { - "name": "price_usd", - "type": "number", - "example": 0, - "description": "Current price of the token in USD", - "required": true - }, - { - "name": "security_score", - "type": "number", - "example": 88, - "description": "Security score assigned to the token", - "required": true + "enum": [ + "eth", + "mainnet", + "0x1", + "matic", + "0x89", + "polygon", + "bsc", + "binance", + "0x38", + "fantom", + "ftm", + "0xfa", + "arbitrum", + "0xa4b1", + "optimism", + "0xa", + "pulsechain", + "0x171" + ] }, { - "name": "market_cap", - "type": "number", - "example": 1351767630.85, - "description": "Market capitalization of the token", - "required": true - }, + "name": "token_address", + "description": "The address of the token", + "required": true, + "example": "0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2", + "type": "string" + } + ], + "responses": [ { - "name": "fully_diluted_valuation", - "type": "number", - "example": 1363915420.28, - "description": "Fully diluted market cap of the token", - "required": true - }, + "status": "200", + "description": "Returns the token details", + "body": { + "type": "object" + } + } + ] + } + }, + "rpc": { + "evmRpc": { + "apiHost": "https://site1.moralis-nodes.com", + "summary": "Retrieve Ethereum Accounts", + "description": "Executes a JSON-RPC 2.0 call to retrieve Ethereum account addresses that are available on the node. This method does not require any additional parameters.", + "method": "POST", + "path": "/:chain/:apiKey", + "pathParams": [ { - "name": "twitter_followers", - "type": "number", - "example": 255217, - "description": "Number of followers for the token's official Twitter account", - "required": true + "name": "chain", + "type": "string", + "required": true, + "description": "The blockchain to interact with.", + "example": "eth", + "enum": [ + "eth", + "holesky", + "polygon", + "amoy", + "bsc", + "bsc testnet", + "arbitrum", + "arbitrum sepolia", + "optimism", + "optimism testnet", + "base", + "base sepolia" + ] }, { - "name": "holders_change", - "type": "object", - "description": "Changes in the number of token holders over various time periods", - "required": true, - "fields": [ + "name": "apiKey", + "type": "string", + "required": true, + "description": "Your API key for authentication.", + "example": "YOUR_API_KEY" + } + ], + "queryParams": [], + "bodyParam": { + "required": true, + "description": "JSON-RPC 2.0 request body", + "type": "object", + "fields": [ { - "name": "1h", - "type": "number", - "example": 14, - "description": "Change in the last hour", - "required": true + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "Version of the JSON-RPC protocol.", + "example": "2.0" }, { - "name": "1d", - "type": "number", - "example": 14, - "description": "Change in the last day", - "required": true + "name": "id", + "type": "number", + "required": true, + "description": "Identifier for the request, must be unique for each request.", + "example": 1 }, { - "name": "1w", - "type": "number", - "example": 162, - "description": "Change in the last week", - "required": true + "name": "method", + "type": "string", + "required": true, + "description": "The name of the RPC method to be invoked.", + "example": "eth_estimateGas", + "enum": [ + "eth_blockNumber", + "eth_call", + "eth_chainId", + "eth_createAccessList", + "eth_estimateGas", + "eth_feeHistory", + "eth_gasPrice", + "eth_getBalance", + "eth_getBlockByHash", + "eth_getBlockByNumber", + "eth_getBlockTransactionCountByHash", + "eth_getBlockTransactionCountByNumber", + "eth_getBlockReceipts", + "eth_getCode", + "eth_getLogs", + "eth_getProof", + "eth_getStorageAt", + "eth_getTransactionByHash", + "eth_getTransactionByBlockHashAndIndex", + "eth_getTransactionByBlockNumberAndIndex", + "eth_getTransactionCount", + "eth_getTransactionReceipt", + "eth_getUncleByBlockHashAndIndex", + "eth_getUncleByBlockNumberAndIndex", + "eth_getUncleCountByBlockHash", + "eth_getUncleCountByBlockNumber", + "eth_maxPriorityFeePerGas", + "eth_sendRawTransaction" + ] }, { - "name": "1M", - "type": "number", - "example": 162, - "description": "Change in the last month", - "required": true + "name": "params", + "type": "rpcArray", + "required": true, + "description": "Parameters for the RPC method.", + "example": [ + { + "from": "0x4838B106FCe9647Bdf1E7877BF73cE8B0BAD5f97", + "to": "0xd4E96eF8eee8678dBFf4d535E033Ed1a4F7605b7", + "value": "0x132a0" + } + ] } - ] - }, + ] + }, + "responses": [ { - "name": "liquidity_change_usd", - "type": "object", - "description": "Changes in liquidity over various time periods, in USD", - "required": true, - "fields": [ - { - "name": "1h", - "type": "number", - "example": 14, - "description": "Change in liquidity in the last hour", - "required": true - }, - { - "name": "1d", - "type": "number", - "example": 14, - "description": "Change in liquidity in the last day", - "required": true - }, - { - "name": "1w", - "type": "number", - "example": 162, - "description": "Change in liquidity in the last week", - "required": true - }, - { - "name": "1M", - "type": "number", - "example": 162, - "description": "Change in liquidity in the last month", - "required": true + "status": "200", + "description": "Returns the response from RPC nodes.", + "body": { + "type": "object", + "description": "Refer to the RPC schema docs for more details on the resposne definitions of each RPC method.", + "fields": [ + { + "name": "jsonrpc", + "type": "string", + "description": "Version of the JSON-RPC protocol. Will be \"2.0\".", + "example": "2.0" + }, + { + "name": "id", + "type": "integer", + "description": "Identifier for the response, matching the request id.", + "example": 1 + }, + { + "name": "result", + "type": "array", + "description": "Refer to RPC schema docs for more details on the resposne definitions of each RPC method." + } + ] } - ] + } + ], + "codeSamples": [] + }, + "eth_blockNumber": { + "apiHost": "https://site1.moralis-nodes.com", + "summary": "Get Current Block Number", + "description": "Returns the number of the most recent block on the chain.", + "method": "POST", + "path": "/:chain/:apiKey", + "pathParams": [ + { + "name": "chain", + "type": "string", + "required": true, + "description": "The blockchain to interact with.", + "example": "eth", + "enum": [ + "eth", + "holesky", + "polygon", + "amoy", + "bsc", + "bsc testnet", + "arbitrum", + "arbitrum sepolia", + "optimism", + "optimism testnet", + "base", + "base sepolia" + ] }, { - "name": "experienced_net_buyers_change", - "type": "object", - "description": "Changes in the count of experienced net buyers over various time periods", - "required": true, - "fields": [ + "name": "apiKey", + "type": "string", + "required": true, + "description": "Your API key for authentication.", + "example": "YOUR_API_KEY" + } + ], + "queryParams": [], + "bodyParam": { + "required": true, + "description": "The request payload for the eth_blockNumber method.", + "type": "object", + "fields": [ { - "name": "1h", - "type": "number", - "example": 14, - "description": "Change in experienced net buyers in the last hour", - "required": true + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "JSON-RPC version (typically 2.0).", + "example": "2.0" }, { - "name": "1d", - "type": "number", - "example": 14, - "description": "Change in experienced net buyers in the last day", - "required": true + "name": "id", + "type": "number", + "required": true, + "description": "The request identifier.", + "example": 1 }, { - "name": "1w", - "type": "number", - "example": 162, - "description": "Change in experienced net buyers in the last week", - "required": true + "name": "method", + "type": "string", + "required": true, + "description": "The JSON-RPC method being invoked.", + "example": "eth_blockNumber" }, { - "name": "1M", - "type": "number", - "example": 162, - "description": "Change in experienced net buyers in the last month", - "required": true + "name": "params", + "type": "rpcArray", + "required": true, + "description": "Parameters to be passed to the method (empty for eth_blockNumber).", + "example": [] + } + ] + }, + "responses": [ + { + "status": "200", + "description": "Returns the current block number as a hex code.", + "body": { + "type": "object", + "fields": [ + { + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "JSON-RPC version (typically 2.0).", + "example": "2.0" + }, + { + "name": "id", + "type": "number", + "required": true, + "description": "The request identifier.", + "example": 1 + }, + { + "name": "result", + "type": "string", + "required": true, + "description": "The current block number in hexadecimal.", + "example": "0x5b8d80" + } + ] } - ] + } + ], + "codeSamples": [] + }, + "eth_call": { + "apiHost": "https://site1.moralis-nodes.com", + "summary": "Executes a new message call immediately without creating a transaction on the block chain.", + "description": "The eth_call method allows for the execution of a message call to a contract. It can be used to call functions on contracts without sending a transaction. This means it doesn't alter the blockchain and is executed only locally to return a response.", + "method": "POST", + "path": "/:chain/:apiKey", + "pathParams": [ + { + "name": "chain", + "type": "string", + "required": true, + "description": "The blockchain to interact with.", + "example": "eth", + "enum": [ + "eth", + "holesky", + "polygon", + "amoy", + "bsc", + "bsc testnet", + "arbitrum", + "arbitrum sepolia", + "optimism", + "optimism testnet", + "base", + "base sepolia" + ] }, { - "name": "volume_change_usd", - "type": "object", - "description": "Changes in trading volume over various time periods, in USD", - "required": true, - "fields": [ + "name": "apiKey", + "type": "string", + "required": true, + "description": "Your API key for authentication.", + "example": "YOUR_API_KEY" + } + ], + "queryParams": [], + "bodyParam": { + "required": true, + "description": "The request payload for the eth_call method.", + "type": "object", + "fields": [ { - "name": "1h", - "type": "number", - "example": 14, - "description": "Change in volume in the last hour", - "required": true + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "JSON-RPC version (typically 2.0).", + "example": "2.0" }, { - "name": "1d", - "type": "number", - "example": 14, - "description": "Change in volume in the last day", - "required": true + "name": "id", + "type": "number", + "required": true, + "description": "The request identifier.", + "example": 1 }, { - "name": "1w", - "type": "number", - "example": 162, - "description": "Change in volume in the last week", - "required": true + "name": "method", + "type": "string", + "required": true, + "description": "The JSON-RPC method being invoked.", + "example": "eth_call" }, { - "name": "1M", - "type": "number", - "example": 162, - "description": "Change in volume in the last month", - "required": true + "name": "params", + "type": "rpcArray", + "required": true, + "description": "Parameters for the call, including the transaction call object and optionally the block number.", + "example": [ + { + "to": "0x407d73d8a49eeb85d32cf465507dd71d507100c1", + "data": "0x06fdde03" + }, + "latest" + ] + } + ] + }, + "responses": [ + { + "status": "200", + "description": "Returns the result of the contract function call.", + "body": { + "type": "object", + "fields": [ + { + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "JSON-RPC version (typically 2.0).", + "example": "2.0" + }, + { + "name": "id", + "type": "number", + "required": true, + "description": "The request identifier.", + "example": 1 + }, + { + "name": "result", + "type": "string", + "required": true, + "description": "The returned data from the contract function, encoded.", + "example": "0x" + } + ] } - ] + } + ], + "codeSamples": [] + }, + "eth_chainId": { + "apiHost": "https://site1.moralis-nodes.com", + "summary": "Get the current chain ID", + "description": "Returns the current chain ID, identifying the current blockchain. The chain ID is a unique identifier for each blockchain and is used for transaction signing to prevent replay attacks across chains.", + "method": "POST", + "path": "/:chain/:apiKey", + "pathParams": [ + { + "name": "chain", + "type": "string", + "required": true, + "description": "The blockchain to interact with.", + "example": "eth", + "enum": [ + "eth", + "holesky", + "polygon", + "amoy", + "bsc", + "bsc testnet", + "arbitrum", + "arbitrum sepolia", + "optimism", + "optimism testnet", + "base", + "base sepolia" + ] }, { - "name": "net_volume_change_usd", - "type": "object", - "description": "Changes in net trading volume over various time periods, in USD", - "required": true, - "fields": [ + "name": "apiKey", + "type": "string", + "required": true, + "description": "Your API key for authentication.", + "example": "YOUR_API_KEY" + } + ], + "queryParams": [], + "bodyParam": { + "required": true, + "description": "The request payload for the eth_chainId method.", + "type": "object", + "fields": [ { - "name": "1h", - "type": "number", - "example": 14, - "description": "Change in net volume in the last hour", - "required": true + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "JSON-RPC version (typically 2.0).", + "example": "2.0" }, { - "name": "1d", - "type": "number", - "example": 14, - "description": "Change in net volume in the last day", - "required": true + "name": "id", + "type": "number", + "required": true, + "description": "The request identifier.", + "example": 1 }, { - "name": "1w", - "type": "number", - "example": 162, - "description": "Change in net volume in the last week", - "required": true + "name": "method", + "type": "string", + "required": true, + "description": "The JSON-RPC method being invoked.", + "example": "eth_chainId" }, { - "name": "1M", - "type": "number", - "example": 162, - "description": "Change in net volume in the last month", - "required": true + "name": "params", + "type": "rpcArray", + "required": true, + "description": "Parameters for the method (empty for eth_chainId).", + "example": [] + } + ] + }, + "responses": [ + { + "status": "200", + "description": "Returns the chain ID of the current blockchain.", + "body": { + "type": "object", + "fields": [ + { + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "JSON-RPC version (typically 2.0).", + "example": "2.0" + }, + { + "name": "id", + "type": "number", + "required": true, + "description": "The request identifier.", + "example": 1 + }, + { + "name": "result", + "type": "string", + "required": true, + "description": "The current chain ID, as a hexadecimal.", + "example": "0x1" + } + ] } - ] + } + ], + "codeSamples": [] + }, + "eth_createAccessList": { + "apiHost": "https://site1.moralis-nodes.com", + "summary": "Create Access List", + "description": "This example demonstrates generating an access list for a hypothetical transaction that interacts with a contract. The access list helps in optimizing gas costs for transactions by pre-specifying accounts and storage keys the transaction intends to access.", + "method": "POST", + "path": "/:chain/:apiKey", + "pathParams": [ + { + "name": "chain", + "type": "string", + "required": true, + "description": "The blockchain to interact with. In this example, 'eth' is used to denote Ethereum Mainnet.", + "example": "eth", + "enum": [ + "eth", + "holesky", + "polygon", + "amoy", + "bsc", + "bsc testnet", + "arbitrum", + "arbitrum sepolia", + "optimism", + "optimism testnet", + "base", + "base sepolia" + ] }, { - "name": "price_percent_change_usd", - "type": "object", - "description": "Percentage changes in token price over various time periods", - "required": true, - "fields": [ + "name": "apiKey", + "type": "string", + "required": true, + "description": "Your API key for authentication. Replace 'YOUR_API_KEY' with your actual Moralis API key.", + "example": "YOUR_API_KEY" + } + ], + "queryParams": [], + "bodyParam": { + "required": true, + "description": "The request payload for generating an access list based on a transaction object.", + "type": "object", + "fields": [ { - "name": "1h", - "type": "number", - "example": 14, - "description": "Percentage price change in the last hour", - "required": true + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "Specifies the JSON-RPC protocol version, which is 2.0 for this example.", + "example": "2.0" }, { - "name": "1d", - "type": "number", - "example": 14, - "description": "Percentage price change in the last day", - "required": true + "name": "id", + "type": "number", + "required": true, + "description": "A unique identifier for the request.", + "example": 1 }, { - "name": "1w", - "type": "number", - "example": 162, - "description": "Percentage price change in the last week", - "required": true + "name": "method", + "type": "string", + "required": true, + "description": "The JSON-RPC method being called. For creating an access list, 'eth_createAccessList' is used.", + "example": "eth_createAccessList" }, { - "name": "1M", - "type": "number", - "example": 162, - "description": "Percentage price change in the last month", - "required": true + "name": "params", + "type": "rpcArray", + "required": true, + "description": "An array containing the transaction object for which to generate the access list, and optionally the block number.", + "example": [ + { + "from": "0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe", + "to": "0x4e6f6D7edB5CBD081670C1F898BBF721c4a24695", + "gas": "0x76c0", + "gasPrice": "0x9184e72a000", + "value": "0x0", + "data": "0x3c11dde50000000000000000000000000000000000000000000000000000000000000003" + }, + "latest" + ] } - ] - } - ] - } - } - } - ] - }, - "getBuyingPressureTokens": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Identifies the top tokens with buying pressure.", - "description": "Identifies the top tokens with buying pressure.", - "method": "GET", - "path": "/discovery/tokens/buying-pressure", - "pathParams": [], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "mainnet", - "0x1", - "matic", - "0x89", - "polygon", - "bsc", - "binance", - "0x38", - "fantom", - "ftm", - "0xfa", - "arbitrum", - "0xa4b1", - "optimism", - "0xa", - "pulsechain", - "0x171" - ] - }, - { - "name": "one_month_net_volume_change_usd", - "description": "The minimum one month net volume change in usd of a token", - "required": false, - "example": 1000000, - "type": "number" - }, - { - "name": "min_market_cap", - "description": "The minimum market cap in usd of a token", - "required": false, - "example": 100000000, - "type": "number" - }, - { - "name": "twitter_followers", - "description": "The minimum twitter followers of a token", - "required": false, - "example": 10000, - "type": "number" - }, - { - "name": "one_month_volume_change_usd", - "description": "The minimum one month volume change in usd of a token", - "required": false, - "example": 10000, - "type": "number" - }, - { - "name": "security_score", - "description": "The minimum security score of a token", - "required": false, - "example": 70, - "type": "number" - }, - { - "name": "one_month_price_percent_change_usd", - "description": "The minimum one month price percent change of a token", - "required": false, - "example": 0, - "type": "number" - } - ], - "responses": [ - { - "status": "200", - "description": "Returns market data for the specified token addresses, including metrics and statistics.", - "body": { - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "chain_id", - "type": "string", - "example": "0x1", - "description": "The blockchain identifier the token is on", - "required": true - }, - { - "name": "token_address", - "type": "string", - "example": "0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2", - "description": "The contract address of the token", - "required": true - }, - { - "name": "token_name", - "type": "string", - "example": "Maker", - "description": "The official name of the token", - "required": true - }, - { - "name": "token_symbol", - "type": "string", - "example": "MKR", - "description": "The abbreviated symbol of the token", - "required": true - }, - { - "name": "token_logo", - "type": "string", - "example": "string", - "description": "URL to the token's logo image", - "required": true - }, - { - "name": "price_usd", - "type": "number", - "example": 0, - "description": "Current price of the token in USD", - "required": true - }, - { - "name": "security_score", - "type": "number", - "example": 88, - "description": "Security score assigned to the token", - "required": true - }, - { - "name": "market_cap", - "type": "number", - "example": 1351767630.85, - "description": "Market capitalization of the token", - "required": true - }, + ] + }, + "responses": [ { - "name": "fully_diluted_valuation", - "type": "number", - "example": 1363915420.28, - "description": "Fully diluted market cap of the token", - "required": true - }, + "status": "200", + "description": "Successful response with the generated access list and gas used.", + "body": { + "type": "object", + "fields": [ + { + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "JSON-RPC protocol version.", + "example": "2.0" + }, + { + "name": "id", + "type": "number", + "required": true, + "description": "The request identifier matching the request.", + "example": 1 + }, + { + "name": "result", + "type": "object", + "required": true, + "description": "Contains the access list and the gas used for the transaction.", + "fields": [ + { + "name": "accessList", + "type": "array", + "description": "Generated access list detailing accounts and storage keys the transaction will access.", + "example": [ + { + "address": "0x4e6f6D7edB5CBD081670C1F898BBF721c4a24695", + "storageKeys": [ + "0x0000000000000000000000000000000000000000000000000000000000000000" + ] + } + ] + }, + { + "name": "gasUsed", + "type": "string", + "description": "The gas used for generating the access list.", + "example": "0x5208" + } + ] + } + ] + } + } + ], + "codeSamples": [] + }, + "eth_estimateGas": { + "apiHost": "https://site1.moralis-nodes.com", + "summary": "Estimate Gas", + "description": "Estimates the amount of gas required to execute a transaction. This method does not execute the transaction but simulates its execution to estimate the gas amount. It's useful for adjusting gas limits before sending transactions to ensure they succeed without running out of gas.", + "method": "POST", + "path": "/:chain/:apiKey", + "pathParams": [ { - "name": "twitter_followers", - "type": "number", - "example": 255217, - "description": "Number of followers for the token's official Twitter account", - "required": true + "name": "chain", + "type": "string", + "required": true, + "description": "The blockchain to interact with.", + "example": "eth", + "enum": [ + "eth", + "holesky", + "polygon", + "amoy", + "bsc", + "bsc testnet", + "arbitrum", + "arbitrum sepolia", + "optimism", + "optimism testnet", + "base", + "base sepolia" + ] }, { - "name": "holders_change", - "type": "object", - "description": "Changes in the number of token holders over various time periods", - "required": true, - "fields": [ + "name": "apiKey", + "type": "string", + "required": true, + "description": "Your API key for authentication.", + "example": "YOUR_API_KEY" + } + ], + "queryParams": [], + "bodyParam": { + "required": true, + "description": "The request payload for estimating gas required for a transaction.", + "type": "object", + "fields": [ { - "name": "1h", - "type": "number", - "example": 14, - "description": "Change in the last hour", - "required": true + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "JSON-RPC version (typically 2.0).", + "example": "2.0" }, { - "name": "1d", - "type": "number", - "example": 14, - "description": "Change in the last day", - "required": true + "name": "id", + "type": "number", + "required": true, + "description": "The request identifier.", + "example": 1 }, { - "name": "1w", - "type": "number", - "example": 162, - "description": "Change in the last week", - "required": true + "name": "method", + "type": "string", + "required": true, + "description": "The JSON-RPC method being invoked.", + "example": "eth_estimateGas" }, { - "name": "1M", - "type": "number", - "example": 162, - "description": "Change in the last month", - "required": true + "name": "params", + "type": "rpcArray", + "required": true, + "description": "Parameters for the transaction to estimate gas for, including details like the sender, receiver, gas price, and value.", + "example": [ + { + "from": "0xa83114A443dA1CecEFC50368531cACE9F37fCCcb", + "to": "0x354f3eD35Ae1a182aF933b793e49d3c86CFcDc63", + "gasPrice": "0x4a817c800", + "value": "0x0", + "data": "0xa9059cbb000000000000000000000000407d73d8a49eeb85d32cf465507dd71d507100c10000000000000000000000000000000000000000000000000000000000000064" + } + ] } - ] - }, + ] + }, + "responses": [ { - "name": "liquidity_change_usd", - "type": "object", - "description": "Changes in liquidity over various time periods, in USD", - "required": true, - "fields": [ - { - "name": "1h", - "type": "number", - "example": 14, - "description": "Change in liquidity in the last hour", - "required": true - }, - { - "name": "1d", - "type": "number", - "example": 14, - "description": "Change in liquidity in the last day", - "required": true - }, - { - "name": "1w", - "type": "number", - "example": 162, - "description": "Change in liquidity in the last week", - "required": true - }, - { - "name": "1M", - "type": "number", - "example": 162, - "description": "Change in liquidity in the last month", - "required": true + "status": "200", + "description": "Returns the estimated gas required for the transaction.", + "body": { + "type": "object", + "fields": [ + { + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "JSON-RPC version (typically 2.0).", + "example": "2.0" + }, + { + "name": "id", + "type": "number", + "required": true, + "description": "The request identifier.", + "example": 1 + }, + { + "name": "result", + "type": "string", + "required": true, + "description": "The estimated gas amount as a hexadecimal.", + "example": "0x5208" + } + ] } - ] + } + ], + "codeSamples": [] + }, + "eth_feeHistory": { + "apiHost": "https://site1.moralis-nodes.com", + "summary": "Retrieve Fee History", + "description": "Retrieves historical data about transaction fees. The method returns the base fee per gas and reward (priority fee) ranges paid in each block for the requested block range. Useful for estimating appropriate fees for future transactions.", + "method": "POST", + "path": "/:chain/:apiKey", + "pathParams": [ + { + "name": "chain", + "type": "string", + "required": true, + "description": "The blockchain to interact with.", + "example": "eth", + "enum": [ + "eth", + "holesky", + "polygon", + "amoy", + "bsc", + "bsc testnet", + "arbitrum", + "arbitrum sepolia", + "optimism", + "optimism testnet", + "base", + "base sepolia" + ] }, { - "name": "experienced_net_buyers_change", - "type": "object", - "description": "Changes in the count of experienced net buyers over various time periods", - "required": true, - "fields": [ + "name": "apiKey", + "type": "string", + "required": true, + "description": "Your API key for authentication.", + "example": "YOUR_API_KEY" + } + ], + "queryParams": [], + "bodyParam": { + "required": true, + "description": "The request payload for retrieving fee history.", + "type": "object", + "fields": [ { - "name": "1h", - "type": "number", - "example": 14, - "description": "Change in experienced net buyers in the last hour", - "required": true + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "JSON-RPC version (typically 2.0).", + "example": "2.0" }, { - "name": "1d", - "type": "number", - "example": 14, - "description": "Change in experienced net buyers in the last day", - "required": true + "name": "id", + "type": "number", + "required": true, + "description": "The request identifier.", + "example": 1 }, { - "name": "1w", - "type": "number", - "example": 162, - "description": "Change in experienced net buyers in the last week", - "required": true + "name": "method", + "type": "string", + "required": true, + "description": "The JSON-RPC method being invoked.", + "example": "eth_feeHistory" }, { - "name": "1M", - "type": "number", - "example": 162, - "description": "Change in experienced net buyers in the last month", - "required": true + "name": "params", + "type": "rpcArray", + "required": true, + "description": "Parameters for the fee history request, including the number of blocks to include, the target block, and the percentile ranges of transaction fees.", + "example": ["0x10", "latest", [25, 50, 75]] } - ] - }, + ] + }, + "responses": [ { - "name": "volume_change_usd", - "type": "object", - "description": "Changes in trading volume over various time periods, in USD", - "required": true, - "fields": [ - { - "name": "1h", - "type": "number", - "example": 14, - "description": "Change in volume in the last hour", - "required": true - }, - { - "name": "1d", - "type": "number", - "example": 14, - "description": "Change in volume in the last day", - "required": true - }, - { - "name": "1w", - "type": "number", - "example": 162, - "description": "Change in volume in the last week", - "required": true - }, - { - "name": "1M", - "type": "number", - "example": 162, - "description": "Change in volume in the last month", - "required": true + "status": "200", + "description": "Returns historical fee data for the requested block range.", + "body": { + "type": "object", + "fields": [ + { + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "JSON-RPC version (typically 2.0).", + "example": "2.0" + }, + { + "name": "id", + "type": "number", + "required": true, + "description": "The request identifier.", + "example": 1 + }, + { + "name": "result", + "type": "object", + "required": true, + "description": "Contains the fee history data.", + "fields": [ + { + "name": "oldestBlock", + "type": "string", + "description": "The oldest block (in hexadecimal) in the requested range.", + "example": "0x9cace7" + }, + { + "name": "baseFeePerGas", + "type": "array", + "field": { + "type": "string", + "description": "Base fee per gas for each block, in hexadecimal.", + "example": "0x4c4b40" + }, + "description": "Array of base fee per gas for each block, in hexadecimal." + }, + { + "name": "gasUsedRatio", + "type": "array", + "field": { + "type": "number", + "description": "Ratio of gas used to gas limit for the block.", + "example": 0.5 + }, + "description": "Array of ratios of gas used to gas limit for each block." + }, + { + "name": "reward", + "type": "array", + "field": { + "type": "array", + "field": { + "type": "string", + "description": "Reward (priority fee) paid for the percentile.", + "example": "0x34630b8a00" + }, + "description": "Array containing the reward (priority fee) paid for each percentile." + }, + "description": "Array of arrays containing the reward (priority fee) paid for each percentile." + } + ] + } + ] } - ] + } + ], + "codeSamples": [] + }, + "eth_gasPrice": { + "apiHost": "https://site1.moralis-nodes.com", + "summary": "Get Current Gas Price", + "description": "Returns the current gas price in wei, which is the median gas price of the latest blocks. This value can be used to set the gas price for new transactions.", + "method": "POST", + "path": "/:chain/:apiKey", + "pathParams": [ + { + "name": "chain", + "type": "string", + "required": true, + "description": "The blockchain to interact with.", + "example": "eth", + "enum": [ + "eth", + "holesky", + "polygon", + "amoy", + "bsc", + "bsc testnet", + "arbitrum", + "arbitrum sepolia", + "optimism", + "optimism testnet", + "base", + "base sepolia" + ] }, { - "name": "net_volume_change_usd", - "type": "object", - "description": "Changes in net trading volume over various time periods, in USD", - "required": true, - "fields": [ + "name": "apiKey", + "type": "string", + "required": true, + "description": "Your API key for authentication.", + "example": "YOUR_API_KEY" + } + ], + "queryParams": [], + "bodyParam": { + "required": true, + "description": "The request payload for retrieving the current gas price.", + "type": "object", + "fields": [ { - "name": "1h", - "type": "number", - "example": 14, - "description": "Change in net volume in the last hour", - "required": true + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "JSON-RPC version (typically 2.0).", + "example": "2.0" }, { - "name": "1d", - "type": "number", - "example": 14, - "description": "Change in net volume in the last day", - "required": true + "name": "id", + "type": "number", + "required": true, + "description": "The request identifier.", + "example": 1 }, { - "name": "1w", - "type": "number", - "example": 162, - "description": "Change in net volume in the last week", - "required": true + "name": "method", + "type": "string", + "required": true, + "description": "The JSON-RPC method being invoked.", + "example": "eth_gasPrice" }, { - "name": "1M", - "type": "number", - "example": 162, - "description": "Change in net volume in the last month", - "required": true + "name": "params", + "type": "rpcArray", + "required": true, + "description": "Parameters for the gas price request (empty for eth_gasPrice).", + "example": [] } - ] - }, + ] + }, + "responses": [ { - "name": "price_percent_change_usd", - "type": "object", - "description": "Percentage changes in token price over various time periods", - "required": true, - "fields": [ - { - "name": "1h", - "type": "number", - "example": 14, - "description": "Percentage price change in the last hour", - "required": true - }, - { - "name": "1d", - "type": "number", - "example": 14, - "description": "Percentage price change in the last day", - "required": true - }, - { - "name": "1w", - "type": "number", - "example": 162, - "description": "Percentage price change in the last week", - "required": true - }, - { - "name": "1M", - "type": "number", - "example": 162, - "description": "Percentage price change in the last month", - "required": true + "status": "200", + "description": "Returns the current gas price in wei.", + "body": { + "type": "object", + "fields": [ + { + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "JSON-RPC version (typically 2.0).", + "example": "2.0" + }, + { + "name": "id", + "type": "number", + "required": true, + "description": "The request identifier.", + "example": 1 + }, + { + "name": "result", + "type": "string", + "required": true, + "description": "The current gas price in wei, as a hexadecimal.", + "example": "0x3b9aca00" + } + ] } - ] } - ] - } - } - } - ] - }, - "getSolidPerformersTokens": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Identifies solid-performing tokens.", - "description": "Identifies solid-performing tokens.", - "method": "GET", - "path": "/discovery/tokens/solid-performers", - "pathParams": [], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "mainnet", - "0x1", - "matic", - "0x89", - "polygon", - "bsc", - "binance", - "0x38", - "fantom", - "ftm", - "0xfa", - "arbitrum", - "0xa4b1", - "optimism", - "0xa", - "pulsechain", - "0x171" - ] - }, - { - "name": "one_month_net_volume_change_usd", - "description": "The minimum one month net volume change in usd of a token", - "required": false, - "example": 100000, - "type": "number" - }, - { - "name": "one_week_net_volume_change_usd", - "description": "The minimum one week net volume change in usd of a token", - "required": false, - "example": 10000, - "type": "number" - }, - { - "name": "one_day_net_volume_change_usd", - "description": "The minimum one day net volume change in usd of a token", - "required": false, - "example": 0, - "type": "number" - }, - { - "name": "one_month_volume_change_usd", - "description": "The minimum one month volume change in usd of a token", - "required": false, - "example": 10000, - "type": "number" - }, - { - "name": "security_score", - "description": "The minimum security score of a token", - "required": false, - "example": 80, - "type": "number" + ], + "codeSamples": [] }, - { - "name": "one_month_price_percent_change_usd", - "description": "The minimum one month price percent change of a token", - "required": false, - "example": 0, - "type": "number" - } - ], - "responses": [ - { - "status": "200", - "description": "Returns market data for the specified token addresses, including metrics and statistics.", - "body": { - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "chain_id", - "type": "string", - "example": "0x1", - "description": "The blockchain identifier the token is on", - "required": true - }, - { - "name": "token_address", - "type": "string", - "example": "0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2", - "description": "The contract address of the token", - "required": true - }, - { - "name": "token_name", - "type": "string", - "example": "Maker", - "description": "The official name of the token", - "required": true - }, - { - "name": "token_symbol", - "type": "string", - "example": "MKR", - "description": "The abbreviated symbol of the token", - "required": true - }, - { - "name": "token_logo", - "type": "string", - "example": "string", - "description": "URL to the token's logo image", - "required": true - }, - { - "name": "price_usd", - "type": "number", - "example": 0, - "description": "Current price of the token in USD", - "required": true - }, - { - "name": "security_score", - "type": "number", - "example": 88, - "description": "Security score assigned to the token", - "required": true - }, - { - "name": "market_cap", - "type": "number", - "example": 1351767630.85, - "description": "Market capitalization of the token", - "required": true - }, - { - "name": "fully_diluted_valuation", - "type": "number", - "example": 1363915420.28, - "description": "Fully diluted market cap of the token", - "required": true - }, + "eth_getBalance": { + "apiHost": "https://site1.moralis-nodes.com", + "summary": "Get Account Balance", + "description": "Returns the balance of the account of a given address at a specific block number.", + "method": "POST", + "path": "/:chain/:apiKey", + "pathParams": [ { - "name": "twitter_followers", - "type": "number", - "example": 255217, - "description": "Number of followers for the token's official Twitter account", - "required": true + "name": "chain", + "type": "string", + "required": true, + "description": "The blockchain to interact with.", + "example": "eth", + "enum": [ + "eth", + "holesky", + "polygon", + "amoy", + "bsc", + "bsc testnet", + "arbitrum", + "arbitrum sepolia", + "optimism", + "optimism testnet", + "base", + "base sepolia" + ] }, { - "name": "holders_change", - "type": "object", - "description": "Changes in the number of token holders over various time periods", - "required": true, - "fields": [ + "name": "apiKey", + "type": "string", + "required": true, + "description": "Your API key for authentication.", + "example": "YOUR_API_KEY" + } + ], + "queryParams": [], + "bodyParam": { + "required": true, + "description": "The request payload for retrieving the account balance.", + "type": "object", + "fields": [ { - "name": "1h", - "type": "number", - "example": 14, - "description": "Change in the last hour", - "required": true + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "JSON-RPC version (typically 2.0).", + "example": "2.0" }, { - "name": "1d", - "type": "number", - "example": 14, - "description": "Change in the last day", - "required": true + "name": "id", + "type": "number", + "required": true, + "description": "The request identifier.", + "example": 1 }, { - "name": "1w", - "type": "number", - "example": 162, - "description": "Change in the last week", - "required": true + "name": "method", + "type": "string", + "required": true, + "description": "The JSON-RPC method being invoked.", + "example": "eth_getBalance" }, { - "name": "1M", - "type": "number", - "example": 162, - "description": "Change in the last month", - "required": true + "name": "params", + "type": "rpcArray", + "required": true, + "description": "Parameters for the balance request, including the address and the block number.", + "example": [ + "0x407d73d8a49eeb85d32cf465507dd71d507100c1", + "latest" + ] } - ] - }, + ] + }, + "responses": [ { - "name": "liquidity_change_usd", - "type": "object", - "description": "Changes in liquidity over various time periods, in USD", - "required": true, - "fields": [ - { - "name": "1h", - "type": "number", - "example": 14, - "description": "Change in liquidity in the last hour", - "required": true - }, - { - "name": "1d", - "type": "number", - "example": 14, - "description": "Change in liquidity in the last day", - "required": true - }, - { - "name": "1w", - "type": "number", - "example": 162, - "description": "Change in liquidity in the last week", - "required": true - }, - { - "name": "1M", - "type": "number", - "example": 162, - "description": "Change in liquidity in the last month", - "required": true + "status": "200", + "description": "Returns the balance of the account in wei.", + "body": { + "type": "object", + "fields": [ + { + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "JSON-RPC version (typically 2.0).", + "example": "2.0" + }, + { + "name": "id", + "type": "number", + "required": true, + "description": "The request identifier.", + "example": 1 + }, + { + "name": "result", + "type": "string", + "required": true, + "description": "The balance of the account in wei, as a hexadecimal.", + "example": "0xde0b6b3a7640000" + } + ] } - ] - }, + } + ], + "codeSamples": [] + }, + "eth_getBlockByHash": { + "apiHost": "https://site1.moralis-nodes.com", + "summary": "Get Block by Hash", + "description": "Returns information about a block by hash. Optionally, it can also return the full transaction objects if the second parameter is set to `true`; otherwise, only the transaction hashes are returned.", + "method": "POST", + "path": "/:chain/:apiKey", + "pathParams": [ { - "name": "experienced_net_buyers_change", - "type": "object", - "description": "Changes in the count of experienced net buyers over various time periods", - "required": true, - "fields": [ - { - "name": "1h", - "type": "number", - "example": 14, - "description": "Change in experienced net buyers in the last hour", - "required": true - }, - { - "name": "1d", - "type": "number", - "example": 14, - "description": "Change in experienced net buyers in the last day", - "required": true - }, - { - "name": "1w", - "type": "number", - "example": 162, - "description": "Change in experienced net buyers in the last week", - "required": true - }, - { - "name": "1M", - "type": "number", - "example": 162, - "description": "Change in experienced net buyers in the last month", - "required": true - } - ] + "name": "chain", + "type": "string", + "required": true, + "description": "The blockchain to interact with.", + "example": "eth", + "enum": [ + "eth", + "holesky", + "polygon", + "amoy", + "bsc", + "bsc testnet", + "arbitrum", + "arbitrum sepolia", + "optimism", + "optimism testnet", + "base", + "base sepolia" + ] }, { - "name": "volume_change_usd", - "type": "object", - "description": "Changes in trading volume over various time periods, in USD", - "required": true, - "fields": [ + "name": "apiKey", + "type": "string", + "required": true, + "description": "Your API key for authentication.", + "example": "YOUR_API_KEY" + } + ], + "queryParams": [], + "bodyParam": { + "required": true, + "description": "The request payload for retrieving block information by hash.", + "type": "object", + "fields": [ { - "name": "1h", - "type": "number", - "example": 14, - "description": "Change in volume in the last hour", - "required": true + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "JSON-RPC version (typically 2.0).", + "example": "2.0" }, { - "name": "1d", - "type": "number", - "example": 14, - "description": "Change in volume in the last day", - "required": true + "name": "id", + "type": "number", + "required": true, + "description": "The request identifier.", + "example": 1 }, { - "name": "1w", - "type": "number", - "example": 162, - "description": "Change in volume in the last week", - "required": true + "name": "method", + "type": "string", + "required": true, + "description": "The JSON-RPC method being invoked.", + "example": "eth_getBlockByHash" }, { - "name": "1M", - "type": "number", - "example": 162, - "description": "Change in volume in the last month", - "required": true + "name": "params", + "type": "rpcArray", + "required": true, + "description": "Parameters for the block query, including the block hash and a boolean indicating whether to return full transaction objects.", + "example": [ + "0x18173058d45f8aa984181fdfbfece01a93a971ea63e008231b2e15f151e0903f", + true + ] } - ] - }, + ] + }, + "responses": [ { - "name": "net_volume_change_usd", - "type": "object", - "description": "Changes in net trading volume over various time periods, in USD", - "required": true, - "fields": [ - { - "name": "1h", - "type": "number", - "example": 14, - "description": "Change in net volume in the last hour", - "required": true - }, - { - "name": "1d", - "type": "number", - "example": 14, - "description": "Change in net volume in the last day", - "required": true - }, - { - "name": "1w", - "type": "number", - "example": 162, - "description": "Change in net volume in the last week", - "required": true - }, - { - "name": "1M", - "type": "number", - "example": 162, - "description": "Change in net volume in the last month", - "required": true + "status": "200", + "description": "Returns detailed information about the requested block.", + "body": { + "type": "object", + "fields": [ + { + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "JSON-RPC version (typically 2.0).", + "example": "2.0" + }, + { + "name": "id", + "type": "number", + "required": true, + "description": "The request identifier.", + "example": 1 + }, + { + "name": "result", + "type": "object", + "required": true, + "description": "Object containing the block information.", + "fields": [ + { + "name": "number", + "type": "string", + "description": "The block number.", + "example": "0x10d4f" + }, + { + "name": "hash", + "type": "string", + "description": "The hash of the block.", + "example": "0x18173058d45f8aa984181fdfbfece01a93a971ea63e008231b2e15f151e0903f" + }, + { + "name": "transactions", + "type": "array", + "description": "Array of transaction objects or hashes included in the block.", + "field": { + "type": "object", + "fields": [ + { + "name": "blockHash", + "type": "string", + "description": "The hash of the block.", + "example": "0x18173058d45f8aa984181fdfbfece01a93a971ea63e008231b2e15f151e0903f" + }, + { + "name": "blockNumber", + "type": "string", + "description": "The number of the block.", + "example": "0x15df" + }, + { + "name": "from", + "type": "string", + "description": "The sender address.", + "example": "0x354f3eD35Ae1a182aF933b793e49d3c86CFcDc63" + }, + { + "name": "to", + "type": "string", + "description": "The receiver address.", + "example": "0x354f3eD35Ae1a182aF933b793e49d3c86CFcDc63" + } + ] + } + }, + { + "name": "parentHash", + "type": "string", + "description": "The hash of the parent block.", + "example": "0xd584c5509e3a3d4b2d3bbde4c8e8c0adec7f5c560e9d42b8f12f3c039dd40e92" + }, + { + "name": "nonce", + "type": "string", + "description": "The nonce that was used to generate the block.", + "example": "0x0000000000000000" + }, + { + "name": "sha3Uncles", + "type": "string", + "description": "SHA3 of the uncles data in the block.", + "example": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + { + "name": "logsBloom", + "type": "string", + "description": "The bloom filter for the logs of the block.", + "example": "0x00000000..." + }, + { + "name": "transactionsRoot", + "type": "string", + "description": "The root of the transaction trie of the block.", + "example": "0x3a1b2c..." + }, + { + "name": "stateRoot", + "type": "string", + "description": "The root of the final state trie of the block.", + "example": "0xf1132b..." + }, + { + "name": "receiptsRoot", + "type": "string", + "description": "The root of the receipts trie of the block.", + "example": "0x140f3e..." + }, + { + "name": "miner", + "type": "string", + "description": "The address of the miner who mined the block.", + "example": "0x4e65fda2159562a496f9f3522f89122a3088497a" + }, + { + "name": "difficulty", + "type": "string", + "description": "The difficulty level of the block.", + "example": "0xffffffff" + }, + { + "name": "totalDifficulty", + "type": "string", + "description": "The total difficulty of the chain up to this block.", + "example": "0x222e4800" + }, + { + "name": "extraData", + "type": "string", + "description": "Extra data related to the block.", + "example": "0xd783010703846765746887676f312e392e34856c696e7578" + }, + { + "name": "size", + "type": "string", + "description": "The size of the block in bytes.", + "example": "0x280" + }, + { + "name": "gasLimit", + "type": "string", + "description": "The maximum gas allowed in this block.", + "example": "0x47e7c4" + }, + { + "name": "gasUsed", + "type": "string", + "description": "The total used gas by all transactions in this block.", + "example": "0x45f3" + }, + { + "name": "timestamp", + "type": "string", + "description": "The timestamp for when the block was collated.", + "example": "0x5a5b8d80" + }, + { + "name": "uncles", + "type": "array", + "description": "List of uncle hashes.", + "field": { + "type": "string", + "description": "The hash of each uncle.", + "example": "0x1602e3..." + } + } + ] + } + ] } - ] + } + ], + "codeSamples": [] + }, + "eth_getBlockByNumber": { + "apiHost": "https://site1.moralis-nodes.com", + "summary": "Get Block by Number", + "description": "Retrieves information about a block by its block number. The method can optionally return full transaction objects within the block if the second parameter is set to true; otherwise, it returns only the transaction hashes.", + "method": "POST", + "path": "/:chain/:apiKey", + "pathParams": [ + { + "name": "chain", + "type": "string", + "required": true, + "description": "The blockchain to interact with.", + "example": "eth", + "enum": [ + "eth", + "holesky", + "polygon", + "amoy", + "bsc", + "bsc testnet", + "arbitrum", + "arbitrum sepolia", + "optimism", + "optimism testnet", + "base", + "base sepolia" + ] }, { - "name": "price_percent_change_usd", - "type": "object", - "description": "Percentage changes in token price over various time periods", - "required": true, - "fields": [ + "name": "apiKey", + "type": "string", + "required": true, + "description": "Your API key for authentication.", + "example": "YOUR_API_KEY" + } + ], + "queryParams": [], + "bodyParam": { + "required": true, + "description": "The request payload for retrieving block information by number.", + "type": "object", + "fields": [ { - "name": "1h", - "type": "number", - "example": 14, - "description": "Percentage price change in the last hour", - "required": true + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "JSON-RPC version (typically 2.0).", + "example": "2.0" }, { - "name": "1d", - "type": "number", - "example": 14, - "description": "Percentage price change in the last day", - "required": true + "name": "id", + "type": "number", + "required": true, + "description": "The request identifier.", + "example": 1 }, { - "name": "1w", - "type": "number", - "example": 162, - "description": "Percentage price change in the last week", - "required": true + "name": "method", + "type": "string", + "required": true, + "description": "The JSON-RPC method being invoked.", + "example": "eth_getBlockByNumber" }, { - "name": "1M", - "type": "number", - "example": 162, - "description": "Percentage price change in the last month", - "required": true + "name": "params", + "type": "rpcArray", + "required": true, + "description": "Parameters for the block query, including the block number (in hexadecimal or predefined tags like 'latest', 'earliest', 'pending') and a boolean indicating whether to return full transaction objects.", + "example": ["latest", true] } - ] - } - ] - } - } - } - ] - }, - "getExperiencedBuyersTokens": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Identifies tokens that experienced buyers are purchasing.", - "description": "Identifies tokens that experienced buyers are purchasing.", - "method": "GET", - "path": "/discovery/tokens/experienced-buyers", - "pathParams": [], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "mainnet", - "0x1", - "matic", - "0x89", - "polygon", - "bsc", - "binance", - "0x38", - "fantom", - "ftm", - "0xfa", - "arbitrum", - "0xa4b1", - "optimism", - "0xa", - "pulsechain", - "0x171" - ] - }, - { - "name": "one_week_experienced_net_buyers_change", - "description": "The minimum one week experienced buyers change of a token", - "required": false, - "example": 10, - "type": "number" - }, - { - "name": "min_market_cap", - "description": "The minimum market cap in usd of a token", - "required": false, - "example": 100000000, - "type": "number" - }, - { - "name": "twitter_followers", - "description": "The minimum twitter followers of a token", - "required": false, - "example": 10000, - "type": "number" - }, - { - "name": "one_month_volume_change_usd", - "description": "The minimum one month volume change in usd of a token", - "required": false, - "example": 10000, - "type": "number" - }, - { - "name": "security_score", - "description": "The minimum security score of a token", - "required": false, - "example": 70, - "type": "number" - }, - { - "name": "one_month_price_percent_change_usd", - "description": "The minimum one month price percent change of a token", - "required": false, - "example": 0, - "type": "number" - } - ], - "responses": [ - { - "status": "200", - "description": "Returns market data for the specified token addresses, including metrics and statistics.", - "body": { - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "chain_id", - "type": "string", - "example": "0x1", - "description": "The blockchain identifier the token is on", - "required": true - }, - { - "name": "token_address", - "type": "string", - "example": "0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2", - "description": "The contract address of the token", - "required": true - }, - { - "name": "token_name", - "type": "string", - "example": "Maker", - "description": "The official name of the token", - "required": true - }, - { - "name": "token_symbol", - "type": "string", - "example": "MKR", - "description": "The abbreviated symbol of the token", - "required": true - }, - { - "name": "token_logo", - "type": "string", - "example": "string", - "description": "URL to the token's logo image", - "required": true - }, - { - "name": "price_usd", - "type": "number", - "example": 0, - "description": "Current price of the token in USD", - "required": true - }, - { - "name": "security_score", - "type": "number", - "example": 88, - "description": "Security score assigned to the token", - "required": true - }, - { - "name": "market_cap", - "type": "number", - "example": 1351767630.85, - "description": "Market capitalization of the token", - "required": true - }, + ] + }, + "responses": [ { - "name": "fully_diluted_valuation", - "type": "number", - "example": 1363915420.28, - "description": "Fully diluted market cap of the token", - "required": true - }, + "status": "200", + "description": "Returns detailed information about the requested block.", + "body": { + "type": "object", + "fields": [ + { + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "JSON-RPC version (typically 2.0).", + "example": "2.0" + }, + { + "name": "id", + "type": "number", + "required": true, + "description": "The request identifier.", + "example": 1 + }, + { + "name": "result", + "type": "object", + "required": true, + "description": "Object containing detailed block information.", + "fields": [ + { + "name": "number", + "type": "string", + "description": "The block number.", + "example": "0x10d4f" + }, + { + "name": "hash", + "type": "string", + "description": "The hash of the block.", + "example": "0x18173058d45f8aa984181fdfbfece01a93a971ea63e008231b2e15f151e0903f" + }, + { + "name": "transactions", + "type": "array", + "description": "Array of transaction objects or hashes included in the block.", + "field": { + "type": "object", + "fields": [ + { + "name": "blockHash", + "type": "string", + "description": "The hash of the block.", + "example": "0x18173058d45f8aa984181fdfbfece01a93a971ea63e008231b2e15f151e0903f" + }, + { + "name": "blockNumber", + "type": "string", + "description": "The number of the block.", + "example": "0x15df" + }, + { + "name": "from", + "type": "string", + "description": "The sender address.", + "example": "0x354f3eD35Ae1a182aF933b793e49d3c86CFcDc63" + }, + { + "name": "to", + "type": "string", + "description": "The receiver address.", + "example": "0x354f3eD35Ae1a182aF933b793e49d3c86CFcDc63" + } + ] + } + }, + { + "name": "parentHash", + "type": "string", + "description": "The hash of the parent block.", + "example": "0xd584c5509e3a3d4b2d3bbde4c8e8c0adec7f5c560e9d42b8f12f3c039dd40e92" + }, + { + "name": "nonce", + "type": "string", + "description": "The nonce that was used to generate the block.", + "example": "0x0000000000000000" + }, + { + "name": "sha3Uncles", + "type": "string", + "description": "SHA3 of the uncles data in the block.", + "example": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + { + "name": "logsBloom", + "type": "string", + "description": "The bloom filter for the logs of the block.", + "example": "0x00000000..." + }, + { + "name": "transactionsRoot", + "type": "string", + "description": "The root of the transaction trie of the block.", + "example": "0x3a1b2c..." + }, + { + "name": "stateRoot", + "type": "string", + "description": "The root of the final state trie of the block.", + "example": "0xf1132b..." + }, + { + "name": "receiptsRoot", + "type": "string", + "description": "The root of the receipts trie of the block.", + "example": "0x140f3e..." + }, + { + "name": "miner", + "type": "string", + "description": "The address of the miner who mined the block.", + "example": "0x4e65fda2159562a496f9f3522f89122a3088497a" + }, + { + "name": "difficulty", + "type": "string", + "description": "The difficulty level of the block.", + "example": "0xffffffff" + }, + { + "name": "totalDifficulty", + "type": "string", + "description": "The total difficulty of the chain up to this block.", + "example": "0x222e4800" + }, + { + "name": "extraData", + "type": "string", + "description": "Extra data related to the block.", + "example": "0xd783010703846765746887676f312e392e34856c696e7578" + }, + { + "name": "size", + "type": "string", + "description": "The size of the block in bytes.", + "example": "0x280" + }, + { + "name": "gasLimit", + "type": "string", + "description": "The maximum gas allowed in this block.", + "example": "0x47e7c4" + }, + { + "name": "gasUsed", + "type": "string", + "description": "The total used gas by all transactions in this block.", + "example": "0x45f3" + }, + { + "name": "timestamp", + "type": "string", + "description": "The timestamp for when the block was collated.", + "example": "0x5a5b8d80" + }, + { + "name": "uncles", + "type": "array", + "description": "List of uncle hashes.", + "field": { + "type": "string", + "description": "The hash of each uncle.", + "example": "0x1602e3..." + } + } + ] + } + ] + } + } + ], + "codeSamples": [] + }, + "eth_getBlockTransactionCountByHash": { + "apiHost": "https://site1.moralis-nodes.com", + "summary": "Get Block Transaction Count by Hash", + "description": "Returns the number of transactions in a block from a block matching the given hash.", + "method": "POST", + "path": "/:chain/:apiKey", + "pathParams": [ { - "name": "twitter_followers", - "type": "number", - "example": 255217, - "description": "Number of followers for the token's official Twitter account", - "required": true + "name": "chain", + "type": "string", + "required": true, + "description": "The blockchain to interact with.", + "example": "eth", + "enum": [ + "eth", + "holesky", + "polygon", + "amoy", + "bsc", + "bsc testnet", + "arbitrum", + "arbitrum sepolia", + "optimism", + "optimism testnet", + "base", + "base sepolia" + ] }, { - "name": "holders_change", - "type": "object", - "description": "Changes in the number of token holders over various time periods", - "required": true, - "fields": [ + "name": "apiKey", + "type": "string", + "required": true, + "description": "Your API key for authentication.", + "example": "YOUR_API_KEY" + } + ], + "queryParams": [], + "bodyParam": { + "required": true, + "description": "The request payload for retrieving the transaction count by block hash.", + "type": "object", + "fields": [ { - "name": "1h", - "type": "number", - "example": 14, - "description": "Change in the last hour", - "required": true + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "JSON-RPC version (typically 2.0).", + "example": "2.0" }, { - "name": "1d", - "type": "number", - "example": 14, - "description": "Change in the last day", - "required": true + "name": "id", + "type": "number", + "required": true, + "description": "The request identifier.", + "example": 1 }, { - "name": "1w", - "type": "number", - "example": 162, - "description": "Change in the last week", - "required": true + "name": "method", + "type": "string", + "required": true, + "description": "The JSON-RPC method being invoked.", + "example": "eth_getBlockTransactionCountByHash" }, { - "name": "1M", - "type": "number", - "example": 162, - "description": "Change in the last month", - "required": true + "name": "params", + "type": "rpcArray", + "required": true, + "description": "Parameters for the method, including the block hash.", + "example": [ + "0x18173058d45f8aa984181fdfbfece01a93a971ea63e008231b2e15f151e0903f" + ] } - ] - }, + ] + }, + "responses": [ { - "name": "liquidity_change_usd", - "type": "object", - "description": "Changes in liquidity over various time periods, in USD", - "required": true, - "fields": [ - { - "name": "1h", - "type": "number", - "example": 14, - "description": "Change in liquidity in the last hour", - "required": true - }, - { - "name": "1d", - "type": "number", - "example": 14, - "description": "Change in liquidity in the last day", - "required": true - }, - { - "name": "1w", - "type": "number", - "example": 162, - "description": "Change in liquidity in the last week", - "required": true - }, - { - "name": "1M", - "type": "number", - "example": 162, - "description": "Change in liquidity in the last month", - "required": true + "status": "200", + "description": "Returns the number of transactions in the specified block.", + "body": { + "type": "object", + "fields": [ + { + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "JSON-RPC version (typically 2.0).", + "example": "2.0" + }, + { + "name": "id", + "type": "number", + "required": true, + "description": "The request identifier.", + "example": 1 + }, + { + "name": "result", + "type": "string", + "required": true, + "description": "The number of transactions in the block, as a hexadecimal.", + "example": "0x5" + } + ] } - ] + } + ], + "codeSamples": [] + }, + "eth_getBlockTransactionCountByNumber": { + "apiHost": "https://site1.moralis-nodes.com", + "summary": "Get Block Transaction Count by Number", + "description": "Returns the number of transactions in a block from a block matching the given number. The block number can be specified as a hexadecimal value or as one of the special strings 'latest', 'earliest', or 'pending'.", + "method": "POST", + "path": "/:chain/:apiKey", + "pathParams": [ + { + "name": "chain", + "type": "string", + "required": true, + "description": "The blockchain to interact with.", + "example": "eth", + "enum": [ + "eth", + "holesky", + "polygon", + "amoy", + "bsc", + "bsc testnet", + "arbitrum", + "arbitrum sepolia", + "optimism", + "optimism testnet", + "base", + "base sepolia" + ] }, { - "name": "experienced_net_buyers_change", - "type": "object", - "description": "Changes in the count of experienced net buyers over various time periods", - "required": true, - "fields": [ + "name": "apiKey", + "type": "string", + "required": true, + "description": "Your API key for authentication.", + "example": "YOUR_API_KEY" + } + ], + "queryParams": [], + "bodyParam": { + "required": true, + "description": "The request payload for retrieving the transaction count by block number.", + "type": "object", + "fields": [ { - "name": "1h", - "type": "number", - "example": 14, - "description": "Change in experienced net buyers in the last hour", - "required": true + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "JSON-RPC version (typically 2.0).", + "example": "2.0" }, { - "name": "1d", - "type": "number", - "example": 14, - "description": "Change in experienced net buyers in the last day", - "required": true + "name": "id", + "type": "number", + "required": true, + "description": "The request identifier.", + "example": 1 }, { - "name": "1w", - "type": "number", - "example": 162, - "description": "Change in experienced net buyers in the last week", - "required": true + "name": "method", + "type": "string", + "required": true, + "description": "The JSON-RPC method being invoked.", + "example": "eth_getBlockTransactionCountByNumber" }, { - "name": "1M", - "type": "number", - "example": 162, - "description": "Change in experienced net buyers in the last month", - "required": true + "name": "params", + "type": "rpcArray", + "required": true, + "description": "Parameters for the method, including the block number.", + "example": ["latest"] } - ] - }, + ] + }, + "responses": [ { - "name": "volume_change_usd", - "type": "object", - "description": "Changes in trading volume over various time periods, in USD", - "required": true, - "fields": [ - { - "name": "1h", - "type": "number", - "example": 14, - "description": "Change in volume in the last hour", - "required": true - }, - { - "name": "1d", - "type": "number", - "example": 14, - "description": "Change in volume in the last day", - "required": true - }, - { - "name": "1w", - "type": "number", - "example": 162, - "description": "Change in volume in the last week", - "required": true - }, - { - "name": "1M", - "type": "number", - "example": 162, - "description": "Change in volume in the last month", - "required": true + "status": "200", + "description": "Returns the number of transactions in the specified block.", + "body": { + "type": "object", + "fields": [ + { + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "JSON-RPC version (typically 2.0).", + "example": "2.0" + }, + { + "name": "id", + "type": "number", + "required": true, + "description": "The request identifier.", + "example": 1 + }, + { + "name": "result", + "type": "string", + "required": true, + "description": "The number of transactions in the block, as a hexadecimal.", + "example": "0xa" + } + ] } - ] + } + ], + "codeSamples": [] + }, + "eth_getBlockReceipts": { + "apiHost": "https://site1.moralis-nodes.com", + "summary": "Get Transaction Receipts by Block", + "description": "Hypothetically retrieves all transaction receipts for a given block. This method would return detailed receipt information for each transaction contained within the specified block.", + "method": "POST", + "path": "/:chain/:apiKey", + "pathParams": [ + { + "name": "chain", + "type": "string", + "required": true, + "description": "The blockchain to interact with.", + "example": "eth", + "enum": [ + "eth", + "holesky", + "polygon", + "amoy", + "bsc", + "bsc testnet", + "arbitrum", + "arbitrum sepolia", + "optimism", + "optimism testnet", + "base", + "base sepolia" + ] }, { - "name": "net_volume_change_usd", - "type": "object", - "description": "Changes in net trading volume over various time periods, in USD", - "required": true, - "fields": [ + "name": "apiKey", + "type": "string", + "required": true, + "description": "Your API key for authentication.", + "example": "YOUR_API_KEY" + } + ], + "queryParams": [], + "bodyParam": { + "required": true, + "description": "The request payload for retrieving transaction receipts by block.", + "type": "object", + "fields": [ { - "name": "1h", - "type": "number", - "example": 14, - "description": "Change in net volume in the last hour", - "required": true + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "JSON-RPC version (typically 2.0).", + "example": "2.0" }, { - "name": "1d", - "type": "number", - "example": 14, - "description": "Change in net volume in the last day", - "required": true + "name": "id", + "type": "number", + "required": true, + "description": "The request identifier.", + "example": 1 }, { - "name": "1w", - "type": "number", - "example": 162, - "description": "Change in net volume in the last week", - "required": true + "name": "method", + "type": "string", + "required": true, + "description": "The JSON-RPC method being invoked.", + "example": "eth_getBlockReceipts" }, { - "name": "1M", - "type": "number", - "example": 162, - "description": "Change in net volume in the last month", - "required": true + "name": "params", + "type": "rpcArray", + "required": true, + "description": "Parameters for the method, including the block identifier (number or hash).", + "example": ["latest"] } - ] - }, + ] + }, + "responses": [ { - "name": "price_percent_change_usd", - "type": "object", - "description": "Percentage changes in token price over various time periods", - "required": true, - "fields": [ - { - "name": "1h", - "type": "number", - "example": 14, - "description": "Percentage price change in the last hour", - "required": true - }, - { - "name": "1d", - "type": "number", - "example": 14, - "description": "Percentage price change in the last day", - "required": true - }, - { - "name": "1w", - "type": "number", - "example": 162, - "description": "Percentage price change in the last week", - "required": true - }, - { - "name": "1M", - "type": "number", - "example": 162, - "description": "Percentage price change in the last month", - "required": true + "status": "200", + "description": "Returns all transaction receipts for the specified block.", + "body": { + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "blockHash", + "type": "string", + "description": "Hash of the block where the transaction was included.", + "example": "0x..." + }, + { + "name": "blockNumber", + "type": "string", + "description": "Block number where the transaction was included.", + "example": "0x..." + }, + { + "name": "contractAddress", + "type": "string", + "description": "The contract address created, if the transaction was a contract creation, otherwise null.", + "example": null + }, + { + "name": "cumulativeGasUsed", + "type": "string", + "description": "The total amount of gas used when this transaction was executed in the block.", + "example": "0x..." + }, + { + "name": "effectiveGasPrice", + "type": "string", + "description": "The effective gas price paid by the transaction.", + "example": "0x..." + }, + { + "name": "from", + "type": "string", + "description": "Address of the sender.", + "example": "0x..." + }, + { + "name": "gasUsed", + "type": "string", + "description": "The amount of gas used by this transaction alone.", + "example": "0x..." + }, + { + "name": "logs", + "type": "array", + "description": "Array of log objects, which this transaction generated.", + "field": { + "type": "object", + "fields": [ + { + "name": "address", + "type": "string", + "description": "Address from which the log originated.", + "example": "0x..." + }, + { + "name": "topics", + "type": "array", + "description": "Array of topics associated with the log.", + "field": { + "type": "string", + "description": "Specific log topic.", + "example": "0x..." + } + }, + { + "name": "data", + "type": "string", + "description": "The data contained in the log.", + "example": "0x..." + }, + { + "name": "blockNumber", + "type": "string", + "description": "The block number where this log was in.", + "example": "0x..." + }, + { + "name": "transactionHash", + "type": "string", + "description": "Hash of the transactions this log was created from.", + "example": "0x..." + }, + { + "name": "transactionIndex", + "type": "string", + "description": "Integer of the transaction's index position in the block.", + "example": "0x..." + }, + { + "name": "blockHash", + "type": "string", + "description": "Hash of the block where this log was in.", + "example": "0x..." + }, + { + "name": "logIndex", + "type": "string", + "description": "Integer of the log's index position in the block.", + "example": "0x..." + }, + { + "name": "removed", + "type": "boolean", + "description": "Indicates if the log was removed due to a chain reorganization.", + "example": false + } + ] + } + }, + { + "name": "logsBloom", + "type": "string", + "description": "The bloom filter for the logs of the block.", + "example": "0x..." + }, + { + "name": "status", + "type": "string", + "description": "The status of the transaction (0x1 for success, 0x0 for failure).", + "example": "0x1" + }, + { + "name": "to", + "type": "string", + "description": "Address of the receiver. null when its a contract creation transaction.", + "example": "0x..." + }, + { + "name": "transactionHash", + "type": "string", + "description": "Hash of the transaction.", + "example": "0x..." + }, + { + "name": "transactionIndex", + "type": "string", + "description": "Integer of the transaction's index position in the block.", + "example": "0x..." + }, + { + "name": "type", + "type": "string", + "description": "EIP-2718 type of the transaction.", + "example": "0x2" + } + ] + }, + "description": "Array of transaction receipt objects." } - ] } - ] - } - } - } - ] - }, - "getRiskyBetsTokens": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Identifies tokens with risky characteristics.", - "description": "Identifies tokens with risky characteristics.", - "method": "GET", - "path": "/discovery/tokens/risky-bets", - "pathParams": [], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "mainnet", - "0x1", - "matic", - "0x89", - "polygon", - "bsc", - "binance", - "0x38", - "fantom", - "ftm", - "0xfa", - "arbitrum", - "0xa4b1", - "optimism", - "0xa", - "pulsechain", - "0x171" - ] - }, - { - "name": "max_market_cap", - "description": "The maximum market cap in usd of a token", - "required": false, - "example": 10000000, - "type": "number" - }, - { - "name": "one_week_holders_change", - "description": "The minimum one week holders change of a token", - "required": false, - "example": 25, - "type": "number" - }, - { - "name": "one_week_net_volume_change_usd", - "description": "The minimum one week net volume change in usd of a token", - "required": false, - "example": 500, - "type": "number" - }, - { - "name": "one_month_volume_change_usd", - "description": "The minimum one month volume change in usd of a token", - "required": false, - "example": 10000, - "type": "number" - }, - { - "name": "security_score", - "description": "The minimum security score of a token", - "required": false, - "example": 70, - "type": "number" + ], + "codeSamples": [] }, - { - "name": "one_month_price_percent_change_usd", - "description": "The minimum one month price percent change of a token", - "required": false, - "example": 0, - "type": "number" - } - ], - "responses": [ - { - "status": "200", - "description": "Returns market data for the specified token addresses, including metrics and statistics.", - "body": { - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "chain_id", - "type": "string", - "example": "0x1", - "description": "The blockchain identifier the token is on", - "required": true - }, - { - "name": "token_address", - "type": "string", - "example": "0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2", - "description": "The contract address of the token", - "required": true - }, - { - "name": "token_name", - "type": "string", - "example": "Maker", - "description": "The official name of the token", - "required": true - }, - { - "name": "token_symbol", - "type": "string", - "example": "MKR", - "description": "The abbreviated symbol of the token", - "required": true - }, - { - "name": "token_logo", - "type": "string", - "example": "string", - "description": "URL to the token's logo image", - "required": true - }, - { - "name": "price_usd", - "type": "number", - "example": 0, - "description": "Current price of the token in USD", - "required": true - }, - { - "name": "security_score", - "type": "number", - "example": 88, - "description": "Security score assigned to the token", - "required": true - }, - { - "name": "market_cap", - "type": "number", - "example": 1351767630.85, - "description": "Market capitalization of the token", - "required": true - }, - { - "name": "fully_diluted_valuation", - "type": "number", - "example": 1363915420.28, - "description": "Fully diluted market cap of the token", - "required": true - }, + "eth_getCode": { + "apiHost": "https://site1.moralis-nodes.com", + "summary": "Get Code at Address", + "description": "Returns the code stored at a given address. This method is commonly used to inspect the bytecode of smart contracts. The block number can be specified to retrieve the code at the time of that block.", + "method": "POST", + "path": "/:chain/:apiKey", + "pathParams": [ { - "name": "twitter_followers", - "type": "number", - "example": 255217, - "description": "Number of followers for the token's official Twitter account", - "required": true + "name": "chain", + "type": "string", + "required": true, + "description": "The blockchain to interact with.", + "example": "eth", + "enum": [ + "eth", + "holesky", + "polygon", + "amoy", + "bsc", + "bsc testnet", + "arbitrum", + "arbitrum sepolia", + "optimism", + "optimism testnet", + "base", + "base sepolia" + ] }, { - "name": "holders_change", - "type": "object", - "description": "Changes in the number of token holders over various time periods", - "required": true, - "fields": [ + "name": "apiKey", + "type": "string", + "required": true, + "description": "Your API key for authentication.", + "example": "YOUR_API_KEY" + } + ], + "queryParams": [], + "bodyParam": { + "required": true, + "description": "The request payload for retrieving the code at a given address.", + "type": "object", + "fields": [ { - "name": "1h", - "type": "number", - "example": 14, - "description": "Change in the last hour", - "required": true + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "JSON-RPC version (typically 2.0).", + "example": "2.0" }, { - "name": "1d", - "type": "number", - "example": 14, - "description": "Change in the last day", - "required": true + "name": "id", + "type": "number", + "required": true, + "description": "The request identifier.", + "example": 1 }, { - "name": "1w", - "type": "number", - "example": 162, - "description": "Change in the last week", - "required": true + "name": "method", + "type": "string", + "required": true, + "description": "The JSON-RPC method being invoked.", + "example": "eth_getCode" }, { - "name": "1M", - "type": "number", - "example": 162, - "description": "Change in the last month", - "required": true + "name": "params", + "type": "rpcArray", + "required": true, + "description": "Parameters for the code retrieval request, including the address of the account and the block number.", + "example": [ + "0xd5677cf67b5aa051bb40496e68ad359eb97cfbf8", + "latest" + ] } - ] - }, + ] + }, + "responses": [ { - "name": "liquidity_change_usd", - "type": "object", - "description": "Changes in liquidity over various time periods, in USD", - "required": true, - "fields": [ - { - "name": "1h", - "type": "number", - "example": 14, - "description": "Change in liquidity in the last hour", - "required": true - }, - { - "name": "1d", - "type": "number", - "example": 14, - "description": "Change in liquidity in the last day", - "required": true - }, - { - "name": "1w", - "type": "number", - "example": 162, - "description": "Change in liquidity in the last week", - "required": true - }, - { - "name": "1M", - "type": "number", - "example": 162, - "description": "Change in liquidity in the last month", - "required": true + "status": "200", + "description": "Returns the bytecode of the contract at the specified address.", + "body": { + "type": "object", + "fields": [ + { + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "JSON-RPC version (typically 2.0).", + "example": "2.0" + }, + { + "name": "id", + "type": "number", + "required": true, + "description": "The request identifier.", + "example": 1 + }, + { + "name": "result", + "type": "string", + "required": true, + "description": "The bytecode of the contract at the given address, or 0x if the address has no code (e.g., an EOA).", + "example": "0x608060405234801561001057600080fd5b506040516101..." + } + ] } - ] + } + ], + "codeSamples": [] + }, + "eth_getLogs": { + "apiHost": "https://site1.moralis-nodes.com", + "summary": "Get Logs", + "description": "Returns an array of logs matching a specified filter condition. This can include logs for specific addresses, block number ranges, or topics. Logs are used by smart contracts to record events and can be queried to retrieve historical state or transaction outcomes.", + "method": "POST", + "path": "/:chain/:apiKey", + "pathParams": [ + { + "name": "chain", + "type": "string", + "required": true, + "description": "The blockchain to interact with.", + "example": "eth", + "enum": [ + "eth", + "holesky", + "polygon", + "amoy", + "bsc", + "bsc testnet", + "arbitrum", + "arbitrum sepolia", + "optimism", + "optimism testnet", + "base", + "base sepolia" + ] }, { - "name": "experienced_net_buyers_change", - "type": "object", - "description": "Changes in the count of experienced net buyers over various time periods", - "required": true, - "fields": [ + "name": "apiKey", + "type": "string", + "required": true, + "description": "Your API key for authentication.", + "example": "YOUR_API_KEY" + } + ], + "queryParams": [], + "bodyParam": { + "required": true, + "description": "The request payload for retrieving logs based on a filter.", + "type": "object", + "fields": [ { - "name": "1h", - "type": "number", - "example": 14, - "description": "Change in experienced net buyers in the last hour", - "required": true + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "JSON-RPC version (typically 2.0).", + "example": "2.0" }, { - "name": "1d", - "type": "number", - "example": 14, - "description": "Change in experienced net buyers in the last day", - "required": true + "name": "id", + "type": "number", + "required": true, + "description": "The request identifier.", + "example": 1 }, { - "name": "1w", - "type": "number", - "example": 162, - "description": "Change in experienced net buyers in the last week", - "required": true + "name": "method", + "type": "string", + "required": true, + "description": "The JSON-RPC method being invoked.", + "example": "eth_getLogs" }, { - "name": "1M", - "type": "number", - "example": 162, - "description": "Change in experienced net buyers in the last month", - "required": true + "name": "params", + "type": "rpcArray", + "required": true, + "description": "A single object representing the filter options for the logs. This can include `fromBlock`, `toBlock`, `address`, and `topics`.", + "example": [ + { + "fromBlock": "0x12b39a9", + "toBlock": "latest", + "address": "0x8888f1f195afa192cfee860698584c030f4c9db1", + "topics": [ + "0x0000000000000000000000000000000000000000000000000000000000000000" + ] + } + ] } - ] - }, + ] + }, + "responses": [ { - "name": "volume_change_usd", - "type": "object", - "description": "Changes in trading volume over various time periods, in USD", - "required": true, - "fields": [ - { - "name": "1h", - "type": "number", - "example": 14, - "description": "Change in volume in the last hour", - "required": true - }, - { - "name": "1d", - "type": "number", - "example": 14, - "description": "Change in volume in the last day", - "required": true - }, - { - "name": "1w", - "type": "number", - "example": 162, - "description": "Change in volume in the last week", - "required": true - }, - { - "name": "1M", - "type": "number", - "example": 162, - "description": "Change in volume in the last month", - "required": true + "status": "200", + "description": "Returns logs matching the filter condition.", + "body": { + "type": "array", + "field": { + "type": "object", + "fields": [ + { + "name": "address", + "type": "string", + "description": "Address from which this log originated.", + "example": "0x8888f1f195afa192cfee860698584c030f4c9db1" + }, + { + "name": "topics", + "type": "array", + "description": "Array of topics associated with the log.", + "field": { + "type": "string", + "description": "Specific log topic.", + "example": "0x0000000000000000000000000000000000000000000000000000000000000000" + } + }, + { + "name": "data", + "type": "string", + "description": "The data associated with the log entry.", + "example": "0x..." + }, + { + "name": "blockNumber", + "type": "string", + "description": "The block number where this log was in.", + "example": "0x1a4" + }, + { + "name": "transactionHash", + "type": "string", + "description": "Hash of the transactions this log was created from.", + "example": "0x..." + }, + { + "name": "transactionIndex", + "type": "string", + "description": "Integer of the transaction's index position in the block.", + "example": "0x3" + }, + { + "name": "blockHash", + "type": "string", + "description": "Hash of the block where this log was in.", + "example": "0x..." + }, + { + "name": "logIndex", + "type": "string", + "description": "Integer of the log's index position in the block.", + "example": "0x1" + }, + { + "name": "removed", + "type": "boolean", + "description": "Indicates if the log was removed due to a chain reorganization.", + "example": false + } + ] + }, + "description": "Array of log entry objects." } - ] + } + ], + "codeSamples": [] + }, + "eth_getProof": { + "apiHost": "https://site1.moralis-nodes.com", + "summary": "Get Merkle Proof for Account and Storage", + "description": "Returns the account and storage values of the specified account address, as well as the Merkle-proof. This allows verification of account and storage data within the current state without needing the entire state.", + "method": "POST", + "path": "/:chain/:apiKey", + "pathParams": [ + { + "name": "chain", + "type": "string", + "required": true, + "description": "The blockchain to interact with.", + "example": "eth", + "enum": [ + "eth", + "holesky", + "polygon", + "amoy", + "bsc", + "bsc testnet", + "arbitrum", + "arbitrum sepolia", + "optimism", + "optimism testnet", + "base", + "base sepolia" + ] }, { - "name": "net_volume_change_usd", - "type": "object", - "description": "Changes in net trading volume over various time periods, in USD", - "required": true, - "fields": [ + "name": "apiKey", + "type": "string", + "required": true, + "description": "Your API key for authentication.", + "example": "YOUR_API_KEY" + } + ], + "queryParams": [], + "bodyParam": { + "required": true, + "description": "The request payload for retrieving the proof.", + "type": "object", + "fields": [ { - "name": "1h", - "type": "number", - "example": 14, - "description": "Change in net volume in the last hour", - "required": true + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "JSON-RPC version (typically 2.0).", + "example": "2.0" }, { - "name": "1d", - "type": "number", - "example": 14, - "description": "Change in net volume in the last day", - "required": true + "name": "id", + "type": "number", + "required": true, + "description": "The request identifier.", + "example": 1 }, { - "name": "1w", - "type": "number", - "example": 162, - "description": "Change in net volume in the last week", - "required": true + "name": "method", + "type": "string", + "required": true, + "description": "The JSON-RPC method being invoked.", + "example": "eth_getProof" }, { - "name": "1M", - "type": "number", - "example": 162, - "description": "Change in net volume in the last month", - "required": true + "name": "params", + "type": "rpcArray", + "required": true, + "description": "Parameters for the proof request, including the address, storage keys as an array, and the block number.", + "example": [ + "0x1234567890123456789012345678901234567890", + [ + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "latest" + ] + } + ] + }, + "responses": [ + { + "status": "200", + "description": "Returns the requested proof data.", + "body": { + "type": "object", + "fields": [ + { + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "JSON-RPC version (typically 2.0).", + "example": "2.0" + }, + { + "name": "id", + "type": "number", + "required": true, + "description": "The request identifier.", + "example": 1 + }, + { + "name": "result", + "type": "object", + "required": true, + "description": "Contains the account proof, balance, code hash, nonce, storage hash, and storage proof.", + "fields": [ + { + "name": "accountProof", + "type": "array", + "description": "Array of hashes used to generate the Merkle proof.", + "field": { + "type": "string", + "description": "Individual hash part of the Merkle proof.", + "example": "0x..." + } + }, + { + "name": "balance", + "type": "string", + "description": "The balance of the account in wei.", + "example": "0x1bc16d674ec80000" + }, + { + "name": "codeHash", + "type": "string", + "description": "Hash of the code of the account.", + "example": "0x..." + }, + { + "name": "nonce", + "type": "string", + "description": "The nonce of the account.", + "example": "0x0" + }, + { + "name": "storageHash", + "type": "string", + "description": "Hash of the storage root.", + "example": "0x..." + }, + { + "name": "storageProof", + "type": "array", + "description": "Proofs for each requested storage key.", + "field": { + "type": "object", + "fields": [ + { + "name": "key", + "type": "string", + "description": "The requested storage key.", + "example": "0x..." + }, + { + "name": "value", + "type": "string", + "description": "The value associated with the storage key.", + "example": "0x..." + } + ] + } + } + ] + } + ] } - ] + } + ], + "codeSamples": [] + }, + "eth_getStorageAt": { + "apiHost": "https://site1.moralis-nodes.com", + "summary": "Get Storage At Address", + "description": "Returns the value from a storage position at a given address. This method can be used to inspect the storage of smart contracts at specific slots.", + "method": "POST", + "path": "/:chain/:apiKey", + "pathParams": [ + { + "name": "chain", + "type": "string", + "required": true, + "description": "The blockchain to interact with.", + "example": "eth", + "enum": [ + "eth", + "holesky", + "polygon", + "amoy", + "bsc", + "bsc testnet", + "arbitrum", + "arbitrum sepolia", + "optimism", + "optimism testnet", + "base", + "base sepolia" + ] }, { - "name": "price_percent_change_usd", - "type": "object", - "description": "Percentage changes in token price over various time periods", - "required": true, - "fields": [ + "name": "apiKey", + "type": "string", + "required": true, + "description": "Your API key for authentication.", + "example": "YOUR_API_KEY" + } + ], + "queryParams": [], + "bodyParam": { + "required": true, + "description": "The request payload for querying storage at a specific address and slot.", + "type": "object", + "fields": [ { - "name": "1h", - "type": "number", - "example": 14, - "description": "Percentage price change in the last hour", - "required": true + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "JSON-RPC version (typically 2.0).", + "example": "2.0" }, { - "name": "1d", - "type": "number", - "example": 14, - "description": "Percentage price change in the last day", - "required": true + "name": "id", + "type": "number", + "required": true, + "description": "The request identifier.", + "example": 1 }, { - "name": "1w", - "type": "number", - "example": 162, - "description": "Percentage price change in the last week", - "required": true + "name": "method", + "type": "string", + "required": true, + "description": "The JSON-RPC method being invoked.", + "example": "eth_getStorageAt" }, { - "name": "1M", - "type": "number", - "example": 162, - "description": "Percentage price change in the last month", - "required": true + "name": "params", + "type": "rpcArray", + "required": true, + "description": "Parameters for the storage query, including the address of the account, the index of the storage slot, and the block number to query against.", + "example": [ + "0x407d73d8a49eeb85d32cf465507dd71d507100c1", + "0x0", + "latest" + ] } - ] - } - ] - } - } - } - ] - }, - "getBlueChipTokens": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Identifies blue-chip tokens.", - "description": "Identifies blue-chip tokens.", - "method": "GET", - "path": "/discovery/tokens/blue-chip", - "pathParams": [], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": false, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "mainnet", - "0x1", - "matic", - "0x89", - "polygon", - "bsc", - "binance", - "0x38", - "fantom", - "ftm", - "0xfa", - "arbitrum", - "0xa4b1", - "optimism", - "0xa", - "pulsechain", - "0x171" - ] - }, - { - "name": "min_market_cap", - "description": "The minimum market cap in usd of a token", - "required": false, - "example": 250000000, - "type": "number" - }, - { - "name": "one_week_price_percent_change_usd", - "description": "The minimum one week price percentage change of a token", - "required": false, - "example": 2, - "type": "number" - }, - { - "name": "one_day_price_percent_change_usd", - "description": "The minimum one day price percentage change of a token", - "required": false, - "example": 2, - "type": "number" - }, - { - "name": "one_month_volume_change_usd", - "description": "The minimum one month volume change in usd of a token", - "required": false, - "example": 10000, - "type": "number" - }, - { - "name": "security_score", - "description": "The minimum security score of a token", - "required": false, - "example": 70, - "type": "number" - }, - { - "name": "one_month_price_percent_change_usd", - "description": "The minimum one month price percent change of a token", - "required": false, - "example": 0, - "type": "number" - } - ], - "responses": [ - { - "status": "200", - "description": "Returns market data for the specified token addresses, including metrics and statistics.", - "body": { - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "chain_id", - "type": "string", - "example": "0x1", - "description": "The blockchain identifier the token is on", - "required": true - }, - { - "name": "token_address", - "type": "string", - "example": "0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2", - "description": "The contract address of the token", - "required": true - }, - { - "name": "token_name", - "type": "string", - "example": "Maker", - "description": "The official name of the token", - "required": true - }, - { - "name": "token_symbol", - "type": "string", - "example": "MKR", - "description": "The abbreviated symbol of the token", - "required": true - }, - { - "name": "token_logo", - "type": "string", - "example": "string", - "description": "URL to the token's logo image", - "required": true - }, - { - "name": "price_usd", - "type": "number", - "example": 0, - "description": "Current price of the token in USD", - "required": true - }, - { - "name": "security_score", - "type": "number", - "example": 88, - "description": "Security score assigned to the token", - "required": true - }, - { - "name": "market_cap", - "type": "number", - "example": 1351767630.85, - "description": "Market capitalization of the token", - "required": true - }, + ] + }, + "responses": [ { - "name": "fully_diluted_valuation", - "type": "number", - "example": 1363915420.28, - "description": "Fully diluted market cap of the token", - "required": true - }, + "status": "200", + "description": "Returns the value from the specified storage slot of the contract.", + "body": { + "type": "object", + "fields": [ + { + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "JSON-RPC version (typically 2.0).", + "example": "2.0" + }, + { + "name": "id", + "type": "number", + "required": true, + "description": "The request identifier.", + "example": 1 + }, + { + "name": "result", + "type": "string", + "required": true, + "description": "The data stored at the requested storage slot, in hexadecimal format.", + "example": "0x..." + } + ] + } + } + ], + "codeSamples": [] + }, + "eth_getTransactionByHash": { + "apiHost": "https://site1.moralis-nodes.com", + "summary": "Get Transaction by Hash", + "description": "Retrieves a transaction by its hash. This method provides detailed information about the transaction, including the sender, receiver, gas used, and whether the transaction has been confirmed in a block.", + "method": "POST", + "path": "/:chain/:apiKey", + "pathParams": [ { - "name": "twitter_followers", - "type": "number", - "example": 255217, - "description": "Number of followers for the token's official Twitter account", - "required": true + "name": "chain", + "type": "string", + "required": true, + "description": "The blockchain to interact with.", + "example": "eth", + "enum": [ + "eth", + "holesky", + "polygon", + "amoy", + "bsc", + "bsc testnet", + "arbitrum", + "arbitrum sepolia", + "optimism", + "optimism testnet", + "base", + "base sepolia" + ] }, { - "name": "holders_change", - "type": "object", - "description": "Changes in the number of token holders over various time periods", - "required": true, - "fields": [ + "name": "apiKey", + "type": "string", + "required": true, + "description": "Your API key for authentication.", + "example": "YOUR_API_KEY" + } + ], + "queryParams": [], + "bodyParam": { + "required": true, + "description": "The request payload for retrieving a transaction by its hash.", + "type": "object", + "fields": [ { - "name": "1h", - "type": "number", - "example": 14, - "description": "Change in the last hour", - "required": true + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "JSON-RPC version (typically 2.0).", + "example": "2.0" }, { - "name": "1d", - "type": "number", - "example": 14, - "description": "Change in the last day", - "required": true + "name": "id", + "type": "number", + "required": true, + "description": "The request identifier.", + "example": 1 }, { - "name": "1w", - "type": "number", - "example": 162, - "description": "Change in the last week", - "required": true + "name": "method", + "type": "string", + "required": true, + "description": "The JSON-RPC method being invoked.", + "example": "eth_getTransactionByHash" }, { - "name": "1M", - "type": "number", - "example": 162, - "description": "Change in the last month", - "required": true + "name": "params", + "type": "rpcArray", + "required": true, + "description": "Parameters for the transaction query, including the transaction hash.", + "example": [ + "0xd4b2e80202cc55517c328412a7792772e1bdd925ac1a2120aeafe84316206ad3" + ] } - ] - }, + ] + }, + "responses": [ { - "name": "liquidity_change_usd", - "type": "object", - "description": "Changes in liquidity over various time periods, in USD", - "required": true, - "fields": [ - { - "name": "1h", - "type": "number", - "example": 14, - "description": "Change in liquidity in the last hour", - "required": true - }, - { - "name": "1d", - "type": "number", - "example": 14, - "description": "Change in liquidity in the last day", - "required": true - }, - { - "name": "1w", - "type": "number", - "example": 162, - "description": "Change in liquidity in the last week", - "required": true - }, - { - "name": "1M", - "type": "number", - "example": 162, - "description": "Change in liquidity in the last month", - "required": true + "status": "200", + "description": "Returns the specified transaction details.", + "body": { + "type": "object", + "fields": [ + { + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "JSON-RPC version (typically 2.0).", + "example": "2.0" + }, + { + "name": "id", + "type": "number", + "required": true, + "description": "The request identifier.", + "example": 1 + }, + { + "name": "result", + "type": "object", + "required": true, + "description": "The transaction object, including details such as `from`, `to`, `gas`, `gasPrice`, `nonce`, `value`, `data`, `hash`, and, if applicable, `blockHash`, `blockNumber`, and `transactionIndex`.", + "fields": [ + { + "name": "blockHash", + "type": "string", + "description": "Hash of the block where this transaction was in. null when its pending.", + "example": "0x..." + }, + { + "name": "blockNumber", + "type": "string", + "description": "Block number where this transaction was in. null when its pending.", + "example": "0x..." + }, + { + "name": "from", + "type": "string", + "description": "Address of the sender.", + "example": "0x..." + }, + { + "name": "to", + "type": "string", + "description": "Address of the receiver. null when its a contract creation transaction.", + "example": "0x..." + } + ] + } + ] } - ] + } + ], + "codeSamples": [] + }, + "eth_getTransactionByBlockHashAndIndex": { + "apiHost": "https://site1.moralis-nodes.com", + "summary": "Get Transaction by Block Hash and Index", + "description": "Retrieves a single transaction by its block hash and index position within the block. This allows for precise querying of transactions when the block hash and transaction's index are known.", + "method": "POST", + "path": "/:chain/:apiKey", + "pathParams": [ + { + "name": "chain", + "type": "string", + "required": true, + "description": "The blockchain to interact with.", + "example": "eth", + "enum": [ + "eth", + "holesky", + "polygon", + "amoy", + "bsc", + "bsc testnet", + "arbitrum", + "arbitrum sepolia", + "optimism", + "optimism testnet", + "base", + "base sepolia" + ] }, { - "name": "experienced_net_buyers_change", - "type": "object", - "description": "Changes in the count of experienced net buyers over various time periods", - "required": true, - "fields": [ + "name": "apiKey", + "type": "string", + "required": true, + "description": "Your API key for authentication.", + "example": "YOUR_API_KEY" + } + ], + "queryParams": [], + "bodyParam": { + "required": true, + "description": "The request payload for retrieving a transaction by block hash and transaction index.", + "type": "object", + "fields": [ { - "name": "1h", - "type": "number", - "example": 14, - "description": "Change in experienced net buyers in the last hour", - "required": true + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "JSON-RPC version (typically 2.0).", + "example": "2.0" }, { - "name": "1d", - "type": "number", - "example": 14, - "description": "Change in experienced net buyers in the last day", - "required": true + "name": "id", + "type": "number", + "required": true, + "description": "The request identifier.", + "example": 1 }, { - "name": "1w", - "type": "number", - "example": 162, - "description": "Change in experienced net buyers in the last week", - "required": true + "name": "method", + "type": "string", + "required": true, + "description": "The JSON-RPC method being invoked.", + "example": "eth_getTransactionByBlockHashAndIndex" }, { - "name": "1M", - "type": "number", - "example": 162, - "description": "Change in experienced net buyers in the last month", - "required": true + "name": "params", + "type": "rpcArray", + "required": true, + "description": "Parameters for the method, including the block hash and the transaction index.", + "example": [ + "0x18173058d45f8aa984181fdfbfece01a93a971ea63e008231b2e15f151e0903f", + "0x0" + ] + } + ] + }, + "responses": [ + { + "status": "200", + "description": "Returns the transaction at the specified index in the given block.", + "body": { + "type": "object", + "fields": [ + { + "name": "blockHash", + "type": "string", + "description": "Hash of the block where this transaction was included.", + "example": "0x18173058d45f8aa984181fdfbfece01a93a971ea63e008231b2e15f151e0903f" + }, + { + "name": "blockNumber", + "type": "string", + "description": "Block number where this transaction was included.", + "example": "0x12b39a9" + }, + { + "name": "from", + "type": "string", + "description": "Address of the sender.", + "example": "0xbb936e46099df268a2c6537299b75cf3609a0541" + }, + { + "name": "gas", + "type": "string", + "description": "Gas provided by the sender.", + "example": "0x2bace" + }, + { + "name": "gasPrice", + "type": "string", + "description": "Gas price provided by the sender in wei.", + "example": "0x3bb9d4fcb" + }, + { + "name": "maxPriorityFeePerGas", + "type": "string", + "description": "Maximum priority fee per gas provided by the sender in wei.", + "example": "0x4c4b40" + }, + { + "name": "maxFeePerGas", + "type": "string", + "description": "Maximum fee per gas provided by the sender in wei.", + "example": "0x5666e04ce" + }, + { + "name": "hash", + "type": "string", + "description": "Hash of the transaction.", + "example": "0x6e760d4b659e9c68b943829b0f4adaa07f3e3c043ee8d4f4787045909ba63090" + }, + { + "name": "input", + "type": "string", + "description": "Data sent along with the transaction.", + "example": "0xa76dfc3b..." + }, + { + "name": "nonce", + "type": "string", + "description": "Number of transactions made by the sender prior to this one.", + "example": "0x1b00" + }, + { + "name": "to", + "type": "string", + "description": "Address of the receiver. Null when it's a contract creation transaction.", + "example": "0x111111125421ca6dc452d289314280a0f8842a65" + }, + { + "name": "transactionIndex", + "type": "string", + "description": "Integer of the transaction's index position in the block.", + "example": "0x0" + }, + { + "name": "value", + "type": "string", + "description": "Value transferred in wei.", + "example": "0x214e8348c4f0000" + }, + { + "name": "type", + "type": "string", + "description": "EIP-2718 type of the transaction.", + "example": "0x2" + }, + { + "name": "accessList", + "type": "array", + "description": "EIP-2930 access list.", + "field": { + "type": "object", + "fields": [] + } + }, + { + "name": "chainId", + "type": "string", + "description": "Chain ID of the transaction.", + "example": "0x1" + }, + { + "name": "v", + "type": "string", + "description": "ECDSA recovery id.", + "example": "0x1" + }, + { + "name": "r", + "type": "string", + "description": "ECDSA signature r.", + "example": "0xf611431e6b44cbc02c4278915d979c9034b6d37b139b8c55ae428abbe9d52d4b" + }, + { + "name": "s", + "type": "string", + "description": "ECDSA signature s.", + "example": "0x1bc0fcf547e60d54daf313f840db039c3c1904c5b9724b9d7a8ec1f2abb46b53" + } + ], + "description": "Details of the transaction at the specified index in the given block." } - ] + } + ], + "codeSamples": [] + }, + "eth_getTransactionByBlockNumberAndIndex": { + "apiHost": "https://site1.moralis-nodes.com", + "summary": "Get Transaction by Block Number and Index", + "description": "Retrieves a specific transaction by its block number (which can be specified as a hexadecimal or as one of the special strings 'latest', 'earliest', 'pending') and its index position within the block.", + "method": "POST", + "path": "/:chain/:apiKey", + "pathParams": [ + { + "name": "chain", + "type": "string", + "required": true, + "description": "The blockchain to interact with.", + "example": "eth", + "enum": [ + "eth", + "holesky", + "polygon", + "amoy", + "bsc", + "bsc testnet", + "arbitrum", + "arbitrum sepolia", + "optimism", + "optimism testnet", + "base", + "base sepolia" + ] }, { - "name": "volume_change_usd", - "type": "object", - "description": "Changes in trading volume over various time periods, in USD", - "required": true, - "fields": [ + "name": "apiKey", + "type": "string", + "required": true, + "description": "Your API key for authentication.", + "example": "YOUR_API_KEY" + } + ], + "queryParams": [], + "bodyParam": { + "required": true, + "description": "The request payload for retrieving a transaction by block number and transaction index.", + "type": "object", + "fields": [ { - "name": "1h", - "type": "number", - "example": 14, - "description": "Change in volume in the last hour", - "required": true + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "JSON-RPC version (typically 2.0).", + "example": "2.0" }, { - "name": "1d", - "type": "number", - "example": 14, - "description": "Change in volume in the last day", - "required": true + "name": "id", + "type": "number", + "required": true, + "description": "The request identifier.", + "example": 1 }, { - "name": "1w", - "type": "number", - "example": 162, - "description": "Change in volume in the last week", - "required": true + "name": "method", + "type": "string", + "required": true, + "description": "The JSON-RPC method being invoked.", + "example": "eth_getTransactionByBlockNumberAndIndex" }, { - "name": "1M", - "type": "number", - "example": 162, - "description": "Change in volume in the last month", - "required": true + "name": "params", + "type": "rpcArray", + "required": true, + "description": "Parameters for the method, including the block number and the transaction index.", + "example": ["latest", "0x0"] + } + ] + }, + "responses": [ + { + "status": "200", + "description": "Returns the transaction at the specified index in the given block.", + "body": { + "type": "object", + "fields": [ + { + "name": "blockHash", + "type": "string", + "description": "Hash of the block where this transaction was included.", + "example": "0x18173058d45f8aa984181fdfbfece01a93a971ea63e008231b2e15f151e0903f" + }, + { + "name": "blockNumber", + "type": "string", + "description": "Block number where this transaction was included.", + "example": "0x12b39a9" + }, + { + "name": "from", + "type": "string", + "description": "Address of the sender.", + "example": "0xbb936e46099df268a2c6537299b75cf3609a0541" + }, + { + "name": "gas", + "type": "string", + "description": "Gas provided by the sender.", + "example": "0x2bace" + }, + { + "name": "gasPrice", + "type": "string", + "description": "Gas price provided by the sender in wei.", + "example": "0x3bb9d4fcb" + }, + { + "name": "maxPriorityFeePerGas", + "type": "string", + "description": "Maximum priority fee per gas provided by the sender in wei.", + "example": "0x4c4b40" + }, + { + "name": "maxFeePerGas", + "type": "string", + "description": "Maximum fee per gas provided by the sender in wei.", + "example": "0x5666e04ce" + }, + { + "name": "hash", + "type": "string", + "description": "Hash of the transaction.", + "example": "0x6e760d4b659e9c68b943829b0f4adaa07f3e3c043ee8d4f4787045909ba63090" + }, + { + "name": "input", + "type": "string", + "description": "Data sent along with the transaction.", + "example": "0xa76dfc3b..." + }, + { + "name": "nonce", + "type": "string", + "description": "Number of transactions made by the sender prior to this one.", + "example": "0x1b00" + }, + { + "name": "to", + "type": "string", + "description": "Address of the receiver. Null when it's a contract creation transaction.", + "example": "0x111111125421ca6dc452d289314280a0f8842a65" + }, + { + "name": "transactionIndex", + "type": "string", + "description": "Integer of the transaction's index position in the block.", + "example": "0x0" + }, + { + "name": "value", + "type": "string", + "description": "Value transferred in wei.", + "example": "0x214e8348c4f0000" + }, + { + "name": "type", + "type": "string", + "description": "EIP-2718 type of the transaction.", + "example": "0x2" + }, + { + "name": "accessList", + "type": "array", + "description": "EIP-2930 access list.", + "field": { + "type": "object", + "fields": [] + } + }, + { + "name": "chainId", + "type": "string", + "description": "Chain ID of the transaction.", + "example": "0x1" + }, + { + "name": "v", + "type": "string", + "description": "ECDSA recovery id.", + "example": "0x1" + }, + { + "name": "r", + "type": "string", + "description": "ECDSA signature r.", + "example": "0xf611431e6b44cbc02c4278915d979c9034b6d37b139b8c55ae428abbe9d52d4b" + }, + { + "name": "s", + "type": "string", + "description": "ECDSA signature s.", + "example": "0x1bc0fcf547e60d54daf313f840db039c3c1904c5b9724b9d7a8ec1f2abb46b53" + } + ], + "description": "Details of the transaction at the specified index in the given block." } - ] + } + ], + "codeSamples": [] + }, + "eth_getTransactionCount": { + "apiHost": "https://site1.moralis-nodes.com", + "summary": "Get Transaction Count", + "description": "Retrieves the number of transactions sent from the specified address. This includes all transactions up to the specified block number, allowing for nonce determination for new transactions.", + "method": "POST", + "path": "/:chain/:apiKey", + "pathParams": [ + { + "name": "chain", + "type": "string", + "required": true, + "description": "The blockchain to interact with.", + "example": "eth", + "enum": [ + "eth", + "holesky", + "polygon", + "amoy", + "bsc", + "bsc testnet", + "arbitrum", + "arbitrum sepolia", + "optimism", + "optimism testnet", + "base", + "base sepolia" + ] }, { - "name": "net_volume_change_usd", - "type": "object", - "description": "Changes in net trading volume over various time periods, in USD", - "required": true, - "fields": [ + "name": "apiKey", + "type": "string", + "required": true, + "description": "Your API key for authentication.", + "example": "YOUR_API_KEY" + } + ], + "queryParams": [], + "bodyParam": { + "required": true, + "description": "The request payload for retrieving the transaction count (nonce) for an address.", + "type": "object", + "fields": [ { - "name": "1h", - "type": "number", - "example": 14, - "description": "Change in net volume in the last hour", - "required": true + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "JSON-RPC version (typically 2.0).", + "example": "2.0" }, { - "name": "1d", - "type": "number", - "example": 14, - "description": "Change in net volume in the last day", - "required": true + "name": "id", + "type": "number", + "required": true, + "description": "The request identifier.", + "example": 1 }, { - "name": "1w", - "type": "number", - "example": 162, - "description": "Change in net volume in the last week", - "required": true + "name": "method", + "type": "string", + "required": true, + "description": "The JSON-RPC method being invoked.", + "example": "eth_getTransactionCount" }, { - "name": "1M", - "type": "number", - "example": 162, - "description": "Change in net volume in the last month", - "required": true + "name": "params", + "type": "rpcArray", + "required": true, + "description": "Parameters for the method, including the address to query and the block number ('latest', 'earliest', 'pending').", + "example": [ + "0x407d73d8a49eeb85d32cf465507dd71d507100c1", + "latest" + ] } - ] - }, + ] + }, + "responses": [ { - "name": "price_percent_change_usd", - "type": "object", - "description": "Percentage changes in token price over various time periods", - "required": true, - "fields": [ - { - "name": "1h", - "type": "number", - "example": 14, - "description": "Percentage price change in the last hour", - "required": true - }, - { - "name": "1d", - "type": "number", - "example": 14, - "description": "Percentage price change in the last day", - "required": true - }, - { - "name": "1w", - "type": "number", - "example": 162, - "description": "Percentage price change in the last week", - "required": true - }, - { - "name": "1M", - "type": "number", - "example": 162, - "description": "Percentage price change in the last month", - "required": true + "status": "200", + "description": "Returns the number of transactions sent from the specified address, as a hexadecimal.", + "body": { + "type": "object", + "fields": [ + { + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "JSON-RPC version (typically 2.0).", + "example": "2.0" + }, + { + "name": "id", + "type": "number", + "required": true, + "description": "The request identifier.", + "example": 1 + }, + { + "name": "result", + "type": "string", + "required": true, + "description": "The number of transactions sent from the address, represented as a hexadecimal value.", + "example": "0x15" + } + ] } - ] } - ] - } - } - } - ] - }, - "getDiscoveryToken": { - "apiHost": "https://deep-index.moralis.io/api/v2.2", - "summary": "Get token details", - "description": "Get token details", - "method": "GET", - "path": "/discovery/token", - "pathParams": [], - "queryParams": [ - { - "name": "chain", - "description": "The chain to query", - "required": true, - "example": "eth", - "type": "string", - "enum": [ - "eth", - "mainnet", - "0x1", - "matic", - "0x89", - "polygon", - "bsc", - "binance", - "0x38", - "fantom", - "ftm", - "0xfa", - "arbitrum", - "0xa4b1", - "optimism", - "0xa", - "pulsechain", - "0x171" - ] - }, - { - "name": "token_address", - "description": "The address of the token", - "required": true, - "example": "0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2", - "type": "string" - } - ], - "responses": [ - { - "status": "200", - "description": "Returns the token details", - "body": { - "type": "object" - } - } - ] - } - }, - "rpc": { - "evmRpc": { - "apiHost": "https://site1.moralis-nodes.com", - "summary": "Retrieve Ethereum Accounts", - "description": "Executes a JSON-RPC 2.0 call to retrieve Ethereum account addresses that are available on the node. This method does not require any additional parameters.", - "method": "POST", - "path": "/:chain/:apiKey", - "pathParams": [ - { - "name": "chain", - "type": "string", - "required": true, - "description": "The blockchain to interact with.", - "example": "eth", - "enum": [ - "eth", - "holesky", - "polygon", - "amoy", - "bsc", - "bsc testnet", - "arbitrum", - "arbitrum sepolia", - "optimism", - "optimism testnet", - "base", - "base sepolia" - ] - }, - { - "name": "apiKey", - "type": "string", - "required": true, - "description": "Your API key for authentication.", - "example": "YOUR_API_KEY" - } - ], - "queryParams": [], - "bodyParam": { - "required": true, - "description": "JSON-RPC 2.0 request body", - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "Version of the JSON-RPC protocol.", - "example": "2.0" - }, - { - "name": "id", - "type": "number", - "required": true, - "description": "Identifier for the request, must be unique for each request.", - "example": 1 - }, - { - "name": "method", - "type": "string", - "required": true, - "description": "The name of the RPC method to be invoked.", - "example": "eth_estimateGas", - "enum": [ - "eth_blockNumber", - "eth_call", - "eth_chainId", - "eth_createAccessList", - "eth_estimateGas", - "eth_feeHistory", - "eth_gasPrice", - "eth_getBalance", - "eth_getBlockByHash", - "eth_getBlockByNumber", - "eth_getBlockTransactionCountByHash", - "eth_getBlockTransactionCountByNumber", - "eth_getBlockReceipts", - "eth_getCode", - "eth_getLogs", - "eth_getProof", - "eth_getStorageAt", - "eth_getTransactionByHash", - "eth_getTransactionByBlockHashAndIndex", - "eth_getTransactionByBlockNumberAndIndex", - "eth_getTransactionCount", - "eth_getTransactionReceipt", - "eth_getUncleByBlockHashAndIndex", - "eth_getUncleByBlockNumberAndIndex", - "eth_getUncleCountByBlockHash", - "eth_getUncleCountByBlockNumber", - "eth_maxPriorityFeePerGas", - "eth_sendRawTransaction" - ] - }, - { - "name": "params", - "type": "rpcArray", - "required": true, - "description": "Parameters for the RPC method.", - "example": [ - { - "from": "0x4838B106FCe9647Bdf1E7877BF73cE8B0BAD5f97", - "to": "0xd4E96eF8eee8678dBFf4d535E033Ed1a4F7605b7", - "value": "0x132a0" - } - ] - } - ] - }, - "responses": [ - { - "status": "200", - "description": "Returns the response from RPC nodes.", - "body": { - "type": "object", - "description": "Refer to the RPC schema docs for more details on the resposne definitions of each RPC method.", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "description": "Version of the JSON-RPC protocol. Will be \"2.0\".", - "example": "2.0" - }, - { - "name": "id", - "type": "integer", - "description": "Identifier for the response, matching the request id.", - "example": 1 - }, - { - "name": "result", - "type": "array", - "description": "Refer to RPC schema docs for more details on the resposne definitions of each RPC method." - } - ] - } - } - ], - "codeSamples": [] - }, - "eth_blockNumber": { - "apiHost": "https://site1.moralis-nodes.com", - "summary": "Get Current Block Number", - "description": "Returns the number of the most recent block on the chain.", - "method": "POST", - "path": "/:chain/:apiKey", - "pathParams": [ - { - "name": "chain", - "type": "string", - "required": true, - "description": "The blockchain to interact with.", - "example": "eth", - "enum": [ - "eth", - "holesky", - "polygon", - "amoy", - "bsc", - "bsc testnet", - "arbitrum", - "arbitrum sepolia", - "optimism", - "optimism testnet", - "base", - "base sepolia" - ] - }, - { - "name": "apiKey", - "type": "string", - "required": true, - "description": "Your API key for authentication.", - "example": "YOUR_API_KEY" - } - ], - "queryParams": [], - "bodyParam": { - "required": true, - "description": "The request payload for the eth_blockNumber method.", - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "JSON-RPC version (typically 2.0).", - "example": "2.0" - }, - { - "name": "id", - "type": "number", - "required": true, - "description": "The request identifier.", - "example": 1 - }, - { - "name": "method", - "type": "string", - "required": true, - "description": "The JSON-RPC method being invoked.", - "example": "eth_blockNumber" - }, - { - "name": "params", - "type": "rpcArray", - "required": true, - "description": "Parameters to be passed to the method (empty for eth_blockNumber).", - "example": [] - } - ] - }, - "responses": [ - { - "status": "200", - "description": "Returns the current block number as a hex code.", - "body": { - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "JSON-RPC version (typically 2.0).", - "example": "2.0" - }, - { - "name": "id", - "type": "number", - "required": true, - "description": "The request identifier.", - "example": 1 - }, - { - "name": "result", - "type": "string", - "required": true, - "description": "The current block number in hexadecimal.", - "example": "0x5b8d80" - } - ] - } - } - ], - "codeSamples": [] - }, - "eth_call": { - "apiHost": "https://site1.moralis-nodes.com", - "summary": "Executes a new message call immediately without creating a transaction on the block chain.", - "description": "The eth_call method allows for the execution of a message call to a contract. It can be used to call functions on contracts without sending a transaction. This means it doesn't alter the blockchain and is executed only locally to return a response.", - "method": "POST", - "path": "/:chain/:apiKey", - "pathParams": [ - { - "name": "chain", - "type": "string", - "required": true, - "description": "The blockchain to interact with.", - "example": "eth", - "enum": [ - "eth", - "holesky", - "polygon", - "amoy", - "bsc", - "bsc testnet", - "arbitrum", - "arbitrum sepolia", - "optimism", - "optimism testnet", - "base", - "base sepolia" - ] - }, - { - "name": "apiKey", - "type": "string", - "required": true, - "description": "Your API key for authentication.", - "example": "YOUR_API_KEY" - } - ], - "queryParams": [], - "bodyParam": { - "required": true, - "description": "The request payload for the eth_call method.", - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "JSON-RPC version (typically 2.0).", - "example": "2.0" - }, - { - "name": "id", - "type": "number", - "required": true, - "description": "The request identifier.", - "example": 1 - }, - { - "name": "method", - "type": "string", - "required": true, - "description": "The JSON-RPC method being invoked.", - "example": "eth_call" - }, - { - "name": "params", - "type": "rpcArray", - "required": true, - "description": "Parameters for the call, including the transaction call object and optionally the block number.", - "example": [ - { - "to": "0x407d73d8a49eeb85d32cf465507dd71d507100c1", - "data": "0x06fdde03" - }, - "latest" - ] - } - ] - }, - "responses": [ - { - "status": "200", - "description": "Returns the result of the contract function call.", - "body": { - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "JSON-RPC version (typically 2.0).", - "example": "2.0" - }, - { - "name": "id", - "type": "number", - "required": true, - "description": "The request identifier.", - "example": 1 - }, - { - "name": "result", - "type": "string", - "required": true, - "description": "The returned data from the contract function, encoded.", - "example": "0x" - } - ] - } - } - ], - "codeSamples": [] - }, - "eth_chainId": { - "apiHost": "https://site1.moralis-nodes.com", - "summary": "Get the current chain ID", - "description": "Returns the current chain ID, identifying the current blockchain. The chain ID is a unique identifier for each blockchain and is used for transaction signing to prevent replay attacks across chains.", - "method": "POST", - "path": "/:chain/:apiKey", - "pathParams": [ - { - "name": "chain", - "type": "string", - "required": true, - "description": "The blockchain to interact with.", - "example": "eth", - "enum": [ - "eth", - "holesky", - "polygon", - "amoy", - "bsc", - "bsc testnet", - "arbitrum", - "arbitrum sepolia", - "optimism", - "optimism testnet", - "base", - "base sepolia" - ] - }, - { - "name": "apiKey", - "type": "string", - "required": true, - "description": "Your API key for authentication.", - "example": "YOUR_API_KEY" - } - ], - "queryParams": [], - "bodyParam": { - "required": true, - "description": "The request payload for the eth_chainId method.", - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "JSON-RPC version (typically 2.0).", - "example": "2.0" - }, - { - "name": "id", - "type": "number", - "required": true, - "description": "The request identifier.", - "example": 1 - }, - { - "name": "method", - "type": "string", - "required": true, - "description": "The JSON-RPC method being invoked.", - "example": "eth_chainId" - }, - { - "name": "params", - "type": "rpcArray", - "required": true, - "description": "Parameters for the method (empty for eth_chainId).", - "example": [] - } - ] - }, - "responses": [ - { - "status": "200", - "description": "Returns the chain ID of the current blockchain.", - "body": { - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "JSON-RPC version (typically 2.0).", - "example": "2.0" - }, - { - "name": "id", - "type": "number", - "required": true, - "description": "The request identifier.", - "example": 1 - }, - { - "name": "result", - "type": "string", - "required": true, - "description": "The current chain ID, as a hexadecimal.", - "example": "0x1" - } - ] - } - } - ], - "codeSamples": [] - }, - "eth_createAccessList": { - "apiHost": "https://site1.moralis-nodes.com", - "summary": "Create Access List", - "description": "This example demonstrates generating an access list for a hypothetical transaction that interacts with a contract. The access list helps in optimizing gas costs for transactions by pre-specifying accounts and storage keys the transaction intends to access.", - "method": "POST", - "path": "/:chain/:apiKey", - "pathParams": [ - { - "name": "chain", - "type": "string", - "required": true, - "description": "The blockchain to interact with. In this example, 'eth' is used to denote Ethereum Mainnet.", - "example": "eth", - "enum": [ - "eth", - "holesky", - "polygon", - "amoy", - "bsc", - "bsc testnet", - "arbitrum", - "arbitrum sepolia", - "optimism", - "optimism testnet", - "base", - "base sepolia" - ] + ], + "codeSamples": [] }, - { - "name": "apiKey", - "type": "string", - "required": true, - "description": "Your API key for authentication. Replace 'YOUR_API_KEY' with your actual Moralis API key.", - "example": "YOUR_API_KEY" - } - ], - "queryParams": [], - "bodyParam": { - "required": true, - "description": "The request payload for generating an access list based on a transaction object.", - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "Specifies the JSON-RPC protocol version, which is 2.0 for this example.", - "example": "2.0" - }, - { - "name": "id", - "type": "number", - "required": true, - "description": "A unique identifier for the request.", - "example": 1 - }, - { - "name": "method", - "type": "string", - "required": true, - "description": "The JSON-RPC method being called. For creating an access list, 'eth_createAccessList' is used.", - "example": "eth_createAccessList" - }, - { - "name": "params", - "type": "rpcArray", - "required": true, - "description": "An array containing the transaction object for which to generate the access list, and optionally the block number.", - "example": [ - { - "from": "0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe", - "to": "0x4e6f6D7edB5CBD081670C1F898BBF721c4a24695", - "gas": "0x76c0", - "gasPrice": "0x9184e72a000", - "value": "0x0", - "data": "0x3c11dde50000000000000000000000000000000000000000000000000000000000000003" - }, - "latest" - ] - } - ] - }, - "responses": [ - { - "status": "200", - "description": "Successful response with the generated access list and gas used.", - "body": { - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "JSON-RPC protocol version.", - "example": "2.0" - }, - { - "name": "id", - "type": "number", - "required": true, - "description": "The request identifier matching the request.", - "example": 1 - }, - { - "name": "result", - "type": "object", - "required": true, - "description": "Contains the access list and the gas used for the transaction.", - "fields": [ - { - "name": "accessList", - "type": "array", - "description": "Generated access list detailing accounts and storage keys the transaction will access.", - "example": [ - { - "address": "0x4e6f6D7edB5CBD081670C1F898BBF721c4a24695", - "storageKeys": [ - "0x0000000000000000000000000000000000000000000000000000000000000000" - ] - } + "eth_getTransactionReceipt": { + "apiHost": "https://site1.moralis-nodes.com", + "summary": "Get Transaction Receipt", + "description": "Retrieves the receipt of a transaction by its hash. Transaction receipts contain details about the transaction's execution, including the status (success or failure), gas used, and event logs.", + "method": "POST", + "path": "/:chain/:apiKey", + "pathParams": [ + { + "name": "chain", + "type": "string", + "required": true, + "description": "The blockchain to interact with.", + "example": "eth", + "enum": [ + "eth", + "holesky", + "polygon", + "amoy", + "bsc", + "bsc testnet", + "arbitrum", + "arbitrum sepolia", + "optimism", + "optimism testnet", + "base", + "base sepolia" ] - }, - { - "name": "gasUsed", + }, + { + "name": "apiKey", "type": "string", - "description": "The gas used for generating the access list.", - "example": "0x5208" - } - ] - } - ] - } - } - ], - "codeSamples": [] - }, - "eth_estimateGas": { - "apiHost": "https://site1.moralis-nodes.com", - "summary": "Estimate Gas", - "description": "Estimates the amount of gas required to execute a transaction. This method does not execute the transaction but simulates its execution to estimate the gas amount. It's useful for adjusting gas limits before sending transactions to ensure they succeed without running out of gas.", - "method": "POST", - "path": "/:chain/:apiKey", - "pathParams": [ - { - "name": "chain", - "type": "string", - "required": true, - "description": "The blockchain to interact with.", - "example": "eth", - "enum": [ - "eth", - "holesky", - "polygon", - "amoy", - "bsc", - "bsc testnet", - "arbitrum", - "arbitrum sepolia", - "optimism", - "optimism testnet", - "base", - "base sepolia" - ] - }, - { - "name": "apiKey", - "type": "string", - "required": true, - "description": "Your API key for authentication.", - "example": "YOUR_API_KEY" - } - ], - "queryParams": [], - "bodyParam": { - "required": true, - "description": "The request payload for estimating gas required for a transaction.", - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "JSON-RPC version (typically 2.0).", - "example": "2.0" - }, - { - "name": "id", - "type": "number", - "required": true, - "description": "The request identifier.", - "example": 1 - }, - { - "name": "method", - "type": "string", - "required": true, - "description": "The JSON-RPC method being invoked.", - "example": "eth_estimateGas" - }, - { - "name": "params", - "type": "rpcArray", - "required": true, - "description": "Parameters for the transaction to estimate gas for, including details like the sender, receiver, gas price, and value.", - "example": [ - { - "from": "0xa83114A443dA1CecEFC50368531cACE9F37fCCcb", - "to": "0x354f3eD35Ae1a182aF933b793e49d3c86CFcDc63", - "gasPrice": "0x4a817c800", - "value": "0x0", - "data": "0xa9059cbb000000000000000000000000407d73d8a49eeb85d32cf465507dd71d507100c10000000000000000000000000000000000000000000000000000000000000064" - } - ] - } - ] - }, - "responses": [ - { - "status": "200", - "description": "Returns the estimated gas required for the transaction.", - "body": { - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "JSON-RPC version (typically 2.0).", - "example": "2.0" - }, - { - "name": "id", - "type": "number", - "required": true, - "description": "The request identifier.", - "example": 1 - }, - { - "name": "result", - "type": "string", - "required": true, - "description": "The estimated gas amount as a hexadecimal.", - "example": "0x5208" - } - ] - } - } - ], - "codeSamples": [] - }, - "eth_feeHistory": { - "apiHost": "https://site1.moralis-nodes.com", - "summary": "Retrieve Fee History", - "description": "Retrieves historical data about transaction fees. The method returns the base fee per gas and reward (priority fee) ranges paid in each block for the requested block range. Useful for estimating appropriate fees for future transactions.", - "method": "POST", - "path": "/:chain/:apiKey", - "pathParams": [ - { - "name": "chain", - "type": "string", - "required": true, - "description": "The blockchain to interact with.", - "example": "eth", - "enum": [ - "eth", - "holesky", - "polygon", - "amoy", - "bsc", - "bsc testnet", - "arbitrum", - "arbitrum sepolia", - "optimism", - "optimism testnet", - "base", - "base sepolia" - ] - }, - { - "name": "apiKey", - "type": "string", - "required": true, - "description": "Your API key for authentication.", - "example": "YOUR_API_KEY" - } - ], - "queryParams": [], - "bodyParam": { - "required": true, - "description": "The request payload for retrieving fee history.", - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "JSON-RPC version (typically 2.0).", - "example": "2.0" - }, - { - "name": "id", - "type": "number", - "required": true, - "description": "The request identifier.", - "example": 1 - }, - { - "name": "method", - "type": "string", - "required": true, - "description": "The JSON-RPC method being invoked.", - "example": "eth_feeHistory" - }, - { - "name": "params", - "type": "rpcArray", - "required": true, - "description": "Parameters for the fee history request, including the number of blocks to include, the target block, and the percentile ranges of transaction fees.", - "example": ["0x10", "latest", [25, 50, 75]] - } - ] - }, - "responses": [ - { - "status": "200", - "description": "Returns historical fee data for the requested block range.", - "body": { - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "JSON-RPC version (typically 2.0).", - "example": "2.0" - }, - { - "name": "id", - "type": "number", + "required": true, + "description": "Your API key for authentication.", + "example": "YOUR_API_KEY" + } + ], + "queryParams": [], + "bodyParam": { "required": true, - "description": "The request identifier.", - "example": 1 - }, - { - "name": "result", + "description": "The request payload for retrieving a transaction receipt.", "type": "object", - "required": true, - "description": "Contains the fee history data.", "fields": [ - { - "name": "oldestBlock", - "type": "string", - "description": "The oldest block (in hexadecimal) in the requested range.", - "example": "0x9cace7" - }, - { - "name": "baseFeePerGas", - "type": "array", - "field": { - "type": "string", - "description": "Base fee per gas for each block, in hexadecimal.", - "example": "0x4c4b40" + { + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "JSON-RPC version (typically 2.0).", + "example": "2.0" }, - "description": "Array of base fee per gas for each block, in hexadecimal." - }, - { - "name": "gasUsedRatio", - "type": "array", - "field": { - "type": "number", - "description": "Ratio of gas used to gas limit for the block.", - "example": 0.5 + { + "name": "id", + "type": "number", + "required": true, + "description": "The request identifier.", + "example": 1 }, - "description": "Array of ratios of gas used to gas limit for each block." - }, - { - "name": "reward", - "type": "array", - "field": { - "type": "array", - "field": { + { + "name": "method", "type": "string", - "description": "Reward (priority fee) paid for the percentile.", - "example": "0x34630b8a00" - }, - "description": "Array containing the reward (priority fee) paid for each percentile." + "required": true, + "description": "The JSON-RPC method being invoked.", + "example": "eth_getTransactionReceipt" }, - "description": "Array of arrays containing the reward (priority fee) paid for each percentile." - } - ] - } - ] - } - } - ], - "codeSamples": [] - }, - "eth_gasPrice": { - "apiHost": "https://site1.moralis-nodes.com", - "summary": "Get Current Gas Price", - "description": "Returns the current gas price in wei, which is the median gas price of the latest blocks. This value can be used to set the gas price for new transactions.", - "method": "POST", - "path": "/:chain/:apiKey", - "pathParams": [ - { - "name": "chain", - "type": "string", - "required": true, - "description": "The blockchain to interact with.", - "example": "eth", - "enum": [ - "eth", - "holesky", - "polygon", - "amoy", - "bsc", - "bsc testnet", - "arbitrum", - "arbitrum sepolia", - "optimism", - "optimism testnet", - "base", - "base sepolia" - ] - }, - { - "name": "apiKey", - "type": "string", - "required": true, - "description": "Your API key for authentication.", - "example": "YOUR_API_KEY" - } - ], - "queryParams": [], - "bodyParam": { - "required": true, - "description": "The request payload for retrieving the current gas price.", - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "JSON-RPC version (typically 2.0).", - "example": "2.0" - }, - { - "name": "id", - "type": "number", - "required": true, - "description": "The request identifier.", - "example": 1 - }, - { - "name": "method", - "type": "string", - "required": true, - "description": "The JSON-RPC method being invoked.", - "example": "eth_gasPrice" - }, - { - "name": "params", - "type": "rpcArray", - "required": true, - "description": "Parameters for the gas price request (empty for eth_gasPrice).", - "example": [] - } - ] - }, - "responses": [ - { - "status": "200", - "description": "Returns the current gas price in wei.", - "body": { - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "JSON-RPC version (typically 2.0).", - "example": "2.0" - }, - { - "name": "id", - "type": "number", - "required": true, - "description": "The request identifier.", - "example": 1 - }, - { - "name": "result", - "type": "string", - "required": true, - "description": "The current gas price in wei, as a hexadecimal.", - "example": "0x3b9aca00" - } - ] - } - } - ], - "codeSamples": [] - }, - "eth_getBalance": { - "apiHost": "https://site1.moralis-nodes.com", - "summary": "Get Account Balance", - "description": "Returns the balance of the account of a given address at a specific block number.", - "method": "POST", - "path": "/:chain/:apiKey", - "pathParams": [ - { - "name": "chain", - "type": "string", - "required": true, - "description": "The blockchain to interact with.", - "example": "eth", - "enum": [ - "eth", - "holesky", - "polygon", - "amoy", - "bsc", - "bsc testnet", - "arbitrum", - "arbitrum sepolia", - "optimism", - "optimism testnet", - "base", - "base sepolia" - ] - }, - { - "name": "apiKey", - "type": "string", - "required": true, - "description": "Your API key for authentication.", - "example": "YOUR_API_KEY" - } - ], - "queryParams": [], - "bodyParam": { - "required": true, - "description": "The request payload for retrieving the account balance.", - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "JSON-RPC version (typically 2.0).", - "example": "2.0" - }, - { - "name": "id", - "type": "number", - "required": true, - "description": "The request identifier.", - "example": 1 - }, - { - "name": "method", - "type": "string", - "required": true, - "description": "The JSON-RPC method being invoked.", - "example": "eth_getBalance" - }, - { - "name": "params", - "type": "rpcArray", - "required": true, - "description": "Parameters for the balance request, including the address and the block number.", - "example": ["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"] - } - ] - }, - "responses": [ - { - "status": "200", - "description": "Returns the balance of the account in wei.", - "body": { - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "JSON-RPC version (typically 2.0).", - "example": "2.0" - }, - { - "name": "id", - "type": "number", - "required": true, - "description": "The request identifier.", - "example": 1 - }, - { - "name": "result", - "type": "string", - "required": true, - "description": "The balance of the account in wei, as a hexadecimal.", - "example": "0xde0b6b3a7640000" - } - ] - } - } - ], - "codeSamples": [] - }, - "eth_getBlockByHash": { - "apiHost": "https://site1.moralis-nodes.com", - "summary": "Get Block by Hash", - "description": "Returns information about a block by hash. Optionally, it can also return the full transaction objects if the second parameter is set to `true`; otherwise, only the transaction hashes are returned.", - "method": "POST", - "path": "/:chain/:apiKey", - "pathParams": [ - { - "name": "chain", - "type": "string", - "required": true, - "description": "The blockchain to interact with.", - "example": "eth", - "enum": [ - "eth", - "holesky", - "polygon", - "amoy", - "bsc", - "bsc testnet", - "arbitrum", - "arbitrum sepolia", - "optimism", - "optimism testnet", - "base", - "base sepolia" - ] - }, - { - "name": "apiKey", - "type": "string", - "required": true, - "description": "Your API key for authentication.", - "example": "YOUR_API_KEY" - } - ], - "queryParams": [], - "bodyParam": { - "required": true, - "description": "The request payload for retrieving block information by hash.", - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "JSON-RPC version (typically 2.0).", - "example": "2.0" - }, - { - "name": "id", - "type": "number", - "required": true, - "description": "The request identifier.", - "example": 1 - }, - { - "name": "method", - "type": "string", - "required": true, - "description": "The JSON-RPC method being invoked.", - "example": "eth_getBlockByHash" - }, - { - "name": "params", - "type": "rpcArray", - "required": true, - "description": "Parameters for the block query, including the block hash and a boolean indicating whether to return full transaction objects.", - "example": [ - "0x18173058d45f8aa984181fdfbfece01a93a971ea63e008231b2e15f151e0903f", - true - ] - } - ] - }, - "responses": [ - { - "status": "200", - "description": "Returns detailed information about the requested block.", - "body": { - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "JSON-RPC version (typically 2.0).", - "example": "2.0" - }, - { - "name": "id", - "type": "number", - "required": true, - "description": "The request identifier.", - "example": 1 - }, - { - "name": "result", - "type": "object", - "required": true, - "description": "Object containing the block information.", - "fields": [ - { - "name": "number", - "type": "string", - "description": "The block number.", - "example": "0x10d4f" - }, - { - "name": "hash", - "type": "string", - "description": "The hash of the block.", - "example": "0x18173058d45f8aa984181fdfbfece01a93a971ea63e008231b2e15f151e0903f" - }, - { - "name": "transactions", - "type": "array", - "description": "Array of transaction objects or hashes included in the block.", - "field": { - "type": "object", - "fields": [ - { - "name": "blockHash", - "type": "string", - "description": "The hash of the block.", - "example": "0x18173058d45f8aa984181fdfbfece01a93a971ea63e008231b2e15f151e0903f" - }, - { - "name": "blockNumber", - "type": "string", - "description": "The number of the block.", - "example": "0x15df" - }, - { - "name": "from", - "type": "string", - "description": "The sender address.", - "example": "0x354f3eD35Ae1a182aF933b793e49d3c86CFcDc63" - }, - { - "name": "to", - "type": "string", - "description": "The receiver address.", - "example": "0x354f3eD35Ae1a182aF933b793e49d3c86CFcDc63" - } - ] + { + "name": "params", + "type": "rpcArray", + "required": true, + "description": "Parameters for the method, including the transaction hash.", + "example": [ + "0xd4b2e80202cc55517c328412a7792772e1bdd925ac1a2120aeafe84316206ad3" + ] } - }, - { - "name": "parentHash", - "type": "string", - "description": "The hash of the parent block.", - "example": "0xd584c5509e3a3d4b2d3bbde4c8e8c0adec7f5c560e9d42b8f12f3c039dd40e92" - }, - { - "name": "nonce", - "type": "string", - "description": "The nonce that was used to generate the block.", - "example": "0x0000000000000000" - }, - { - "name": "sha3Uncles", - "type": "string", - "description": "SHA3 of the uncles data in the block.", - "example": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - }, - { - "name": "logsBloom", - "type": "string", - "description": "The bloom filter for the logs of the block.", - "example": "0x00000000..." - }, - { - "name": "transactionsRoot", - "type": "string", - "description": "The root of the transaction trie of the block.", - "example": "0x3a1b2c..." - }, - { - "name": "stateRoot", - "type": "string", - "description": "The root of the final state trie of the block.", - "example": "0xf1132b..." - }, - { - "name": "receiptsRoot", - "type": "string", - "description": "The root of the receipts trie of the block.", - "example": "0x140f3e..." - }, - { - "name": "miner", - "type": "string", - "description": "The address of the miner who mined the block.", - "example": "0x4e65fda2159562a496f9f3522f89122a3088497a" - }, - { - "name": "difficulty", - "type": "string", - "description": "The difficulty level of the block.", - "example": "0xffffffff" - }, - { - "name": "totalDifficulty", - "type": "string", - "description": "The total difficulty of the chain up to this block.", - "example": "0x222e4800" - }, - { - "name": "extraData", - "type": "string", - "description": "Extra data related to the block.", - "example": "0xd783010703846765746887676f312e392e34856c696e7578" - }, - { - "name": "size", - "type": "string", - "description": "The size of the block in bytes.", - "example": "0x280" - }, - { - "name": "gasLimit", - "type": "string", - "description": "The maximum gas allowed in this block.", - "example": "0x47e7c4" - }, - { - "name": "gasUsed", - "type": "string", - "description": "The total used gas by all transactions in this block.", - "example": "0x45f3" - }, - { - "name": "timestamp", - "type": "string", - "description": "The timestamp for when the block was collated.", - "example": "0x5a5b8d80" - }, - { - "name": "uncles", - "type": "array", - "description": "List of uncle hashes.", - "field": { - "type": "string", - "description": "The hash of each uncle.", - "example": "0x1602e3..." + ] + }, + "responses": [ + { + "status": "200", + "description": "Returns the transaction at the specified index in the given block.", + "body": { + "type": "object", + "fields": [ + { + "name": "blockHash", + "type": "string", + "description": "Hash of the block where this transaction was included.", + "example": "0x18173058d45f8aa984181fdfbfece01a93a971ea63e008231b2e15f151e0903f" + }, + { + "name": "blockNumber", + "type": "string", + "description": "Block number where this transaction was included.", + "example": "0x12b39a9" + }, + { + "name": "from", + "type": "string", + "description": "Address of the sender.", + "example": "0xbb936e46099df268a2c6537299b75cf3609a0541" + }, + { + "name": "gas", + "type": "string", + "description": "Gas provided by the sender.", + "example": "0x2bace" + }, + { + "name": "gasPrice", + "type": "string", + "description": "Gas price provided by the sender in wei.", + "example": "0x3bb9d4fcb" + }, + { + "name": "maxPriorityFeePerGas", + "type": "string", + "description": "Maximum priority fee per gas provided by the sender in wei.", + "example": "0x4c4b40" + }, + { + "name": "maxFeePerGas", + "type": "string", + "description": "Maximum fee per gas provided by the sender in wei.", + "example": "0x5666e04ce" + }, + { + "name": "hash", + "type": "string", + "description": "Hash of the transaction.", + "example": "0x6e760d4b659e9c68b943829b0f4adaa07f3e3c043ee8d4f4787045909ba63090" + }, + { + "name": "input", + "type": "string", + "description": "Data sent along with the transaction.", + "example": "0xa76dfc3b..." + }, + { + "name": "nonce", + "type": "string", + "description": "Number of transactions made by the sender prior to this one.", + "example": "0x1b00" + }, + { + "name": "to", + "type": "string", + "description": "Address of the receiver. Null when it's a contract creation transaction.", + "example": "0x111111125421ca6dc452d289314280a0f8842a65" + }, + { + "name": "transactionIndex", + "type": "string", + "description": "Integer of the transaction's index position in the block.", + "example": "0x0" + }, + { + "name": "value", + "type": "string", + "description": "Value transferred in wei.", + "example": "0x214e8348c4f0000" + }, + { + "name": "type", + "type": "string", + "description": "EIP-2718 type of the transaction.", + "example": "0x2" + }, + { + "name": "accessList", + "type": "array", + "description": "EIP-2930 access list.", + "field": { + "type": "object", + "fields": [] + } + }, + { + "name": "chainId", + "type": "string", + "description": "Chain ID of the transaction.", + "example": "0x1" + }, + { + "name": "v", + "type": "string", + "description": "ECDSA recovery id.", + "example": "0x1" + }, + { + "name": "r", + "type": "string", + "description": "ECDSA signature r.", + "example": "0xf611431e6b44cbc02c4278915d979c9034b6d37b139b8c55ae428abbe9d52d4b" + }, + { + "name": "s", + "type": "string", + "description": "ECDSA signature s.", + "example": "0x1bc0fcf547e60d54daf313f840db039c3c1904c5b9724b9d7a8ec1f2abb46b53" + } + ], + "description": "Details of the transaction at the specified index in the given block." } - } - ] - } - ] - } - } - ], - "codeSamples": [] - }, - "eth_getBlockByNumber": { - "apiHost": "https://site1.moralis-nodes.com", - "summary": "Get Block by Number", - "description": "Retrieves information about a block by its block number. The method can optionally return full transaction objects within the block if the second parameter is set to true; otherwise, it returns only the transaction hashes.", - "method": "POST", - "path": "/:chain/:apiKey", - "pathParams": [ - { - "name": "chain", - "type": "string", - "required": true, - "description": "The blockchain to interact with.", - "example": "eth", - "enum": [ - "eth", - "holesky", - "polygon", - "amoy", - "bsc", - "bsc testnet", - "arbitrum", - "arbitrum sepolia", - "optimism", - "optimism testnet", - "base", - "base sepolia" - ] + } + ], + "codeSamples": [] }, - { - "name": "apiKey", - "type": "string", - "required": true, - "description": "Your API key for authentication.", - "example": "YOUR_API_KEY" - } - ], - "queryParams": [], - "bodyParam": { - "required": true, - "description": "The request payload for retrieving block information by number.", - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "JSON-RPC version (typically 2.0).", - "example": "2.0" - }, - { - "name": "id", - "type": "number", - "required": true, - "description": "The request identifier.", - "example": 1 - }, - { - "name": "method", - "type": "string", - "required": true, - "description": "The JSON-RPC method being invoked.", - "example": "eth_getBlockByNumber" - }, - { - "name": "params", - "type": "rpcArray", - "required": true, - "description": "Parameters for the block query, including the block number (in hexadecimal or predefined tags like 'latest', 'earliest', 'pending') and a boolean indicating whether to return full transaction objects.", - "example": ["latest", true] - } - ] - }, - "responses": [ - { - "status": "200", - "description": "Returns detailed information about the requested block.", - "body": { - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "JSON-RPC version (typically 2.0).", - "example": "2.0" - }, - { - "name": "id", - "type": "number", - "required": true, - "description": "The request identifier.", - "example": 1 - }, - { - "name": "result", - "type": "object", - "required": true, - "description": "Object containing detailed block information.", - "fields": [ - { - "name": "number", - "type": "string", - "description": "The block number.", - "example": "0x10d4f" - }, - { - "name": "hash", - "type": "string", - "description": "The hash of the block.", - "example": "0x18173058d45f8aa984181fdfbfece01a93a971ea63e008231b2e15f151e0903f" - }, - { - "name": "transactions", - "type": "array", - "description": "Array of transaction objects or hashes included in the block.", - "field": { - "type": "object", - "fields": [ - { - "name": "blockHash", - "type": "string", - "description": "The hash of the block.", - "example": "0x18173058d45f8aa984181fdfbfece01a93a971ea63e008231b2e15f151e0903f" - }, - { - "name": "blockNumber", - "type": "string", - "description": "The number of the block.", - "example": "0x15df" - }, - { - "name": "from", - "type": "string", - "description": "The sender address.", - "example": "0x354f3eD35Ae1a182aF933b793e49d3c86CFcDc63" - }, - { - "name": "to", - "type": "string", - "description": "The receiver address.", - "example": "0x354f3eD35Ae1a182aF933b793e49d3c86CFcDc63" - } - ] - } - }, - { - "name": "parentHash", - "type": "string", - "description": "The hash of the parent block.", - "example": "0xd584c5509e3a3d4b2d3bbde4c8e8c0adec7f5c560e9d42b8f12f3c039dd40e92" - }, - { - "name": "nonce", - "type": "string", - "description": "The nonce that was used to generate the block.", - "example": "0x0000000000000000" - }, - { - "name": "sha3Uncles", - "type": "string", - "description": "SHA3 of the uncles data in the block.", - "example": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" - }, - { - "name": "logsBloom", - "type": "string", - "description": "The bloom filter for the logs of the block.", - "example": "0x00000000..." - }, - { - "name": "transactionsRoot", - "type": "string", - "description": "The root of the transaction trie of the block.", - "example": "0x3a1b2c..." - }, - { - "name": "stateRoot", - "type": "string", - "description": "The root of the final state trie of the block.", - "example": "0xf1132b..." - }, - { - "name": "receiptsRoot", - "type": "string", - "description": "The root of the receipts trie of the block.", - "example": "0x140f3e..." - }, - { - "name": "miner", - "type": "string", - "description": "The address of the miner who mined the block.", - "example": "0x4e65fda2159562a496f9f3522f89122a3088497a" - }, - { - "name": "difficulty", - "type": "string", - "description": "The difficulty level of the block.", - "example": "0xffffffff" - }, - { - "name": "totalDifficulty", - "type": "string", - "description": "The total difficulty of the chain up to this block.", - "example": "0x222e4800" - }, - { - "name": "extraData", - "type": "string", - "description": "Extra data related to the block.", - "example": "0xd783010703846765746887676f312e392e34856c696e7578" - }, - { - "name": "size", - "type": "string", - "description": "The size of the block in bytes.", - "example": "0x280" - }, - { - "name": "gasLimit", - "type": "string", - "description": "The maximum gas allowed in this block.", - "example": "0x47e7c4" - }, - { - "name": "gasUsed", + "eth_getUncleByBlockHashAndIndex": { + "apiHost": "https://site1.moralis-nodes.com", + "summary": "Get Uncle by Block Hash and Index", + "description": "Retrieves details of an uncle block by specifying the hash of the parent block and the uncle's index position. This method is useful for examining the uncles of a given block, providing insights into block reorganizations and network security.", + "method": "POST", + "path": "/:chain/:apiKey", + "pathParams": [ + { + "name": "chain", "type": "string", - "description": "The total used gas by all transactions in this block.", - "example": "0x45f3" - }, - { - "name": "timestamp", + "required": true, + "description": "The blockchain to interact with.", + "example": "eth", + "enum": [ + "eth", + "holesky", + "polygon", + "amoy", + "bsc", + "bsc testnet", + "arbitrum", + "arbitrum sepolia", + "optimism", + "optimism testnet", + "base", + "base sepolia" + ] + }, + { + "name": "apiKey", "type": "string", - "description": "The timestamp for when the block was collated.", - "example": "0x5a5b8d80" - }, - { - "name": "uncles", - "type": "array", - "description": "List of uncle hashes.", - "field": { - "type": "string", - "description": "The hash of each uncle.", - "example": "0x1602e3..." - } - } - ] - } - ] - } - } - ], - "codeSamples": [] - }, - "eth_getBlockTransactionCountByHash": { - "apiHost": "https://site1.moralis-nodes.com", - "summary": "Get Block Transaction Count by Hash", - "description": "Returns the number of transactions in a block from a block matching the given hash.", - "method": "POST", - "path": "/:chain/:apiKey", - "pathParams": [ - { - "name": "chain", - "type": "string", - "required": true, - "description": "The blockchain to interact with.", - "example": "eth", - "enum": [ - "eth", - "holesky", - "polygon", - "amoy", - "bsc", - "bsc testnet", - "arbitrum", - "arbitrum sepolia", - "optimism", - "optimism testnet", - "base", - "base sepolia" - ] - }, - { - "name": "apiKey", - "type": "string", - "required": true, - "description": "Your API key for authentication.", - "example": "YOUR_API_KEY" - } - ], - "queryParams": [], - "bodyParam": { - "required": true, - "description": "The request payload for retrieving the transaction count by block hash.", - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "JSON-RPC version (typically 2.0).", - "example": "2.0" - }, - { - "name": "id", - "type": "number", - "required": true, - "description": "The request identifier.", - "example": 1 - }, - { - "name": "method", - "type": "string", - "required": true, - "description": "The JSON-RPC method being invoked.", - "example": "eth_getBlockTransactionCountByHash" - }, - { - "name": "params", - "type": "rpcArray", - "required": true, - "description": "Parameters for the method, including the block hash.", - "example": [ - "0x18173058d45f8aa984181fdfbfece01a93a971ea63e008231b2e15f151e0903f" - ] - } - ] - }, - "responses": [ - { - "status": "200", - "description": "Returns the number of transactions in the specified block.", - "body": { - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "JSON-RPC version (typically 2.0).", - "example": "2.0" - }, - { - "name": "id", - "type": "number", - "required": true, - "description": "The request identifier.", - "example": 1 - }, - { - "name": "result", - "type": "string", - "required": true, - "description": "The number of transactions in the block, as a hexadecimal.", - "example": "0x5" - } - ] - } - } - ], - "codeSamples": [] - }, - "eth_getBlockTransactionCountByNumber": { - "apiHost": "https://site1.moralis-nodes.com", - "summary": "Get Block Transaction Count by Number", - "description": "Returns the number of transactions in a block from a block matching the given number. The block number can be specified as a hexadecimal value or as one of the special strings 'latest', 'earliest', or 'pending'.", - "method": "POST", - "path": "/:chain/:apiKey", - "pathParams": [ - { - "name": "chain", - "type": "string", - "required": true, - "description": "The blockchain to interact with.", - "example": "eth", - "enum": [ - "eth", - "holesky", - "polygon", - "amoy", - "bsc", - "bsc testnet", - "arbitrum", - "arbitrum sepolia", - "optimism", - "optimism testnet", - "base", - "base sepolia" - ] - }, - { - "name": "apiKey", - "type": "string", - "required": true, - "description": "Your API key for authentication.", - "example": "YOUR_API_KEY" - } - ], - "queryParams": [], - "bodyParam": { - "required": true, - "description": "The request payload for retrieving the transaction count by block number.", - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "JSON-RPC version (typically 2.0).", - "example": "2.0" - }, - { - "name": "id", - "type": "number", - "required": true, - "description": "The request identifier.", - "example": 1 - }, - { - "name": "method", - "type": "string", - "required": true, - "description": "The JSON-RPC method being invoked.", - "example": "eth_getBlockTransactionCountByNumber" - }, - { - "name": "params", - "type": "rpcArray", - "required": true, - "description": "Parameters for the method, including the block number.", - "example": ["latest"] - } - ] - }, - "responses": [ - { - "status": "200", - "description": "Returns the number of transactions in the specified block.", - "body": { - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "JSON-RPC version (typically 2.0).", - "example": "2.0" - }, - { - "name": "id", - "type": "number", - "required": true, - "description": "The request identifier.", - "example": 1 - }, - { - "name": "result", - "type": "string", + "required": true, + "description": "Your API key for authentication.", + "example": "YOUR_API_KEY" + } + ], + "queryParams": [], + "bodyParam": { "required": true, - "description": "The number of transactions in the block, as a hexadecimal.", - "example": "0xa" - } - ] - } - } - ], - "codeSamples": [] - }, - "eth_getBlockReceipts": { - "apiHost": "https://site1.moralis-nodes.com", - "summary": "Get Transaction Receipts by Block", - "description": "Hypothetically retrieves all transaction receipts for a given block. This method would return detailed receipt information for each transaction contained within the specified block.", - "method": "POST", - "path": "/:chain/:apiKey", - "pathParams": [ - { - "name": "chain", - "type": "string", - "required": true, - "description": "The blockchain to interact with.", - "example": "eth", - "enum": [ - "eth", - "holesky", - "polygon", - "amoy", - "bsc", - "bsc testnet", - "arbitrum", - "arbitrum sepolia", - "optimism", - "optimism testnet", - "base", - "base sepolia" - ] - }, - { - "name": "apiKey", - "type": "string", - "required": true, - "description": "Your API key for authentication.", - "example": "YOUR_API_KEY" - } - ], - "queryParams": [], - "bodyParam": { - "required": true, - "description": "The request payload for retrieving transaction receipts by block.", - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "JSON-RPC version (typically 2.0).", - "example": "2.0" - }, - { - "name": "id", - "type": "number", - "required": true, - "description": "The request identifier.", - "example": 1 - }, - { - "name": "method", - "type": "string", - "required": true, - "description": "The JSON-RPC method being invoked.", - "example": "eth_getBlockReceipts" - }, - { - "name": "params", - "type": "rpcArray", - "required": true, - "description": "Parameters for the method, including the block identifier (number or hash).", - "example": ["latest"] - } - ] - }, - "responses": [ - { - "status": "200", - "description": "Returns all transaction receipts for the specified block.", - "body": { - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "blockHash", - "type": "string", - "description": "Hash of the block where the transaction was included.", - "example": "0x..." - }, - { - "name": "blockNumber", - "type": "string", - "description": "Block number where the transaction was included.", - "example": "0x..." - }, - { - "name": "contractAddress", - "type": "string", - "description": "The contract address created, if the transaction was a contract creation, otherwise null.", - "example": null - }, - { - "name": "cumulativeGasUsed", - "type": "string", - "description": "The total amount of gas used when this transaction was executed in the block.", - "example": "0x..." - }, - { - "name": "effectiveGasPrice", - "type": "string", - "description": "The effective gas price paid by the transaction.", - "example": "0x..." - }, - { - "name": "from", - "type": "string", - "description": "Address of the sender.", - "example": "0x..." - }, - { - "name": "gasUsed", - "type": "string", - "description": "The amount of gas used by this transaction alone.", - "example": "0x..." - }, - { - "name": "logs", - "type": "array", - "description": "Array of log objects, which this transaction generated.", - "field": { - "type": "object", - "fields": [ - { - "name": "address", - "type": "string", - "description": "Address from which the log originated.", - "example": "0x..." - }, - { - "name": "topics", - "type": "array", - "description": "Array of topics associated with the log.", - "field": { - "type": "string", - "description": "Specific log topic.", - "example": "0x..." - } - }, - { - "name": "data", - "type": "string", - "description": "The data contained in the log.", - "example": "0x..." - }, - { - "name": "blockNumber", - "type": "string", - "description": "The block number where this log was in.", - "example": "0x..." - }, - { - "name": "transactionHash", - "type": "string", - "description": "Hash of the transactions this log was created from.", - "example": "0x..." - }, - { - "name": "transactionIndex", - "type": "string", - "description": "Integer of the transaction's index position in the block.", - "example": "0x..." - }, - { - "name": "blockHash", + "description": "The request payload for retrieving an uncle by block hash and index.", + "type": "object", + "fields": [ + { + "name": "jsonrpc", "type": "string", - "description": "Hash of the block where this log was in.", - "example": "0x..." - }, - { - "name": "logIndex", + "required": true, + "description": "JSON-RPC version (typically 2.0).", + "example": "2.0" + }, + { + "name": "id", + "type": "number", + "required": true, + "description": "The request identifier.", + "example": 1 + }, + { + "name": "method", "type": "string", - "description": "Integer of the log's index position in the block.", - "example": "0x..." - }, - { - "name": "removed", - "type": "boolean", - "description": "Indicates if the log was removed due to a chain reorganization.", - "example": false - } - ] - } - }, - { - "name": "logsBloom", - "type": "string", - "description": "The bloom filter for the logs of the block.", - "example": "0x..." - }, - { - "name": "status", - "type": "string", - "description": "The status of the transaction (0x1 for success, 0x0 for failure).", - "example": "0x1" - }, - { - "name": "to", - "type": "string", - "description": "Address of the receiver. null when its a contract creation transaction.", - "example": "0x..." - }, + "required": true, + "description": "The JSON-RPC method being invoked.", + "example": "eth_getUncleByBlockHashAndIndex" + }, + { + "name": "params", + "type": "rpcArray", + "required": true, + "description": "Parameters for the method, including the block hash and the uncle's index.", + "example": [ + "0x18173058d45f8aa984181fdfbfece01a93a971ea63e008231b2e15f151e0903f", + "0x0" + ] + } + ] + }, + "responses": [ { - "name": "transactionHash", - "type": "string", - "description": "Hash of the transaction.", - "example": "0x..." - }, + "status": "200", + "description": "Returns the specified uncle block details.", + "body": { + "type": "object", + "fields": [ + { + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "JSON-RPC version (typically 2.0).", + "example": "2.0" + }, + { + "name": "id", + "type": "number", + "required": true, + "description": "The request identifier.", + "example": 1 + }, + { + "name": "result", + "type": "object", + "required": true, + "description": "The uncle block object, including details such as `parentHash`, `sha3Uncles`, `miner`, `stateRoot`, `transactionsRoot`, `receiptsRoot`, `logsBloom`, `difficulty`, `number`, `gasLimit`, `gasUsed`, `timestamp`, and more.", + "fields": [] + } + ] + } + } + ], + "codeSamples": [] + }, + "eth_getUncleByBlockNumberAndIndex": { + "apiHost": "https://site1.moralis-nodes.com", + "summary": "Get Uncle by Block Number and Index", + "description": "Retrieves details of an uncle block by specifying the block number (which can be a hexadecimal value or one of the special strings 'latest', 'earliest', 'pending') and the uncle's index position within the uncle list of the block.", + "method": "POST", + "path": "/:chain/:apiKey", + "pathParams": [ { - "name": "transactionIndex", - "type": "string", - "description": "Integer of the transaction's index position in the block.", - "example": "0x..." + "name": "chain", + "type": "string", + "required": true, + "description": "The blockchain to interact with.", + "example": "eth", + "enum": [ + "eth", + "holesky", + "polygon", + "amoy", + "bsc", + "bsc testnet", + "arbitrum", + "arbitrum sepolia", + "optimism", + "optimism testnet", + "base", + "base sepolia" + ] }, { - "name": "type", - "type": "string", - "description": "EIP-2718 type of the transaction.", - "example": "0x2" + "name": "apiKey", + "type": "string", + "required": true, + "description": "Your API key for authentication.", + "example": "YOUR_API_KEY" } - ] - }, - "description": "Array of transaction receipt objects." - } - } - ], - "codeSamples": [] - }, - "eth_getCode": { - "apiHost": "https://site1.moralis-nodes.com", - "summary": "Get Code at Address", - "description": "Returns the code stored at a given address. This method is commonly used to inspect the bytecode of smart contracts. The block number can be specified to retrieve the code at the time of that block.", - "method": "POST", - "path": "/:chain/:apiKey", - "pathParams": [ - { - "name": "chain", - "type": "string", - "required": true, - "description": "The blockchain to interact with.", - "example": "eth", - "enum": [ - "eth", - "holesky", - "polygon", - "amoy", - "bsc", - "bsc testnet", - "arbitrum", - "arbitrum sepolia", - "optimism", - "optimism testnet", - "base", - "base sepolia" - ] - }, - { - "name": "apiKey", - "type": "string", - "required": true, - "description": "Your API key for authentication.", - "example": "YOUR_API_KEY" - } - ], - "queryParams": [], - "bodyParam": { - "required": true, - "description": "The request payload for retrieving the code at a given address.", - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "JSON-RPC version (typically 2.0).", - "example": "2.0" - }, - { - "name": "id", - "type": "number", - "required": true, - "description": "The request identifier.", - "example": 1 - }, - { - "name": "method", - "type": "string", - "required": true, - "description": "The JSON-RPC method being invoked.", - "example": "eth_getCode" - }, - { - "name": "params", - "type": "rpcArray", - "required": true, - "description": "Parameters for the code retrieval request, including the address of the account and the block number.", - "example": ["0xd5677cf67b5aa051bb40496e68ad359eb97cfbf8", "latest"] - } - ] - }, - "responses": [ - { - "status": "200", - "description": "Returns the bytecode of the contract at the specified address.", - "body": { - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "JSON-RPC version (typically 2.0).", - "example": "2.0" - }, - { - "name": "id", - "type": "number", - "required": true, - "description": "The request identifier.", - "example": 1 - }, - { - "name": "result", - "type": "string", + ], + "queryParams": [], + "bodyParam": { "required": true, - "description": "The bytecode of the contract at the given address, or 0x if the address has no code (e.g., an EOA).", - "example": "0x608060405234801561001057600080fd5b506040516101..." - } - ] - } - } - ], - "codeSamples": [] - }, - "eth_getLogs": { - "apiHost": "https://site1.moralis-nodes.com", - "summary": "Get Logs", - "description": "Returns an array of logs matching a specified filter condition. This can include logs for specific addresses, block number ranges, or topics. Logs are used by smart contracts to record events and can be queried to retrieve historical state or transaction outcomes.", - "method": "POST", - "path": "/:chain/:apiKey", - "pathParams": [ - { - "name": "chain", - "type": "string", - "required": true, - "description": "The blockchain to interact with.", - "example": "eth", - "enum": [ - "eth", - "holesky", - "polygon", - "amoy", - "bsc", - "bsc testnet", - "arbitrum", - "arbitrum sepolia", - "optimism", - "optimism testnet", - "base", - "base sepolia" - ] - }, - { - "name": "apiKey", - "type": "string", - "required": true, - "description": "Your API key for authentication.", - "example": "YOUR_API_KEY" - } - ], - "queryParams": [], - "bodyParam": { - "required": true, - "description": "The request payload for retrieving logs based on a filter.", - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "JSON-RPC version (typically 2.0).", - "example": "2.0" - }, - { - "name": "id", - "type": "number", - "required": true, - "description": "The request identifier.", - "example": 1 - }, - { - "name": "method", - "type": "string", - "required": true, - "description": "The JSON-RPC method being invoked.", - "example": "eth_getLogs" - }, - { - "name": "params", - "type": "rpcArray", - "required": true, - "description": "A single object representing the filter options for the logs. This can include `fromBlock`, `toBlock`, `address`, and `topics`.", - "example": [ - { - "fromBlock": "0x12b39a9", - "toBlock": "latest", - "address": "0x8888f1f195afa192cfee860698584c030f4c9db1", - "topics": [ - "0x0000000000000000000000000000000000000000000000000000000000000000" + "description": "The request payload for retrieving an uncle by block number and index.", + "type": "object", + "fields": [ + { + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "JSON-RPC version (typically 2.0).", + "example": "2.0" + }, + { + "name": "id", + "type": "number", + "required": true, + "description": "The request identifier.", + "example": 1 + }, + { + "name": "method", + "type": "string", + "required": true, + "description": "The JSON-RPC method being invoked.", + "example": "eth_getUncleByBlockNumberAndIndex" + }, + { + "name": "params", + "type": "rpcArray", + "required": true, + "description": "Parameters for the method, including the block number and the uncle's index.", + "example": ["latest", "0x0"] + } ] - } - ] - } - ] - }, - "responses": [ - { - "status": "200", - "description": "Returns logs matching the filter condition.", - "body": { - "type": "array", - "field": { - "type": "object", - "fields": [ - { - "name": "address", - "type": "string", - "description": "Address from which this log originated.", - "example": "0x8888f1f195afa192cfee860698584c030f4c9db1" - }, - { - "name": "topics", - "type": "array", - "description": "Array of topics associated with the log.", - "field": { - "type": "string", - "description": "Specific log topic.", - "example": "0x0000000000000000000000000000000000000000000000000000000000000000" - } - }, - { - "name": "data", - "type": "string", - "description": "The data associated with the log entry.", - "example": "0x..." - }, + }, + "responses": [ { - "name": "blockNumber", - "type": "string", - "description": "The block number where this log was in.", - "example": "0x1a4" - }, + "status": "200", + "description": "Returns the specified uncle block details.", + "body": { + "type": "object", + "fields": [ + { + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "JSON-RPC version (typically 2.0).", + "example": "2.0" + }, + { + "name": "id", + "type": "number", + "required": true, + "description": "The request identifier.", + "example": 1 + }, + { + "name": "result", + "type": "object", + "required": true, + "description": "The uncle block object, including details such as `parentHash`, `sha3Uncles`, `miner`, `stateRoot`, `transactionsRoot`, `receiptsRoot`, `logsBloom`, `difficulty`, `number`, `gasLimit`, `gasUsed`, `timestamp`, and other relevant block information.", + "fields": [] + } + ] + } + } + ], + "codeSamples": [] + }, + "eth_getUncleCountByBlockHash": { + "apiHost": "https://site1.moralis-nodes.com", + "summary": "Get Uncle Count by Block Hash", + "description": "Returns the number of uncle blocks included in a block, identified by the block hash. This method provides insights into the block's contributions to the network security and the overall branching behavior of the blockchain.", + "method": "POST", + "path": "/:chain/:apiKey", + "pathParams": [ { - "name": "transactionHash", - "type": "string", - "description": "Hash of the transactions this log was created from.", - "example": "0x..." + "name": "chain", + "type": "string", + "required": true, + "description": "The blockchain to interact with.", + "example": "eth", + "enum": [ + "eth", + "holesky", + "polygon", + "amoy", + "bsc", + "bsc testnet", + "arbitrum", + "arbitrum sepolia", + "optimism", + "optimism testnet", + "base", + "base sepolia" + ] }, { - "name": "transactionIndex", - "type": "string", - "description": "Integer of the transaction's index position in the block.", - "example": "0x3" - }, + "name": "apiKey", + "type": "string", + "required": true, + "description": "Your API key for authentication.", + "example": "YOUR_API_KEY" + } + ], + "queryParams": [], + "bodyParam": { + "required": true, + "description": "The request payload for retrieving the number of uncles by block hash.", + "type": "object", + "fields": [ + { + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "JSON-RPC version (typically 2.0).", + "example": "2.0" + }, + { + "name": "id", + "type": "number", + "required": true, + "description": "The request identifier.", + "example": 1 + }, + { + "name": "method", + "type": "string", + "required": true, + "description": "The JSON-RPC method being invoked.", + "example": "eth_getUncleCountByBlockHash" + }, + { + "name": "params", + "type": "rpcArray", + "required": true, + "description": "Parameters for the method, including the block hash.", + "example": [ + "0x18173058d45f8aa984181fdfbfece01a93a971ea63e008231b2e15f151e0903f" + ] + } + ] + }, + "responses": [ { - "name": "blockHash", - "type": "string", - "description": "Hash of the block where this log was in.", - "example": "0x..." - }, + "status": "200", + "description": "Returns the number of uncle blocks included in the specified block.", + "body": { + "type": "object", + "fields": [ + { + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "JSON-RPC version (typically 2.0).", + "example": "2.0" + }, + { + "name": "id", + "type": "number", + "required": true, + "description": "The request identifier.", + "example": 1 + }, + { + "name": "result", + "type": "string", + "required": true, + "description": "The number of uncle blocks included in the block, represented as a hexadecimal value.", + "example": "0x1" + } + ] + } + } + ], + "codeSamples": [] + }, + "eth_getUncleCountByBlockNumber": { + "apiHost": "https://site1.moralis-nodes.com", + "summary": "Get Uncle Count by Block Number", + "description": "Returns the number of uncle blocks included in a block, identified by the block number. This method sheds light on the blockchain's branching behavior and the role of uncle blocks in enhancing network security.", + "method": "POST", + "path": "/:chain/:apiKey", + "pathParams": [ { - "name": "logIndex", - "type": "string", - "description": "Integer of the log's index position in the block.", - "example": "0x1" + "name": "chain", + "type": "string", + "required": true, + "description": "The blockchain to interact with.", + "example": "eth", + "enum": [ + "eth", + "holesky", + "polygon", + "amoy", + "bsc", + "bsc testnet", + "arbitrum", + "arbitrum sepolia", + "optimism", + "optimism testnet", + "base", + "base sepolia" + ] }, { - "name": "removed", - "type": "boolean", - "description": "Indicates if the log was removed due to a chain reorganization.", - "example": false + "name": "apiKey", + "type": "string", + "required": true, + "description": "Your API key for authentication.", + "example": "YOUR_API_KEY" } - ] - }, - "description": "Array of log entry objects." - } - } - ], - "codeSamples": [] - }, - "eth_getProof": { - "apiHost": "https://site1.moralis-nodes.com", - "summary": "Get Merkle Proof for Account and Storage", - "description": "Returns the account and storage values of the specified account address, as well as the Merkle-proof. This allows verification of account and storage data within the current state without needing the entire state.", - "method": "POST", - "path": "/:chain/:apiKey", - "pathParams": [ - { - "name": "chain", - "type": "string", - "required": true, - "description": "The blockchain to interact with.", - "example": "eth", - "enum": [ - "eth", - "holesky", - "polygon", - "amoy", - "bsc", - "bsc testnet", - "arbitrum", - "arbitrum sepolia", - "optimism", - "optimism testnet", - "base", - "base sepolia" - ] - }, - { - "name": "apiKey", - "type": "string", - "required": true, - "description": "Your API key for authentication.", - "example": "YOUR_API_KEY" - } - ], - "queryParams": [], - "bodyParam": { - "required": true, - "description": "The request payload for retrieving the proof.", - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "JSON-RPC version (typically 2.0).", - "example": "2.0" - }, - { - "name": "id", - "type": "number", - "required": true, - "description": "The request identifier.", - "example": 1 - }, - { - "name": "method", - "type": "string", - "required": true, - "description": "The JSON-RPC method being invoked.", - "example": "eth_getProof" - }, - { - "name": "params", - "type": "rpcArray", - "required": true, - "description": "Parameters for the proof request, including the address, storage keys as an array, and the block number.", - "example": [ - "0x1234567890123456789012345678901234567890", - [ - "0x0000000000000000000000000000000000000000000000000000000000000000" - ], - "latest" - ] - } - ] - }, - "responses": [ - { - "status": "200", - "description": "Returns the requested proof data.", - "body": { - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "JSON-RPC version (typically 2.0).", - "example": "2.0" - }, - { - "name": "id", - "type": "number", + ], + "queryParams": [], + "bodyParam": { "required": true, - "description": "The request identifier.", - "example": 1 - }, - { - "name": "result", + "description": "The request payload for retrieving the number of uncles by block number.", "type": "object", - "required": true, - "description": "Contains the account proof, balance, code hash, nonce, storage hash, and storage proof.", "fields": [ - { - "name": "accountProof", - "type": "array", - "description": "Array of hashes used to generate the Merkle proof.", - "field": { - "type": "string", - "description": "Individual hash part of the Merkle proof.", - "example": "0x..." - } - }, - { - "name": "balance", - "type": "string", - "description": "The balance of the account in wei.", - "example": "0x1bc16d674ec80000" - }, - { - "name": "codeHash", - "type": "string", - "description": "Hash of the code of the account.", - "example": "0x..." - }, - { - "name": "nonce", - "type": "string", - "description": "The nonce of the account.", - "example": "0x0" - }, - { - "name": "storageHash", - "type": "string", - "description": "Hash of the storage root.", - "example": "0x..." - }, - { - "name": "storageProof", - "type": "array", - "description": "Proofs for each requested storage key.", - "field": { - "type": "object", - "fields": [ - { - "name": "key", - "type": "string", - "description": "The requested storage key.", - "example": "0x..." - }, - { - "name": "value", - "type": "string", - "description": "The value associated with the storage key.", - "example": "0x..." - } - ] + { + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "JSON-RPC version (typically 2.0).", + "example": "2.0" + }, + { + "name": "id", + "type": "number", + "required": true, + "description": "The request identifier.", + "example": 1 + }, + { + "name": "method", + "type": "string", + "required": true, + "description": "The JSON-RPC method being invoked.", + "example": "eth_getUncleCountByBlockNumber" + }, + { + "name": "params", + "type": "rpcArray", + "required": true, + "description": "Parameters for the method, including the block number. The block number can be specified as a hexadecimal value or using the tags 'latest', 'earliest', or 'pending'.", + "example": ["latest"] } - } ] - } - ] - } - } - ], - "codeSamples": [] - }, - "eth_getStorageAt": { - "apiHost": "https://site1.moralis-nodes.com", - "summary": "Get Storage At Address", - "description": "Returns the value from a storage position at a given address. This method can be used to inspect the storage of smart contracts at specific slots.", - "method": "POST", - "path": "/:chain/:apiKey", - "pathParams": [ - { - "name": "chain", - "type": "string", - "required": true, - "description": "The blockchain to interact with.", - "example": "eth", - "enum": [ - "eth", - "holesky", - "polygon", - "amoy", - "bsc", - "bsc testnet", - "arbitrum", - "arbitrum sepolia", - "optimism", - "optimism testnet", - "base", - "base sepolia" - ] - }, - { - "name": "apiKey", - "type": "string", - "required": true, - "description": "Your API key for authentication.", - "example": "YOUR_API_KEY" - } - ], - "queryParams": [], - "bodyParam": { - "required": true, - "description": "The request payload for querying storage at a specific address and slot.", - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "JSON-RPC version (typically 2.0).", - "example": "2.0" - }, - { - "name": "id", - "type": "number", - "required": true, - "description": "The request identifier.", - "example": 1 - }, - { - "name": "method", - "type": "string", - "required": true, - "description": "The JSON-RPC method being invoked.", - "example": "eth_getStorageAt" - }, - { - "name": "params", - "type": "rpcArray", - "required": true, - "description": "Parameters for the storage query, including the address of the account, the index of the storage slot, and the block number to query against.", - "example": [ - "0x407d73d8a49eeb85d32cf465507dd71d507100c1", - "0x0", - "latest" - ] - } - ] - }, - "responses": [ - { - "status": "200", - "description": "Returns the value from the specified storage slot of the contract.", - "body": { - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "JSON-RPC version (typically 2.0).", - "example": "2.0" - }, - { - "name": "id", - "type": "number", - "required": true, - "description": "The request identifier.", - "example": 1 - }, - { - "name": "result", - "type": "string", - "required": true, - "description": "The data stored at the requested storage slot, in hexadecimal format.", - "example": "0x..." - } - ] - } - } - ], - "codeSamples": [] - }, - "eth_getTransactionByHash": { - "apiHost": "https://site1.moralis-nodes.com", - "summary": "Get Transaction by Hash", - "description": "Retrieves a transaction by its hash. This method provides detailed information about the transaction, including the sender, receiver, gas used, and whether the transaction has been confirmed in a block.", - "method": "POST", - "path": "/:chain/:apiKey", - "pathParams": [ - { - "name": "chain", - "type": "string", - "required": true, - "description": "The blockchain to interact with.", - "example": "eth", - "enum": [ - "eth", - "holesky", - "polygon", - "amoy", - "bsc", - "bsc testnet", - "arbitrum", - "arbitrum sepolia", - "optimism", - "optimism testnet", - "base", - "base sepolia" - ] + }, + "responses": [ + { + "status": "200", + "description": "Returns the number of uncle blocks included in the specified block.", + "body": { + "type": "object", + "fields": [ + { + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "JSON-RPC version (typically 2.0).", + "example": "2.0" + }, + { + "name": "id", + "type": "number", + "required": true, + "description": "The request identifier.", + "example": 1 + }, + { + "name": "result", + "type": "string", + "required": true, + "description": "The number of uncle blocks included in the block, represented as a hexadecimal value.", + "example": "0x2" + } + ] + } + } + ], + "codeSamples": [] }, - { - "name": "apiKey", - "type": "string", - "required": true, - "description": "Your API key for authentication.", - "example": "YOUR_API_KEY" - } - ], - "queryParams": [], - "bodyParam": { - "required": true, - "description": "The request payload for retrieving a transaction by its hash.", - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "JSON-RPC version (typically 2.0).", - "example": "2.0" - }, - { - "name": "id", - "type": "number", - "required": true, - "description": "The request identifier.", - "example": 1 - }, - { - "name": "method", - "type": "string", - "required": true, - "description": "The JSON-RPC method being invoked.", - "example": "eth_getTransactionByHash" - }, - { - "name": "params", - "type": "rpcArray", - "required": true, - "description": "Parameters for the transaction query, including the transaction hash.", - "example": [ - "0xd4b2e80202cc55517c328412a7792772e1bdd925ac1a2120aeafe84316206ad3" - ] - } - ] - }, - "responses": [ - { - "status": "200", - "description": "Returns the specified transaction details.", - "body": { - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "JSON-RPC version (typically 2.0).", - "example": "2.0" - }, - { - "name": "id", - "type": "number", - "required": true, - "description": "The request identifier.", - "example": 1 - }, - { - "name": "result", - "type": "object", - "required": true, - "description": "The transaction object, including details such as `from`, `to`, `gas`, `gasPrice`, `nonce`, `value`, `data`, `hash`, and, if applicable, `blockHash`, `blockNumber`, and `transactionIndex`.", - "fields": [ - { - "name": "blockHash", - "type": "string", - "description": "Hash of the block where this transaction was in. null when its pending.", - "example": "0x..." - }, - { - "name": "blockNumber", - "type": "string", - "description": "Block number where this transaction was in. null when its pending.", - "example": "0x..." - }, - { - "name": "from", + "eth_maxPriorityFeePerGas": { + "apiHost": "https://site1.moralis-nodes.com", + "summary": "Get Max Priority Fee Per Gas", + "description": "Returns the maximum priority fee per gas a user is willing to pay on top of the base fee. This fee is used to expedite the transaction's inclusion in a block by compensating miners, especially during times of high network demand.", + "method": "POST", + "path": "/:chain/:apiKey", + "pathParams": [ + { + "name": "chain", "type": "string", - "description": "Address of the sender.", - "example": "0x..." - }, - { - "name": "to", + "required": true, + "description": "The blockchain to interact with.", + "example": "eth", + "enum": [ + "eth", + "holesky", + "polygon", + "amoy", + "bsc", + "bsc testnet", + "arbitrum", + "arbitrum sepolia", + "optimism", + "optimism testnet", + "base", + "base sepolia" + ] + }, + { + "name": "apiKey", "type": "string", - "description": "Address of the receiver. null when its a contract creation transaction.", - "example": "0x..." - } - ] - } - ] - } - } - ], - "codeSamples": [] - }, - "eth_getTransactionByBlockHashAndIndex": { - "apiHost": "https://site1.moralis-nodes.com", - "summary": "Get Transaction by Block Hash and Index", - "description": "Retrieves a single transaction by its block hash and index position within the block. This allows for precise querying of transactions when the block hash and transaction's index are known.", - "method": "POST", - "path": "/:chain/:apiKey", - "pathParams": [ - { - "name": "chain", - "type": "string", - "required": true, - "description": "The blockchain to interact with.", - "example": "eth", - "enum": [ - "eth", - "holesky", - "polygon", - "amoy", - "bsc", - "bsc testnet", - "arbitrum", - "arbitrum sepolia", - "optimism", - "optimism testnet", - "base", - "base sepolia" - ] - }, - { - "name": "apiKey", - "type": "string", - "required": true, - "description": "Your API key for authentication.", - "example": "YOUR_API_KEY" - } - ], - "queryParams": [], - "bodyParam": { - "required": true, - "description": "The request payload for retrieving a transaction by block hash and transaction index.", - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "JSON-RPC version (typically 2.0).", - "example": "2.0" - }, - { - "name": "id", - "type": "number", - "required": true, - "description": "The request identifier.", - "example": 1 - }, - { - "name": "method", - "type": "string", - "required": true, - "description": "The JSON-RPC method being invoked.", - "example": "eth_getTransactionByBlockHashAndIndex" - }, - { - "name": "params", - "type": "rpcArray", - "required": true, - "description": "Parameters for the method, including the block hash and the transaction index.", - "example": [ - "0x18173058d45f8aa984181fdfbfece01a93a971ea63e008231b2e15f151e0903f", - "0x0" - ] - } - ] - }, - "responses": [ - { - "status": "200", - "description": "Returns the transaction at the specified index in the given block.", - "body": { - "type": "object", - "fields": [ - { - "name": "blockHash", - "type": "string", - "description": "Hash of the block where this transaction was included.", - "example": "0x18173058d45f8aa984181fdfbfece01a93a971ea63e008231b2e15f151e0903f" - }, - { - "name": "blockNumber", - "type": "string", - "description": "Block number where this transaction was included.", - "example": "0x12b39a9" - }, - { - "name": "from", - "type": "string", - "description": "Address of the sender.", - "example": "0xbb936e46099df268a2c6537299b75cf3609a0541" - }, - { - "name": "gas", - "type": "string", - "description": "Gas provided by the sender.", - "example": "0x2bace" - }, - { - "name": "gasPrice", - "type": "string", - "description": "Gas price provided by the sender in wei.", - "example": "0x3bb9d4fcb" - }, - { - "name": "maxPriorityFeePerGas", - "type": "string", - "description": "Maximum priority fee per gas provided by the sender in wei.", - "example": "0x4c4b40" - }, - { - "name": "maxFeePerGas", - "type": "string", - "description": "Maximum fee per gas provided by the sender in wei.", - "example": "0x5666e04ce" - }, - { - "name": "hash", - "type": "string", - "description": "Hash of the transaction.", - "example": "0x6e760d4b659e9c68b943829b0f4adaa07f3e3c043ee8d4f4787045909ba63090" - }, - { - "name": "input", - "type": "string", - "description": "Data sent along with the transaction.", - "example": "0xa76dfc3b..." - }, - { - "name": "nonce", - "type": "string", - "description": "Number of transactions made by the sender prior to this one.", - "example": "0x1b00" - }, - { - "name": "to", - "type": "string", - "description": "Address of the receiver. Null when it's a contract creation transaction.", - "example": "0x111111125421ca6dc452d289314280a0f8842a65" - }, - { - "name": "transactionIndex", - "type": "string", - "description": "Integer of the transaction's index position in the block.", - "example": "0x0" - }, - { - "name": "value", - "type": "string", - "description": "Value transferred in wei.", - "example": "0x214e8348c4f0000" - }, - { - "name": "type", - "type": "string", - "description": "EIP-2718 type of the transaction.", - "example": "0x2" - }, - { - "name": "accessList", - "type": "array", - "description": "EIP-2930 access list.", - "field": { - "type": "object", - "fields": [] - } - }, - { - "name": "chainId", - "type": "string", - "description": "Chain ID of the transaction.", - "example": "0x1" - }, - { - "name": "v", - "type": "string", - "description": "ECDSA recovery id.", - "example": "0x1" - }, - { - "name": "r", - "type": "string", - "description": "ECDSA signature r.", - "example": "0xf611431e6b44cbc02c4278915d979c9034b6d37b139b8c55ae428abbe9d52d4b" - }, - { - "name": "s", - "type": "string", - "description": "ECDSA signature s.", - "example": "0x1bc0fcf547e60d54daf313f840db039c3c1904c5b9724b9d7a8ec1f2abb46b53" - } - ], - "description": "Details of the transaction at the specified index in the given block." - } - } - ], - "codeSamples": [] - }, - "eth_getTransactionByBlockNumberAndIndex": { - "apiHost": "https://site1.moralis-nodes.com", - "summary": "Get Transaction by Block Number and Index", - "description": "Retrieves a specific transaction by its block number (which can be specified as a hexadecimal or as one of the special strings 'latest', 'earliest', 'pending') and its index position within the block.", - "method": "POST", - "path": "/:chain/:apiKey", - "pathParams": [ - { - "name": "chain", - "type": "string", - "required": true, - "description": "The blockchain to interact with.", - "example": "eth", - "enum": [ - "eth", - "holesky", - "polygon", - "amoy", - "bsc", - "bsc testnet", - "arbitrum", - "arbitrum sepolia", - "optimism", - "optimism testnet", - "base", - "base sepolia" - ] - }, - { - "name": "apiKey", - "type": "string", - "required": true, - "description": "Your API key for authentication.", - "example": "YOUR_API_KEY" - } - ], - "queryParams": [], - "bodyParam": { - "required": true, - "description": "The request payload for retrieving a transaction by block number and transaction index.", - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "JSON-RPC version (typically 2.0).", - "example": "2.0" - }, - { - "name": "id", - "type": "number", - "required": true, - "description": "The request identifier.", - "example": 1 - }, - { - "name": "method", - "type": "string", - "required": true, - "description": "The JSON-RPC method being invoked.", - "example": "eth_getTransactionByBlockNumberAndIndex" - }, - { - "name": "params", - "type": "rpcArray", - "required": true, - "description": "Parameters for the method, including the block number and the transaction index.", - "example": ["latest", "0x0"] - } - ] - }, - "responses": [ - { - "status": "200", - "description": "Returns the transaction at the specified index in the given block.", - "body": { - "type": "object", - "fields": [ - { - "name": "blockHash", - "type": "string", - "description": "Hash of the block where this transaction was included.", - "example": "0x18173058d45f8aa984181fdfbfece01a93a971ea63e008231b2e15f151e0903f" - }, - { - "name": "blockNumber", - "type": "string", - "description": "Block number where this transaction was included.", - "example": "0x12b39a9" - }, - { - "name": "from", - "type": "string", - "description": "Address of the sender.", - "example": "0xbb936e46099df268a2c6537299b75cf3609a0541" - }, - { - "name": "gas", - "type": "string", - "description": "Gas provided by the sender.", - "example": "0x2bace" - }, - { - "name": "gasPrice", - "type": "string", - "description": "Gas price provided by the sender in wei.", - "example": "0x3bb9d4fcb" - }, - { - "name": "maxPriorityFeePerGas", - "type": "string", - "description": "Maximum priority fee per gas provided by the sender in wei.", - "example": "0x4c4b40" - }, - { - "name": "maxFeePerGas", - "type": "string", - "description": "Maximum fee per gas provided by the sender in wei.", - "example": "0x5666e04ce" - }, - { - "name": "hash", - "type": "string", - "description": "Hash of the transaction.", - "example": "0x6e760d4b659e9c68b943829b0f4adaa07f3e3c043ee8d4f4787045909ba63090" - }, - { - "name": "input", - "type": "string", - "description": "Data sent along with the transaction.", - "example": "0xa76dfc3b..." - }, - { - "name": "nonce", - "type": "string", - "description": "Number of transactions made by the sender prior to this one.", - "example": "0x1b00" - }, - { - "name": "to", - "type": "string", - "description": "Address of the receiver. Null when it's a contract creation transaction.", - "example": "0x111111125421ca6dc452d289314280a0f8842a65" - }, - { - "name": "transactionIndex", - "type": "string", - "description": "Integer of the transaction's index position in the block.", - "example": "0x0" - }, - { - "name": "value", - "type": "string", - "description": "Value transferred in wei.", - "example": "0x214e8348c4f0000" - }, - { - "name": "type", - "type": "string", - "description": "EIP-2718 type of the transaction.", - "example": "0x2" - }, - { - "name": "accessList", - "type": "array", - "description": "EIP-2930 access list.", - "field": { - "type": "object", - "fields": [] - } - }, - { - "name": "chainId", - "type": "string", - "description": "Chain ID of the transaction.", - "example": "0x1" - }, - { - "name": "v", - "type": "string", - "description": "ECDSA recovery id.", - "example": "0x1" - }, - { - "name": "r", - "type": "string", - "description": "ECDSA signature r.", - "example": "0xf611431e6b44cbc02c4278915d979c9034b6d37b139b8c55ae428abbe9d52d4b" - }, - { - "name": "s", - "type": "string", - "description": "ECDSA signature s.", - "example": "0x1bc0fcf547e60d54daf313f840db039c3c1904c5b9724b9d7a8ec1f2abb46b53" - } - ], - "description": "Details of the transaction at the specified index in the given block." - } - } - ], - "codeSamples": [] - }, - "eth_getTransactionCount": { - "apiHost": "https://site1.moralis-nodes.com", - "summary": "Get Transaction Count", - "description": "Retrieves the number of transactions sent from the specified address. This includes all transactions up to the specified block number, allowing for nonce determination for new transactions.", - "method": "POST", - "path": "/:chain/:apiKey", - "pathParams": [ - { - "name": "chain", - "type": "string", - "required": true, - "description": "The blockchain to interact with.", - "example": "eth", - "enum": [ - "eth", - "holesky", - "polygon", - "amoy", - "bsc", - "bsc testnet", - "arbitrum", - "arbitrum sepolia", - "optimism", - "optimism testnet", - "base", - "base sepolia" - ] - }, - { - "name": "apiKey", - "type": "string", - "required": true, - "description": "Your API key for authentication.", - "example": "YOUR_API_KEY" - } - ], - "queryParams": [], - "bodyParam": { - "required": true, - "description": "The request payload for retrieving the transaction count (nonce) for an address.", - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "JSON-RPC version (typically 2.0).", - "example": "2.0" - }, - { - "name": "id", - "type": "number", - "required": true, - "description": "The request identifier.", - "example": 1 - }, - { - "name": "method", - "type": "string", - "required": true, - "description": "The JSON-RPC method being invoked.", - "example": "eth_getTransactionCount" - }, - { - "name": "params", - "type": "rpcArray", - "required": true, - "description": "Parameters for the method, including the address to query and the block number ('latest', 'earliest', 'pending').", - "example": ["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"] - } - ] - }, - "responses": [ - { - "status": "200", - "description": "Returns the number of transactions sent from the specified address, as a hexadecimal.", - "body": { - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "JSON-RPC version (typically 2.0).", - "example": "2.0" - }, - { - "name": "id", - "type": "number", - "required": true, - "description": "The request identifier.", - "example": 1 - }, - { - "name": "result", - "type": "string", - "required": true, - "description": "The number of transactions sent from the address, represented as a hexadecimal value.", - "example": "0x15" - } - ] - } - } - ], - "codeSamples": [] - }, - "eth_getTransactionReceipt": { - "apiHost": "https://site1.moralis-nodes.com", - "summary": "Get Transaction Receipt", - "description": "Retrieves the receipt of a transaction by its hash. Transaction receipts contain details about the transaction's execution, including the status (success or failure), gas used, and event logs.", - "method": "POST", - "path": "/:chain/:apiKey", - "pathParams": [ - { - "name": "chain", - "type": "string", - "required": true, - "description": "The blockchain to interact with.", - "example": "eth", - "enum": [ - "eth", - "holesky", - "polygon", - "amoy", - "bsc", - "bsc testnet", - "arbitrum", - "arbitrum sepolia", - "optimism", - "optimism testnet", - "base", - "base sepolia" - ] - }, - { - "name": "apiKey", - "type": "string", - "required": true, - "description": "Your API key for authentication.", - "example": "YOUR_API_KEY" - } - ], - "queryParams": [], - "bodyParam": { - "required": true, - "description": "The request payload for retrieving a transaction receipt.", - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "JSON-RPC version (typically 2.0).", - "example": "2.0" - }, - { - "name": "id", - "type": "number", - "required": true, - "description": "The request identifier.", - "example": 1 - }, - { - "name": "method", - "type": "string", - "required": true, - "description": "The JSON-RPC method being invoked.", - "example": "eth_getTransactionReceipt" - }, - { - "name": "params", - "type": "rpcArray", - "required": true, - "description": "Parameters for the method, including the transaction hash.", - "example": [ - "0xd4b2e80202cc55517c328412a7792772e1bdd925ac1a2120aeafe84316206ad3" - ] - } - ] - }, - "responses": [ - { - "status": "200", - "description": "Returns the transaction at the specified index in the given block.", - "body": { - "type": "object", - "fields": [ - { - "name": "blockHash", - "type": "string", - "description": "Hash of the block where this transaction was included.", - "example": "0x18173058d45f8aa984181fdfbfece01a93a971ea63e008231b2e15f151e0903f" - }, - { - "name": "blockNumber", - "type": "string", - "description": "Block number where this transaction was included.", - "example": "0x12b39a9" - }, - { - "name": "from", - "type": "string", - "description": "Address of the sender.", - "example": "0xbb936e46099df268a2c6537299b75cf3609a0541" - }, - { - "name": "gas", - "type": "string", - "description": "Gas provided by the sender.", - "example": "0x2bace" - }, - { - "name": "gasPrice", - "type": "string", - "description": "Gas price provided by the sender in wei.", - "example": "0x3bb9d4fcb" - }, - { - "name": "maxPriorityFeePerGas", - "type": "string", - "description": "Maximum priority fee per gas provided by the sender in wei.", - "example": "0x4c4b40" - }, - { - "name": "maxFeePerGas", - "type": "string", - "description": "Maximum fee per gas provided by the sender in wei.", - "example": "0x5666e04ce" - }, - { - "name": "hash", - "type": "string", - "description": "Hash of the transaction.", - "example": "0x6e760d4b659e9c68b943829b0f4adaa07f3e3c043ee8d4f4787045909ba63090" - }, - { - "name": "input", - "type": "string", - "description": "Data sent along with the transaction.", - "example": "0xa76dfc3b..." - }, - { - "name": "nonce", - "type": "string", - "description": "Number of transactions made by the sender prior to this one.", - "example": "0x1b00" - }, - { - "name": "to", - "type": "string", - "description": "Address of the receiver. Null when it's a contract creation transaction.", - "example": "0x111111125421ca6dc452d289314280a0f8842a65" - }, - { - "name": "transactionIndex", - "type": "string", - "description": "Integer of the transaction's index position in the block.", - "example": "0x0" - }, - { - "name": "value", - "type": "string", - "description": "Value transferred in wei.", - "example": "0x214e8348c4f0000" - }, - { - "name": "type", - "type": "string", - "description": "EIP-2718 type of the transaction.", - "example": "0x2" - }, - { - "name": "accessList", - "type": "array", - "description": "EIP-2930 access list.", - "field": { - "type": "object", - "fields": [] - } - }, - { - "name": "chainId", - "type": "string", - "description": "Chain ID of the transaction.", - "example": "0x1" - }, - { - "name": "v", - "type": "string", - "description": "ECDSA recovery id.", - "example": "0x1" - }, - { - "name": "r", - "type": "string", - "description": "ECDSA signature r.", - "example": "0xf611431e6b44cbc02c4278915d979c9034b6d37b139b8c55ae428abbe9d52d4b" - }, - { - "name": "s", - "type": "string", - "description": "ECDSA signature s.", - "example": "0x1bc0fcf547e60d54daf313f840db039c3c1904c5b9724b9d7a8ec1f2abb46b53" - } - ], - "description": "Details of the transaction at the specified index in the given block." - } - } - ], - "codeSamples": [] - }, - "eth_getUncleByBlockHashAndIndex": { - "apiHost": "https://site1.moralis-nodes.com", - "summary": "Get Uncle by Block Hash and Index", - "description": "Retrieves details of an uncle block by specifying the hash of the parent block and the uncle's index position. This method is useful for examining the uncles of a given block, providing insights into block reorganizations and network security.", - "method": "POST", - "path": "/:chain/:apiKey", - "pathParams": [ - { - "name": "chain", - "type": "string", - "required": true, - "description": "The blockchain to interact with.", - "example": "eth", - "enum": [ - "eth", - "holesky", - "polygon", - "amoy", - "bsc", - "bsc testnet", - "arbitrum", - "arbitrum sepolia", - "optimism", - "optimism testnet", - "base", - "base sepolia" - ] - }, - { - "name": "apiKey", - "type": "string", - "required": true, - "description": "Your API key for authentication.", - "example": "YOUR_API_KEY" - } - ], - "queryParams": [], - "bodyParam": { - "required": true, - "description": "The request payload for retrieving an uncle by block hash and index.", - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "JSON-RPC version (typically 2.0).", - "example": "2.0" - }, - { - "name": "id", - "type": "number", - "required": true, - "description": "The request identifier.", - "example": 1 - }, - { - "name": "method", - "type": "string", - "required": true, - "description": "The JSON-RPC method being invoked.", - "example": "eth_getUncleByBlockHashAndIndex" - }, - { - "name": "params", - "type": "rpcArray", - "required": true, - "description": "Parameters for the method, including the block hash and the uncle's index.", - "example": [ - "0x18173058d45f8aa984181fdfbfece01a93a971ea63e008231b2e15f151e0903f", - "0x0" - ] - } - ] - }, - "responses": [ - { - "status": "200", - "description": "Returns the specified uncle block details.", - "body": { - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "JSON-RPC version (typically 2.0).", - "example": "2.0" - }, - { - "name": "id", - "type": "number", + "required": true, + "description": "Your API key for authentication.", + "example": "YOUR_API_KEY" + } + ], + "queryParams": [], + "bodyParam": { "required": true, - "description": "The request identifier.", - "example": 1 - }, - { - "name": "result", + "description": "The request payload for retrieving the maximum priority fee per gas.", "type": "object", - "required": true, - "description": "The uncle block object, including details such as `parentHash`, `sha3Uncles`, `miner`, `stateRoot`, `transactionsRoot`, `receiptsRoot`, `logsBloom`, `difficulty`, `number`, `gasLimit`, `gasUsed`, `timestamp`, and more.", - "fields": [] - } - ] - } - } - ], - "codeSamples": [] - }, - "eth_getUncleByBlockNumberAndIndex": { - "apiHost": "https://site1.moralis-nodes.com", - "summary": "Get Uncle by Block Number and Index", - "description": "Retrieves details of an uncle block by specifying the block number (which can be a hexadecimal value or one of the special strings 'latest', 'earliest', 'pending') and the uncle's index position within the uncle list of the block.", - "method": "POST", - "path": "/:chain/:apiKey", - "pathParams": [ - { - "name": "chain", - "type": "string", - "required": true, - "description": "The blockchain to interact with.", - "example": "eth", - "enum": [ - "eth", - "holesky", - "polygon", - "amoy", - "bsc", - "bsc testnet", - "arbitrum", - "arbitrum sepolia", - "optimism", - "optimism testnet", - "base", - "base sepolia" - ] + "fields": [ + { + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "JSON-RPC version (typically 2.0).", + "example": "2.0" + }, + { + "name": "id", + "type": "number", + "required": true, + "description": "The request identifier.", + "example": 1 + }, + { + "name": "method", + "type": "string", + "required": true, + "description": "The JSON-RPC method being invoked.", + "example": "eth_maxPriorityFeePerGas" + }, + { + "name": "params", + "type": "rpcArray", + "required": false, + "description": "No parameters are needed for this call.", + "example": [] + } + ] + }, + "responses": [ + { + "status": "200", + "description": "Returns the maximum priority fee per gas.", + "body": { + "type": "object", + "fields": [ + { + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "JSON-RPC version (typically 2.0).", + "example": "2.0" + }, + { + "name": "id", + "type": "number", + "required": true, + "description": "The request identifier.", + "example": 1 + }, + { + "name": "result", + "type": "string", + "required": true, + "description": "The maximum priority fee per gas, in wei, represented as a hexadecimal value.", + "example": "0x3B9ACA00" + } + ] + } + } + ], + "codeSamples": [] }, - { - "name": "apiKey", - "type": "string", - "required": true, - "description": "Your API key for authentication.", - "example": "YOUR_API_KEY" - } - ], - "queryParams": [], - "bodyParam": { - "required": true, - "description": "The request payload for retrieving an uncle by block number and index.", - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "JSON-RPC version (typically 2.0).", - "example": "2.0" - }, - { - "name": "id", - "type": "number", - "required": true, - "description": "The request identifier.", - "example": 1 - }, - { - "name": "method", - "type": "string", - "required": true, - "description": "The JSON-RPC method being invoked.", - "example": "eth_getUncleByBlockNumberAndIndex" - }, - { - "name": "params", - "type": "rpcArray", - "required": true, - "description": "Parameters for the method, including the block number and the uncle's index.", - "example": ["latest", "0x0"] - } - ] - }, - "responses": [ - { - "status": "200", - "description": "Returns the specified uncle block details.", - "body": { - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "JSON-RPC version (typically 2.0).", - "example": "2.0" - }, - { - "name": "id", - "type": "number", + "eth_sendRawTransaction": { + "apiHost": "https://site1.moralis-nodes.com", + "summary": "Send Raw Transaction", + "description": "Submits a pre-signed transaction to the network. This method is essential for executing transactions on the Ethereum blockchain, including transfers, contract interactions, and contract deployments. The transaction must be signed with the sender's private key before submission.", + "method": "POST", + "path": "/:chain/:apiKey", + "pathParams": [ + { + "name": "chain", + "type": "string", + "required": true, + "description": "The blockchain to interact with.", + "example": "eth", + "enum": [ + "eth", + "holesky", + "polygon", + "amoy", + "bsc", + "bsc testnet", + "arbitrum", + "arbitrum sepolia", + "optimism", + "optimism testnet", + "base", + "base sepolia" + ] + }, + { + "name": "apiKey", + "type": "string", + "required": true, + "description": "Your API key for authentication.", + "example": "YOUR_API_KEY" + } + ], + "queryParams": [], + "bodyParam": { "required": true, - "description": "The request identifier.", - "example": 1 - }, - { - "name": "result", + "description": "The request payload for submitting a raw, pre-signed transaction.", "type": "object", - "required": true, - "description": "The uncle block object, including details such as `parentHash`, `sha3Uncles`, `miner`, `stateRoot`, `transactionsRoot`, `receiptsRoot`, `logsBloom`, `difficulty`, `number`, `gasLimit`, `gasUsed`, `timestamp`, and other relevant block information.", - "fields": [] - } - ] - } - } - ], - "codeSamples": [] - }, - "eth_getUncleCountByBlockHash": { - "apiHost": "https://site1.moralis-nodes.com", - "summary": "Get Uncle Count by Block Hash", - "description": "Returns the number of uncle blocks included in a block, identified by the block hash. This method provides insights into the block's contributions to the network security and the overall branching behavior of the blockchain.", - "method": "POST", - "path": "/:chain/:apiKey", - "pathParams": [ - { - "name": "chain", - "type": "string", - "required": true, - "description": "The blockchain to interact with.", - "example": "eth", - "enum": [ - "eth", - "holesky", - "polygon", - "amoy", - "bsc", - "bsc testnet", - "arbitrum", - "arbitrum sepolia", - "optimism", - "optimism testnet", - "base", - "base sepolia" - ] - }, - { - "name": "apiKey", - "type": "string", - "required": true, - "description": "Your API key for authentication.", - "example": "YOUR_API_KEY" - } - ], - "queryParams": [], - "bodyParam": { - "required": true, - "description": "The request payload for retrieving the number of uncles by block hash.", - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "JSON-RPC version (typically 2.0).", - "example": "2.0" - }, - { - "name": "id", - "type": "number", - "required": true, - "description": "The request identifier.", - "example": 1 - }, - { - "name": "method", - "type": "string", - "required": true, - "description": "The JSON-RPC method being invoked.", - "example": "eth_getUncleCountByBlockHash" - }, - { - "name": "params", - "type": "rpcArray", - "required": true, - "description": "Parameters for the method, including the block hash.", - "example": [ - "0x18173058d45f8aa984181fdfbfece01a93a971ea63e008231b2e15f151e0903f" - ] - } - ] - }, - "responses": [ - { - "status": "200", - "description": "Returns the number of uncle blocks included in the specified block.", - "body": { - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "JSON-RPC version (typically 2.0).", - "example": "2.0" - }, - { - "name": "id", - "type": "number", - "required": true, - "description": "The request identifier.", - "example": 1 - }, - { - "name": "result", - "type": "string", - "required": true, - "description": "The number of uncle blocks included in the block, represented as a hexadecimal value.", - "example": "0x1" - } - ] - } - } - ], - "codeSamples": [] - }, - "eth_getUncleCountByBlockNumber": { - "apiHost": "https://site1.moralis-nodes.com", - "summary": "Get Uncle Count by Block Number", - "description": "Returns the number of uncle blocks included in a block, identified by the block number. This method sheds light on the blockchain's branching behavior and the role of uncle blocks in enhancing network security.", - "method": "POST", - "path": "/:chain/:apiKey", - "pathParams": [ - { - "name": "chain", - "type": "string", - "required": true, - "description": "The blockchain to interact with.", - "example": "eth", - "enum": [ - "eth", - "holesky", - "polygon", - "amoy", - "bsc", - "bsc testnet", - "arbitrum", - "arbitrum sepolia", - "optimism", - "optimism testnet", - "base", - "base sepolia" - ] - }, - { - "name": "apiKey", - "type": "string", - "required": true, - "description": "Your API key for authentication.", - "example": "YOUR_API_KEY" - } - ], - "queryParams": [], - "bodyParam": { - "required": true, - "description": "The request payload for retrieving the number of uncles by block number.", - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "JSON-RPC version (typically 2.0).", - "example": "2.0" - }, - { - "name": "id", - "type": "number", - "required": true, - "description": "The request identifier.", - "example": 1 - }, - { - "name": "method", - "type": "string", - "required": true, - "description": "The JSON-RPC method being invoked.", - "example": "eth_getUncleCountByBlockNumber" - }, - { - "name": "params", - "type": "rpcArray", - "required": true, - "description": "Parameters for the method, including the block number. The block number can be specified as a hexadecimal value or using the tags 'latest', 'earliest', or 'pending'.", - "example": ["latest"] - } - ] - }, - "responses": [ - { - "status": "200", - "description": "Returns the number of uncle blocks included in the specified block.", - "body": { - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "JSON-RPC version (typically 2.0).", - "example": "2.0" - }, - { - "name": "id", - "type": "number", - "required": true, - "description": "The request identifier.", - "example": 1 - }, - { - "name": "result", - "type": "string", - "required": true, - "description": "The number of uncle blocks included in the block, represented as a hexadecimal value.", - "example": "0x2" - } - ] - } - } - ], - "codeSamples": [] - }, - "eth_maxPriorityFeePerGas": { - "apiHost": "https://site1.moralis-nodes.com", - "summary": "Get Max Priority Fee Per Gas", - "description": "Returns the maximum priority fee per gas a user is willing to pay on top of the base fee. This fee is used to expedite the transaction's inclusion in a block by compensating miners, especially during times of high network demand.", - "method": "POST", - "path": "/:chain/:apiKey", - "pathParams": [ - { - "name": "chain", - "type": "string", - "required": true, - "description": "The blockchain to interact with.", - "example": "eth", - "enum": [ - "eth", - "holesky", - "polygon", - "amoy", - "bsc", - "bsc testnet", - "arbitrum", - "arbitrum sepolia", - "optimism", - "optimism testnet", - "base", - "base sepolia" - ] - }, - { - "name": "apiKey", - "type": "string", - "required": true, - "description": "Your API key for authentication.", - "example": "YOUR_API_KEY" - } - ], - "queryParams": [], - "bodyParam": { - "required": true, - "description": "The request payload for retrieving the maximum priority fee per gas.", - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "JSON-RPC version (typically 2.0).", - "example": "2.0" - }, - { - "name": "id", - "type": "number", - "required": true, - "description": "The request identifier.", - "example": 1 - }, - { - "name": "method", - "type": "string", - "required": true, - "description": "The JSON-RPC method being invoked.", - "example": "eth_maxPriorityFeePerGas" - }, - { - "name": "params", - "type": "rpcArray", - "required": false, - "description": "No parameters are needed for this call.", - "example": [] - } - ] - }, - "responses": [ - { - "status": "200", - "description": "Returns the maximum priority fee per gas.", - "body": { - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "JSON-RPC version (typically 2.0).", - "example": "2.0" - }, - { - "name": "id", - "type": "number", - "required": true, - "description": "The request identifier.", - "example": 1 - }, - { - "name": "result", - "type": "string", - "required": true, - "description": "The maximum priority fee per gas, in wei, represented as a hexadecimal value.", - "example": "0x3B9ACA00" - } - ] - } - } - ], - "codeSamples": [] - }, - "eth_sendRawTransaction": { - "apiHost": "https://site1.moralis-nodes.com", - "summary": "Send Raw Transaction", - "description": "Submits a pre-signed transaction to the network. This method is essential for executing transactions on the Ethereum blockchain, including transfers, contract interactions, and contract deployments. The transaction must be signed with the sender's private key before submission.", - "method": "POST", - "path": "/:chain/:apiKey", - "pathParams": [ - { - "name": "chain", - "type": "string", - "required": true, - "description": "The blockchain to interact with.", - "example": "eth", - "enum": [ - "eth", - "holesky", - "polygon", - "amoy", - "bsc", - "bsc testnet", - "arbitrum", - "arbitrum sepolia", - "optimism", - "optimism testnet", - "base", - "base sepolia" - ] - }, - { - "name": "apiKey", - "type": "string", - "required": true, - "description": "Your API key for authentication.", - "example": "YOUR_API_KEY" - } - ], - "queryParams": [], - "bodyParam": { - "required": true, - "description": "The request payload for submitting a raw, pre-signed transaction.", - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "JSON-RPC version (typically 2.0).", - "example": "2.0" - }, - { - "name": "id", - "type": "number", - "required": true, - "description": "The request identifier.", - "example": 1 - }, - { - "name": "method", - "type": "string", - "required": true, - "description": "The JSON-RPC method being invoked.", - "example": "eth_sendRawTransaction" - }, - { - "name": "params", - "type": "rpcArray", - "required": true, - "description": "Parameters for the method, including the raw transaction data.", - "example": ["0xf904808000831cfde080..."] - } - ] - }, - "responses": [ - { - "status": "200", - "description": "Returns the hash of the transaction once it has been sent.", - "body": { - "type": "object", - "fields": [ - { - "name": "jsonrpc", - "type": "string", - "required": true, - "description": "JSON-RPC version (typically 2.0).", - "example": "2.0" - }, - { - "name": "id", - "type": "number", - "required": true, - "description": "The request identifier.", - "example": 1 - }, - { - "name": "result", - "type": "string", - "required": true, - "description": "The hash of the submitted transaction.", - "example": "0x..." - } - ] - } + "fields": [ + { + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "JSON-RPC version (typically 2.0).", + "example": "2.0" + }, + { + "name": "id", + "type": "number", + "required": true, + "description": "The request identifier.", + "example": 1 + }, + { + "name": "method", + "type": "string", + "required": true, + "description": "The JSON-RPC method being invoked.", + "example": "eth_sendRawTransaction" + }, + { + "name": "params", + "type": "rpcArray", + "required": true, + "description": "Parameters for the method, including the raw transaction data.", + "example": ["0xf904808000831cfde080..."] + } + ] + }, + "responses": [ + { + "status": "200", + "description": "Returns the hash of the transaction once it has been sent.", + "body": { + "type": "object", + "fields": [ + { + "name": "jsonrpc", + "type": "string", + "required": true, + "description": "JSON-RPC version (typically 2.0).", + "example": "2.0" + }, + { + "name": "id", + "type": "number", + "required": true, + "description": "The request identifier.", + "example": 1 + }, + { + "name": "result", + "type": "string", + "required": true, + "description": "The hash of the submitted transaction.", + "example": "0x..." + } + ] + } + } + ], + "codeSamples": [] } - ], - "codeSamples": [] } - } }