> For the complete documentation index, see [llms.txt](https://docs.31third.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.31third.com/31third-api/swap/get-started.md).

# Get started

## Step 0: Get 31Third API key

Request an API key via <dev@31third.com>.&#x20;

## Step 1: Get an indicative price

Use `/swap/price` to fetch an indicative price.&#x20;

{% content-ref url="/pages/v3aBRgpDybwqxqbGV9GJ" %}
[price](/31third-api/swap/price.md)
{% endcontent-ref %}

You'll receive indicative information about:

* buy amount
* conversion price
* price impact estimation.

## Step 2: Get quote

Use `/swap/quote` to fetch a quote.&#x20;

{% content-ref url="/pages/sPTF07oV1zu47nqBZq1m" %}
[quote](/31third-api/swap/quote.md)
{% endcontent-ref %}

You'll receive information about:

* buy amount
* minimal buy amount
* conversion price
* guaranteed conversion price
* price impact
* maximal price impact
* **raw transaction**

## Step 3: Send transaction

The quote response contains a raw transaction.

```
RawTransaction {
  to: string;
  data: string;
  value: string;
  gasLimit?: string; // Not always present
  gasPrice?: string; // Not always present
}
```

This transaction can be broadcasted to execute the swap.

### Ethers.js example

The raw transaction can be passed into [ethers signer.sendTransaction](https://docs.ethers.org/v5/api/signer/#Signer-sendTransaction) as follows:

```typescript
signer.sendTransaction(rawTransaction);
```


---

# 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.31third.com/31third-api/swap/get-started.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.
