{
  "openapi": "3.0.1",
  "info": {
    "title": "GMGN Wallet Portfolio & PnL Tracker — Holdings & Profit",
    "description": "Track any wallet's complete portfolio across Solana, BSC, Ethereum, Base, Tron, Monad. Every token (current + past) with cost basis, realized/unrealized profit, holding period, transfer history, wallet tags. Plus per-period PnL (1d/7d/30d), native-token funding source. Zerion/DeBank alternative.",
    "version": "1.0",
    "x-build-id": "DKgy57b208HbR5Ifd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/logiover~gmgn-wallet-portfolio-pnl-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-logiover-gmgn-wallet-portfolio-pnl-tracker",
        "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/logiover~gmgn-wallet-portfolio-pnl-tracker/runs": {
      "post": {
        "operationId": "runs-sync-logiover-gmgn-wallet-portfolio-pnl-tracker",
        "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/logiover~gmgn-wallet-portfolio-pnl-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-logiover-gmgn-wallet-portfolio-pnl-tracker",
        "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",
        "required": [
          "wallets"
        ],
        "properties": {
          "wallets": {
            "title": "Wallets",
            "type": "array",
            "description": "List of wallets to track. Each entry: `{ chain, address }`. Up to 100 wallets per run. Chain: sol, bsc, eth, base, tron, monad."
          },
          "maxHoldingsPerWallet": {
            "title": "Max Holdings per Wallet",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "How many tokens per wallet to fetch. GMGN's pagination returns 50 per page — the actor follows the `next` cursor up to this cap.",
            "default": 200
          },
          "orderBy": {
            "title": "Holdings Order By",
            "enum": [
              "last_active_timestamp",
              "total_profit",
              "total_value",
              "balance",
              "buys",
              "sells"
            ],
            "type": "string",
            "description": "Field to sort by before truncation. Pick the metric that best matches your use case.",
            "default": "last_active_timestamp"
          },
          "direction": {
            "title": "Direction",
            "enum": [
              "desc",
              "asc"
            ],
            "type": "string",
            "description": "Sort direction. desc = highest first (default, matches the source UI). asc = lowest first — useful for hunting unfamiliar entries.",
            "default": "desc"
          },
          "hideSmall": {
            "title": "Hide Small Holdings",
            "type": "boolean",
            "description": "Drop dust positions (GMGN-defined threshold ~$0.1).",
            "default": false
          },
          "sellout": {
            "title": "Include Sold-Out Positions",
            "type": "boolean",
            "description": "Include tokens the wallet has fully sold (balance=0). Useful for full lifetime history.",
            "default": true
          },
          "hideAbnormal": {
            "title": "Hide Abnormal Tokens",
            "type": "boolean",
            "description": "Drop tokens flagged by GMGN as honeypots / blacklisted.",
            "default": false
          },
          "includeWalletSummary": {
            "title": "Include Wallet Summary",
            "type": "boolean",
            "description": "Emit one extra row per wallet with overall PnL, total value, winrate, balances per chain, tags, Twitter linked status.",
            "default": true
          },
          "includePnlPeriods": {
            "title": "Include PnL Periods (advanced)",
            "uniqueItems": true,
            "type": "array",
            "description": "Fetch per-period PnL detail rows from the auth-gated /person_wallets_pnl_info endpoint. NOTE: same period stats (pnl1d/7d/30d, realizedProfit1d/7d/30d, winrate1d/7d/30d, volume1d/7d/30d) are already returned in the wallet_summary row without this option. Leave empty unless you need the extra fields (token_num, total_profit_pnl).",
            "items": {
              "type": "string",
              "enum": [
                "1d",
                "7d",
                "30d"
              ],
              "enumTitles": [
                "1 day",
                "7 days",
                "30 days"
              ]
            },
            "default": []
          },
          "includeNativeTransfers": {
            "title": "Include Native Transfer Source",
            "type": "boolean",
            "description": "Fetch /native_transfer to find which wallet funded this one (key for insider / cluster detection).",
            "default": false
          },
          "minTotalValueUsd": {
            "title": "Minimum Total Value (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Drop rows whose total USD value is below this threshold. Default 0 = no filter.",
            "default": 0
          },
          "useProxy": {
            "title": "Use Apify Proxy",
            "type": "boolean",
            "description": "Route requests through Apify Proxy. Strongly recommended ON — residential proxy is the most reliable way to bypass Cloudflare rate limits.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Apify Proxy configuration. Residential proxy group is recommended for the highest success rate against Cloudflare.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "maxConcurrency": {
            "title": "Max Concurrent Requests",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum number of API calls running in parallel. Higher = faster runs but more chance of hitting rate limits. 3-5 is safe.",
            "default": 5
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}