# Transaction Spending Limits Endpoints

## Get Transaction Spending Limit Response From Hex

<mark style="color:blue;">`GET`</mark> `/api/v0/get-transaction-spending-limit-response-from-hex/{transactionSpendingLimitHex}`

This endpoint converts a hex string representing a TransactionSpendingLimit object into a client-friendly [#transactionspendinglimitresponse](https://docs.deso.org/~/changes/fDLjGJdJathPNuf23Eol/deso-backend/api/..#transactionspendinglimitresponse "mention") object. This is mainly used by identity to parse the transaction spending limit from extra data of an [#authorize-derived-key](https://docs.deso.org/~/changes/fDLjGJdJathPNuf23Eol/construct-transactions/derived-keys-transaction-api#authorize-derived-key "mention") transaction to show the user the permissions they are granting to a derived key.

#### Path Parameters

| Name                                                          | Type   | Description                                        |
| ------------------------------------------------------------- | ------ | -------------------------------------------------- |
| transactionSpendingLimitHex<mark style="color:red;">\*</mark> | String | Hex string representing a TransactionSpendingLimit |

{% tabs %}
{% tab title="200: OK Successfully retrieved a TransactionSpendingLimitResponse from the provided hex" %}
{% tabs %}
{% tab title="Sample Response" %}

```json5
{
  <TransactionSpendingLimitResponse> // See the TransactionSpendingLimitResponse description in DataTypes for more details 
}
```

{% endtab %}

{% tab title="Response Field Descriptions" %}
...coming soon! See comments in sample response for descriptions for now.
{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="400: Bad Request " %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

## Get Transaction Spending Limit Hex String

<mark style="color:green;">`POST`</mark> `/api/v0/get-transaction-spending-limit-hex-string`

This endpoint converts a [#transactionspendinglimitresponse](https://docs.deso.org/~/changes/fDLjGJdJathPNuf23Eol/deso-backend/api/..#transactionspendinglimitresponse "mention") into a hex string. This is mainly used by identity to convert the object into the form needed to generate an access signature at the [#derive](https://docs.deso.org/~/changes/fDLjGJdJathPNuf23Eol/deso-identity/window-api/endpoints#derive "mention") endpoint.

#### Request Body

| Name                                                       | Type                             | Description                                                                                                                                                                                                 |
| ---------------------------------------------------------- | -------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| TransactionSpendingLimit<mark style="color:red;">\*</mark> | TransactionSpendingLimitResponse | The [#transactionspendinglimitresponse](https://docs.deso.org/~/changes/fDLjGJdJathPNuf23Eol/deso-backend/api/..#transactionspendinglimitresponse "mention") for which you wish to retrieve the hex string. |

{% tabs %}
{% tab title="200: OK Successfully retrieve the hex string for the provided TransactionSpendingLimitResponse object" %}
{% tabs %}
{% tab title="Sample Response" %}

```json5
{
  "HexString": "80d0dbc3f40202020a16010b210000000000000000000000000000000000000000000000000000000000000000000005210210ec74e153aa5c18167dc089030e922cbbfa439acb2051e3f1d4222a33ca417701858af9c3012102397b1a80eba0a60644650af13c2a6ffdfbbf38830cafc34937a75ddd44b8ce52010a2102397b1a80eba0a60644650af13c2a6ffdfbbf38830cafc34937a75ddd44b8ce52030221029380f3d890348085a22e07d8daad9f1f3706767bfdd59337641c4d3231046509010421029380f3d890348085a22e07d8daad9f1f3706767bfdd59337641c4d3231046509037b2102aa3dc8d299ea1e4914de66494ed3e16eda9a0d65719d523c1a9a03cbf9f60c4500032103f016bef71b72d07ececebc62af189da31c3fa0359d142d732c54c2e2c466915a00e4b0022103f016bef71b72d07ececebc62af189da31c3fa0359d142d732c54c2e2c466915a0198ce0b2103f016bef71b72d07ececebc62af189da31c3fa0359d142d732c54c2e2c466915a028ef0072103f016bef71b72d07ececebc62af189da31c3fa0359d142d732c54c2e2c466915a03904e042102397b1a80eba0a60644650af13c2a6ffdfbbf38830cafc34937a75ddd44b8ce5200022102397b1a80eba0a60644650af13c2a6ffdfbbf38830cafc34937a75ddd44b8ce52050a2102aa3dc8d299ea1e4914de66494ed3e16eda9a0d65719d523c1a9a03cbf9f60c4500022102aa3dc8d299ea1e4914de66494ed3e16eda9a0d65719d523c1a9a03cbf9f60c45050a0a200000000000000000000000000000000000000000000000000000000000000000000202200000000000000000000000000000000000000000000000000000000000000000000305203e42215a120a6e9d4848117f5829a2c4d9f692360fd14b78daea483a72d142dc000302203e42215a120a6e9d4848117f5829a2c4d9f692360fd14b78daea483a72d142dc010004203e42215a120a6e9d4848117f5829a2c4d9f692360fd14b78daea483a72d142dc020002203e42215a120a6e9d4848117f5829a2c4d9f692360fd14b78daea483a72d142dc03020a203e42215a120a6e9d4848117f5829a2c4d9f692360fd14b78daea483a72d142dc040102203e42215a120a6e9d4848117f5829a2c4d9f692360fd14b78daea483a72d142dc050003203e42215a120a6e9d4848117f5829a2c4d9f692360fd14b78daea483a72d142dc060402203e42215a120a6e9d4848117f5829a2c4d9f692360fd14b78daea483a72d142dc070603"
}
```

{% endtab %}

{% tab title="Response Field Descriptions" %}
...coming soon! See comments in sample response for descriptions for now.
{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="400: Bad Request " %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}


---

# 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.deso.org/~/changes/fDLjGJdJathPNuf23Eol/deso-backend/api/transaction-spending-limits-endpoints.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.
