It looks like you're new here. If you want to get involved, click one of these buttons!
ERROR 2017-01-30 19:39:40,185 [pool-1-thread-1] com.TradeRobotBatch.business.processor.OrderProcessor - Order Exception:
com.TradeRobotBatch.kiteAPI.api.kitehttp.exceptions.KiteOrderException
at com.TradeRobotBatch.kiteAPI.api.kitehttp.KiteRequest.dealWithKiteException(KiteRequest.java:242)
at com.TradeRobotBatch.kiteAPI.api.kitehttp.KiteRequest.postRequest(KiteRequest.java:46)
at com.TradeRobotBatch.kiteAPI.api.kiteconnect.KiteConnect.placeOrder(KiteConnect.java:213)
at com.TradeRobotBatch.business.processor.OrderProcessor.process(OrderProcessor.java:72)
at com.TradeRobotBatch.business.processor.OrderProcessor.process(OrderProcessor.java:1)
at org.springframework.batch.core.step.item.SimpleChunkProcessor.doProcess(SimpleChunkProcessor.java:126)
at org.springframework.batch.core.step.item.SimpleChunkProcessor.transform(SimpleChunkProcessor.java:293)
at org.springframework.batch.core.step.item.SimpleChunkProcessor.process(SimpleChunkProcessor.java:192)
at org.springframework.batch.core.step.item.ChunkOrientedTasklet.execute(ChunkOrientedTasklet.java:75)
at org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:406)
at org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:330)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
at org.springframework.batch.core.step.tasklet.TaskletStep$2.doInChunkContext(TaskletStep.java:271)
at org.springframework.batch.core.scope.context.StepContextRepeatCallback.doInIteration(StepContextRepeatCallback.java:81)
at org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:374)
at org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:215)
at org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:144)
at org.springframework.batch.core.step.tasklet.TaskletStep.doExecute(TaskletStep.java:257)
at org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:200)
at org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:148)
at org.springframework.batch.core.job.flow.JobFlowExecutor.executeStep(JobFlowExecutor.java:64)
at org.springframework.batch.core.job.flow.support.state.StepState.handle(StepState.java:67)
at org.springframework.batch.core.job.flow.support.SimpleFlow.resume(SimpleFlow.java:169)
at org.springframework.batch.core.job.flow.support.SimpleFlow.start(SimpleFlow.java:144)
at org.springframework.batch.core.job.flow.FlowJob.doExecute(FlowJob.java:134)
at org.springframework.batch.core.job.AbstractJob.execute(AbstractJob.java:306)
at org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:135)
at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:50)
at org.springframework.batch.core.launch.support.SimpleJobLauncher.run(SimpleJobLauncher.java:128)
at com.TradeRobotBatch.business.ScheduledJobRun.runApp(ScheduledJobRun.java:52)
at sun.reflect.GeneratedMethodAccessor39.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:65)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Can you print error message in KiteException ? \
You can access error message like this kiteException.message
ERROR 2017-01-31 20:02:07,019 [pool-1-thread-1] com.TradeRobotBatch.kiteAPI.api.kitehttp.KiteRequest - OrderResponse Error Type: OrderException
ERROR 2017-01-31 20:02:07,020 [pool-1-thread-1] com.TradeRobotBatch.kiteAPI.api.kitehttp.KiteRequest - OrderResponse Message: SELL `trigger_price` should be greater than `price`
ERROR 2017-01-31 20:02:07,020 [pool-1-thread-1] com.TradeRobotBatch.kiteAPI.api.kitehttp.KiteRequest - OrderResponse Error Code: 400
ERROR 2017-01-31 20:02:07,021 [pool-1-thread-1] com.TradeRobotBatch.business.processor.OrderProcessor - Order Exception:
com.TradeRobotBatch.kiteAPI.api.kitehttp.exceptions.KiteOrderException
at com.TradeRobotBatch.kiteAPI.api.kitehttp.KiteRequest.dealWithKiteException(KiteRequest.java:256)
at com.TradeRobotBatch.kiteAPI.api.kitehttp.KiteRequest.postRequest(KiteRequest.java:51)
at com.TradeRobotBatch.kiteAPI.api.kiteconnect.KiteConnect.placeOrder(KiteConnect.java:217)
at com.TradeRobotBatch.business.processor.OrderProcessor.process(OrderProcessor.java:72)
at com.TradeRobotBatch.business.processor.OrderProcessor.process(OrderProcessor.java:1)
at org.springframework.batch.core.step.item.SimpleChunkProcessor.doProcess(SimpleChunkProcessor.java:126)
at org.springframework.batch.core.step.item.SimpleChunkProcessor.transform(SimpleChunkProcessor.java:293)
at org.springframework.batch.core.step.item.SimpleChunkProcessor.process(SimpleChunkProcessor.java:192)
at org.springframework.batch.core.step.item.ChunkOrientedTasklet.execute(ChunkOrientedTasklet.java:75)
at org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:406)
at org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:330)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
at org.springframework.batch.core.step.tasklet.TaskletStep$2.doInChunkContext(TaskletStep.java:271)
at org.springframework.batch.core.scope.context.StepContextRepeatCallback.doInIteration(StepContextRepeatCallback.java:81)
at org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:374)
at org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:215)
at org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:144)
at org.springframework.batch.core.step.tasklet.TaskletStep.doExecute(TaskletStep.java:257)
at org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:200)
at org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:148)
at org.springframework.batch.core.job.flow.JobFlowExecutor.executeStep(JobFlowExecutor.java:64)
at org.springframework.batch.core.job.flow.support.state.StepState.handle(StepState.java:67)
at org.springframework.batch.core.job.flow.support.SimpleFlow.resume(SimpleFlow.java:169)
at org.springframework.batch.core.job.flow.support.SimpleFlow.start(SimpleFlow.java:144)
at org.springframework.batch.core.job.flow.FlowJob.doExecute(FlowJob.java:134)
at org.springframework.batch.core.job.AbstractJob.execute(AbstractJob.java:306)
at org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:135)
at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:50)
at org.springframework.batch.core.launch.support.SimpleJobLauncher.run(SimpleJobLauncher.java:128)
at com.TradeRobotBatch.business.ScheduledJobRun.runApp(ScheduledJobRun.java:52)
at sun.reflect.GeneratedMethodAccessor39.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:65)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Can you paste complete request with params here?
INFO 2017-02-01 16:43:11,487 [pool-1-thread-1] com.TradeRobotBatch.kiteAPI.api.kiteconnect.KiteConnect - Order URL : https://api.kite.trade/orders/regular
INFO 2017-02-01 16:43:11,488 [pool-1-thread-1] com.TradeRobotBatch.kiteAPI.api.kiteconnect.KiteConnect - ************** Order Parameteres ****************
INFO 2017-02-01 16:43:11,488 [pool-1-thread-1] com.TradeRobotBatch.kiteAPI.api.kiteconnect.KiteConnect - product : MIS
INFO 2017-02-01 16:43:11,488 [pool-1-thread-1] com.TradeRobotBatch.kiteAPI.api.kiteconnect.KiteConnect - quantity : 1
INFO 2017-02-01 16:43:11,488 [pool-1-thread-1] com.TradeRobotBatch.kiteAPI.api.kiteconnect.KiteConnect - trigger_price : 3560
INFO 2017-02-01 16:43:11,488 [pool-1-thread-1] com.TradeRobotBatch.kiteAPI.api.kiteconnect.KiteConnect - price : 3560
INFO 2017-02-01 16:43:11,489 [pool-1-thread-1] com.TradeRobotBatch.kiteAPI.api.kiteconnect.KiteConnect - tradingsymbol : CRUDEOILM17FEBFUT
INFO 2017-02-01 16:43:11,489 [pool-1-thread-1] com.TradeRobotBatch.kiteAPI.api.kiteconnect.KiteConnect - exchange : MCX
INFO 2017-02-01 16:43:11,489 [pool-1-thread-1] com.TradeRobotBatch.kiteAPI.api.kiteconnect.KiteConnect - validity : DAY
INFO 2017-02-01 16:43:11,490 [pool-1-thread-1] com.TradeRobotBatch.kiteAPI.api.kiteconnect.KiteConnect - transaction_type : SELL
INFO 2017-02-01 16:43:11,490 [pool-1-thread-1] com.TradeRobotBatch.kiteAPI.api.kiteconnect.KiteConnect - order_type : SL
INFO 2017-02-01 16:43:11,490 [pool-1-thread-1] com.TradeRobotBatch.kiteAPI.api.kiteconnect.KiteConnect - ************** ************** ****************
For stoploss orders, price and trigger price can't have same value.
Please go through this blog post to understand why it can't be same.
I will check with concerned team and get back to you.