{
  "openapi": "3.0.1",
  "info": {
    "title": "Crypto Wallet API: Token Balances, NFTs, DeFi and Prices",
    "description": "Crypto wallet and Web3 data from the Moralis API on your own key: token balances with USD prices, decoded wallet history, net worth, NFTs, DeFi positions, PnL, token prices, metadata and holders. Ethereum, Base, BNB Chain, Polygon, Arbitrum and Solana. Bring your own key.",
    "version": "0.1",
    "x-build-id": "mwto4uXUyy1LFfQJP"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~crypto-wallet-nft-defi-token-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-crypto-wallet-nft-defi-token-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/nabeelbaghoor~crypto-wallet-nft-defi-token-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-crypto-wallet-nft-defi-token-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/nabeelbaghoor~crypto-wallet-nft-defi-token-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-crypto-wallet-nft-defi-token-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "mode": {
            "title": "What to get",
            "enum": [
              "walletTokens",
              "walletHistory",
              "walletNetWorth",
              "walletNfts",
              "walletDefiPositions",
              "walletProfitability",
              "solanaPortfolio",
              "tokenPrice",
              "tokenMetadata",
              "tokenHolders",
              "nftMetadata"
            ],
            "type": "string",
            "description": "Wallet token balances lists every token a wallet holds with balance, USD price, USD value and 24 hour change. Wallet transaction history returns decoded transactions with category, summary and transfers. Wallet net worth sums a wallet's USD value across chains. NFTs by wallet lists NFTs with metadata. Wallet DeFi positions lists liquidity, lending and staking positions. Wallet profit and loss gives realized PnL per traded token. Solana wallet portfolio returns SOL, SPL tokens and NFTs in one call. Token price, Token metadata and Token holders read one token contract each. NFT metadata reads single NFTs. Every mode only reads.",
            "default": "walletTokens"
          },
          "chain": {
            "title": "Chain",
            "enum": [
              "eth",
              "base",
              "polygon",
              "bsc",
              "arbitrum",
              "optimism",
              "avalanche",
              "linea",
              "gnosis",
              "cronos",
              "chiliz",
              "ronin",
              "pulse",
              "flow",
              "sei",
              "monad",
              "robinhood",
              "sepolia",
              "solana"
            ],
            "type": "string",
            "description": "The blockchain to read. Solana works with Wallet token balances (no prices on Solana), NFTs by wallet, Solana wallet portfolio, Token price, Token metadata and NFT metadata; the other modes are EVM only. Wallet net worth uses the Net worth chains list instead.",
            "default": "eth"
          },
          "addresses": {
            "title": "Addresses",
            "type": "array",
            "description": "One per line, up to 100. Wallet modes: wallet addresses (0x... on EVM, base58 on Solana). Token modes: token contract addresses (Solana: token mint). NFT metadata: contract:tokenId on EVM, for example 0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d:1, or the NFT mint on Solana. Explorer URLs are trimmed to the address.",
            "items": {
              "type": "string"
            }
          },
          "chains": {
            "title": "Net worth chains",
            "type": "array",
            "description": "Wallet net worth only. The EVM chains to sum. Leave empty for the API's default set.",
            "items": {
              "type": "string",
              "enum": [
                "eth",
                "base",
                "polygon",
                "bsc",
                "arbitrum",
                "optimism",
                "avalanche",
                "linea",
                "gnosis",
                "cronos",
                "chiliz",
                "ronin",
                "pulse",
                "flow",
                "sei",
                "monad",
                "robinhood",
                "sepolia"
              ],
              "enumTitles": [
                "Ethereum",
                "Base",
                "Polygon",
                "BNB Smart Chain",
                "Arbitrum",
                "Optimism",
                "Avalanche C-Chain",
                "Linea",
                "Gnosis",
                "Cronos",
                "Chiliz",
                "Ronin",
                "PulseChain",
                "Flow EVM",
                "Sei",
                "Monad",
                "Robinhood Chain",
                "Sepolia testnet"
              ]
            }
          },
          "fromDate": {
            "title": "From date",
            "type": "string",
            "description": "Wallet transaction history only. First day to include, YYYY-MM-DD."
          },
          "toDate": {
            "title": "To date",
            "type": "string",
            "description": "Wallet transaction history only. Last day to include, YYYY-MM-DD."
          },
          "includeInternal": {
            "title": "Include internal transactions",
            "type": "boolean",
            "description": "Wallet transaction history only. Also return internal (contract to contract) transactions inside each transaction.",
            "default": false
          },
          "order": {
            "title": "Order",
            "enum": [
              "DESC",
              "ASC"
            ],
            "type": "string",
            "description": "Wallet transaction history and Token holders.",
            "default": "DESC"
          },
          "profitDays": {
            "title": "Profit timeframe",
            "enum": [
              "all",
              "7",
              "30",
              "60",
              "90"
            ],
            "type": "string",
            "description": "Wallet profit and loss only.",
            "default": "all"
          },
          "excludeSpam": {
            "title": "Exclude spam tokens and NFTs",
            "type": "boolean",
            "description": "Wallet token balances, Wallet net worth, NFTs by wallet and Solana wallet portfolio. Leave out contracts the API flags as possible spam.",
            "default": true
          },
          "excludeUnverified": {
            "title": "Exclude unverified contracts",
            "type": "boolean",
            "description": "Wallet token balances and Wallet net worth on EVM chains. Leave out tokens whose contract is not verified.",
            "default": false
          },
          "includeNftPrices": {
            "title": "Include NFT prices",
            "type": "boolean",
            "description": "NFTs by wallet and NFT metadata on EVM chains. Add last sale and floor price where the API has them.",
            "default": false
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "The most rows this run returns and charges for. Paging stops here.",
            "default": 100
          },
          "apiKey": {
            "title": "API key",
            "type": "string",
            "description": "Your Moralis API key, from the API Keys page of admin.moralis.com. Sent only to the Moralis API in the X-API-Key header, never logged. You can also set the DATA_API_KEY secret instead."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}