# DBot: Contract Type Conditions

**URL:** <https://community.deriv.com/t/dbot-contract-type-conditions/38112>\
**Category:** Deriv Bot\
**Tags:** dbot\
**Created:** [October 19, 2022, 8:24am UTC](https://community.deriv.com/t/dbot-contract-type-conditions/38112 "2022-10-19T08:24:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deriv\_adminN5](https://sea2.discourse-cdn.com/flex020/user_avatar/community.deriv.com/deriv_adminn5/32/5126_2.png) [@Deriv\_adminN5](https://community.deriv.com/u/Deriv_adminN5)\
**Post date:** [October 19, 2022, 8:24am UTC](https://community.deriv.com/t/dbot-contract-type-conditions/38112/1 "2022-10-19T08:24:21Z")

</div>

Hi Deriv Community,

The DBot workspace provides has the option for you to select the _contract type_ in the _Trade parameters_ block.

In this contract type, you will see 3 conditions after selecting a specific trade type namely **Both** , **Rise** and **Fall**.

 ![Trade Parameters](https://us1.discourse-cdn.com/flex020/uploads/deriv/original/2X/d/d63d111be874a3bd15187ac1c43bc2cccf31e5c1.jpeg)

* * *

### Contract Type: Both

For the Contract Type of **Both** : The user will have 2 conditions to choose from for the **Purchase** block in the **Purchase Condition** Mandatory blocks.

 ![Contract Type: Both](https://us1.discourse-cdn.com/flex020/uploads/deriv/original/2X/a/a1f0cf86530aa2d0df2946a165a9996a4c300de6.jpeg)

* * *

### Contract Type: Rise

For the Contract Type of **Rise** : The user can only choose **Rise** for the **Purchase** block in the **Purchase Condition** Mandatory blocks.

 ![Contract Type: Rise](https://us1.discourse-cdn.com/flex020/uploads/deriv/original/2X/3/35cd2047abbb0b34079134aba4d98dd792ae573d.jpeg)

* * *

### Contract Type: Fall

For the Contract Type of **Fall** : The user can only choose **Fall** for the **Purchase** block in the **Purchase Condition** Mandatory blocks.

 ![Contract Type: Fall](https://us1.discourse-cdn.com/flex020/uploads/deriv/original/2X/a/a826f98b1c055f3d0a099d1a90823d25270684b0.jpeg)

* * *

The Contract Type: “ **Both** ” option is useful when the DBot user sets up an **advanced strategy** where the user can determine when to purchase a **Rise** or when to purchase a **Fall** :

For example, if you’ve set **contract type** to **Both** , add a conditional block in the **Purchase Conditions** mandatory block to help your bot determine which contract to purchase at each run.

**Here’s how to do it:**

1. Head over to the **Utility** section in the **Blocks Menu** and select **Logic**

 ![Blocks menu](https://us1.discourse-cdn.com/flex020/uploads/deriv/original/2X/3/349e4916ec2dad1c5d2a7df8b06622f165e4c099.jpeg)

1. Add the **Conditional block** under the **Purchase conditions**. You can drag the block to the workspace or click on the ➕ sign.

 ![Conditional Block](https://us1.discourse-cdn.com/flex020/uploads/deriv/original/2X/2/2fedc4ee77bd7c190773ff3215bc357fea561b87.jpeg)

1. You would need to define and set the first conditions. This depends on your trading strategy. You can add the **purchase block** under the **purchase condition** and set the contract type that you want. Below is an example;

 ![Purchase block](https://us1.discourse-cdn.com/flex020/uploads/deriv/original/2X/d/ddd098addd682cd96a20c12c2ffec399533cec91.jpeg)

1. Click on the + on the **Conditional block** to add a second condition. Set the second condition, add a **Purchase block** , and set the **opposite contract type**.

 ![Purcahse conditions](https://us1.discourse-cdn.com/flex020/uploads/deriv/original/2X/5/5e59d2ddc7b9bd6065caf0b74ffe65fe0410e357.png)

The User can specify 2 different **Purchase Conditions** , **Rise/Fall** , on the **Conditional block** in the **Purchase Condition** Mandatory Block, where the DBot can purchase the contract with a rise and another with a fall depending on the purchase instruction.

Note: Please note that these options are not supported on mobile.

If you have any questions, please visit our Help Centre or contact us via Live Chat and WhatsApp.

> **[Help Centre | Frequently Asked Questions | Deriv](https://deriv.com/help-centre)**
>
> Have questions on your trading account, how our trading platforms work or about trading? Read our FAQ’s or contact us through Deriv live chat.

---

<div class="post-metadata">

**Author:** ![Deriv\_adminN5](https://sea2.discourse-cdn.com/flex020/user_avatar/community.deriv.com/deriv_adminn5/32/5126_2.png) [@Deriv\_adminN5](https://community.deriv.com/u/Deriv_adminN5)\
**Post date:** [October 19, 2022, 8:24am UTC](https://community.deriv.com/t/dbot-contract-type-conditions/38112/2 "2022-10-19T08:24:29Z")

</div>


