> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orbscan.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Orbscan API Quickstart: Your First Request in 5 Minutes

> Make your first Orbscan API call in under 5 minutes. Fetch live trader activity by wallet address and inspect the full JSON response.

This guide gets you from zero to a live API response in under five minutes. You'll obtain an API key, call the trader activity endpoint with a real wallet address, and inspect the JSON response — giving you a working template you can adapt for any other Orbscan endpoint.

<Steps>
  <Step title="Get your API key">
    Every request to the Orbscan API requires a valid API key in the `Authorization` header. If you don't have one yet, follow the steps in the [Authentication](/authentication) guide to create an account and generate a key.

    Once you have your key, store it in an environment variable so you can reference it safely across requests:

    ```bash theme={null}
    export ORBSCAN_API_KEY='your_api_key_here'
    ```
  </Step>

  <Step title="Fetch trader activity">
    The trader activity endpoint returns paginated buy, sell, and redeem history for any Polymarket wallet. Send the request below — it fetches the 5 most recent actions for a real wallet address.

    <CodeGroup>
      ```bash curl theme={null}
      curl -X GET "https://orbscan.com/open-api/v1/trader/0x6a72f61820b26b1fe4d956e17b6dc2a1ea3033ee/activity?limit=5" \
        -H "Authorization: Bearer $ORBSCAN_API_KEY" \
        -H "Accept: application/json"
      ```

      ```python Python theme={null}
      import os
      import requests

      api_key = os.environ["ORBSCAN_API_KEY"]
      address = "0x6a72f61820b26b1fe4d956e17b6dc2a1ea3033ee"

      response = requests.get(
          f"https://orbscan.com/open-api/v1/trader/{address}/activity",
          params={"limit": 5},
          headers={
              "Authorization": f"Bearer {api_key}",
              "Accept": "application/json",
          },
      )

      data = response.json()
      print(data)
      ```
    </CodeGroup>
  </Step>

  <Step title="Inspect the response">
    A successful request returns a JSON object wrapped in the standard Orbscan response envelope. The `data.items` array contains the activity records, and `data.nextCursor` lets you page through the full history.

    ```json theme={null}
    {
      "success": true,
      "code": "0",
      "message": "success",
      "data": {
        "items": [
          {
            "time": 1782861128,
            "action": "Redeem",
            "recordType": "REDEEMS",
            "actionType": 1,
            "price": 100.0,
            "quantity": 5.0,
            "fee": 0.0,
            "grossValue": 5.0,
            "transferNetAmount": -5.0,
            "txHash": "0x71bf46c3089e2349a62ec6b93638522e8cc635a9836f1308ac7621ce1ecbb609",
            "marketId": "2707644",
            "marketTitle": "Will France win on 2026-06-30?",
            "positionSide": "Yes",
            "trader": "0x6a72f61820b26b1fe4d956e17b6dc2a1ea3033ee",
            "liquidityRole": null
          },
          {
            "time": 1782765956,
            "action": "Buy",
            "recordType": "SUMMARY",
            "actionType": 0,
            "price": 78.0,
            "quantity": 5.0,
            "fee": 0.02574,
            "grossValue": 3.9,
            "transferNetAmount": 5.0,
            "txHash": "0xbf15dbfb9d3b8b1f5210a582ca78deb73bf77372cb43d8e15edb323750461b1c",
            "marketId": "2707644",
            "marketTitle": "Will France win on 2026-06-30?",
            "positionSide": "Yes",
            "trader": "0x6a72f61820b26b1fe4d956e17b6dc2a1ea3033ee",
            "liquidityRole": "TAKER"
          }
        ],
        "nextCursor": "MTc4Mjc2NTk1Nnw4OTM3Mzk3NHwxNzR8MHhiZjE1..."
      }
    }
    ```

    Here are the key fields to understand in each activity record:

    | Field               | Description                                                                                                                  |
    | ------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
    | `time`              | Unix timestamp (seconds) of when the action occurred on-chain.                                                               |
    | `action`            | Human-readable action label: `Buy`, `Sell`, or `Redeem`.                                                                     |
    | `price`             | Price per share **in cents** (0–100). A value of `78.0` means 78¢ per share, not \$78.                                       |
    | `quantity`          | Number of outcome token shares involved in this action.                                                                      |
    | `transferNetAmount` | Net USDC moved: positive means USDC left your wallet (cost), negative means USDC returned to your wallet (proceeds).         |
    | `nextCursor`        | Opaque base64 string to pass as the `cursor` query parameter on your next request. `null` when you've reached the last page. |
  </Step>

  <Step title="Next steps">
    You've made your first successful Orbscan API call. Here's where to go next:

    <CardGroup cols={2}>
      <Card title="API Reference" icon="code" href="/api-reference/overview">
        Browse every available endpoint — trader activity, deposits & withdrawals, and per-transaction action details — with full parameter and response documentation.
      </Card>

      <Card title="Guides" icon="map" href="/guides/fetch-trader-profile">
        Follow step-by-step recipes for common tasks like building a leaderboard widget or tracking a wallet's full trading history.
      </Card>
    </CardGroup>
  </Step>
</Steps>
