Eli Bain
Eli Bain

Reputation: 13

Bybit API InvalidRequestError: Missing required parameter 'type'

I get the above error when trying to execute an order through pybit.

Reading the docs I'm not aware of a parameter called "type" or what it refers to. Does anyone know what I need to do to my code to execute an order?

    session.place_active_order(symbol= "BTCUSDT", 
            qty= BTCsell_qty, 
            side= "Sell", 
            order_type= "Limit", 
            time_in_force= "GoodTillCancel",
            price= BTCMarketPrice)

Upvotes: 1

Views: 1296

Answers (1)

Falcon78
Falcon78

Reputation: 706

Make sure you cover the Required fields like close_on_trigger. Include Position_idx if in one way mode. I generally use Conditional Trigger Orders for Limit orders

Upvotes: 0

Related Questions