# updateStrategy

This function creates an unsigned transaction to update an existing strategy.

```
public async updateStrategy(
    strategyId: BigNumberish,
    encoded: EncodedStrategy,
    baseToken: { address: string; decimals: number },
    quoteToken: { address: string; decimals: number },
    buyPriceLow: string,
    buyPriceHigh: string,
    buyBudget: string,
    sellPriceLow: string,
    sellPriceHigh: string,
    sellBudget: string,
    overrides?: PayableOverrides
  )
```

<table><thead><tr><th width="172.33333333333331">Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>strategyId</td><td>number</td><td>The id of the strategy to update.</td></tr><tr><td>encoded</td><td>EncodedStrategy</td><td>The encoded form of the strategy that is being updated. This can be acquired using the <a href="getuserstrategies">getUserStrategies</a> function. </td></tr><tr><td>baseToken</td><td>object {token address, number}</td><td>An object containing a token address and a string with the number of decimal places used for the given token.</td></tr><tr><td>quoteToken</td><td>object {token address, number}</td><td>An object containing a token address and a string with the number of decimal places used for the given token.</td></tr><tr><td>buyPriceLow</td><td>string (number)</td><td>The lowest price at which to buy the quote token, in the form of quoteTokens  per 1 baseToken. </td></tr><tr><td>buyPriceHigh</td><td>string (number)</td><td>The highest price at which to buy the quote token, in the form quoteTokens  per 1 baseToken. </td></tr><tr><td>buyBudget</td><td>string (number)</td><td>The number of base tokens to start the strategy with.</td></tr><tr><td>sellPriceLow</td><td>string (number)</td><td>The lowest price at which to buy the base token, in the form of baseTokens per 1 quote token. </td></tr><tr><td>sellPriceHigh</td><td>string (number)</td><td>The highest price at which to buy the base token, in the form of baseTokens per 1 quote token. </td></tr><tr><td>sellBudget</td><td>string (number)</td><td>The number of quote tokens to start the strategy with.</td></tr><tr><td>overrides</td><td>object (<strong>optional</strong>)</td><td>This optional object contains transaction parameters, such as gas price, Eth value, etc. See <strong>overrides</strong> in the <a href="https://docs.ethers.org/v5/api/contract/contract/">Ethers documentation</a> for details. </td></tr></tbody></table>

### Returns

This function returns an unsigned transaction, ready to be signed and submitted to the blockchain.
