py5paisa icon indicating copy to clipboard operation
py5paisa copied to clipboard

Object of type int64 is not JSON serializable error for Bo_co_order

Open Sushantmkarande opened this issue 3 years ago • 1 comments

  • 5paisa Python SDK version: 0.4.8
  • Python version:3.10.4
  • Operating System: windows 10

Description

from py5paisa.order import Bo_co_order, Order test_order = Bo_co_order(scrip_code=1660, BuySell='B', Qty=1, LimitPriceInitialOrder=205, TriggerPriceInitialOrder=0, LimitPriceProfitOrder=215.0, TriggerPriceForSL=203, LimitPriceForSL=202, ExchType='C', Exch='N', RequestType='P', AtMarket=False)

response = client.bo_order(test_order)

What I Did

I need to place bracket order with target price and stoploss

respose is None and error warning is Object of type int64 is not JSON serializable error

Sushantmkarande avatar May 30 '22 06:05 Sushantmkarande

I guess the problem might be with the scripcode. try assigning the value of scrip code to a variable and declare the variable datatype as int. If possible, can you show the traceback of the response?

kumarchinmaya116 avatar May 31 '22 02:05 kumarchinmaya116