> For the complete documentation index, see [llms.txt](https://www.notbank.com/learn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.notbank.com/learn/api-reference/websocket-api/fee.md).

# Fee

### GetWithdrawFee

**Permissions:** NotbankTrading, NotbankWithdraw\
**Call Type:** Synchronous

Get a fee estimate for a withdrawal.

#### Request

{% tabs %}
{% tab title="Node" %}

```javascript
import Notbank from 'notbank'
// websocket connection code ...

await client.getFeeService().getWithdrawFee({
  AccountId: 7,
  ProductId: 1,
  Amount: 100
});

// parameters
{
  AccountId: number;
  ProductId: number;
  Amount: number;
  AccountProviderId?: number;
}
```

{% endtab %}

{% tab title="Java" %}

```java
import exchange.notbank.fee.paramBuilders.GetWithdrawFeeParamBuilder;

var response = client.getFeeService()
    .getWithdrawFee(new GetWithdrawFeeParamBuilder(7, 1, new BigDecimal(100))).get();
```

{% endtab %}

{% tab title="Python" %}

```python
from notbank_python_sdk.requests_models import FeeRequest

response = client.get_withdraw_fee(FeeRequest(
    account_id=7,
    product_id=1,
    amount=Decimal(50),
))
```

{% endtab %}

{% tab title="Json" %}

```json
{
  "m": 0,
  "i": 0,
  "n": "GetWithdrawFee",
  "o": "{
      \"OMSId\": 1,
      \"AccountId\": 1,
      \"ProductId\": 1,
      \"Amount\": 100
  }"
}
```

{% endtab %}
{% endtabs %}

| Key               | Value                                                                                                                                                                                                       |
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| OMSId             | **integer**. The ID of the OMS on which the product is trade. **required**.                                                                                                                                 |
| AccountId         | **integer**. The ID of the account making the withdrawal. Not explicitly required but needs to be defined to get the accurate estimate of withdraw fee especially if there are fee overrides. **required**. |
| ProductId         | **integer**. The ID of the product intended to be withdrawn. Fees may vary with product. Not explicitly required but needs to be defined to get the accurate estimate of withdraw fee. **required**.        |
| Amount            | **decimal**. The amount of product intended to be withdrawn, not explicitly required but needs to be defined to get the accurate estimate of withdraw fee. **required**.                                    |
| AccountProviderId | **integer**. Defining an ID here makes sure the fee is accurate according to the account provider used to withdraw. Default is 0. **optional**.                                                             |

#### Response

```json
{
  "m": 1,
  "i": 0,
  "n": "GetWithdrawFee",
  "o": "{
    \"FeeAmount\": 1.0,
    \"TicketAmount\": 100
  }"
}
```

| Key          | Value                                                                      |
| ------------ | -------------------------------------------------------------------------- |
| FeeAmount    | **decimal**. The estimated amount of the fee for the indicated withdrawal. |
| TicketAmount | **decimal**. The amount of product intended to be withdrawn.               |

### GetDepositFee

**Permissions:** NotbankTrading, NotbankDeposit\
**Call Type:** Synchronous

Get a fee estimate for a deposit.

#### Request

{% tabs %}
{% tab title="Node" %}

```javascript
import Notbank from 'notbank'
// websocket connection code ...

await client.getFeeService().getDepositFee({
  AccountId: 7,
  ProductId: 1,
  Amount: 100,
  AccountProviderId: 5
});

// parameters
{
  AccountId: number;
  ProductId: number;
  Amount: number;
  AccountProviderId?: number;
}
```

{% endtab %}

{% tab title="Java" %}

```java
import exchange.notbank.fee.paramBuilders.GetDepositFeeParamBuilder;

var response = client.getFeeService()
    .getDepositFee(new GetDepositFeeParamBuilder(7, 1, new BigDecimal(100), 5)).get();
```

{% endtab %}

{% tab title="Python" %}

```python
from notbank_python_sdk.requests_models.fee_request import FeeRequest

response = client.get_deposit_fee(FeeRequest(
    account_id=7,
    product_id=1,
    amount=Decimal(100),
    account_provider_id=5,
))
```

{% endtab %}

{% tab title="Json" %}

```json
{
  "m": 0,
  "i": 0,
  "n": "GetDepositFee",
  "o": "{
    \"OMSId\": 1,
    \"AccountId\": 1,
    \"ProductId\": 1,
    \"Amount\": 100,
    \"AccountProviderId\": 5
  }"
}
```

{% endtab %}
{% endtabs %}

All fields in the table below are required in order to the the correct deposit fee estimate.

| Key               | Value                                                                                                                                                                                                       |
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| OMSId             | **integer**. The ID of the OMS. **required**.                                                                                                                                                               |
| AccountId         | **integer**. The ID of the account making the deposit. Not explicitly required but needs to be defined to get the accurate estimate of deposit fee especially if there is/are fee override/s. **required**. |
| ProductId         | **integer**. The ID of the product intended to be deposited. Fees may vary with product. Not explicitly required but needs to be defined to get the accurate estimate of deposit fee. **required**.         |
| Amount            | **decimal**. The amount of product intended to be deposited. Not explicitly required but needs to be defined to get the accurate estimate of deposit fee. **required**.                                     |
| AccountProviderId | **integer**. Defining an ID here makes sure the fee is accurate according to the account provider used to deposit. Default is 0. **optional**.                                                              |

#### Response

```json
{
  "m": 1,
  "i": 0,
  "n": "GetDepositFee",
  "o": "{
    \"FeeAmount\": 1.0,
    \"TicketAmount\": 100
  }"
}
```

| Key          | Value                                                                   |
| ------------ | ----------------------------------------------------------------------- |
| FeeAmount    | **decimal**. The estimated amount of the fee for the indicated deposit. |
| TicketAmount | **decimal**. The amount of product intended to be deposited.            |

### GetOMSWithdrawFees

**Permissions:** NotbankWithdraw\
**Call Type:** Synchronous

Gets a list of withdraw fees for products in a specific OMS. Can be filtered per product and account provider.

It is possible that a withdraw fee exists specifically for a product and an account provider.

#### Request

{% tabs %}
{% tab title="Node" %}

```javascript
import Notbank from 'notbank'
// websocket connection code ...

await client.getFeeService().getOMSWithdrawFees({
  ProductId: 1,
  AccountProviderId: 8
});

// parameters
{
  ProductId?: number; // ID of the product (optional)
  AccountProviderId?: number; // ID of the account provider (optional)
}
```

{% endtab %}

{% tab title="Java" %}

```java
import exchange.notbank.fee.paramBuilders.GetOmsWithdrawFeesParamsBuilder;

var response = client.getFeeService()
        .getOmsWithdrawtFees(new GetOmsWithdrawFeesParamsBuilder().productId(1).accountProviderId(8)).get();
```

{% endtab %}

{% tab title="Python" %}

```python
from notbank_python_sdk.requests_models import OmsFeesRequest

response = client.get_oms_withdraw_fees(OmsFeesRequest(
    product_id=1,
    account_provider_id=8,
))
```

{% endtab %}

{% tab title="Json" %}

```json
{
  "m": 0,
  "i": 0,
  "n": "GetOMSWithdrawFees",
  "o": "{
    \"OMSId\": 1,
    \"ProductId\": 1,
    \"AccountProviderId\": 8
  }"
}
```

{% endtab %}
{% endtabs %}

| Key               | Value                                                                                                                                                                             |
| ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| OMSId             | **integer**. The ID of the OMS. **required**.                                                                                                                                     |
| ProductId         | **integer**. The ID of the product in the OMS you wish to retrieve withdraw fees of. If not defined, withdraw fees for all products will be returned. **optional**.               |
| AccountProviderId | **integer**. The ID of account provider in the OMS you wish to retrieve withdraw fees of. If not defined, withdraw fees for all account providers will be returned. **optional**. |

#### Response

```json
{
  "m": 1,
  "i": 0,
  "n": "GetOMSWithdrawFees",
  "o": "[
    {
      \"OMSId\": 1,
      \"AccountId\": 2,
      \"AccountProviderId\": 0,
      \"FeeId\": 47,
      \"FeeAmt\": 7.0,
      \"FeeCalcType\": \"Percentage\",
      \"IsActive\": false,
      \"ProductId\": 1,
      \"MinimalFeeAmt\": 2.0,
      \"MinimalFeeCalcType\": \"Percentage\"
    }
  ]"
}


```

| Key                | Value                                                                                                                                                                                      |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| OMSId              | **integer**. The ID of the OMS.                                                                                                                                                            |
| AccountId          | **integer**. The ID of the account to which the fee will apply. If its value is 0, fee will apply to any account doing a withdraw of the the specific product defined in the withdraw fee. |
| AccountProviderId  | **integer**. The ID of the account provider to which the fee will apply. If its value 0, fee will apply regardless of the account provider used for the withdraw transaction.              |
| FeeId              | **integer**. The ID of the specific withdraw fee.                                                                                                                                          |
| FeeAmt             | **decimal**. The standard withdraw fee amount.                                                                                                                                             |
| FeeCalcType        | **string**. The way to calculate the standard fee amount. One of: **Percentage**, **Flat**.                                                                                                |
| IsActive           | **boolean**. If true, fee will apply, else it will not.                                                                                                                                    |
| ProductId          | **integer**. The ID of the product for which the specific withdraw fee will apply.                                                                                                         |
| MinimalFeeAmt      | **decimal**. The minimum withdraw fee amount.                                                                                                                                              |
| MinimalFeeCalcType | **string**. The way to calculate the minimum withdraw fee. One of: **Percentage**, **Flat**.                                                                                               |

### GetOMSDepositFees

**Permissions:** NotbankDeposit\
**Call Type:** Synchronous

Gets a list of deposit fees for products in a specific OMS. Can be filtered per product and account provider.

It is possible to that a deposit fee exists specifically for a product and an account provider.

#### Request

{% tabs %}
{% tab title="Node" %}

```javascript
import Notbank from 'notbank'
// websocket connection code ...

await client.getFeeService().getOMSDepositFees({
  ProductId: 1,
  AccountProviderId: 5
});

// parameters
{
  ProductId?: number; // ID of the product (optional)
  AccountProviderId?: number; // ID of the account provider (optional)
}
```

{% endtab %}

{% tab title="Java" %}

```java
import exchange.notbank.fee.paramBuilders.GetOmsDepositFeesParamsBuilder;

var response = client.getFeeService()
    .getOmsDepositFees(new GetOmsDepositFeesParamsBuilder().productId(1).accountProviderId(5)).get();
```

{% endtab %}

{% tab title="Python" %}

```python
from notbank_python_sdk.requests_models import OmsFeesRequest

response = client.get_oms_deposit_fees(OmsFeesRequest(
    product_id=1,
    account_provider_id=8,
))
```

{% endtab %}

{% tab title="Json" %}

```json
{
  "m": 0,
  "i": 0,
  "n": "GetOMSDepositFees",
  "o": "{
    \"OMSId\": 1,
    \"ProductId\": 1,
    \"AccountProviderId\": 5
  }"
}
```

{% endtab %}
{% endtabs %}

| Key               | Value                                                                                                                                                                           |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| OMSId             | **integer**. The ID of the OMS. **required**.                                                                                                                                   |
| ProductId         | **integer**. The ID of the product in the OMS you wish to retrieve deposit fees of. If not defined, deposit fees for all products will be returned. **optional**.               |
| AccountProviderId | **integer**. The ID of account provider in the OMS you wish to retrieve deposit fees of. If not defined, deposit fees for all account providers will be returned. **optional**. |

#### Response

```json
{
  "m": 1,
  "i": 0,
  "n": "GetOMSDepositFees",
  "o": "[
    {
      \"OMSId\": 1,
      \"AccountId\": 0,
      \"AccountProviderId\": 5,
      \"FeeId\": 8,
      \"FeeAmt\": 1.0,
      \"FeeCalcType\": \"FlatRate\",
      \"IsActive\": true,
      \"ProductId\": 1,
      \"MinimalFeeAmt\": 0,
      \"MinimalFeeCalcType\": \"FlatRate\"
    },
    {
      \"OMSId\": 1,
      \"AccountId\": 0,
      \"AccountProviderId\": 5,
      \"FeeId\": 10,
      \"FeeAmt\": 1.0,
      \"FeeCalcType\": \"FlatRate\",
      \"IsActive\": true,
      \"ProductId\": 1,
      \"MinimalFeeAmt\": 0,
      \"MinimalFeeCalcType\": \"FlatRate\"
    }
  ]"
}
```

| Key                | Value                                                                                                                                                                                       |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| OMSId              | **integer**. The ID of the OMS.                                                                                                                                                             |
| AccountId          | **integer**. The ID of the account to which the fee will apply, if set to 0, fee will apply to any account doing a deposit of the the specific product defined in the deposit fee.          |
| AccountProviderId  | **integer**. The ID of the account provider to which the fee will apply, if set to 0, fee will apply regardless of the account provider used for the deposit transaction.                   |
| FeeId              | **integer**. The ID of the specific deposit fee.                                                                                                                                            |
| FeeAmt             | **decimal**. The standard deposit fee amount.                                                                                                                                               |
| FeeCalcType        | **string**. The way to calculate the standard fee amount. One of: **Percentage**, **Flat**.                                                                                                 |
| IsActive           | **boolean**. If true, fee will apply, else it will not.                                                                                                                                     |
| ProductId          | **integer**. The ID of the product for which the specific deposit fee will apply.                                                                                                           |
| MinimalFeeAmt      | **decimal**. Not yet supported in the current latest NotBank version; for future provision. The minimum deposit fee amount. This will be the lowest amount of fee charged for each deposit. |
| MinimalFeeCalcType | **string**. Not yet supported in the current latest NotBank version; for future provision. he way to calculate the minimum withdraw fee. One of: **Percentage**, **Flat**.                  |

### GetAccountFees

**Permissions:** NotbankTrading, NotbankReadOnly\
**Call Type:** Synchronous

Gets a list of trading fees that are set for a specific account. This method will respond a list of trading fees that are defined with the same fee tier as the fee tier of the account.

#### Request

{% tabs %}
{% tab title="Node" %}

```javascript
import Notbank from 'notbank'
// websocket connection code ...

await client.getFeeService().getAccountFees({
  AccountId: 1
});

// parameters
{
  AccountId: number; // ID of the account (required)
}
```

{% endtab %}

{% tab title="Java" %}

```java
import exchange.notbank.fee.paramBuilders.GetAccountFeesParamBuilder;

var response = client.getFeeService()
    .getAccountFees(new GetAccountFeesParamBuilder(1)).get();
```

{% endtab %}

{% tab title="Python" %}

```python
from notbank_python_sdk.requests_models.account_fees_request import AccountFeesRequest

account_fees = client.get_account_fees(AccountFeesRequest(1))
```

{% endtab %}

{% tab title="Json" %}

```json
{
  "m": 0,
  "i": 0,
  "n": "GetAccountFees",
  "o": "{
    \"OMSId\": 1,
    \"AccountId\": 9
  }"
}
```

{% endtab %}
{% endtabs %}

| Key       | Value                                                                          |
| --------- | ------------------------------------------------------------------------------ |
| AccountId | **integer**. The ID of the account whose fees will be retrieved. **required**. |
| OMSId     | **integer**. The ID of the OMS. **required**.                                  |

#### Response

```json
{
  "m": 1,
  "i": 0,
  "n": "GetAccountFees",
  "o": "[
    {
      \"FeeId\": 296,
      \"OMSId\": 1,
      \"FeeTier\": 2,
      \"AccountId\": 0,
      \"FeeAmt\": 0.04,
      \"FeeCalcType\": \"Percentage\",
      \"FeeType\": \"Flat\",
      \"LadderThreshold\": 0.0,
      \"LadderSeconds\": 0,
      \"IsActive\": true,
      \"InstrumentId\": 2,
      \"OrderType\": \"Unknown\",
      \"PeggedProductId\": 0
    },
    {
      \"FeeId\": 335,
      \"OMSId\": 1,
      \"FeeTier\": 2,
      \"AccountId\": 0,
      \"FeeAmt\": 0.002,
      \"FeeCalcType\": \"Percentage\",
      \"FeeType\": \"FlatPegToProduct\",
      \"LadderThreshold\": 0.0,
      \"LadderSeconds\": 0,
      \"IsActive\": false,
      \"InstrumentId\": 1,
      \"OrderType\": \"Unknown\",
      \"PeggedProductId\": 2
    }
  ]"
}
```

| Key             | Value                                                                                                                                                                                                                            |
| --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| FeeId           | **integer**. The ID of the fee.                                                                                                                                                                                                  |
| OMSId           | **integer**. The ID the OMS.                                                                                                                                                                                                     |
| FeeTier         | **integer**. The tier of the fee, the same with the fee tier of the account.                                                                                                                                                     |
| AccountId       | **integer**. The ID of the account to which the fee will apply, 0 means it will apply to all accounts with the same fee tier.                                                                                                    |
| FeeAmt          | **decimal**. The actual fee amount if **FeeCalcType** is Flat. Otherwise if **Percentage**, this represents the percentage of the trade value.                                                                                   |
| FeeCalcType     | **string**. One of: **Flat**, **Percentage**.                                                                                                                                                                                    |
| FeeType         | **string**. One of: **Flat**, **MakerFee**, **TakerFee**, **PeggedProductFee**, **AffiliateFee**.                                                                                                                                |
| LadderThreshold | **decimal**. The ladder threshold of the fee.                                                                                                                                                                                    |
| LadderSeconds   | **integer**.                                                                                                                                                                                                                     |
| IsActive        | **boolean**. If true, means can apply to a trade, else it will not even if criteria are met.                                                                                                                                     |
| InstrumentId    | **integer**. The ID of the instrument to which the fee will apply.                                                                                                                                                               |
| OrderType       | **string**. The type of order where fee will only apply. One of: **Market**, **Limit**, **StopMarket**, **StopLimit**,**TrailingStopMarket**, **TrailingStopLimit**, **BlockTrade**, **Unknown**. Unknown means all order types. |
| PeggedProductId | **integer**. The ID of the pegged product if the FeeType is **PeggedProductFee**.                                                                                                                                                |

### GetOrderFee

**Permissions:** NotbankTrading\
**Call Type:** Synchronous

Gets an estimate of the transaction/trading fee for a specific order side, instrument, and order type.

The exchange generally deducts fees from the "receiving" side of the trade. There are two products in every trade (and in every instrument); for example, the instrument BTCUSD comprises a Bitcoin product and a US dollar product. Placing a buy order on the book causes fees to be deducted from Product 1, in this case, Bitcoin; placing a sell order causes fees to be deducted from Product 2, in this case, US dollar.

A user with NotbankTrading permission can get fee estimates for any account that the user is associated with and for any instrument or product that the account can trade.

If loyalty token is enabled and there is no market for the loyalty token, the system automatically uses 3rd party rates for the loyalty token market.

#### Request

{% tabs %}
{% tab title="Node" %}

```javascript
import Notbank from 'notbank'
// websocket connection code ...

await client.getFeeService().getOrderFee({
  AccountId: 9,
  InstrumentId: 1,
  Quantity: 0.5,
  Price: 10000,
  OrderType: 2,
  MakerTaker: "Maker",
  Side: 0
});

// parameters
{
  AccountId: number;
  InstrumentId: number;
  Quantity: number;
  Price: number;
  OrderType: OrderTypeInt;
  MakerTaker: MakerTaker;
  Side: TradeSide;
}
```

{% endtab %}

{% tab title="Java" %}

```java
import exchange.notbank.fee.paramBuilders.GetOrderFeeParamBuilder;
import exchange.notbank.fee.constants.IntOrderType;
import exchange.notbank.fee.constants.IntSide;
import exchange.notbank.fee.constants.MakerTaker;

var response = client.getFeeService()
    .getOrderFee(new GetOrderFeeParamBuilder(1, 1, new BigDecimal(0.5), new BigDecimal(1000), IntOrderType.LIMIT,
        MakerTaker.Maker, IntSide.Buy)).get();
```

{% endtab %}

{% tab title="Python" %}

```python
from notbank_python_sdk.requests_models import GetOrderFeeRequest
from notbank_python_sdk.constants import MakerTaker, OrderType, Side

response = client.get_order_fee(GetOrderFeeRequest(
    account_id=9,
    instrument_id=1,
    quantity=Decimal(0.5),
    price=Decimal(10000.0),
    order_type=OrderType.LIMIT,
    maker_taker=MakerTaker.MAKER,
    side=Side.BUY,
))
```

{% endtab %}

{% tab title="Json" %}

```json
{
  "m": 0,
  "i": 0,
  "n": "GetOrderFee",
  "o": "{
    \"OMSId\": 1,
    \"AccountId\": 9,
    \"InstrumentId\": 1,
    \"Quantity\": 0.5,
    \"Side\": 0,
    \"Price\": \"10000\",
    \"OrderType\": 2,
    \"MakerTaker\": \"Maker\"
  }"
}
```

{% endtab %}
{% endtabs %}

| Key          | Value                                                                                                                                                                                                                                                                                                                                                                                     |
| ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| OMSId        | **integer**. The ID of the OMS on which the trade would take place. **required**.                                                                                                                                                                                                                                                                                                         |
| AccountId    | **integer**. The ID of the account requesting the fee estimate. **required**.                                                                                                                                                                                                                                                                                                             |
| InstrumentId | **integer**. The ID of the instrument being or to be traded. **required**.                                                                                                                                                                                                                                                                                                                |
| Quantity     | **decimal**. The quantity or amount of the proposed trade for which the OMS would charge a fee. **required**.                                                                                                                                                                                                                                                                             |
| Price        | **decimal**. The price at which the proposed trade would take place. Supply your price for a limit order; the exact price is difficult to know before execution. **required**.                                                                                                                                                                                                            |
| OrderType    | <p><strong>integer</strong>. The type of the proposed order. One of:<br>- 0 Unknown<br>- 1 Market<br>- 2 Limit<br>- 3 StopMarket<br>- 4 StopLimit<br>- 5 TrailingStopMarket<br>- 6 TrailingStopLimit<br>- 7 BlockTrade<br><strong>required</strong>.</p>                                                                                                                                  |
| MakerTaker   | <p><strong>integer</strong>. Depending on the venue, there may be different fees for a maker (one who places the order on the books, either buy or sell) or taker (one who accepts the order, either buy or sell). If the user places a large order that is only partially filled, he is a partial maker. One of:<br>-0 Unknown<br>-1 Maker<br>-2 Taker<br><strong>required</strong>.</p> |
| Side         | <p><strong>integer</strong>. Side of the trade. It will decide at which product will the fee be donominated. In NotBank, the fee is charged in the incoming product by default. One of:<br>- 0 Buy<br>- 1 Sell<br>- 2 Short<br>- 3 Unknown<br><strong>required</strong>.</p>                                                                                                              |

#### Response

```json
{
  "m": 1,
  "i": 0,
  "n": "GetOrderFee",
  "o": "{
    \"OrderFee\": 0.00001,
    \"ProductId\": 2
  }"
}

```

| Key       | Value                                                                          |
| --------- | ------------------------------------------------------------------------------ |
| OrderFee  | **decimal**. The estimated fee for the trade as described.                     |
| ProductId | **integer**. The ID of the product (currency) in which the fee is denominated. |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.notbank.com/learn/api-reference/websocket-api/fee.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
