pocketful logo light
pocketful logo light

Fetch Position Daywise

To retrieve the day’s positions, use the PositionDayWise API. This method provides a detailed breakdown of your trading positions for the current day, allowing for real-time tracking and analysis.

Endpoint: api/v1/positions
Method-Type: GET

Headers

Header NameValueDescription
x-authorization-token<your_access_token>Valid JWT token for authentication
x-device-typeWEBThe device type (e.g., WEB, ANDROID, IOS)

Query Params

{
   "client_id": "<client id>",
   "type": "live"
}

Example cURL Request

curl --location 'https://algo.pocketful.in/api/v1/positions?client_id=<client_id>&type=live' \
--header 'x-authorization-token: <your_access_token>' \
--header 'x-device-type: WEB'

Response

{
    "data": [
    {
       "average_buy_price": 14.7,
       "average_price": 0,
       "average_sell_price": 0,
       "buy_amount": 14.7,
       "buy_quantity": 1,
       "cf_buy_amount": 0,
       "cf_buy_quantity": 0,
       "cf_sell_amount": 0,
       "cf_sell_quantity": 0,
       "client_id": "DEMO1",
       "close_price": 0,
       "exchange": "NSE",
       "instrument_token": 11915,
       "ltp": 14.6,
       "multiplier": 1,
       "net_amount": -14.7,
       "net_quantity": 1,
       "previous_close": 14.65,
       "pro_cli": "CLIENT",
       "prod_type": 2,
       "product": "MIS",
       "realized_mtm": 0,
       "segment": "Capital",
       "sell_amount": 0,
       "sell_quantity": 0,
       "symbol": "YESBANK",
       "token": 11915,
       "trading_symbol": "YESBANK-EQ",
       "v_login_id": "DEMO1"
    }]
    "message": "",
    "status": "success"
   }

Response Parameter

Field NameDescription
average_buy_priceAverage buy price of the instrument.
average_priceAverage price of the instrument.
average_sell_priceAverage sell price of the instrument.
buy_amountAmount spent on buying the instrument.
buy_quantityQuantity purchased of the instrument.
cf_buy_amountCumulative buy amount of the instrument.
cf_buy_quantityCumulative buy quantity of the instrument.
cf_sell_amountCumulative sell amount of the instrument.
cf_sell_quantityCumulative sell quantity of the instrument.
client_idClient identifier.
close_priceClosing price of the instrument.
exchangeExchange where the instrument is traded.
instrument_tokenToken identifying the instrument.
ltpLast traded price of the instrument.
multiplierMultiplier for the instrument.
net_amountNet amount considering buy and sell transactions.
net_quantityNet quantity considering buy and sell transactions.
previous_closePrevious closing price of the instrument.
pro_cliClient category (e.g., CLIENT, PRO).
prod_typeProduct type code.
productProduct type (e.g., MIS).
realized_mtmRealized Mark-to-Market (MTM) value.
segmentMarket segment where the instrument is traded.
sell_amountAmount received from selling the instrument.
sell_quantityQuantity sold of the instrument.
symbolSymbol of the instrument.
tokenToken identifying the instrument.
trading_symbolTrading symbol of the instrument.
v_login_idVirtual login identifier.

Error Response

{
  "status": "error",
  "message": "Request forbidden",
  "error_code": 40000,
  "data":{
  }
}