jane-cloud / Open-API-SDK-V5

360 stars 212 forks source link

{"code":"51000","data":[],"msg":"Parameter tpTriggerPx error"} #23

Closed mohamad76wp closed 2 years ago

mohamad76wp commented 2 years ago

Dear friends i using the okx-python-sdk-api-v5 to place an positions and using algo order for set sl and tp . in some situations i just need stop lost and no needs for take profit so i just fill the slTriggerPx and slOrdPx parameter for place algo order and i get this error {"code":"51000","data":[],"msg":"Parameter tpTriggerPx error"} can you tell me why the both of sl and tp parametes are required ? and how can i just set sl parameter?

mohamad76wp commented 2 years ago

[Solved] It depends on ordType if the value set oco you should use sl and tp , in conditional mode sl or tp is optional