Market Data API-Quote


  • Does the quote API give only best 5 buy/sell quantities ???


  • @Moderator_2 Hi, I was trying out WebSocket2 as suggested.
    I was successful in the first few attempts to and received ticks...
    but now I get "Attempting to resubscribe/reconnect (Attempt 1)..." and then I get "Connection closed due to max retry attempts reached." consistently.

    I logged out, rebooted the machine but still gets the same error.

    Code sample I am using is the websocket2 example from github.


  • Hi @SKExplorer

    Kindly find our Websocket streaming documentation below to fetch Best Twenty Buy/Sell Data under depth mode.
    "Section-3) Response Contract for 20-Depth Mode"
    Ref: https://smartapi.angelbroking.com/docs/WebSocket2

    Regards,
    SmartAPI team


  • @Moderator_2 so basically, rephrasing my question again, you dont provide level 3 data ??? thank you.


  • Hi @SKExplorer

    Market Data API can be hit multiple time with rate limiting to fetch more best 5 buy/sell data if required.

    Regards,
    SmartAPI team


  • @Moderator_2 my question was , does it give only best five ? not 20 ?


  • Hi @SKExplorer

    Please find the below document for market data API.
    https://smartapi.angelbroking.com/docs/MarketData
    On FULL Mode, you can fetch Best 5 quantities, Price and orders for Buy/Sell.

    Sample response for TCS28MAR24FUT
    {
    "status": true,
    "message": "SUCCESS",
    "errorcode": "",
    "data": {
    "fetched": [
    {
    "exchange": "NFO",
    "tradingSymbol": "TCS28MAR24FUT",
    "symbolToken": "66522",
    "ltp": 4229.6,
    "open": 4214.55,
    "high": 4250.9,
    "low": 4213.05,
    "close": 4210.75,
    "lastTradeQty": 175,
    "exchFeedTime": "13-Mar-2024 11:07:56",
    "exchTradeTime": "13-Mar-2024 11:07:44",
    "netChange": 18.85,
    "percentChange": 0.45,
    "avgPrice": 4231.26,
    "tradeVolume": 1149400,
    "opnInterest": 13371750,
    "lowerCircuit": 3789.7,
    "upperCircuit": 4631.85,
    "totBuyQuan": 83300,
    "totSellQuan": 141400,
    "52WeekLow": 0.0,
    "52WeekHigh": 4250.9,
    "depth": {
    "buy": [
    {
    "price": 4229.8,
    "quantity": 350,
    "orders": 1
    },
    {
    "price": 4229.75,
    "quantity": 175,
    "orders": 1
    },
    {
    "price": 4229.5,
    "quantity": 175,
    "orders": 1
    },
    {
    "price": 4229.15,
    "quantity": 175,
    "orders": 1
    },
    {
    "price": 4229.0,
    "quantity": 175,
    "orders": 1
    }
    ],
    "sell": [
    {
    "price": 4230.7,
    "quantity": 175,
    "orders": 1
    },
    {
    "price": 4230.75,
    "quantity": 175,
    "orders": 1
    },
    {
    "price": 4230.8,
    "quantity": 175,
    "orders": 1
    },
    {
    "price": 4230.85,
    "quantity": 700,
    "orders": 4
    },
    {
    "price": 4230.95,
    "quantity": 175,
    "orders": 1
    }
    ]
    }
    }
    ],
    "unfetched": []
    }
    }