{
  "openapi": "3.0.1",
  "info": {
    "title": "Solana Wallet PnL & Smart-Money Profiler",
    "description": "Solana wallet PnL, win rate, holding times and a transparent smart-money score from raw on-chain data via your own RPC (Helius, Triton, QuickNode). No scraping. Errors are free.",
    "version": "1.0",
    "x-build-id": "y90OULqgEjtRyUhBS"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/metallic_pastry~solana-wallet-pnl-profiler/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-metallic_pastry-solana-wallet-pnl-profiler",
        "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/metallic_pastry~solana-wallet-pnl-profiler/runs": {
      "post": {
        "operationId": "runs-sync-metallic_pastry-solana-wallet-pnl-profiler",
        "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/metallic_pastry~solana-wallet-pnl-profiler/run-sync": {
      "post": {
        "operationId": "run-sync-metallic_pastry-solana-wallet-pnl-profiler",
        "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": "Wallet addresses",
            "minItems": 1,
            "maxItems": 1000,
            "type": "array",
            "description": "Solana wallet addresses (base58 public keys) to profile. Duplicates are removed. Invalid addresses produce an error item and are not charged.",
            "items": {
              "type": "string"
            }
          },
          "rpcUrl": {
            "title": "Solana RPC URL",
            "type": "string",
            "description": "Standard Solana JSON-RPC endpoint (HTTPS). Strongly recommended: your own Helius, Triton or QuickNode URL. Provider URLs usually embed an API key, so this field is stored encrypted. If left empty, the public endpoint https://api.mainnet-beta.solana.com is used; it allows roughly 1 getTransaction per second and is only suitable for a few wallets."
          },
          "lookbackDays": {
            "title": "Lookback (days)",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Analyze transactions from the last N days. Ignored when a start date is set.",
            "default": 30
          },
          "startDate": {
            "title": "Start date (optional)",
            "type": "string",
            "description": "Window start (UTC, inclusive). Overrides the lookback when set."
          },
          "endDate": {
            "title": "End date (optional)",
            "type": "string",
            "description": "Window end (UTC, inclusive end of day). Defaults to now."
          },
          "maxTransactionsPerWallet": {
            "title": "Max transactions per wallet",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Cap on successful transactions fetched per wallet (newest first). If a wallet has more inside the window, its result is marked truncated: true. When the public RPC endpoint is used this is limited to 50.",
            "default": 500
          },
          "maxRequestsPerSecond": {
            "title": "Max RPC requests per second",
            "minimum": 0.2,
            "maximum": 500,
            "type": "number",
            "description": "Upper bound for request rate (each call inside a JSON-RPC batch counts as one). The actor slows down automatically when the endpoint rate limits. Keep about 5 for the public endpoint; paid plans can go much higher.",
            "default": 5
          },
          "concurrency": {
            "title": "Concurrent RPC requests",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum number of HTTP requests in flight at the same time.",
            "default": 3
          },
          "useBatchRequests": {
            "title": "Use JSON-RPC batch requests",
            "type": "boolean",
            "description": "Send getTransaction calls in JSON-RPC batches. If the endpoint rejects batches, the actor falls back to single requests automatically.",
            "default": true
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Timeout for one HTTP request to the RPC endpoint.",
            "default": 30
          },
          "maxRetries": {
            "title": "Max retries per request",
            "minimum": 0,
            "maximum": 12,
            "type": "integer",
            "description": "Retries for HTTP 429/5xx, timeouts and JSON-RPC rate-limit errors (exponential backoff with jitter, Retry-After honored). A wallet whose data cannot be fetched after retries returns an error item and is not charged.",
            "default": 6
          },
          "maxWallets": {
            "title": "Max wallets per run",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Safety limit. Wallets beyond this number (after de-duplication) are not processed.",
            "default": 100
          },
          "minWinRate": {
            "title": "Smart money: minimum win rate",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "smartMoney is true only if the wallet's win rate (winning closed positions / closed positions) is at least this value (0-1).",
            "default": 0.55
          },
          "minRealizedPnlSol": {
            "title": "Smart money: minimum realized PnL (SOL, after fees)",
            "type": "number",
            "description": "smartMoney requires realized SOL PnL after network fees of at least this amount.",
            "default": 1
          },
          "minClosedPositions": {
            "title": "Smart money: minimum closed positions",
            "minimum": 0,
            "type": "integer",
            "description": "smartMoney requires at least this many closed (fully or partially sold) positions.",
            "default": 5
          },
          "includeTokenBreakdown": {
            "title": "Include per-token breakdown",
            "type": "boolean",
            "description": "Add a tokens[] array with per-token PnL ledgers (SOL- and USD-quoted).",
            "default": true
          },
          "includeTrades": {
            "title": "Include individual trades",
            "type": "boolean",
            "description": "Add tradeList[] (every classified swap) and tokenToTokenSwapList[] to each item. Makes items much larger.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}