> For the complete documentation index, see [llms.txt](https://docs.mayaprotocol.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mayaprotocol.com/archive/maya-integration-guide.md).

# Maya Integration Guide

A small guide to show what you would need to integrate Maya.

Maya Protocol can perform an action when a specific instruction is sent to Maya’s address for a particular chain.

If you want to swap BTC to KUJI, you send a BTC transaction to Maya’s vault for Bitcoin, along with the memo: e.g. `=:KUJI.KUJI:kujira1q6g84pxu4tpr26dwp39fdrrwtpcnak44sf0x7f`

This memo specifies the asset you want to swap to, and the destination address. You don’t have to manually look for these vaults, we have an endpoint, from which you can fetch the inbound vaults for Maya, and the memo’s you need. An example. You want to swap 0.001 BTC to KUJI. Your Kujira address is: `kujira1cd5kzygxfzylez8q4vak55pwj2z7a6hweat0zw`.

Entering this in the quoting endpoint: <https://mayanode.mayachain.info/mayachain/quote/swap?from_asset=BTC.BTC&to_asset=KUJI.KUJI&amount=100000&destination=kujira1cd5kzygxfzylez8q4vak55pwj2z7a6hweat0zw>

Gives:

```
{
  "expected_amount_out": "2352067700",
  "fees": {
    "affiliate": "0",
    "asset": "KUJI.KUJI",
    "outbound": "450000"
  },
  "inbound_address": "bc1q6u3d8780tytlrcrr69gj96gxhr9m24558lxee2",
  "inbound_confirmation_blocks": 1,
  "inbound_confirmation_seconds": 600,
  "memo": "=:KUJI.KUJI:kujira1cd5kzygxfzylez8q4vak55pwj2z7a6hweat0zw",
  "outbound_delay_blocks": 1,
  "outbound_delay_seconds": 3,
  "slippage_bps": 2
}
```

You find the expected amount of KUJI you’ll get in 1e8 (in this case 23.52 KUJI), the address (`inbound_address`) you need to send your BTC to, and the memo you need to attack to the BTC transaction. That is everything you need, to swap using Maya Protocol.

{% hint style="info" %}
You can add limits, affiliate fees and more to this endpoint as well.
{% endhint %}

You can find all available and active pools in the Pools endpoint: <https://mayanode.mayachain.info/mayachain/pools>.

Bitcoin is `BTC.BTC`, USK is `KUJI.USK` (KUJI is the chain, USK the asset).

Exceptions: It can happen that a chain is halted.

This can be checked by looking at the Mimir endpoint: <https://mayanode.mayachain.info/mayachain/mimir>

If `HALTBTCTRADING = 1`, trading is halted. Trading is not halted when the parameter is set to 0. Currently we have the following chains: `BTC`, `ETH`, `THOR`, `DASH` & `KUJI`.

You can find all endpoints here: <https://mayanode.mayachain.info/mayachain/doc> Hopefully this explains well how you can swap and integrate Maya’s cross-chain swaps! (edited)


---

# 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.mayaprotocol.com/archive/maya-integration-guide.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.
