# Withdraw money

<pre><code><strong>POST /withdraw
</strong></code></pre>

process withdraw request to orderbook and return its hash

```json
{
    "maker": str,
    "token": str,
    "amount": {"type": int, "min": 0},
    "salt": {"type": int, "min": 0},
    "receiver": str,
    "sign": {"type": list, "min_size": 2, "max_size": 2, "item_schema": {"type": int, "min": 0}},
    "gas_fee": {
        "type": dict, 
        "fields": {
            "gas_per_action": {"type": int, "min": 0},
            "fee_token": str,
            "max_gas_price": {"type": int, "min": 0},
            "conversion_rate": {"type": list, "min_size": 2, "max_size": 2, "item_schema": {"type": int, "min": 0}}
        }
    }
}
```

### Parameters:

* `maker`:
  * **Type**: String
  * **Description**: Address of the user initiating the withdrawal.
* `token`:
  * **Type**: String
  * **Description**: The address of the token to be withdrawn.
* `amount`:
  * **Type**: Integer
  * **Description**: The quantity of tokens to withdraw.
  * **Constraints**: Must be a non-negative integer.
* `salt`:
  * **Type**: Integer
  * **Description**: A random value used to ensure the uniqueness of the withdrawal request.
  * **Constraints**: Must be a non-negative integer.
* `receiver`:
  * **Type**: String
  * **Description**:  Address of the receiver of the withdrawn tokens.
* `sign`:
  * **Type**: List
  * **Description**: Signature data required to authorize the withdrawal.
  * **Constraints**: Must be a list containing exactly 2 integer items, each of which should be non-negative.
  * To sign a withdrawal request, one needs first to obtain the Poseidon hash of the withdraw entity  ([see](https://github.com/LayerAkira/kurosawa_akira/blob/d7abec0717b411421f93762645f7b2267447a509/src/WithdrawComponent.cairo#L8)) and then sign it by the private key.
* `gas_fee`:
  * **Type**: Dictionary
  * **Description**: Information about the gas fee associated with the withdrawal.
  * **Fields**:
    * `gas_per_action`: Integer, minimum 0, representing the gas cost per action.
    * `fee_token`: String, indicating the token used for the fee.
    * `max_gas_price`: Integer, minimum 0, the maximum price per gas unit.
    * `conversion_rate`: List of integers, with minimum size 2 and maximum size 2, each element being non-negative, representing the conversion rate.

### Response example:

In case of a successful place, the order hash is returned

```json
{
    'result': 12345 // withdraw request hash
}
```

Success operation means the request successfully passed the validation phase and is now in the request processing queue.&#x20;

In case of unsuccessful request, the error and code are returned ([see](/layerakira-documentation/integration/endpoints/responses.md))


---

# 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://layer-akira.gitbook.io/layerakira-documentation/integration/endpoints/withdraw-money.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.
