# DyDxWithdraw

### Description

Withdraw tokens from DyDx

> **Notes**
>
> User withdraws tokens from the DyDx protocol

### Action ID

`0x63e4c7d0`

### SDK Action

```ts
const dyDxWithdrawAction = new dfs.actions.dydx.DyDxWithdrawAction(
    tokenAddr,
    amount,
    to
);
```

### Action Type

`STANDARD_ACTION`

### Input Parameters

```solidity
    /// @param tokenAddr Address of the token to be withdrawn
    /// @param amount Amount of tokens to be withdrawn -> send type(uint).max for whole amount
    /// @param to Where the withdrawn tokens will be sent
    struct Params {
        address tokenAddr;
        uint256 amount;
        address to;
    }
```

### Return Value

```solidity
return bytes32(withdrawnAmount);
```

### Events and Logs

```solidity
emit ActionEvent("DyDxWithdraw", logData);
logger.logActionDirectEvent("DyDxWithdraw", logData);
bytes memory logData = abi.encode(params);
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.defisaver.com/actions/dydx/dydxwithdraw.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
