> For the complete documentation index, see [llms.txt](https://docs.expand.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.expand.network/integrations/synthetics/synthetix.md).

# Synthetix

### /getprice

Get the exchange amount in Protocol Tokens for entered Pegged Tokens.

<mark style="color:blue;">`GET`</mark> `https://api.expand.network/synthetic/getprice`

#### Query Parameters

| Name                                     | Type   | Description                                                             |
| ---------------------------------------- | ------ | ----------------------------------------------------------------------- |
| syntheticId                              | String | Refer to the [Synthetics IDs](/ids/synthetics-ids.md) page for details. |
| amount<mark style="color:red;">\*</mark> | String | Amount in Synths.                                                       |

{% tabs %}
{% tab title="Sample Request" %}

```url
https://api.expand.network/synthetic/getprice?amount=58798
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "peggedToProtocolToken": "22177"
    }
}
```

{% endtab %}
{% endtabs %}

### /depositpeggedtoken

Deposit pegged token.

<mark style="color:green;">`POST`</mark> `https://api.expand.network/synthetic/depositpeggedtoken`

#### Request Body

| Name                                     | Type   | Description                                                             |
| ---------------------------------------- | ------ | ----------------------------------------------------------------------- |
| syntheticId                              | String | Refer to the [Synthetics IDs](/ids/synthetics-ids.md) page for details. |
| amount<mark style="color:red;">\*</mark> | String | Amount of pegged token.                                                 |
| from<mark style="color:red;">\*</mark>   | String | Address of the sender of the token.                                     |
| gas                                      | String | Maximum gas limit provided by the sender, for the transaction.          |
| gasPriority                              | String | low, medium, or high.                                                   |

{% tabs %}
{% tab title="Sample Request" %}

```json
{
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",      
    "amount": "100000000000000000",
    "gas": "300000",
    "syntheticId": "6000"
}
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
        "value": "0",
        "gas": "300000",
        "data": "0xdc8fa6c2000000000000000000000000000000000000000000000000016345785d8a0000",
        "to": "0xE1f64079aDa6Ef07b03982Ca34f1dD7152AA3b86"
    }
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Sample Request" %}

#### With gasPriority:

```json
{
    "from": "0x731FDBd6871aD5cD905eE560A84615229eD8197a",
    "amount": "100000",
    "gas": "300000",
    "syntheticId": "6000",
    "gasPriority": "medium"
}
```

{% endtab %}

{% tab title="Sample Response" %}

#### With gasPriority:

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0x731FDBd6871aD5cD905eE560A84615229eD8197a",
        "value": "0",
        "gas": "300000",
        "data": "0xdc8fa6c200000000000000000000000000000000000000000000000000000000000186a0",
        "to": "0xE1f64079aDa6Ef07b03982Ca34f1dD7152AA3b86",
        "gasPrice": "17327449829"
    }
}
```

{% endtab %}
{% endtabs %}

### /withdrawpeggedtoken

Withdraw pegged token.

<mark style="color:green;">`POST`</mark> `https://api.expand.network/synthetic/withdrawpeggedtoken`

#### Request Body

| Name                                   | Type   | Description                                                             |
| -------------------------------------- | ------ | ----------------------------------------------------------------------- |
| syntheticId                            | String | Refer to the [Synthetics IDs](/ids/synthetics-ids.md) page for details. |
| from<mark style="color:red;">\*</mark> | String | Address of the owner of the token.                                      |
| gas                                    | String | Maximum gas to be approved for the transaction.                         |
| gasPriority                            | String | low, medium, or high.                                                   |

{% tabs %}
{% tab title="Sample Request" %}

```json
{
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "gas": "300000",
    "syntheticId": "6000"
}
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
        "value": "0",
        "gas": "300000",
        "data": "0x81b797dc",
        "to": "0xE1f64079aDa6Ef07b03982Ca34f1dD7152AA3b86"
    }
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Sample Request" %}

#### With gasPriority:

```json
{
    "from": "0x731FDBd6871aD5cD905eE560A84615229eD8197a",
    "gas": "300000",
    "syntheticId": "6000",
    "gasPriority": "medium"
}
```

{% endtab %}

{% tab title="Sample Response" %}

#### With gasPriority:

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0x731FDBd6871aD5cD905eE560A84615229eD8197a",
        "value": "0",
        "gas": "300000",
        "data": "0x81b797dc",
        "to": "0xE1f64079aDa6Ef07b03982Ca34f1dD7152AA3b86",
        "gasPrice": "16948048970"
    }
}
```

{% endtab %}
{% endtabs %}


---

# 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 dynamically by asking a question.

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

```
GET https://docs.expand.network/integrations/synthetics/synthetix.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
