How to test a python script in demo?


  • Hi @admin
    I have created a python code and need to test it in demo.
    Can you please tell me how it can be done?


  • HI @grparv said in How to test a python script in demo?:

    Can you please tell me if I am missing something. I am just taking the ltp from the ltpData API and using that as price input for placing order.
    My order params are like this:
    variety = NORMAL, tradingsymbol = BANKNIFTY23SEP2136900CE, symboltoken =49249,transactiontype =SELL,exchange =NFO, ordertype =MARKET, price=350.65, quantity=25

    Are you able to place the orders in options from the web based platform manually..? Please provide with the screenshot of your orderbook once you execute the order in option.


  • @admin Can you please tell me if I am missing something. I am just taking the ltp from the ltpData API and using that as price input for placing order.
    My order params are like this:
    variety = NORMAL, tradingsymbol = BANKNIFTY23SEP2136900CE, symboltoken =49249,transactiontype =SELL,exchange =NFO, ordertype =MARKET, price=350.65, quantity=25

    The response is like this:
    {
    "variety":"NORMAL",
    "ordertype":"MARKET",
    "producttype":"INTRADAY",
    "duration":"DAY",
    "price":350.65,
    "triggerprice":0.0,
    "quantity":"25",
    "disclosedquantity":"0",
    "squareoff":0.0,
    "stoploss":0.0,
    "trailingstoploss":0.0,
    "tradingsymbol":"BANKNIFTY23SEP2136900CE",
    "transactiontype":"SELL",
    "exchange":"NFO",
    "symboltoken":"49249",
    "ordertag":"",
    "instrumenttype":"OPTIDX",
    "strikeprice":36900.0,
    "optiontype":"CE",
    "expirydate":"23SEP2021",
    "lotsize":"25",
    "cancelsize":"0",
    "averageprice":0.0,
    "filledshares":"0",
    "unfilledshares":"25",
    "orderid":"210921000528081",
    "text":"exchg not enabled for this acct",
    "status":"rejected",
    "orderstatus":"rejected",
    "updatetime":"21-Sep-2021 10:41:07",
    "exchtime":"",
    "exchorderupdatetime":"",
    "fillid":"",
    "filltime":"",
    "parentorderid":""
    },
    Since I am only testing the scripts, I have not kept funds in my account. I need to know if what I am doing is right or if I am doing it wrong.
    Also please tell me what the trigger price and average price stand for in the response.

    Thanks![alt text](image url)


  • HI @grparv You need to maintain the signal and the price difference logs in python to test your script in demo currently we dont provide any simulator.