Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs

    History and Market AI error AG8004

    Bugs
    1
    1
    3
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      Mohan 0 last edited by

      Quick question:
      We’re getting AG8004 – Invalid API Key for the Market Scanner APIs (Gainers/Losers, PCR, OI Buildup), even though our access token is valid and other APIs (orders, profile, etc.) are working fine.

      We are correctly passing the API Key (not the secret) in the header:

      X-PrivateKey: <API_KEY>

      Is there any separate activation, entitlement, or plan requirement for these scanner APIs? Are they disabled by default?

      Sample Market API cURL (masked) available if needed.

      curl --location 'https://apiconnect.angelone.in/rest/secure/angelbroking/marketData/v1/OIBuildup'
      --header 'Authorization: Bearer eyJhbGciOi...<MASKED>'
      --header 'Content-Type: application/json'
      --header 'Accept: application/json'
      --header 'X-UserType: USER'
      --header 'X-SourceID: WEB'
      --header 'X-ClientLocalIP: 1XX.0.0.1'
      --header 'X-ClientPublicIP: 1XX.0.0.1'
      --header 'X-MACAddress: 00:00:00:00:00:00'
      --header 'X-PrivateKey: XXXXXX'
      --data '{
      "datatype": "Long Built Up",
      "expirytype": "NEAR"
      }'

      1 Reply Last reply Reply Quote 0
      • First post
        Last post